From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 00:36:08 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 39ED1106566C; Sun, 1 Jul 2012 00:36:08 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 24B1F8FC08; Sun, 1 Jul 2012 00:36:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q610a7bt050630; Sun, 1 Jul 2012 00:36:07 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q610a7wc050629; Sun, 1 Jul 2012 00:36:07 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201207010036.q610a7wc050629@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Sun, 1 Jul 2012 00:36:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237860 - head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 00:36:08 -0000 Author: pfg Date: Sun Jul 1 00:36:07 2012 New Revision: 237860 URL: http://svn.freebsd.org/changeset/base/237860 Log: Import the dtrace llquantize test files from the vendor area. Now that we have an illumos vendor area, import the llquantize test files directly from there to make it easier to track the code provenance. Special thanks to Martin Matuska for populating the illumos vendor area. Requested by: obrien Replaced: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/ - copied from r237859, vendor/illumos/dist/cmd/dtrace/test/tst/common/llquantize/ From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 00:40:10 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 28CD7106564A; Sun, 1 Jul 2012 00:40:10 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E723B8FC18; Sun, 1 Jul 2012 00:40:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q610e9Q1050837; Sun, 1 Jul 2012 00:40:09 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q610e9DJ050835; Sun, 1 Jul 2012 00:40:09 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201207010040.q610e9DJ050835@svn.freebsd.org> From: Eitan Adler Date: Sun, 1 Jul 2012 00:40:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237861 - in stable/9: share/man/man4 sys/dev/hptrr X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 00:40:10 -0000 Author: eadler Date: Sun Jul 1 00:40:09 2012 New Revision: 237861 URL: http://svn.freebsd.org/changeset/base/237861 Log: MFC r237178: attach_generic causes missing devices in /dev when the driver interacts with some non-highpoint controollers. Change attach_generic to be off by default. PR: kern/168910 Approved by: cperciva (implicit) Modified: stable/9/share/man/man4/hptrr.4 stable/9/sys/dev/hptrr/hptrr_osm_bsd.c Directory Properties: stable/9/share/man/man4/ (props changed) stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/share/man/man4/hptrr.4 ============================================================================== --- stable/9/share/man/man4/hptrr.4 Sun Jul 1 00:36:07 2012 (r237860) +++ stable/9/share/man/man4/hptrr.4 Sun Jul 1 00:40:09 2012 (r237861) @@ -50,8 +50,8 @@ hptrr_load="YES" The following tunables are settable from the loader: .Bl -ohang .It Va hw.hptrr.attach_generic -set to 0 to deny driver attach to chips with generic Marvell (non-HighPoint) -PCI identification. These chips are also supported by ata(4). +set to 1 to permit driver attach to chips with generic Marvell (non-HighPoint) +PCI identification. These chips are also supported by ata(4) and mvs(4). Some vendors are using same chips, but without providing RAID BIOS. .El .Sh DESCRIPTION @@ -112,7 +112,8 @@ This driver supersedes the older rr232x .Xr ata 4 , .Xr cam 4 , .Xr hptmv 4 , -.Xr loader 8 +.Xr loader 8 , +.Xr mvs 4 .Sh HISTORY The .Nm Modified: stable/9/sys/dev/hptrr/hptrr_osm_bsd.c ============================================================================== --- stable/9/sys/dev/hptrr/hptrr_osm_bsd.c Sun Jul 1 00:36:07 2012 (r237860) +++ stable/9/sys/dev/hptrr/hptrr_osm_bsd.c Sun Jul 1 00:40:09 2012 (r237861) @@ -36,7 +36,7 @@ __FBSDID("$FreeBSD$"); #include #include -static int attach_generic = 1; +static int attach_generic = 0; TUNABLE_INT("hw.hptrr.attach_generic", &attach_generic); static int hpt_probe(device_t dev) From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 00:40:38 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 949A01065680; Sun, 1 Jul 2012 00:40:38 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6543F8FC16; Sun, 1 Jul 2012 00:40:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q610ec8K050888; Sun, 1 Jul 2012 00:40:38 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q610ecvG050885; Sun, 1 Jul 2012 00:40:38 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201207010040.q610ecvG050885@svn.freebsd.org> From: Eitan Adler Date: Sun, 1 Jul 2012 00:40: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: r237862 - in stable/8: share/man/man4 sys/dev/hptrr X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 00:40:38 -0000 Author: eadler Date: Sun Jul 1 00:40:37 2012 New Revision: 237862 URL: http://svn.freebsd.org/changeset/base/237862 Log: MFC r237178: attach_generic causes missing devices in /dev when the driver interacts with some non-highpoint controollers. Change attach_generic to be off by default. PR: kern/168910 Approved by: cperciva (implicit) Modified: stable/8/share/man/man4/hptrr.4 stable/8/sys/dev/hptrr/hptrr_osm_bsd.c Directory Properties: stable/8/share/man/man4/ (props changed) stable/8/sys/ (props changed) Modified: stable/8/share/man/man4/hptrr.4 ============================================================================== --- stable/8/share/man/man4/hptrr.4 Sun Jul 1 00:40:09 2012 (r237861) +++ stable/8/share/man/man4/hptrr.4 Sun Jul 1 00:40:37 2012 (r237862) @@ -50,8 +50,8 @@ hptrr_load="YES" The following tunables are settable from the loader: .Bl -ohang .It Va hw.hptrr.attach_generic -set to 0 to deny driver attach to chips with generic Marvell (non-HighPoint) -PCI identification. These chips are also supported by ata(4). +set to 1 to permit driver attach to chips with generic Marvell (non-HighPoint) +PCI identification. These chips are also supported by ata(4) and mvs(4). Some vendors are using same chips, but without providing RAID BIOS. .El .Sh DESCRIPTION @@ -112,7 +112,8 @@ This driver supersedes the older rr232x .Xr ata 4 , .Xr cam 4 , .Xr hptmv 4 , -.Xr loader 8 +.Xr loader 8 , +.Xr mvs 4 .Sh HISTORY The .Nm Modified: stable/8/sys/dev/hptrr/hptrr_osm_bsd.c ============================================================================== --- stable/8/sys/dev/hptrr/hptrr_osm_bsd.c Sun Jul 1 00:40:09 2012 (r237861) +++ stable/8/sys/dev/hptrr/hptrr_osm_bsd.c Sun Jul 1 00:40:37 2012 (r237862) @@ -36,7 +36,7 @@ __FBSDID("$FreeBSD$"); #include #include -static int attach_generic = 1; +static int attach_generic = 0; TUNABLE_INT("hw.hptrr.attach_generic", &attach_generic); static int hpt_probe(device_t dev) From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 00:40:56 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E53221065751; Sun, 1 Jul 2012 00:40:56 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CFC508FC08; Sun, 1 Jul 2012 00:40:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q610euas050934; Sun, 1 Jul 2012 00:40:56 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q610euna050931; Sun, 1 Jul 2012 00:40:56 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201207010040.q610euna050931@svn.freebsd.org> From: Eitan Adler Date: Sun, 1 Jul 2012 00:40: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: r237863 - in stable/7: share/man/man4 sys/dev/hptrr X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 00:40:57 -0000 Author: eadler Date: Sun Jul 1 00:40:56 2012 New Revision: 237863 URL: http://svn.freebsd.org/changeset/base/237863 Log: MFC r237178: attach_generic causes missing devices in /dev when the driver interacts with some non-highpoint controollers. Change attach_generic to be off by default. PR: kern/168910 Approved by: cperciva (implicit) Modified: stable/7/share/man/man4/hptrr.4 stable/7/sys/dev/hptrr/hptrr_osm_bsd.c Directory Properties: stable/7/share/man/man4/ (props changed) stable/7/sys/ (props changed) Modified: stable/7/share/man/man4/hptrr.4 ============================================================================== --- stable/7/share/man/man4/hptrr.4 Sun Jul 1 00:40:37 2012 (r237862) +++ stable/7/share/man/man4/hptrr.4 Sun Jul 1 00:40:56 2012 (r237863) @@ -50,8 +50,8 @@ hptrr_load="YES" The following tunables are settable from the loader: .Bl -ohang .It Va hw.hptrr.attach_generic -set to 0 to deny driver attach to chips with generic Marvell (non-HighPoint) -PCI identification. These chips are also supported by ata(4). +set to 1 to permit driver attach to chips with generic Marvell (non-HighPoint) +PCI identification. These chips are also supported by ata(4) and mvs(4). Some vendors are using same chips, but without providing RAID BIOS. .El .Sh DESCRIPTION @@ -112,7 +112,8 @@ This driver supersedes the older rr232x .Xr ata 4 , .Xr cam 4 , .Xr hptmv 4 , -.Xr loader 8 +.Xr loader 8 , +.Xr mvs 4 .Sh HISTORY The .Nm Modified: stable/7/sys/dev/hptrr/hptrr_osm_bsd.c ============================================================================== --- stable/7/sys/dev/hptrr/hptrr_osm_bsd.c Sun Jul 1 00:40:37 2012 (r237862) +++ stable/7/sys/dev/hptrr/hptrr_osm_bsd.c Sun Jul 1 00:40:56 2012 (r237863) @@ -34,7 +34,7 @@ #include #include -static int attach_generic = 1; +static int attach_generic = 0; TUNABLE_INT("hw.hptrr.attach_generic", &attach_generic); static int hpt_probe(device_t dev) From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 02:34:33 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0010A106566C; Sun, 1 Jul 2012 02:34:32 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DF7C38FC08; Sun, 1 Jul 2012 02:34:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q612YWG3058973; Sun, 1 Jul 2012 02:34:32 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q612YWd5058970; Sun, 1 Jul 2012 02:34:32 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201207010234.q612YWd5058970@svn.freebsd.org> From: Adrian Chadd Date: Sun, 1 Jul 2012 02:34:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237864 - in head/sys/dev/ath: . ath_hal X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 02:34:33 -0000 Author: adrian Date: Sun Jul 1 02:34:32 2012 New Revision: 237864 URL: http://svn.freebsd.org/changeset/base/237864 Log: Fix the HAL debugging to only use one bit to mark a message as unmaskable. Whilst I'm here, remove the duplication of the #define. Modified: head/sys/dev/ath/ah_osdep.c head/sys/dev/ath/ath_hal/ah_debug.h Modified: head/sys/dev/ath/ah_osdep.c ============================================================================== --- head/sys/dev/ath/ah_osdep.c Sun Jul 1 00:40:56 2012 (r237863) +++ head/sys/dev/ath/ah_osdep.c Sun Jul 1 02:34:32 2012 (r237864) @@ -47,6 +47,7 @@ #include /* XXX for ether_sprintf */ #include +#include /* * WiSoC boards overload the bus tag with information about the @@ -137,8 +138,6 @@ ath_hal_ether_sprintf(const u_int8_t *ma #ifdef AH_DEBUG -/* This must match the definition in ath_hal/ah_debug.h */ -#define HAL_DEBUG_UNMASKABLE 0xf0000000 void DO_HALDEBUG(struct ath_hal *ah, u_int mask, const char* fmt, ...) { Modified: head/sys/dev/ath/ath_hal/ah_debug.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah_debug.h Sun Jul 1 00:40:56 2012 (r237863) +++ head/sys/dev/ath/ath_hal/ah_debug.h Sun Jul 1 02:34:32 2012 (r237864) @@ -48,7 +48,7 @@ enum { HAL_DEBUG_DFS = 0x00200000, /* DFS debugging */ HAL_DEBUG_HANG = 0x00400000, /* BB/MAC hang debugging */ - HAL_DEBUG_UNMASKABLE = 0xf0000000, /* always printed */ + HAL_DEBUG_UNMASKABLE = 0x80000000, /* always printed */ HAL_DEBUG_ANY = 0xffffffff }; #endif /* _ATH_AH_DEBUG_H_ */ From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 02:37:05 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 88AE61065673; Sun, 1 Jul 2012 02:37:05 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 74B3B8FC17; Sun, 1 Jul 2012 02:37:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q612b5aF059243; Sun, 1 Jul 2012 02:37:05 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q612b5J5059241; Sun, 1 Jul 2012 02:37:05 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201207010237.q612b5J5059241@svn.freebsd.org> From: Adrian Chadd Date: Sun, 1 Jul 2012 02:37:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237865 - head/sys/dev/ath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 02:37:05 -0000 Author: adrian Date: Sun Jul 1 02:37:04 2012 New Revision: 237865 URL: http://svn.freebsd.org/changeset/base/237865 Log: Add OS_MEMCMP(). Modified: head/sys/dev/ath/ah_osdep.h Modified: head/sys/dev/ath/ah_osdep.h ============================================================================== --- head/sys/dev/ath/ah_osdep.h Sun Jul 1 02:34:32 2012 (r237864) +++ head/sys/dev/ath/ah_osdep.h Sun Jul 1 02:37:04 2012 (r237865) @@ -63,6 +63,7 @@ typedef bus_space_handle_t HAL_BUS_HANDL #define OS_INLINE __inline #define OS_MEMZERO(_a, _n) bzero((_a), (_n)) #define OS_MEMCPY(_d, _s, _n) memcpy(_d,_s,_n) +#define OS_MEMCMP(_a, _b, _l) memcmp((_a), (_b), (_l)) #define abs(_a) __builtin_abs(_a) From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 02:44:37 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A5BE6106566C; Sun, 1 Jul 2012 02:44:37 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 907898FC08; Sun, 1 Jul 2012 02:44:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q612ibmI059948; Sun, 1 Jul 2012 02:44:37 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q612ibs0059946; Sun, 1 Jul 2012 02:44:37 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201207010244.q612ibs0059946@svn.freebsd.org> From: Adrian Chadd Date: Sun, 1 Jul 2012 02:44:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237866 - head/sys/dev/ath/ath_hal X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 02:44:37 -0000 Author: adrian Date: Sun Jul 1 02:44:36 2012 New Revision: 237866 URL: http://svn.freebsd.org/changeset/base/237866 Log: Bring over capabilities for the AR9300 and later HAL. Modified: head/sys/dev/ath/ath_hal/ah_internal.h Modified: head/sys/dev/ath/ath_hal/ah_internal.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah_internal.h Sun Jul 1 02:37:04 2012 (r237865) +++ head/sys/dev/ath/ath_hal/ah_internal.h Sun Jul 1 02:44:36 2012 (r237866) @@ -212,10 +212,24 @@ typedef struct { halBssidMatchSupport : 1, hal4kbSplitTransSupport : 1, halHasRxSelfLinkedTail : 1, - halSupportsFastClock5GHz : 1, /* Hardware supports 5ghz fast clock; check eeprom/channel before using */ + halSupportsFastClock5GHz : 1, halHasLongRxDescTsf : 1, halHasBBReadWar : 1, - halSerialiseRegWar : 1; + halSerialiseRegWar : 1, + halMciSupport : 1, + halRxTxAbortSupport : 1, + halPaprdEnabled : 1, + halHasUapsdSupport : 1, + halWpsPushButtonSupport : 1, + halBtCoexApsmWar : 1, + halGenTimerSupport : 1, + halLDPCSupport : 1, + halHwBeaconProcSupport : 1, + halEnhancedDmaSupport : 1; + uint32_t halIsrRacSupport : 1, + halApmEnable : 1, + halIntrMitigation : 1; + uint32_t halWirelessModes; uint16_t halTotalQueues; uint16_t halKeyCacheSize; @@ -231,6 +245,13 @@ typedef struct { uint32_t halIntrMask; uint8_t halTxStreams; uint8_t halRxStreams; + + int halNumTxMaps; + int halTxDescLen; + int halTxStatusLen; + int halRxStatusLen; + int halRxHpFifoDepth; + int halRxLpFifoDepth; } HAL_CAPABILITIES; struct regDomain; From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 03:15:19 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 18F02106564A; Sun, 1 Jul 2012 03:15:19 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D71648FC12; Sun, 1 Jul 2012 03:15:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q613FIcG062070; Sun, 1 Jul 2012 03:15:18 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q613FII3062067; Sun, 1 Jul 2012 03:15:18 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201207010315.q613FII3062067@svn.freebsd.org> From: Adrian Chadd Date: Sun, 1 Jul 2012 03:15:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237868 - in head/sys/dev/ath/ath_hal: . ar5416 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 03:15:19 -0000 Author: adrian Date: Sun Jul 1 03:15:18 2012 New Revision: 237868 URL: http://svn.freebsd.org/changeset/base/237868 Log: Migrate the MAC/BB hang structures out from ar5416_misc.h into the HAL. The ar9300 HAL also uses these types, so it makes no sense to duplicate them. Modified: head/sys/dev/ath/ath_hal/ah_internal.h head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Modified: head/sys/dev/ath/ath_hal/ah_internal.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah_internal.h Sun Jul 1 02:57:30 2012 (r237867) +++ head/sys/dev/ath/ath_hal/ah_internal.h Sun Jul 1 03:15:18 2012 (r237868) @@ -649,6 +649,46 @@ extern HAL_BOOL ath_hal_setcapability(st /* The diagnostic codes used to be internally defined here -adrian */ #include "ah_diagcodes.h" +/* + * The AR5416 and later HALs have MAC and baseband hang checking. + */ +typedef struct { + uint32_t hang_reg_offset; + uint32_t hang_val; + uint32_t hang_mask; + uint32_t hang_offset; +} hal_hw_hang_check_t; + +typedef struct { + uint32_t dma_dbg_3; + uint32_t dma_dbg_4; + uint32_t dma_dbg_5; + uint32_t dma_dbg_6; +} mac_dbg_regs_t; + +typedef enum { + dcu_chain_state = 0x1, + dcu_complete_state = 0x2, + qcu_state = 0x4, + qcu_fsp_ok = 0x8, + qcu_fsp_state = 0x10, + qcu_stitch_state = 0x20, + qcu_fetch_state = 0x40, + qcu_complete_state = 0x80 +} hal_mac_hangs_t; + +typedef struct { + int states; + uint8_t dcu_chain_state; + uint8_t dcu_complete_state; + uint8_t qcu_state; + uint8_t qcu_fsp_ok; + uint8_t qcu_fsp_state; + uint8_t qcu_stitch_state; + uint8_t qcu_fetch_state; + uint8_t qcu_complete_state; +} hal_mac_hang_check_t; + enum { HAL_BB_HANG_DFS = 0x0001, HAL_BB_HANG_RIFS = 0x0002, Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Sun Jul 1 02:57:30 2012 (r237867) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Sun Jul 1 03:15:18 2012 (r237868) @@ -493,36 +493,6 @@ ar5416GetDiagState(struct ath_hal *ah, i args, argsize, result, resultsize); } -typedef struct { - uint32_t dma_dbg_3; - uint32_t dma_dbg_4; - uint32_t dma_dbg_5; - uint32_t dma_dbg_6; -} mac_dbg_regs_t; - -typedef enum { - dcu_chain_state = 0x1, - dcu_complete_state = 0x2, - qcu_state = 0x4, - qcu_fsp_ok = 0x8, - qcu_fsp_state = 0x10, - qcu_stitch_state = 0x20, - qcu_fetch_state = 0x40, - qcu_complete_state = 0x80 -} hal_mac_hangs_t; - -typedef struct { - int states; - uint8_t dcu_chain_state; - uint8_t dcu_complete_state; - uint8_t qcu_state; - uint8_t qcu_fsp_ok; - uint8_t qcu_fsp_state; - uint8_t qcu_stitch_state; - uint8_t qcu_fetch_state; - uint8_t qcu_complete_state; -} hal_mac_hang_check_t; - HAL_BOOL ar5416SetRifsDelay(struct ath_hal *ah, const struct ieee80211_channel *chan, HAL_BOOL enable) From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 04:15:15 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 055E7106566C; Sun, 1 Jul 2012 04:15:15 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E01BD8FC0A; Sun, 1 Jul 2012 04:15:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q614FEuo064781; Sun, 1 Jul 2012 04:15:14 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q614FEEr064770; Sun, 1 Jul 2012 04:15:14 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201207010415.q614FEEr064770@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Sun, 1 Jul 2012 04:15:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237870 - in stable/9: cddl/contrib/opensolaris/lib/libdtrace/common sys/cddl/contrib/opensolaris/uts/common/dtrace sys/cddl/contrib/opensolaris/uts/common/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 04:15:15 -0000 Author: pfg Date: Sun Jul 1 04:15:14 2012 New Revision: 237870 URL: http://svn.freebsd.org/changeset/base/237870 Log: MFC r237624, r237714, r237716, r237860: Bring llquantize support into Dtrace. Bryan Cantrill implemented the equivalent of semi-log graph paper for Dtrace so llquantize will use one logarithmic and one linear scale. Added: - copied from r237868, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/ Directory Properties: stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/ (props changed) Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_aggregate.c stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_errtags.h stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_printf.c stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dtrace.h stable/9/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c stable/9/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h Directory Properties: stable/9/cddl/ (props changed) stable/9/cddl/contrib/opensolaris/ (props changed) stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_aggregate.c ============================================================================== --- stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_aggregate.c Sun Jul 1 04:09:42 2012 (r237869) +++ stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_aggregate.c Sun Jul 1 04:15:14 2012 (r237870) @@ -24,7 +24,9 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" +/* + * Copyright (c) 2011, Joyent, Inc. All rights reserved. + */ #include #include @@ -209,6 +211,83 @@ dt_aggregate_lquantizedcmp(int64_t *lhs, return (0); } +static void +dt_aggregate_llquantize(int64_t *existing, int64_t *new, size_t size) +{ + int i; + + for (i = 1; i < size / sizeof (int64_t); i++) + existing[i] = existing[i] + new[i]; +} + +static long double +dt_aggregate_llquantizedsum(int64_t *llquanta) +{ + int64_t arg = *llquanta++; + uint16_t factor = DTRACE_LLQUANTIZE_FACTOR(arg); + uint16_t low = DTRACE_LLQUANTIZE_LOW(arg); + uint16_t high = DTRACE_LLQUANTIZE_HIGH(arg); + uint16_t nsteps = DTRACE_LLQUANTIZE_NSTEP(arg); + int bin = 0, order; + int64_t value = 1, next, step; + long double total; + + assert(nsteps >= factor); + assert(nsteps % factor == 0); + + for (order = 0; order < low; order++) + value *= factor; + + total = (long double)llquanta[bin++] * (long double)(value - 1); + + next = value * factor; + step = next > nsteps ? next / nsteps : 1; + + while (order <= high) { + assert(value < next); + total += (long double)llquanta[bin++] * (long double)(value); + + if ((value += step) != next) + continue; + + next = value * factor; + step = next > nsteps ? next / nsteps : 1; + order++; + } + + return (total + (long double)llquanta[bin] * (long double)value); +} + +static int +dt_aggregate_llquantizedcmp(int64_t *lhs, int64_t *rhs) +{ + long double lsum = dt_aggregate_llquantizedsum(lhs); + long double rsum = dt_aggregate_llquantizedsum(rhs); + int64_t lzero, rzero; + + if (lsum < rsum) + return (DT_LESSTHAN); + + if (lsum > rsum) + return (DT_GREATERTHAN); + + /* + * If they're both equal, then we will compare based on the weights at + * zero. If the weights at zero are equal, then this will be judged a + * tie and will be resolved based on the key comparison. + */ + lzero = lhs[1]; + rzero = rhs[1]; + + if (lzero < rzero) + return (DT_LESSTHAN); + + if (lzero > rzero) + return (DT_GREATERTHAN); + + return (0); +} + static int dt_aggregate_quantizedcmp(int64_t *lhs, int64_t *rhs) { @@ -592,6 +671,10 @@ hashnext: h->dtahe_aggregate = dt_aggregate_lquantize; break; + case DTRACEAGG_LLQUANTIZE: + h->dtahe_aggregate = dt_aggregate_llquantize; + break; + case DTRACEAGG_COUNT: case DTRACEAGG_SUM: case DTRACEAGG_AVG: @@ -859,6 +942,10 @@ dt_aggregate_valcmp(const void *lhs, con rval = dt_aggregate_lquantizedcmp(laddr, raddr); break; + case DTRACEAGG_LLQUANTIZE: + rval = dt_aggregate_llquantizedcmp(laddr, raddr); + break; + case DTRACEAGG_COUNT: case DTRACEAGG_SUM: case DTRACEAGG_MIN: Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c ============================================================================== --- stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c Sun Jul 1 04:09:42 2012 (r237869) +++ stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c Sun Jul 1 04:15:14 2012 (r237870) @@ -82,6 +82,7 @@ #include #include +#include #include #include @@ -1369,6 +1370,146 @@ dt_compile_agg(dtrace_hdl_t *dtp, dt_nod argmax = 5; } + if (fid->di_id == DTRACEAGG_LLQUANTIZE) { + /* + * For log/linear quantizations, we have between one and five + * arguments in addition to the expression: + * + * arg1 => Factor + * arg2 => Low magnitude + * arg3 => High magnitude + * arg4 => Number of steps per magnitude + * arg5 => Quantization increment value (defaults to 1) + */ + dt_node_t *llarg = dnp->dn_aggfun->dn_args->dn_list; + uint64_t oarg, order, v; + dt_idsig_t *isp; + int i; + + struct { + char *str; /* string identifier */ + int badtype; /* error on bad type */ + int badval; /* error on bad value */ + int mismatch; /* error on bad match */ + int shift; /* shift value */ + uint16_t value; /* value itself */ + } args[] = { + { "factor", D_LLQUANT_FACTORTYPE, + D_LLQUANT_FACTORVAL, D_LLQUANT_FACTORMATCH, + DTRACE_LLQUANTIZE_FACTORSHIFT }, + { "low magnitude", D_LLQUANT_LOWTYPE, + D_LLQUANT_LOWVAL, D_LLQUANT_LOWMATCH, + DTRACE_LLQUANTIZE_LOWSHIFT }, + { "high magnitude", D_LLQUANT_HIGHTYPE, + D_LLQUANT_HIGHVAL, D_LLQUANT_HIGHMATCH, + DTRACE_LLQUANTIZE_HIGHSHIFT }, + { "linear steps per magnitude", D_LLQUANT_NSTEPTYPE, + D_LLQUANT_NSTEPVAL, D_LLQUANT_NSTEPMATCH, + DTRACE_LLQUANTIZE_NSTEPSHIFT }, + { NULL } + }; + + assert(arg == 0); + + for (i = 0; args[i].str != NULL; i++) { + if (llarg->dn_kind != DT_NODE_INT) { + dnerror(llarg, args[i].badtype, "llquantize( ) " + "argument #%d (%s) must be an " + "integer constant\n", i + 1, args[i].str); + } + + if ((uint64_t)llarg->dn_value > UINT16_MAX) { + dnerror(llarg, args[i].badval, "llquantize( ) " + "argument #%d (%s) must be an unsigned " + "16-bit quantity\n", i + 1, args[i].str); + } + + args[i].value = (uint16_t)llarg->dn_value; + + assert(!(arg & ((uint64_t)UINT16_MAX << + args[i].shift))); + arg |= ((uint64_t)args[i].value << args[i].shift); + llarg = llarg->dn_list; + } + + assert(arg != 0); + + if (args[0].value < 2) { + dnerror(dnp, D_LLQUANT_FACTORSMALL, "llquantize( ) " + "factor (argument #1) must be two or more\n"); + } + + if (args[1].value >= args[2].value) { + dnerror(dnp, D_LLQUANT_MAGRANGE, "llquantize( ) " + "high magnitude (argument #3) must be greater " + "than low magnitude (argument #2)\n"); + } + + if (args[3].value < args[0].value) { + dnerror(dnp, D_LLQUANT_FACTORNSTEPS, "llquantize( ) " + "factor (argument #1) must be less than or " + "equal to the number of linear steps per " + "magnitude (argument #4)\n"); + } + + for (v = args[0].value; v < args[3].value; v *= args[0].value) + continue; + + if ((args[3].value % args[0].value) || (v % args[3].value)) { + dnerror(dnp, D_LLQUANT_FACTOREVEN, "llquantize( ) " + "factor (argument #1) must evenly divide the " + "number of steps per magnitude (argument #4), " + "and the number of steps per magnitude must evenly " + "divide a power of the factor\n"); + } + + for (i = 0, order = 1; i < args[2].value; i++) { + if (order * args[0].value > order) { + order *= args[0].value; + continue; + } + + dnerror(dnp, D_LLQUANT_MAGTOOBIG, "llquantize( ) " + "factor (%d) raised to power of high magnitude " + "(%d) overflows 64-bits\n", args[0].value, + args[2].value); + } + + isp = (dt_idsig_t *)aid->di_data; + + if (isp->dis_auxinfo == 0) { + /* + * This is the first time we've seen an llquantize() + * for this aggregation; we'll store our argument + * as the auxiliary signature information. + */ + isp->dis_auxinfo = arg; + } else if ((oarg = isp->dis_auxinfo) != arg) { + /* + * If we have seen this llquantize() before and the + * argument doesn't match the original argument, pick + * the original argument apart to concisely report the + * mismatch. + */ + int expected = 0, found = 0; + + for (i = 0; expected == found; i++) { + assert(args[i].str != NULL); + + expected = (oarg >> args[i].shift) & UINT16_MAX; + found = (arg >> args[i].shift) & UINT16_MAX; + } + + dnerror(dnp, args[i - 1].mismatch, "llquantize( ) " + "%s (argument #%d) doesn't match previous " + "declaration: expected %d, found %d\n", + args[i - 1].str, i, expected, found); + } + + incr = llarg; + argmax = 6; + } + if (fid->di_id == DTRACEAGG_QUANTIZE) { incr = dnp->dn_aggfun->dn_args->dn_list; argmax = 2; Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c ============================================================================== --- stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c Sun Jul 1 04:09:42 2012 (r237869) +++ stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c Sun Jul 1 04:15:14 2012 (r237870) @@ -23,6 +23,10 @@ * Use is subject to license terms. */ +/* + * Copyright (c) 2011, Joyent, Inc. All rights reserved. + */ + #include #include #include @@ -686,6 +690,121 @@ dt_print_lquantize(dtrace_hdl_t *dtp, FI return (0); } +int +dt_print_llquantize(dtrace_hdl_t *dtp, FILE *fp, const void *addr, + size_t size, uint64_t normal) +{ + int i, first_bin, last_bin, bin = 1, order, levels; + uint16_t factor, low, high, nsteps; + const int64_t *data = addr; + int64_t value = 1, next, step; + char positives = 0, negatives = 0; + long double total = 0; + uint64_t arg; + char c[32]; + + if (size < sizeof (uint64_t)) + return (dt_set_errno(dtp, EDT_DMISMATCH)); + + arg = *data++; + size -= sizeof (uint64_t); + + factor = DTRACE_LLQUANTIZE_FACTOR(arg); + low = DTRACE_LLQUANTIZE_LOW(arg); + high = DTRACE_LLQUANTIZE_HIGH(arg); + nsteps = DTRACE_LLQUANTIZE_NSTEP(arg); + + /* + * We don't expect to be handed invalid llquantize() parameters here, + * but sanity check them (to a degree) nonetheless. + */ + if (size > INT32_MAX || factor < 2 || low >= high || + nsteps == 0 || factor > nsteps) + return (dt_set_errno(dtp, EDT_DMISMATCH)); + + levels = (int)size / sizeof (uint64_t); + + first_bin = 0; + last_bin = levels - 1; + + while (first_bin < levels && data[first_bin] == 0) + first_bin++; + + if (first_bin == levels) { + first_bin = 0; + last_bin = 1; + } else { + if (first_bin > 0) + first_bin--; + + while (last_bin > 0 && data[last_bin] == 0) + last_bin--; + + if (last_bin < levels - 1) + last_bin++; + } + + for (i = first_bin; i <= last_bin; i++) { + positives |= (data[i] > 0); + negatives |= (data[i] < 0); + total += dt_fabsl((long double)data[i]); + } + + if (dt_printf(dtp, fp, "\n%16s %41s %-9s\n", "value", + "------------- Distribution -------------", "count") < 0) + return (-1); + + for (order = 0; order < low; order++) + value *= factor; + + next = value * factor; + step = next > nsteps ? next / nsteps : 1; + + if (first_bin == 0) { + (void) snprintf(c, sizeof (c), "< %lld", (long long)value); + + if (dt_printf(dtp, fp, "%16s ", c) < 0) + return (-1); + + if (dt_print_quantline(dtp, fp, data[0], normal, + total, positives, negatives) < 0) + return (-1); + } + + while (order <= high) { + if (bin >= first_bin && bin <= last_bin) { + if (dt_printf(dtp, fp, "%16lld ", (long long)value) < 0) + return (-1); + + if (dt_print_quantline(dtp, fp, data[bin], + normal, total, positives, negatives) < 0) + return (-1); + } + + assert(value < next); + bin++; + + if ((value += step) != next) + continue; + + next = value * factor; + step = next > nsteps ? next / nsteps : 1; + order++; + } + + if (last_bin < bin) + return (0); + + assert(last_bin == bin); + (void) snprintf(c, sizeof (c), ">= %lld", value); + + if (dt_printf(dtp, fp, "%16s ", c) < 0) + return (-1); + + return (dt_print_quantline(dtp, fp, data[bin], normal, + total, positives, negatives)); +} + /*ARGSUSED*/ static int dt_print_average(dtrace_hdl_t *dtp, FILE *fp, caddr_t addr, @@ -1711,6 +1830,9 @@ dt_print_datum(dtrace_hdl_t *dtp, FILE * case DTRACEAGG_LQUANTIZE: return (dt_print_lquantize(dtp, fp, addr, size, normal)); + case DTRACEAGG_LLQUANTIZE: + return (dt_print_llquantize(dtp, fp, addr, size, normal)); + case DTRACEAGG_AVG: return (dt_print_average(dtp, fp, addr, size, normal)); Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_errtags.h ============================================================================== --- stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_errtags.h Sun Jul 1 04:09:42 2012 (r237869) +++ stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_errtags.h Sun Jul 1 04:15:14 2012 (r237870) @@ -236,6 +236,23 @@ typedef enum { D_LQUANT_MATCHBASE, /* lquantize() mismatch on base */ D_LQUANT_MATCHLIM, /* lquantize() mismatch on limit */ D_LQUANT_MATCHSTEP, /* lquantize() mismatch on step */ + D_LLQUANT_FACTORTYPE, /* llquantize() bad magnitude type */ + D_LLQUANT_FACTORVAL, /* llquantize() bad magnitude value */ + D_LLQUANT_FACTORMATCH, /* llquantize() mismatch on magnitude */ + D_LLQUANT_LOWTYPE, /* llquantize() bad low mag type */ + D_LLQUANT_LOWVAL, /* llquantize() bad low mag value */ + D_LLQUANT_LOWMATCH, /* llquantize() mismatch on low mag */ + D_LLQUANT_HIGHTYPE, /* llquantize() bad high mag type */ + D_LLQUANT_HIGHVAL, /* llquantize() bad high mag value */ + D_LLQUANT_HIGHMATCH, /* llquantize() mismatch on high mag */ + D_LLQUANT_NSTEPTYPE, /* llquantize() bad # steps type */ + D_LLQUANT_NSTEPVAL, /* llquantize() bad # steps value */ + D_LLQUANT_NSTEPMATCH, /* llquantize() mismatch on # steps */ + D_LLQUANT_MAGRANGE, /* llquantize() bad magnitude range */ + D_LLQUANT_FACTORNSTEPS, /* llquantize() # steps < factor */ + D_LLQUANT_FACTOREVEN, /* llquantize() bad # steps/factor */ + D_LLQUANT_FACTORSMALL, /* llquantize() magnitude too small */ + D_LLQUANT_MAGTOOBIG, /* llquantize() high mag too large */ D_PRINTM_ADDR, /* printm() memref bad type */ D_PRINTM_SIZE, /* printm() size bad type */ D_PRINTT_ADDR, /* printt() typeref bad type */ Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h ============================================================================== --- stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h Sun Jul 1 04:09:42 2012 (r237869) +++ stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h Sun Jul 1 04:15:14 2012 (r237870) @@ -24,6 +24,10 @@ * Use is subject to license terms. */ +/* + * Copyright (c) 2011, Joyent, Inc. All rights reserved. + */ + #ifndef _DT_IMPL_H #define _DT_IMPL_H @@ -641,6 +645,8 @@ extern int dt_print_quantize(dtrace_hdl_ const void *, size_t, uint64_t); extern int dt_print_lquantize(dtrace_hdl_t *, FILE *, const void *, size_t, uint64_t); +extern int dt_print_llquantize(dtrace_hdl_t *, FILE *, + const void *, size_t, uint64_t); extern int dt_print_agg(const dtrace_aggdata_t *, void *); extern int dt_handle(dtrace_hdl_t *, dtrace_probedata_t *); Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c ============================================================================== --- stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c Sun Jul 1 04:09:42 2012 (r237869) +++ stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c Sun Jul 1 04:15:14 2012 (r237870) @@ -21,6 +21,7 @@ /* * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, Joyent, Inc. All rights reserved. */ #include @@ -114,8 +115,9 @@ #define DT_VERS_1_6_1 DT_VERSION_NUMBER(1, 6, 1) #define DT_VERS_1_6_2 DT_VERSION_NUMBER(1, 6, 2) #define DT_VERS_1_6_3 DT_VERSION_NUMBER(1, 6, 3) -#define DT_VERS_LATEST DT_VERS_1_6_3 -#define DT_VERS_STRING "Sun D 1.6.3" +#define DT_VERS_1_7 DT_VERSION_NUMBER(1, 7, 0) +#define DT_VERS_LATEST DT_VERS_1_7 +#define DT_VERS_STRING "Sun D 1.7" const dt_version_t _dtrace_versions[] = { DT_VERS_1_0, /* D API 1.0.0 (PSARC 2001/466) Solaris 10 FCS */ @@ -131,6 +133,7 @@ const dt_version_t _dtrace_versions[] = DT_VERS_1_6_1, /* D API 1.6.1 */ DT_VERS_1_6_2, /* D API 1.6.2 */ DT_VERS_1_6_3, /* D API 1.6.3 */ + DT_VERS_1_7, /* D API 1.7 */ 0 }; @@ -287,6 +290,9 @@ static const dt_ident_t _dtrace_globals[ &dt_idops_func, "stack(...)" }, { "lltostr", DT_IDENT_FUNC, 0, DIF_SUBR_LLTOSTR, DT_ATTR_STABCMN, DT_VERS_1_0, &dt_idops_func, "string(int64_t)" }, +{ "llquantize", DT_IDENT_AGGFUNC, 0, DTRACEAGG_LLQUANTIZE, DT_ATTR_STABCMN, + DT_VERS_1_7, &dt_idops_func, + "void(@, int32_t, int32_t, int32_t, int32_t, ...)" }, { "lquantize", DT_IDENT_AGGFUNC, 0, DTRACEAGG_LQUANTIZE, DT_ATTR_STABCMN, DT_VERS_1_0, &dt_idops_func, "void(@, int32_t, int32_t, ...)" }, Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_printf.c ============================================================================== --- stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_printf.c Sun Jul 1 04:09:42 2012 (r237869) +++ stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_printf.c Sun Jul 1 04:15:14 2012 (r237870) @@ -21,6 +21,7 @@ /* * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, Joyent, Inc. All rights reserved. */ #if defined(sun) @@ -1322,6 +1323,14 @@ pfprint_lquantize(dtrace_hdl_t *dtp, FIL return (dt_print_lquantize(dtp, fp, addr, size, normal)); } +/*ARGSUSED*/ +static int +pfprint_llquantize(dtrace_hdl_t *dtp, FILE *fp, const char *format, + const dt_pfargd_t *pfd, const void *addr, size_t size, uint64_t normal) +{ + return (dt_print_llquantize(dtp, fp, addr, size, normal)); +} + static int dt_printf_format(dtrace_hdl_t *dtp, FILE *fp, const dt_pfargv_t *pfv, const dtrace_recdesc_t *recs, uint_t nrecs, const void *buf, @@ -1507,6 +1516,9 @@ dt_printf_format(dtrace_hdl_t *dtp, FILE case DTRACEAGG_LQUANTIZE: func = pfprint_lquantize; break; + case DTRACEAGG_LLQUANTIZE: + func = pfprint_llquantize; + break; case DTRACEACT_MOD: func = pfprint_mod; break; Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dtrace.h ============================================================================== --- stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dtrace.h Sun Jul 1 04:09:42 2012 (r237869) +++ stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dtrace.h Sun Jul 1 04:15:14 2012 (r237870) @@ -24,11 +24,13 @@ * Use is subject to license terms. */ +/* + * Copyright (c) 2011, Joyent, Inc. All rights reserved. + */ + #ifndef _DTRACE_H #define _DTRACE_H -#pragma ident "%Z%%M% %I% %E% SMI" - #include #include #include Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Sun Jul 1 04:09:42 2012 (r237869) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Sun Jul 1 04:15:14 2012 (r237870) @@ -1913,6 +1913,75 @@ dtrace_aggregate_lquantize(uint64_t *lqu lquanta[levels + 1] += incr; } +static int +dtrace_aggregate_llquantize_bucket(uint16_t factor, uint16_t low, + uint16_t high, uint16_t nsteps, int64_t value) +{ + int64_t this = 1, last, next; + int base = 1, order; + + ASSERT(factor <= nsteps); + ASSERT(nsteps % factor == 0); + + for (order = 0; order < low; order++) + this *= factor; + + /* + * If our value is less than our factor taken to the power of the + * low order of magnitude, it goes into the zeroth bucket. + */ + if (value < (last = this)) + return (0); + + for (this *= factor; order <= high; order++) { + int nbuckets = this > nsteps ? nsteps : this; + + if ((next = this * factor) < this) { + /* + * We should not generally get log/linear quantizations + * with a high magnitude that allows 64-bits to + * overflow, but we nonetheless protect against this + * by explicitly checking for overflow, and clamping + * our value accordingly. + */ + value = this - 1; + } + + if (value < this) { + /* + * If our value lies within this order of magnitude, + * determine its position by taking the offset within + * the order of magnitude, dividing by the bucket + * width, and adding to our (accumulated) base. + */ + return (base + (value - last) / (this / nbuckets)); + } + + base += nbuckets - (nbuckets / factor); + last = this; + this = next; + } + + /* + * Our value is greater than or equal to our factor taken to the + * power of one plus the high magnitude -- return the top bucket. + */ + return (base); +} + +static void +dtrace_aggregate_llquantize(uint64_t *llquanta, uint64_t nval, uint64_t incr) +{ + uint64_t arg = *llquanta++; + uint16_t factor = DTRACE_LLQUANTIZE_FACTOR(arg); + uint16_t low = DTRACE_LLQUANTIZE_LOW(arg); + uint16_t high = DTRACE_LLQUANTIZE_HIGH(arg); + uint16_t nsteps = DTRACE_LLQUANTIZE_NSTEP(arg); + + llquanta[dtrace_aggregate_llquantize_bucket(factor, + low, high, nsteps, nval)] += incr; +} + /*ARGSUSED*/ static void dtrace_aggregate_avg(uint64_t *data, uint64_t nval, uint64_t arg) @@ -9853,6 +9922,35 @@ dtrace_ecb_aggregation_create(dtrace_ecb break; } + case DTRACEAGG_LLQUANTIZE: { + uint16_t factor = DTRACE_LLQUANTIZE_FACTOR(desc->dtad_arg); + uint16_t low = DTRACE_LLQUANTIZE_LOW(desc->dtad_arg); + uint16_t high = DTRACE_LLQUANTIZE_HIGH(desc->dtad_arg); + uint16_t nsteps = DTRACE_LLQUANTIZE_NSTEP(desc->dtad_arg); + int64_t v; + + agg->dtag_initial = desc->dtad_arg; + agg->dtag_aggregate = dtrace_aggregate_llquantize; + + if (factor < 2 || low >= high || nsteps < factor) + goto err; + + /* + * Now check that the number of steps evenly divides a power + * of the factor. (This assures both integer bucket size and + * linearity within each magnitude.) + */ + for (v = factor; v < nsteps; v *= factor) + continue; + + if ((v % nsteps) || (nsteps % factor)) + goto err; + + size = (dtrace_aggregate_llquantize_bucket(factor, + low, high, nsteps, INT64_MAX) + 2) * sizeof (uint64_t); + break; + } + case DTRACEAGG_AVG: agg->dtag_aggregate = dtrace_aggregate_avg; size = sizeof (uint64_t) * 2; Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h Sun Jul 1 04:09:42 2012 (r237869) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h Sun Jul 1 04:15:14 2012 (r237870) @@ -24,6 +24,10 @@ * Use is subject to license terms. */ +/* + * Copyright (c) 2011, Joyent, Inc. All rights reserved. + */ + #ifndef _SYS_DTRACE_H #define _SYS_DTRACE_H @@ -481,6 +485,7 @@ typedef struct dtrace_difv { #define DTRACEAGG_STDDEV (DTRACEACT_AGGREGATION + 6) #define DTRACEAGG_QUANTIZE (DTRACEACT_AGGREGATION + 7) #define DTRACEAGG_LQUANTIZE (DTRACEACT_AGGREGATION + 8) +#define DTRACEAGG_LLQUANTIZE (DTRACEACT_AGGREGATION + 9) #define DTRACEACT_ISAGG(x) \ (DTRACEACT_CLASS(x) == DTRACEACT_AGGREGATION) @@ -515,6 +520,31 @@ typedef struct dtrace_difv { (int32_t)(((x) & DTRACE_LQUANTIZE_BASEMASK) >> \ DTRACE_LQUANTIZE_BASESHIFT) +#define DTRACE_LLQUANTIZE_FACTORSHIFT 48 +#define DTRACE_LLQUANTIZE_FACTORMASK ((uint64_t)UINT16_MAX << 48) +#define DTRACE_LLQUANTIZE_LOWSHIFT 32 +#define DTRACE_LLQUANTIZE_LOWMASK ((uint64_t)UINT16_MAX << 32) +#define DTRACE_LLQUANTIZE_HIGHSHIFT 16 +#define DTRACE_LLQUANTIZE_HIGHMASK ((uint64_t)UINT16_MAX << 16) +#define DTRACE_LLQUANTIZE_NSTEPSHIFT 0 +#define DTRACE_LLQUANTIZE_NSTEPMASK UINT16_MAX + +#define DTRACE_LLQUANTIZE_FACTOR(x) \ + (uint16_t)(((x) & DTRACE_LLQUANTIZE_FACTORMASK) >> \ + DTRACE_LLQUANTIZE_FACTORSHIFT) + +#define DTRACE_LLQUANTIZE_LOW(x) \ + (uint16_t)(((x) & DTRACE_LLQUANTIZE_LOWMASK) >> \ + DTRACE_LLQUANTIZE_LOWSHIFT) + +#define DTRACE_LLQUANTIZE_HIGH(x) \ + (uint16_t)(((x) & DTRACE_LLQUANTIZE_HIGHMASK) >> \ + DTRACE_LLQUANTIZE_HIGHSHIFT) + +#define DTRACE_LLQUANTIZE_NSTEP(x) \ + (uint16_t)(((x) & DTRACE_LLQUANTIZE_NSTEPMASK) >> \ + DTRACE_LLQUANTIZE_NSTEPSHIFT) + #define DTRACE_USTACK_NFRAMES(x) (uint32_t)((x) & UINT32_MAX) #define DTRACE_USTACK_STRSIZE(x) (uint32_t)((x) >> 32) #define DTRACE_USTACK_ARG(x, y) \ From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 04:25:50 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4E3BA106566B; Sun, 1 Jul 2012 04:25:50 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 393E38FC0A; Sun, 1 Jul 2012 04:25:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q614Po4C065218; Sun, 1 Jul 2012 04:25:50 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q614PoJD065215; Sun, 1 Jul 2012 04:25:50 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201207010425.q614PoJD065215@svn.freebsd.org> From: Adrian Chadd Date: Sun, 1 Jul 2012 04:25:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237871 - head/sys/net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 04:25:50 -0000 Author: adrian Date: Sun Jul 1 04:25:49 2012 New Revision: 237871 URL: http://svn.freebsd.org/changeset/base/237871 Log: Add a check for dynamic OFDM/CCK channel types. Modified: head/sys/net80211/_ieee80211.h Modified: head/sys/net80211/_ieee80211.h ============================================================================== --- head/sys/net80211/_ieee80211.h Sun Jul 1 04:15:14 2012 (r237870) +++ head/sys/net80211/_ieee80211.h Sun Jul 1 04:25:49 2012 (r237871) @@ -242,6 +242,8 @@ struct ieee80211_channel { (((_c)->ic_flags & (IEEE80211_CHAN_OFDM | IEEE80211_CHAN_DYN)) != 0) #define IEEE80211_IS_CHAN_CCK(_c) \ (((_c)->ic_flags & (IEEE80211_CHAN_CCK | IEEE80211_CHAN_DYN)) != 0) +#define IEEE80211_IS_CHAN_DYN(_c) \ + (((_c)->ic_flags & IEEE80211_CHAN_DYN) == IEEE80211_CHAN_DYN) #define IEEE80211_IS_CHAN_GFSK(_c) \ (((_c)->ic_flags & IEEE80211_CHAN_GFSK) != 0) #define IEEE80211_IS_CHAN_TURBO(_c) \ From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 04:26:52 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 69408106564A; Sun, 1 Jul 2012 04:26:52 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4EAFC8FC12; Sun, 1 Jul 2012 04:26:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q614QqZh065300; Sun, 1 Jul 2012 04:26:52 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q614QqjI065289; Sun, 1 Jul 2012 04:26:52 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201207010426.q614QqjI065289@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Sun, 1 Jul 2012 04:26: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: r237872 - in stable/8: cddl/contrib/opensolaris/lib/libdtrace/common sys/cddl/contrib/opensolaris/uts/common/dtrace sys/cddl/contrib/opensolaris/uts/common/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 04:26:52 -0000 Author: pfg Date: Sun Jul 1 04:26:51 2012 New Revision: 237872 URL: http://svn.freebsd.org/changeset/base/237872 Log: MFC r237624, r237714, r237716, r237860: Bring llquantize support into Dtrace. Bryan Cantrill implemented the equivalent of semi-log graph paper for Dtrace so llquantize will use one logarithmic and one linear scale. Illumos Revision: 13355:15b74a2a9a9d Reference: https://www.illumos/issues/905 Obtained from: Illumos Added: - copied from r237868, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/ Directory Properties: stable/8/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/ (props changed) Modified: stable/8/cddl/contrib/opensolaris/lib/libdtrace/common/dt_aggregate.c stable/8/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c stable/8/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c stable/8/cddl/contrib/opensolaris/lib/libdtrace/common/dt_errtags.h stable/8/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h stable/8/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c stable/8/cddl/contrib/opensolaris/lib/libdtrace/common/dt_printf.c stable/8/cddl/contrib/opensolaris/lib/libdtrace/common/dtrace.h stable/8/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c stable/8/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h Directory Properties: stable/8/cddl/ (props changed) stable/8/cddl/contrib/opensolaris/ (props changed) stable/8/sys/ (props changed) stable/8/sys/cddl/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/8/cddl/contrib/opensolaris/lib/libdtrace/common/dt_aggregate.c ============================================================================== --- stable/8/cddl/contrib/opensolaris/lib/libdtrace/common/dt_aggregate.c Sun Jul 1 04:25:49 2012 (r237871) +++ stable/8/cddl/contrib/opensolaris/lib/libdtrace/common/dt_aggregate.c Sun Jul 1 04:26:51 2012 (r237872) @@ -24,7 +24,9 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" +/* + * Copyright (c) 2011, Joyent, Inc. All rights reserved. + */ #include #include @@ -209,6 +211,83 @@ dt_aggregate_lquantizedcmp(int64_t *lhs, return (0); } +static void +dt_aggregate_llquantize(int64_t *existing, int64_t *new, size_t size) +{ + int i; + + for (i = 1; i < size / sizeof (int64_t); i++) + existing[i] = existing[i] + new[i]; +} + +static long double +dt_aggregate_llquantizedsum(int64_t *llquanta) +{ + int64_t arg = *llquanta++; + uint16_t factor = DTRACE_LLQUANTIZE_FACTOR(arg); + uint16_t low = DTRACE_LLQUANTIZE_LOW(arg); + uint16_t high = DTRACE_LLQUANTIZE_HIGH(arg); + uint16_t nsteps = DTRACE_LLQUANTIZE_NSTEP(arg); + int bin = 0, order; + int64_t value = 1, next, step; + long double total; + + assert(nsteps >= factor); + assert(nsteps % factor == 0); + + for (order = 0; order < low; order++) + value *= factor; + + total = (long double)llquanta[bin++] * (long double)(value - 1); + + next = value * factor; + step = next > nsteps ? next / nsteps : 1; + + while (order <= high) { + assert(value < next); + total += (long double)llquanta[bin++] * (long double)(value); + + if ((value += step) != next) + continue; + + next = value * factor; + step = next > nsteps ? next / nsteps : 1; + order++; + } + + return (total + (long double)llquanta[bin] * (long double)value); +} + +static int +dt_aggregate_llquantizedcmp(int64_t *lhs, int64_t *rhs) +{ + long double lsum = dt_aggregate_llquantizedsum(lhs); + long double rsum = dt_aggregate_llquantizedsum(rhs); + int64_t lzero, rzero; + + if (lsum < rsum) + return (DT_LESSTHAN); + + if (lsum > rsum) + return (DT_GREATERTHAN); + + /* + * If they're both equal, then we will compare based on the weights at + * zero. If the weights at zero are equal, then this will be judged a + * tie and will be resolved based on the key comparison. + */ + lzero = lhs[1]; + rzero = rhs[1]; + + if (lzero < rzero) + return (DT_LESSTHAN); + + if (lzero > rzero) + return (DT_GREATERTHAN); + + return (0); +} + static int dt_aggregate_quantizedcmp(int64_t *lhs, int64_t *rhs) { @@ -592,6 +671,10 @@ hashnext: h->dtahe_aggregate = dt_aggregate_lquantize; break; + case DTRACEAGG_LLQUANTIZE: + h->dtahe_aggregate = dt_aggregate_llquantize; + break; + case DTRACEAGG_COUNT: case DTRACEAGG_SUM: case DTRACEAGG_AVG: @@ -859,6 +942,10 @@ dt_aggregate_valcmp(const void *lhs, con rval = dt_aggregate_lquantizedcmp(laddr, raddr); break; + case DTRACEAGG_LLQUANTIZE: + rval = dt_aggregate_llquantizedcmp(laddr, raddr); + break; + case DTRACEAGG_COUNT: case DTRACEAGG_SUM: case DTRACEAGG_MIN: Modified: stable/8/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c ============================================================================== --- stable/8/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c Sun Jul 1 04:25:49 2012 (r237871) +++ stable/8/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c Sun Jul 1 04:26:51 2012 (r237872) @@ -82,6 +82,7 @@ #include #include +#include #include #include @@ -1369,6 +1370,146 @@ dt_compile_agg(dtrace_hdl_t *dtp, dt_nod argmax = 5; } + if (fid->di_id == DTRACEAGG_LLQUANTIZE) { + /* + * For log/linear quantizations, we have between one and five + * arguments in addition to the expression: + * + * arg1 => Factor + * arg2 => Low magnitude + * arg3 => High magnitude + * arg4 => Number of steps per magnitude + * arg5 => Quantization increment value (defaults to 1) + */ + dt_node_t *llarg = dnp->dn_aggfun->dn_args->dn_list; + uint64_t oarg, order, v; + dt_idsig_t *isp; + int i; + + struct { + char *str; /* string identifier */ + int badtype; /* error on bad type */ + int badval; /* error on bad value */ + int mismatch; /* error on bad match */ + int shift; /* shift value */ + uint16_t value; /* value itself */ + } args[] = { + { "factor", D_LLQUANT_FACTORTYPE, + D_LLQUANT_FACTORVAL, D_LLQUANT_FACTORMATCH, + DTRACE_LLQUANTIZE_FACTORSHIFT }, + { "low magnitude", D_LLQUANT_LOWTYPE, + D_LLQUANT_LOWVAL, D_LLQUANT_LOWMATCH, + DTRACE_LLQUANTIZE_LOWSHIFT }, + { "high magnitude", D_LLQUANT_HIGHTYPE, + D_LLQUANT_HIGHVAL, D_LLQUANT_HIGHMATCH, + DTRACE_LLQUANTIZE_HIGHSHIFT }, + { "linear steps per magnitude", D_LLQUANT_NSTEPTYPE, + D_LLQUANT_NSTEPVAL, D_LLQUANT_NSTEPMATCH, + DTRACE_LLQUANTIZE_NSTEPSHIFT }, + { NULL } + }; + + assert(arg == 0); + + for (i = 0; args[i].str != NULL; i++) { + if (llarg->dn_kind != DT_NODE_INT) { + dnerror(llarg, args[i].badtype, "llquantize( ) " + "argument #%d (%s) must be an " + "integer constant\n", i + 1, args[i].str); + } + + if ((uint64_t)llarg->dn_value > UINT16_MAX) { + dnerror(llarg, args[i].badval, "llquantize( ) " + "argument #%d (%s) must be an unsigned " + "16-bit quantity\n", i + 1, args[i].str); + } + + args[i].value = (uint16_t)llarg->dn_value; + + assert(!(arg & ((uint64_t)UINT16_MAX << + args[i].shift))); + arg |= ((uint64_t)args[i].value << args[i].shift); + llarg = llarg->dn_list; + } + + assert(arg != 0); + + if (args[0].value < 2) { + dnerror(dnp, D_LLQUANT_FACTORSMALL, "llquantize( ) " + "factor (argument #1) must be two or more\n"); + } + + if (args[1].value >= args[2].value) { + dnerror(dnp, D_LLQUANT_MAGRANGE, "llquantize( ) " + "high magnitude (argument #3) must be greater " + "than low magnitude (argument #2)\n"); + } + + if (args[3].value < args[0].value) { + dnerror(dnp, D_LLQUANT_FACTORNSTEPS, "llquantize( ) " + "factor (argument #1) must be less than or " + "equal to the number of linear steps per " + "magnitude (argument #4)\n"); + } + + for (v = args[0].value; v < args[3].value; v *= args[0].value) + continue; + + if ((args[3].value % args[0].value) || (v % args[3].value)) { + dnerror(dnp, D_LLQUANT_FACTOREVEN, "llquantize( ) " + "factor (argument #1) must evenly divide the " + "number of steps per magnitude (argument #4), " + "and the number of steps per magnitude must evenly " + "divide a power of the factor\n"); + } + + for (i = 0, order = 1; i < args[2].value; i++) { + if (order * args[0].value > order) { + order *= args[0].value; + continue; + } + + dnerror(dnp, D_LLQUANT_MAGTOOBIG, "llquantize( ) " + "factor (%d) raised to power of high magnitude " + "(%d) overflows 64-bits\n", args[0].value, + args[2].value); + } + + isp = (dt_idsig_t *)aid->di_data; + + if (isp->dis_auxinfo == 0) { + /* + * This is the first time we've seen an llquantize() + * for this aggregation; we'll store our argument + * as the auxiliary signature information. + */ + isp->dis_auxinfo = arg; + } else if ((oarg = isp->dis_auxinfo) != arg) { + /* + * If we have seen this llquantize() before and the + * argument doesn't match the original argument, pick + * the original argument apart to concisely report the + * mismatch. + */ + int expected = 0, found = 0; + + for (i = 0; expected == found; i++) { + assert(args[i].str != NULL); + + expected = (oarg >> args[i].shift) & UINT16_MAX; + found = (arg >> args[i].shift) & UINT16_MAX; + } + + dnerror(dnp, args[i - 1].mismatch, "llquantize( ) " + "%s (argument #%d) doesn't match previous " + "declaration: expected %d, found %d\n", + args[i - 1].str, i, expected, found); + } + + incr = llarg; + argmax = 6; + } + if (fid->di_id == DTRACEAGG_QUANTIZE) { incr = dnp->dn_aggfun->dn_args->dn_list; argmax = 2; Modified: stable/8/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c ============================================================================== --- stable/8/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c Sun Jul 1 04:25:49 2012 (r237871) +++ stable/8/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c Sun Jul 1 04:26:51 2012 (r237872) @@ -23,6 +23,10 @@ * Use is subject to license terms. */ +/* + * Copyright (c) 2011, Joyent, Inc. All rights reserved. + */ + #include #include #include @@ -686,6 +690,121 @@ dt_print_lquantize(dtrace_hdl_t *dtp, FI return (0); } +int +dt_print_llquantize(dtrace_hdl_t *dtp, FILE *fp, const void *addr, + size_t size, uint64_t normal) +{ + int i, first_bin, last_bin, bin = 1, order, levels; + uint16_t factor, low, high, nsteps; + const int64_t *data = addr; + int64_t value = 1, next, step; + char positives = 0, negatives = 0; + long double total = 0; + uint64_t arg; + char c[32]; + + if (size < sizeof (uint64_t)) + return (dt_set_errno(dtp, EDT_DMISMATCH)); + + arg = *data++; + size -= sizeof (uint64_t); + + factor = DTRACE_LLQUANTIZE_FACTOR(arg); + low = DTRACE_LLQUANTIZE_LOW(arg); + high = DTRACE_LLQUANTIZE_HIGH(arg); + nsteps = DTRACE_LLQUANTIZE_NSTEP(arg); + + /* + * We don't expect to be handed invalid llquantize() parameters here, + * but sanity check them (to a degree) nonetheless. + */ + if (size > INT32_MAX || factor < 2 || low >= high || + nsteps == 0 || factor > nsteps) + return (dt_set_errno(dtp, EDT_DMISMATCH)); + + levels = (int)size / sizeof (uint64_t); + + first_bin = 0; + last_bin = levels - 1; + + while (first_bin < levels && data[first_bin] == 0) + first_bin++; + + if (first_bin == levels) { + first_bin = 0; + last_bin = 1; + } else { + if (first_bin > 0) + first_bin--; + + while (last_bin > 0 && data[last_bin] == 0) + last_bin--; + + if (last_bin < levels - 1) + last_bin++; + } + + for (i = first_bin; i <= last_bin; i++) { + positives |= (data[i] > 0); + negatives |= (data[i] < 0); + total += dt_fabsl((long double)data[i]); + } + + if (dt_printf(dtp, fp, "\n%16s %41s %-9s\n", "value", + "------------- Distribution -------------", "count") < 0) + return (-1); + + for (order = 0; order < low; order++) + value *= factor; + + next = value * factor; + step = next > nsteps ? next / nsteps : 1; + + if (first_bin == 0) { + (void) snprintf(c, sizeof (c), "< %lld", (long long)value); + + if (dt_printf(dtp, fp, "%16s ", c) < 0) + return (-1); + + if (dt_print_quantline(dtp, fp, data[0], normal, + total, positives, negatives) < 0) + return (-1); + } + + while (order <= high) { + if (bin >= first_bin && bin <= last_bin) { + if (dt_printf(dtp, fp, "%16lld ", (long long)value) < 0) + return (-1); + + if (dt_print_quantline(dtp, fp, data[bin], + normal, total, positives, negatives) < 0) + return (-1); + } + + assert(value < next); + bin++; + + if ((value += step) != next) + continue; + + next = value * factor; + step = next > nsteps ? next / nsteps : 1; + order++; + } + + if (last_bin < bin) + return (0); + + assert(last_bin == bin); + (void) snprintf(c, sizeof (c), ">= %lld", value); + + if (dt_printf(dtp, fp, "%16s ", c) < 0) + return (-1); + + return (dt_print_quantline(dtp, fp, data[bin], normal, + total, positives, negatives)); +} + /*ARGSUSED*/ static int dt_print_average(dtrace_hdl_t *dtp, FILE *fp, caddr_t addr, @@ -1710,6 +1829,9 @@ dt_print_datum(dtrace_hdl_t *dtp, FILE * case DTRACEAGG_LQUANTIZE: return (dt_print_lquantize(dtp, fp, addr, size, normal)); + case DTRACEAGG_LLQUANTIZE: + return (dt_print_llquantize(dtp, fp, addr, size, normal)); + case DTRACEAGG_AVG: return (dt_print_average(dtp, fp, addr, size, normal)); Modified: stable/8/cddl/contrib/opensolaris/lib/libdtrace/common/dt_errtags.h ============================================================================== --- stable/8/cddl/contrib/opensolaris/lib/libdtrace/common/dt_errtags.h Sun Jul 1 04:25:49 2012 (r237871) +++ stable/8/cddl/contrib/opensolaris/lib/libdtrace/common/dt_errtags.h Sun Jul 1 04:26:51 2012 (r237872) @@ -236,6 +236,23 @@ typedef enum { D_LQUANT_MATCHBASE, /* lquantize() mismatch on base */ D_LQUANT_MATCHLIM, /* lquantize() mismatch on limit */ D_LQUANT_MATCHSTEP, /* lquantize() mismatch on step */ + D_LLQUANT_FACTORTYPE, /* llquantize() bad magnitude type */ + D_LLQUANT_FACTORVAL, /* llquantize() bad magnitude value */ + D_LLQUANT_FACTORMATCH, /* llquantize() mismatch on magnitude */ + D_LLQUANT_LOWTYPE, /* llquantize() bad low mag type */ + D_LLQUANT_LOWVAL, /* llquantize() bad low mag value */ + D_LLQUANT_LOWMATCH, /* llquantize() mismatch on low mag */ + D_LLQUANT_HIGHTYPE, /* llquantize() bad high mag type */ + D_LLQUANT_HIGHVAL, /* llquantize() bad high mag value */ + D_LLQUANT_HIGHMATCH, /* llquantize() mismatch on high mag */ + D_LLQUANT_NSTEPTYPE, /* llquantize() bad # steps type */ + D_LLQUANT_NSTEPVAL, /* llquantize() bad # steps value */ + D_LLQUANT_NSTEPMATCH, /* llquantize() mismatch on # steps */ + D_LLQUANT_MAGRANGE, /* llquantize() bad magnitude range */ + D_LLQUANT_FACTORNSTEPS, /* llquantize() # steps < factor */ + D_LLQUANT_FACTOREVEN, /* llquantize() bad # steps/factor */ + D_LLQUANT_FACTORSMALL, /* llquantize() magnitude too small */ + D_LLQUANT_MAGTOOBIG, /* llquantize() high mag too large */ D_PRINTM_ADDR, /* printm() memref bad type */ D_PRINTM_SIZE, /* printm() size bad type */ D_PRINTT_ADDR, /* printt() typeref bad type */ Modified: stable/8/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h ============================================================================== --- stable/8/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h Sun Jul 1 04:25:49 2012 (r237871) +++ stable/8/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h Sun Jul 1 04:26:51 2012 (r237872) @@ -24,6 +24,10 @@ * Use is subject to license terms. */ +/* + * Copyright (c) 2011, Joyent, Inc. All rights reserved. + */ + #ifndef _DT_IMPL_H #define _DT_IMPL_H @@ -641,6 +645,8 @@ extern int dt_print_quantize(dtrace_hdl_ const void *, size_t, uint64_t); extern int dt_print_lquantize(dtrace_hdl_t *, FILE *, const void *, size_t, uint64_t); +extern int dt_print_llquantize(dtrace_hdl_t *, FILE *, + const void *, size_t, uint64_t); extern int dt_print_agg(const dtrace_aggdata_t *, void *); extern int dt_handle(dtrace_hdl_t *, dtrace_probedata_t *); Modified: stable/8/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c ============================================================================== --- stable/8/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c Sun Jul 1 04:25:49 2012 (r237871) +++ stable/8/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c Sun Jul 1 04:26:51 2012 (r237872) @@ -21,6 +21,7 @@ /* * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, Joyent, Inc. All rights reserved. */ #include @@ -114,8 +115,9 @@ #define DT_VERS_1_6_1 DT_VERSION_NUMBER(1, 6, 1) #define DT_VERS_1_6_2 DT_VERSION_NUMBER(1, 6, 2) #define DT_VERS_1_6_3 DT_VERSION_NUMBER(1, 6, 3) -#define DT_VERS_LATEST DT_VERS_1_6_3 -#define DT_VERS_STRING "Sun D 1.6.3" +#define DT_VERS_1_7 DT_VERSION_NUMBER(1, 7, 0) +#define DT_VERS_LATEST DT_VERS_1_7 +#define DT_VERS_STRING "Sun D 1.7" const dt_version_t _dtrace_versions[] = { DT_VERS_1_0, /* D API 1.0.0 (PSARC 2001/466) Solaris 10 FCS */ @@ -131,6 +133,7 @@ const dt_version_t _dtrace_versions[] = DT_VERS_1_6_1, /* D API 1.6.1 */ DT_VERS_1_6_2, /* D API 1.6.2 */ DT_VERS_1_6_3, /* D API 1.6.3 */ + DT_VERS_1_7, /* D API 1.7 */ 0 }; @@ -287,6 +290,9 @@ static const dt_ident_t _dtrace_globals[ &dt_idops_func, "stack(...)" }, { "lltostr", DT_IDENT_FUNC, 0, DIF_SUBR_LLTOSTR, DT_ATTR_STABCMN, DT_VERS_1_0, &dt_idops_func, "string(int64_t)" }, +{ "llquantize", DT_IDENT_AGGFUNC, 0, DTRACEAGG_LLQUANTIZE, DT_ATTR_STABCMN, + DT_VERS_1_7, &dt_idops_func, + "void(@, int32_t, int32_t, int32_t, int32_t, ...)" }, { "lquantize", DT_IDENT_AGGFUNC, 0, DTRACEAGG_LQUANTIZE, DT_ATTR_STABCMN, DT_VERS_1_0, &dt_idops_func, "void(@, int32_t, int32_t, ...)" }, Modified: stable/8/cddl/contrib/opensolaris/lib/libdtrace/common/dt_printf.c ============================================================================== --- stable/8/cddl/contrib/opensolaris/lib/libdtrace/common/dt_printf.c Sun Jul 1 04:25:49 2012 (r237871) +++ stable/8/cddl/contrib/opensolaris/lib/libdtrace/common/dt_printf.c Sun Jul 1 04:26:51 2012 (r237872) @@ -21,6 +21,7 @@ /* * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, Joyent, Inc. All rights reserved. */ #if defined(sun) @@ -1322,6 +1323,14 @@ pfprint_lquantize(dtrace_hdl_t *dtp, FIL return (dt_print_lquantize(dtp, fp, addr, size, normal)); } +/*ARGSUSED*/ +static int +pfprint_llquantize(dtrace_hdl_t *dtp, FILE *fp, const char *format, + const dt_pfargd_t *pfd, const void *addr, size_t size, uint64_t normal) +{ + return (dt_print_llquantize(dtp, fp, addr, size, normal)); +} + static int dt_printf_format(dtrace_hdl_t *dtp, FILE *fp, const dt_pfargv_t *pfv, const dtrace_recdesc_t *recs, uint_t nrecs, const void *buf, @@ -1507,6 +1516,9 @@ dt_printf_format(dtrace_hdl_t *dtp, FILE case DTRACEAGG_LQUANTIZE: func = pfprint_lquantize; break; + case DTRACEAGG_LLQUANTIZE: + func = pfprint_llquantize; + break; case DTRACEACT_MOD: func = pfprint_mod; break; Modified: stable/8/cddl/contrib/opensolaris/lib/libdtrace/common/dtrace.h ============================================================================== --- stable/8/cddl/contrib/opensolaris/lib/libdtrace/common/dtrace.h Sun Jul 1 04:25:49 2012 (r237871) +++ stable/8/cddl/contrib/opensolaris/lib/libdtrace/common/dtrace.h Sun Jul 1 04:26:51 2012 (r237872) @@ -24,11 +24,13 @@ * Use is subject to license terms. */ +/* + * Copyright (c) 2011, Joyent, Inc. All rights reserved. + */ + #ifndef _DTRACE_H #define _DTRACE_H -#pragma ident "%Z%%M% %I% %E% SMI" - #include #include #include Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Sun Jul 1 04:25:49 2012 (r237871) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Sun Jul 1 04:26:51 2012 (r237872) @@ -1913,6 +1913,75 @@ dtrace_aggregate_lquantize(uint64_t *lqu lquanta[levels + 1] += incr; } +static int +dtrace_aggregate_llquantize_bucket(uint16_t factor, uint16_t low, + uint16_t high, uint16_t nsteps, int64_t value) +{ + int64_t this = 1, last, next; + int base = 1, order; + + ASSERT(factor <= nsteps); + ASSERT(nsteps % factor == 0); + + for (order = 0; order < low; order++) + this *= factor; + + /* + * If our value is less than our factor taken to the power of the + * low order of magnitude, it goes into the zeroth bucket. + */ + if (value < (last = this)) + return (0); + + for (this *= factor; order <= high; order++) { + int nbuckets = this > nsteps ? nsteps : this; + + if ((next = this * factor) < this) { + /* + * We should not generally get log/linear quantizations + * with a high magnitude that allows 64-bits to + * overflow, but we nonetheless protect against this + * by explicitly checking for overflow, and clamping + * our value accordingly. + */ + value = this - 1; + } + + if (value < this) { + /* + * If our value lies within this order of magnitude, + * determine its position by taking the offset within + * the order of magnitude, dividing by the bucket + * width, and adding to our (accumulated) base. + */ + return (base + (value - last) / (this / nbuckets)); + } + + base += nbuckets - (nbuckets / factor); + last = this; + this = next; + } + + /* + * Our value is greater than or equal to our factor taken to the + * power of one plus the high magnitude -- return the top bucket. + */ + return (base); +} + +static void +dtrace_aggregate_llquantize(uint64_t *llquanta, uint64_t nval, uint64_t incr) +{ + uint64_t arg = *llquanta++; + uint16_t factor = DTRACE_LLQUANTIZE_FACTOR(arg); + uint16_t low = DTRACE_LLQUANTIZE_LOW(arg); + uint16_t high = DTRACE_LLQUANTIZE_HIGH(arg); + uint16_t nsteps = DTRACE_LLQUANTIZE_NSTEP(arg); + + llquanta[dtrace_aggregate_llquantize_bucket(factor, + low, high, nsteps, nval)] += incr; +} + /*ARGSUSED*/ static void dtrace_aggregate_avg(uint64_t *data, uint64_t nval, uint64_t arg) @@ -9853,6 +9922,35 @@ dtrace_ecb_aggregation_create(dtrace_ecb break; } + case DTRACEAGG_LLQUANTIZE: { + uint16_t factor = DTRACE_LLQUANTIZE_FACTOR(desc->dtad_arg); + uint16_t low = DTRACE_LLQUANTIZE_LOW(desc->dtad_arg); + uint16_t high = DTRACE_LLQUANTIZE_HIGH(desc->dtad_arg); + uint16_t nsteps = DTRACE_LLQUANTIZE_NSTEP(desc->dtad_arg); + int64_t v; + + agg->dtag_initial = desc->dtad_arg; + agg->dtag_aggregate = dtrace_aggregate_llquantize; + + if (factor < 2 || low >= high || nsteps < factor) + goto err; + + /* + * Now check that the number of steps evenly divides a power + * of the factor. (This assures both integer bucket size and + * linearity within each magnitude.) + */ + for (v = factor; v < nsteps; v *= factor) + continue; + + if ((v % nsteps) || (nsteps % factor)) + goto err; + + size = (dtrace_aggregate_llquantize_bucket(factor, + low, high, nsteps, INT64_MAX) + 2) * sizeof (uint64_t); + break; + } + case DTRACEAGG_AVG: agg->dtag_aggregate = dtrace_aggregate_avg; size = sizeof (uint64_t) * 2; Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h Sun Jul 1 04:25:49 2012 (r237871) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h Sun Jul 1 04:26:51 2012 (r237872) @@ -24,6 +24,10 @@ * Use is subject to license terms. */ +/* + * Copyright (c) 2011, Joyent, Inc. All rights reserved. + */ + #ifndef _SYS_DTRACE_H #define _SYS_DTRACE_H @@ -481,6 +485,7 @@ typedef struct dtrace_difv { #define DTRACEAGG_STDDEV (DTRACEACT_AGGREGATION + 6) #define DTRACEAGG_QUANTIZE (DTRACEACT_AGGREGATION + 7) #define DTRACEAGG_LQUANTIZE (DTRACEACT_AGGREGATION + 8) +#define DTRACEAGG_LLQUANTIZE (DTRACEACT_AGGREGATION + 9) #define DTRACEACT_ISAGG(x) \ (DTRACEACT_CLASS(x) == DTRACEACT_AGGREGATION) @@ -515,6 +520,31 @@ typedef struct dtrace_difv { (int32_t)(((x) & DTRACE_LQUANTIZE_BASEMASK) >> \ DTRACE_LQUANTIZE_BASESHIFT) +#define DTRACE_LLQUANTIZE_FACTORSHIFT 48 +#define DTRACE_LLQUANTIZE_FACTORMASK ((uint64_t)UINT16_MAX << 48) +#define DTRACE_LLQUANTIZE_LOWSHIFT 32 +#define DTRACE_LLQUANTIZE_LOWMASK ((uint64_t)UINT16_MAX << 32) +#define DTRACE_LLQUANTIZE_HIGHSHIFT 16 +#define DTRACE_LLQUANTIZE_HIGHMASK ((uint64_t)UINT16_MAX << 16) +#define DTRACE_LLQUANTIZE_NSTEPSHIFT 0 +#define DTRACE_LLQUANTIZE_NSTEPMASK UINT16_MAX + +#define DTRACE_LLQUANTIZE_FACTOR(x) \ + (uint16_t)(((x) & DTRACE_LLQUANTIZE_FACTORMASK) >> \ + DTRACE_LLQUANTIZE_FACTORSHIFT) + +#define DTRACE_LLQUANTIZE_LOW(x) \ + (uint16_t)(((x) & DTRACE_LLQUANTIZE_LOWMASK) >> \ + DTRACE_LLQUANTIZE_LOWSHIFT) + +#define DTRACE_LLQUANTIZE_HIGH(x) \ + (uint16_t)(((x) & DTRACE_LLQUANTIZE_HIGHMASK) >> \ + DTRACE_LLQUANTIZE_HIGHSHIFT) + +#define DTRACE_LLQUANTIZE_NSTEP(x) \ + (uint16_t)(((x) & DTRACE_LLQUANTIZE_NSTEPMASK) >> \ + DTRACE_LLQUANTIZE_NSTEPSHIFT) + #define DTRACE_USTACK_NFRAMES(x) (uint32_t)((x) & UINT32_MAX) #define DTRACE_USTACK_STRSIZE(x) (uint32_t)((x) >> 32) #define DTRACE_USTACK_ARG(x, y) \ From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 05:14:31 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8852A1067F8F; Sun, 1 Jul 2012 05:13:51 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6F5AE8FC1B; Sun, 1 Jul 2012 05:13:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q615DpOo067176; Sun, 1 Jul 2012 05:13:51 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q615Dp2F067167; Sun, 1 Jul 2012 05:13:51 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <201207010513.q615Dp2F067167@svn.freebsd.org> From: "Kenneth D. Merry" Date: Sun, 1 Jul 2012 05:13:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237873 - in stable/9: share/man/man9 sys/cam/scsi sys/dev/xen/blkfront sys/geom X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 05:14:31 -0000 Author: ken Date: Sun Jul 1 05:13:50 2012 New Revision: 237873 URL: http://svn.freebsd.org/changeset/base/237873 Log: MFC 237518, 237545, 237648: r237518 | ken | 2012-06-23 22:29:03 -0600 (Sat, 23 Jun 2012) | 72 lines Fix a bug which causes a panic in daopen(). The panic is caused by a da(4) instance going away while GEOM is still probing it. In this case, the GEOM disk class instance has been created by disk_create(), and the taste of the disk is queued in the GEOM event queue. While that event is queued, the da(4) instance goes away. When the open call comes into the da(4) driver, it dereferences the freed (but non-NULL) peripheral pointer provided by GEOM, which results in a panic. The solution is to add a callback to the GEOM disk code that is called when all of its resources are cleaned up. This is implemented inside GEOM by adding an optional callback that is called when all consumers have detached from a provider, and the provider is about to be deleted. scsi_cd.c, scsi_da.c: In the register routine for the cd(4) and da(4) routines, acquire a reference to the CAM peripheral instance just before we call disk_create(). Use the new GEOM disk d_gone() callback to register a callback (dadiskgonecb()/cddiskgonecb()) that decrements the peripheral reference count once GEOM has finished cleaning up its resources. In the cd(4) driver, clean up open and close behavior slightly. GEOM makes sure we only get one open() and one close call, so there is no need to set an open flag and decrement the reference count if we are not the first open. In the cd(4) driver, use cam_periph_release_locked() in a couple of error scenarios to avoid extra mutex calls. geom.h: Add a new, optional, providergone callback that is called when a provider is about to be deleted. geom_disk.h: Add a new d_gone() callback to the GEOM disk interface. Bump the DISK_VERSION to version 2. This probably should have been done after a couple of previous changes, especially the addition of the d_getattr() callback. geom_disk.c: Add a providergone callback for the disk class, g_disk_providergone(), that calls the user's d_gone() callback if it exists. Bump the DISK_VERSION to 2. geom_subr.c: In g_destroy_provider(), call the providergone callback if it has been provided. In g_new_geomf(), propagate the class's providergone callback to the new geom instance. blkfront.c: Callers of disk_create() are supposed to pass in DISK_VERSION, not an explicit disk API version number. Update the blkfront driver to do that. disk.9: Update the disk(9) man page to include information on the new d_gone() callback, as well as the previously added d_getattr() callback, d_descr field, and HBA PCI ID fields. r237545 | ken | 2012-06-24 22:26:10 -0600 (Sun, 24 Jun 2012) | 7 lines Consume spare fields for the providergone pointers added to the g_class and g_geom structures in change 237518. The original change would have broken the ABI. Suggested by: ae r237648 | ken | 2012-06-27 10:05:09 -0600 (Wed, 27 Jun 2012) | 6 lines In g_disk_providergone(), don't continue if the softc is NULL. This may be the case if we've already gone through g_disk_destroy(). Reported by: Michael Butler Modified: stable/9/share/man/man9/disk.9 stable/9/sys/cam/scsi/scsi_cd.c stable/9/sys/cam/scsi/scsi_da.c stable/9/sys/dev/xen/blkfront/blkfront.c stable/9/sys/geom/geom.h stable/9/sys/geom/geom_disk.c stable/9/sys/geom/geom_disk.h stable/9/sys/geom/geom_subr.c Directory Properties: stable/9/share/man/man9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/share/man/man9/disk.9 ============================================================================== --- stable/9/share/man/man9/disk.9 Sun Jul 1 04:26:51 2012 (r237872) +++ stable/9/share/man/man9/disk.9 Sun Jul 1 05:13:50 2012 (r237873) @@ -145,6 +145,16 @@ Optional: if configured with .Xr dumpon 8 , this function is invoked from a very restricted system state after a kernel panic to record a copy of the system RAM to the disk. +.It Vt "disk_getattr_t *" Va d_getattr +Optional: if this method is provided, it gives the disk driver the +opportunity to override the default GEOM response to BIO_GETATTR requests. +This function should return -1 if the attribute is not handled, 0 if the +attribute is handled, or an errno to be passed to g_io_deliver(). +.It Vt "disk_gone_t *" Va d_gone +Optional: if this method is provided, it will be called after disk_gone() +is called, once GEOM has finished its cleanup process. +Once this callback is called, it is safe for the disk driver to free all of +its resources, as it will not be receiving further calls from GEOM. .El .Ss Mandatory Media Properties The following fields identify the size and granularity of the disk device. @@ -180,7 +190,23 @@ Please see .Pa src/sys/geom/notes for details. .It Vt char Va d_ident[DISK_IDENT_SIZE] -This field can and should be used to store disk's serial number. +This field can and should be used to store disk's serial number if the +d_getattr method described above isn't implemented, or if it does not +support the GEOM::ident attribute. +.It Vt char Va d_descr[DISK_IDENT_SIZE] +This field can be used to store the disk vendor and product description. +.It Vt uint16_t Va d_hba_vendor +This field can be used to store the PCI vendor ID for the HBA connected to +the disk. +.It Vt uint16_t Va d_hba_device +This field can be used to store the PCI device ID for the HBA connected to +the disk. +.It Vt uint16_t Va d_hba_subvendor +This field can be used to store the PCI subvendor ID for the HBA connected to +the disk. +.It Vt uint16_t Va d_hba_subdevice +This field can be used to store the PCI subdevice ID for the HBA connected to +the disk. .El .Ss Driver Private Data This field may be used by the device driver to store a pointer to Modified: stable/9/sys/cam/scsi/scsi_cd.c ============================================================================== --- stable/9/sys/cam/scsi/scsi_cd.c Sun Jul 1 04:26:51 2012 (r237872) +++ stable/9/sys/cam/scsi/scsi_cd.c Sun Jul 1 05:13:50 2012 (r237873) @@ -103,8 +103,7 @@ typedef enum { CD_FLAG_RETRY_UA = 0x0200, CD_FLAG_VALID_MEDIA = 0x0400, CD_FLAG_VALID_TOC = 0x0800, - CD_FLAG_SCTX_INIT = 0x1000, - CD_FLAG_OPEN = 0x2000 + CD_FLAG_SCTX_INIT = 0x1000 } cd_flags; typedef enum { @@ -357,6 +356,20 @@ cdinit(void) } } +/* + * Callback from GEOM, called when it has finished cleaning up its + * resources. + */ +static void +cddiskgonecb(struct disk *dp) +{ + struct cam_periph *periph; + + periph = (struct cam_periph *)dp->d_drv1; + + cam_periph_release(periph); +} + static void cdoninvalidate(struct cam_periph *periph) { @@ -388,7 +401,7 @@ cdoninvalidate(struct cam_periph *periph camq_remove(&softc->changer->devq, softc->pinfo.index); disk_gone(softc->disk); - xpt_print(periph->path, "lost device\n"); + xpt_print(periph->path, "lost device, %d refs\n", periph->refcount); } static void @@ -725,6 +738,7 @@ cdregister(struct cam_periph *periph, vo softc->disk->d_open = cdopen; softc->disk->d_close = cdclose; softc->disk->d_strategy = cdstrategy; + softc->disk->d_gone = cddiskgonecb; softc->disk->d_ioctl = cdioctl; softc->disk->d_name = "cd"; cam_strvis(softc->disk->d_descr, cgd->inq_data.vendor, @@ -746,6 +760,19 @@ cdregister(struct cam_periph *periph, vo softc->disk->d_hba_device = cpi.hba_device; softc->disk->d_hba_subvendor = cpi.hba_subvendor; softc->disk->d_hba_subdevice = cpi.hba_subdevice; + + /* + * Acquire a reference to the periph before we register with GEOM. + * We'll release this reference once GEOM calls us back (via + * dadiskgonecb()) telling us that our provider has been freed. + */ + if (cam_periph_acquire(periph) != CAM_REQ_CMP) { + xpt_print(periph->path, "%s: lost periph during " + "registration!\n", __func__); + cam_periph_lock(periph); + return (CAM_REQ_CMP_ERR); + } + disk_create(softc->disk, DISK_VERSION); cam_periph_lock(periph); @@ -999,14 +1026,14 @@ cdopen(struct disk *dp) cam_periph_lock(periph); if (softc->flags & CD_FLAG_INVALID) { + cam_periph_release_locked(periph); cam_periph_unlock(periph); - cam_periph_release(periph); return(ENXIO); } if ((error = cam_periph_hold(periph, PRIBIO | PCATCH)) != 0) { + cam_periph_release_locked(periph); cam_periph_unlock(periph); - cam_periph_release(periph); return (error); } @@ -1023,14 +1050,7 @@ cdopen(struct disk *dp) CAM_DEBUG(periph->path, CAM_DEBUG_TRACE, ("leaving cdopen\n")); cam_periph_unhold(periph); - /* Closes aren't symmetrical with opens, so fix up the refcounting. */ - if ((softc->flags & CD_FLAG_OPEN) == 0) { - softc->flags |= CD_FLAG_OPEN; - cam_periph_unlock(periph); - } else { - cam_periph_unlock(periph); - cam_periph_release(periph); - } + cam_periph_unlock(periph); return (0); } @@ -1069,11 +1089,11 @@ cdclose(struct disk *dp) /* * We'll check the media and toc again at the next open(). */ - softc->flags &= ~(CD_FLAG_VALID_MEDIA|CD_FLAG_VALID_TOC|CD_FLAG_OPEN); + softc->flags &= ~(CD_FLAG_VALID_MEDIA|CD_FLAG_VALID_TOC); cam_periph_unhold(periph); + cam_periph_release_locked(periph); cam_periph_unlock(periph); - cam_periph_release(periph); return (0); } Modified: stable/9/sys/cam/scsi/scsi_da.c ============================================================================== --- stable/9/sys/cam/scsi/scsi_da.c Sun Jul 1 04:26:51 2012 (r237872) +++ stable/9/sys/cam/scsi/scsi_da.c Sun Jul 1 05:13:50 2012 (r237873) @@ -1234,6 +1234,20 @@ dainit(void) } } +/* + * Callback from GEOM, called when it has finished cleaning up its + * resources. + */ +static void +dadiskgonecb(struct disk *dp) +{ + struct cam_periph *periph; + + periph = (struct cam_periph *)dp->d_drv1; + + cam_periph_release(periph); +} + static void daoninvalidate(struct cam_periph *periph) { @@ -1256,7 +1270,12 @@ daoninvalidate(struct cam_periph *periph bioq_flush(&softc->bio_queue, NULL, ENXIO); bioq_flush(&softc->delete_queue, NULL, ENXIO); + /* + * Tell GEOM that we've gone away, we'll get a callback when it is + * done cleaning up its resources. + */ disk_gone(softc->disk); + xpt_print(periph->path, "lost device - %d outstanding, %d refs\n", softc->outstanding_cmds, periph->refcount); } @@ -1634,6 +1653,7 @@ daregister(struct cam_periph *periph, vo softc->disk->d_strategy = dastrategy; softc->disk->d_dump = dadump; softc->disk->d_getattr = dagetattr; + softc->disk->d_gone = dadiskgonecb; softc->disk->d_name = "da"; softc->disk->d_drv1 = periph; if (cpi.maxio == 0) @@ -1656,6 +1676,19 @@ daregister(struct cam_periph *periph, vo softc->disk->d_hba_device = cpi.hba_device; softc->disk->d_hba_subvendor = cpi.hba_subvendor; softc->disk->d_hba_subdevice = cpi.hba_subdevice; + + /* + * Acquire a reference to the periph before we register with GEOM. + * We'll release this reference once GEOM calls us back (via + * dadiskgonecb()) telling us that our provider has been freed. + */ + if (cam_periph_acquire(periph) != CAM_REQ_CMP) { + xpt_print(periph->path, "%s: lost periph during " + "registration!\n", __func__); + mtx_lock(periph->sim->mtx); + return (CAM_REQ_CMP_ERR); + } + disk_create(softc->disk, DISK_VERSION); mtx_lock(periph->sim->mtx); Modified: stable/9/sys/dev/xen/blkfront/blkfront.c ============================================================================== --- stable/9/sys/dev/xen/blkfront/blkfront.c Sun Jul 1 04:26:51 2012 (r237872) +++ stable/9/sys/dev/xen/blkfront/blkfront.c Sun Jul 1 05:13:50 2012 (r237873) @@ -230,7 +230,7 @@ xlvbd_add(struct xb_softc *sc, blkif_sec sc->xb_disk->d_mediasize = sectors * sector_size; sc->xb_disk->d_maxsize = sc->max_request_size; sc->xb_disk->d_flags = 0; - disk_create(sc->xb_disk, DISK_VERSION_00); + disk_create(sc->xb_disk, DISK_VERSION); return error; } Modified: stable/9/sys/geom/geom.h ============================================================================== --- stable/9/sys/geom/geom.h Sun Jul 1 04:26:51 2012 (r237872) +++ stable/9/sys/geom/geom.h Sun Jul 1 05:13:50 2012 (r237873) @@ -76,6 +76,7 @@ typedef void g_orphan_t (struct g_consum typedef void g_start_t (struct bio *); typedef void g_spoiled_t (struct g_consumer *); typedef void g_attrchanged_t (struct g_consumer *, const char *attr); +typedef void g_provgone_t (struct g_provider *); typedef void g_dumpconf_t (struct sbuf *, const char *indent, struct g_geom *, struct g_consumer *, struct g_provider *); @@ -106,7 +107,7 @@ struct g_class { g_access_t *access; g_orphan_t *orphan; g_ioctl_t *ioctl; - void *spare1; + g_provgone_t *providergone; void *spare2; /* * The remaining elements are private @@ -137,7 +138,7 @@ struct g_geom { g_access_t *access; g_orphan_t *orphan; g_ioctl_t *ioctl; - void *spare0; + g_provgone_t *providergone; void *spare1; void *softc; unsigned flags; Modified: stable/9/sys/geom/geom_disk.c ============================================================================== --- stable/9/sys/geom/geom_disk.c Sun Jul 1 04:26:51 2012 (r237872) +++ stable/9/sys/geom/geom_disk.c Sun Jul 1 05:13:50 2012 (r237873) @@ -75,6 +75,7 @@ static g_fini_t g_disk_fini; static g_start_t g_disk_start; static g_ioctl_t g_disk_ioctl; static g_dumpconf_t g_disk_dumpconf; +static g_provgone_t g_disk_providergone; static struct g_class g_disk_class = { .name = "DISK", @@ -84,6 +85,7 @@ static struct g_class g_disk_class = { .start = g_disk_start, .access = g_disk_access, .ioctl = g_disk_ioctl, + .providergone = g_disk_providergone, .dumpconf = g_disk_dumpconf, }; @@ -484,6 +486,33 @@ g_disk_create(void *arg, int flag) g_error_provider(pp, 0); } +/* + * We get this callback after all of the consumers have gone away, and just + * before the provider is freed. If the disk driver provided a d_gone + * callback, let them know that it is okay to free resources -- they won't + * be getting any more accesses from GEOM. + */ +static void +g_disk_providergone(struct g_provider *pp) +{ + struct disk *dp; + struct g_disk_softc *sc; + + sc = (struct g_disk_softc *)pp->geom->softc; + + /* + * If the softc is already NULL, then we've probably been through + * g_disk_destroy already; there is nothing for us to do anyway. + */ + if (sc == NULL) + return; + + dp = sc->dp; + + if (dp->d_gone != NULL) + dp->d_gone(dp); +} + static void g_disk_destroy(void *ptr, int flag) { @@ -548,7 +577,7 @@ disk_alloc() void disk_create(struct disk *dp, int version) { - if (version != DISK_VERSION_00 && version != DISK_VERSION_01) { + if (version != DISK_VERSION_02) { printf("WARNING: Attempt to add disk %s%d %s", dp->d_name, dp->d_unit, " using incompatible ABI version of disk(9)\n"); Modified: stable/9/sys/geom/geom_disk.h ============================================================================== --- stable/9/sys/geom/geom_disk.h Sun Jul 1 04:26:51 2012 (r237872) +++ stable/9/sys/geom/geom_disk.h Sun Jul 1 05:13:50 2012 (r237873) @@ -50,6 +50,7 @@ typedef int disk_open_t(struct disk *); typedef int disk_close_t(struct disk *); typedef void disk_strategy_t(struct bio *bp); typedef int disk_getattr_t(struct bio *bp); +typedef void disk_gone_t(struct disk *); typedef int disk_ioctl_t(struct disk *, u_long cmd, void *data, int fflag, struct thread *td); /* NB: disk_ioctl_t SHALL be cast'able to d_ioctl_t */ @@ -77,6 +78,7 @@ struct disk { disk_ioctl_t *d_ioctl; dumper_t *d_dump; disk_getattr_t *d_getattr; + disk_gone_t *d_gone; /* Info fields from driver to geom_disk.c. Valid when open */ u_int d_sectorsize; @@ -110,7 +112,8 @@ void disk_attr_changed(struct disk *dp, #define DISK_VERSION_00 0x58561059 #define DISK_VERSION_01 0x5856105a -#define DISK_VERSION DISK_VERSION_01 +#define DISK_VERSION_02 0x5856105b +#define DISK_VERSION DISK_VERSION_02 #endif /* _KERNEL */ #endif /* _GEOM_GEOM_DISK_H_ */ Modified: stable/9/sys/geom/geom_subr.c ============================================================================== --- stable/9/sys/geom/geom_subr.c Sun Jul 1 04:26:51 2012 (r237872) +++ stable/9/sys/geom/geom_subr.c Sun Jul 1 05:13:50 2012 (r237873) @@ -351,6 +351,7 @@ g_new_geomf(struct g_class *mp, const ch gp->start = mp->start; gp->spoiled = mp->spoiled; gp->attrchanged = mp->attrchanged; + gp->providergone = mp->providergone; gp->dumpconf = mp->dumpconf; gp->access = mp->access; gp->orphan = mp->orphan; @@ -634,6 +635,13 @@ g_destroy_provider(struct g_provider *pp LIST_REMOVE(pp, provider); gp = pp->geom; devstat_remove_entry(pp->stat); + /* + * If a callback was provided, send notification that the provider + * is now gone. + */ + if (gp->providergone != NULL) + gp->providergone(pp); + g_free(pp); if ((gp->flags & G_GEOM_WITHER)) g_do_wither(); From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 05:15:09 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E85281068139; Sun, 1 Jul 2012 05:14:25 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6A70B8FC08; Sun, 1 Jul 2012 05:14:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q615EPko067238; Sun, 1 Jul 2012 05:14:25 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q615EP5k067236; Sun, 1 Jul 2012 05:14:25 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201207010514.q615EP5k067236@svn.freebsd.org> From: Adrian Chadd Date: Sun, 1 Jul 2012 05:14:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237874 - head/sys/dev/ath/ath_hal X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 05:15:09 -0000 Author: adrian Date: Sun Jul 1 05:14:24 2012 New Revision: 237874 URL: http://svn.freebsd.org/changeset/base/237874 Log: Add in some further changes from the AR9300 HAL: * Add a new ANI variable, for AR9003 and later chips; * The AR9003 and later series chips support two RX queues now, so start down the road of supporting that; * Add some new TX queue types - uAPSD is possible on earlier chips, but PAPRD is relevant to AR9003 and later. Obtained from: Qualcomm Atheros, Linux ath9k Modified: head/sys/dev/ath/ath_hal/ah.h Modified: head/sys/dev/ath/ath_hal/ah.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah.h Sun Jul 1 05:13:50 2012 (r237873) +++ head/sys/dev/ath/ath_hal/ah.h Sun Jul 1 05:14:24 2012 (r237874) @@ -73,6 +73,7 @@ typedef enum { HAL_EINPROGRESS = 15, /* Operation incomplete */ HAL_EEBADREG = 16, /* EEPROM invalid regulatory contents */ HAL_EEBADCC = 17, /* EEPROM invalid country code */ + HAL_INV_PMODE = 18, /* Couldn't bring out of sleep state */ } HAL_STATUS; typedef enum { @@ -180,10 +181,19 @@ typedef enum { HAL_TX_QUEUE_CAB = 3, /* "crap after beacon" xmit q */ HAL_TX_QUEUE_UAPSD = 4, /* u-apsd power save xmit q */ HAL_TX_QUEUE_PSPOLL = 5, /* power save poll xmit q */ + HAL_TX_QUEUE_CFEND = 6, + HAL_TX_QUEUE_PAPRD = 7, } HAL_TX_QUEUE; #define HAL_NUM_TX_QUEUES 10 /* max possible # of queues */ +typedef enum { + HAL_RX_QUEUE_HP = 0, /* high priority recv queue */ + HAL_RX_QUEUE_LP = 0, /* low priority recv queue */ +} HAL_RX_QUEUE; + +#define HAL_NUM_RX_QUEUES 2 /* max possible # of queues */ + /* * Transmit queue subtype. These map directly to * WME Access Categories (except for UPSD). Refer @@ -592,7 +602,7 @@ typedef enum { typedef struct { uint8_t kv_type; /* one of HAL_CIPHER */ - uint8_t kv_pad; + uint8_t kv_apsd; /* Mask for APSD enabled ACs */ uint16_t kv_len; /* length in bits */ uint8_t kv_val[16]; /* enough for 128-bit keys */ uint8_t kv_mic[8]; /* TKIP MIC key */ @@ -721,6 +731,7 @@ typedef enum { HAL_ANI_SPUR_IMMUNITY_LEVEL = 5, /* set level */ HAL_ANI_MODE = 6, /* 0 => manual, 1 => auto (XXX do not change) */ HAL_ANI_PHYERR_RESET = 7, /* reset phy error stats */ + HAL_ANI_MRC_CCK = 8, } HAL_ANI_CMD; /* @@ -738,6 +749,7 @@ typedef enum { HAL_CAP_INTMIT_SPUR_IMMUNITY_LEVEL = 6 } HAL_CAP_INTMIT_CMD; +/* DFS defines */ typedef struct { int32_t pe_firpwr; /* FIR pwr out threshold */ int32_t pe_rrssi; /* Radar rssi thresh */ From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 05:23:28 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2C3D91065D76; Sun, 1 Jul 2012 05:22:14 +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 1896E8FC18; Sun, 1 Jul 2012 05:22:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q615MDv0067607; Sun, 1 Jul 2012 05:22:13 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q615MDEX067605; Sun, 1 Jul 2012 05:22:13 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201207010522.q615MDEX067605@svn.freebsd.org> From: Warner Losh Date: Sun, 1 Jul 2012 05:22:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237875 - head/sys/geom X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 05:23:28 -0000 Author: imp Date: Sun Jul 1 05:22:13 2012 New Revision: 237875 URL: http://svn.freebsd.org/changeset/base/237875 Log: Use %j to match intmax_t. Modified: head/sys/geom/geom_map.c Modified: head/sys/geom/geom_map.c ============================================================================== --- head/sys/geom/geom_map.c Sun Jul 1 05:14:24 2012 (r237874) +++ head/sys/geom/geom_map.c Sun Jul 1 05:22:13 2012 (r237875) @@ -321,7 +321,7 @@ g_map_parse_part(struct g_class *mp, str } if (bootverbose) { - printf("MAP: %lxx%lx, data=%lxx%lx " + printf("MAP: %jxx%jx, data=%jxx%jx " "\"/dev/map/%s\"\n", (intmax_t)start, (intmax_t)size, (intmax_t)offset, (intmax_t)dsize, name); From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 05:24:02 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2106B1065E10; Sun, 1 Jul 2012 05:22:45 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C392C8FC16; Sun, 1 Jul 2012 05:22:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q615MjNm067675; Sun, 1 Jul 2012 05:22:45 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q615MjMu067660; Sun, 1 Jul 2012 05:22:45 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <201207010522.q615MjMu067660@svn.freebsd.org> From: "Kenneth D. Merry" Date: Sun, 1 Jul 2012 05:22:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237876 - in stable/9/sys/dev/mps: . mpi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 05:24:02 -0000 Author: ken Date: Sun Jul 1 05:22:45 2012 New Revision: 237876 URL: http://svn.freebsd.org/changeset/base/237876 Log: MFC 237683: r237683 | ken | 2012-06-27 21:48:54 -0600 (Wed, 27 Jun 2012) | 129 lines Bring in LSI's latest mps(4) 6Gb SAS and WarpDrive driver, version 14.00.00.01-fbsd. Their description of the changes is as follows: 1. Copyright contents has been changed in all respective .c and .h files 2. Support for WRITE12 and READ12 for direct-io (warpdrive only) has been added. 3. Driver has added checks to see if Drive has READ_CAP_16 support before sending it down to the device. If SPC3_SID_PROTECT flag is set in the inquiry data, the device supports protection information, and must support the 16 byte read capacity command, otherwise continue without sending read cap 16. This will optimize driver performance, since it will not send READ_CAP_16 to the drive which does not have support of READ_CAP_16. 4. With new approach, "MPTIOCTL_RESET_ADAPTER" IOCTL will not use DELAY() which is busy loop implementation. It will use (Better way to sleep without busy loop). Also from the HBA reset code path and some other places, DELAY() is replaced with msleep() or "pause()", which is based on sleep/wakeup style calls. Driver use msleep()/pause() instead of DELAY based on CAN_SLEEP/NO_SLEEP flags to avoid busy loop which is not required all the time.e.a a. While driver is getting loaded, driver calls most of the commands with NO_SLEEP. b. When Driver is functional and it needs Reinit of HBA, CAN_SLEEP flag is used. 5. driver is not Endian safe. It will not work on Big Endian machines like Sparc and PowerPC platforms because it assumes it is running on a Little Endian machine. Driver code is modified such way that it does not assume CPU arch is Little Endian. a. All places where Driver interacts from HBA to Host, it converts Little Endian format to CPU format. b. All places where Driver interacts from Host to HBA, it converts CPU format to Little Endian. 6. Findout memory leaks in FreeBSD Driver and resolve those, such as memory leak in targ's luns creation/deletion. Also added additional checks to see memory allocation success/fail. 7. Add loginfo prints as debug message, i.e. When FW sends any loginfo, Driver should print those as debug message. This will help for debugging purpose. 8. There is possibility to get config request timeout. Current driver is able to detect config request timetout, but it does not do anything on config_request timeout. Driver should call mps_reinit() if any request_poll (which is called as part of config_request) is time out. 9. cdb length check is required for 32 byte CDB. Add correct mpi control value for 32 bit CDB as below while submitting SCSI IO Request to controller. mpi_control |= 4 << MPI2_SCSIIO_CONTROL_ADDCDBLEN_SHIFT; 10. Check the actual status of Message unit reset (mps_message_unit_reset).Previously FreeBSD Driver just writes MPI2_FUNCTION_IOC_MESSAGE_UNIT_RESET and never check the ack (it just wait for 50 millisecond). So, Driver now check the status of "MPI2_FUNCTION_IOC_MESSAGE_UNIT_RESET" after writing it to the FW. Now it also checking for whether doorbell ack uses msleep with proper sleep flags, instead of . 11. Previously CAM does not detect Multi-Lun Devices. In order to detect Multi-Lun Devices by CAM the driver needs following change set: a. There is "max_lun" field which Driver need to set based on hw/fw support. Currently LSI released driver does not set this field. b. Default of "max_lun" should not be 0 in OS, but it is currently set to 0 in CAM layer. c. Export max_lun capacity to 255 12. Driver will not reset target info after port enable complete and also do Device removal when Device remove from FW. The detail description is as follows a. When Driver receive WD PD add events, it will add all information in driver local data structure. b. Only for WD, we have below checks after port enable completes, where driver clear off all information retrieved at #1. if ((sc->WD_available && (sc->WD_hide_expose == MPS_WD_HIDE_ALWAYS)) || (sc->WD_valid_config && (sc->WD_hide_expose == MPS_WD_HIDE_IF_VOLUME)) { // clear off target data structure. } It is mainly not to attach PDs to OS. FreeBSD does bus rescan as older Parallel scsi style. So Driver needs to handle which Drive is visible to OS. That is a reason we have to clear off targ information for PDs. Again, above logic was implemented long time ago. Similar concept we have for non-wd also. For that, LSI have introduced different logic to hide PDs. Eventually, because of above gap, when Phy goes offline, we observe below failure. That is what Driver is not doing complete removal of device with FW. (which was pointed by Scott) Apr 5 02:39:24 Freebsd7 kernel: mpslsi0: mpssas_prepare_remove Apr 5 02:39:24 Freebsd7 kernel: mpssas_prepare_remove 497 : invalid handle 0xe Now Driver will not reset target info after port enable complete and also will do Device removal when Device remove from FW. 13. Returning "CAM_SEL_TIMEOUT" instead of "CAM_TID_INVALID" error code on request to the Target IDs that have no devices conected at that moment. As if "CAM_TID_INVALID" error code is returned to the CAM Layaer then it results in a huge chain of errors in verbose kernel messages on boot and every hot-plug event. Submitted by: Sreekanth Reddy Modified: stable/9/sys/dev/mps/mpi/mpi2.h stable/9/sys/dev/mps/mpi/mpi2_cnfg.h stable/9/sys/dev/mps/mpi/mpi2_hbd.h stable/9/sys/dev/mps/mpi/mpi2_history.txt stable/9/sys/dev/mps/mpi/mpi2_init.h stable/9/sys/dev/mps/mpi/mpi2_ioc.h stable/9/sys/dev/mps/mpi/mpi2_ra.h stable/9/sys/dev/mps/mpi/mpi2_raid.h stable/9/sys/dev/mps/mpi/mpi2_sas.h stable/9/sys/dev/mps/mpi/mpi2_targ.h stable/9/sys/dev/mps/mpi/mpi2_tool.h stable/9/sys/dev/mps/mpi/mpi2_type.h stable/9/sys/dev/mps/mps.c stable/9/sys/dev/mps/mps_config.c stable/9/sys/dev/mps/mps_ioctl.h stable/9/sys/dev/mps/mps_mapping.c stable/9/sys/dev/mps/mps_mapping.h stable/9/sys/dev/mps/mps_sas.c stable/9/sys/dev/mps/mps_sas.h stable/9/sys/dev/mps/mps_sas_lsi.c stable/9/sys/dev/mps/mps_user.c stable/9/sys/dev/mps/mpsvar.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/mps/mpi/mpi2.h ============================================================================== --- stable/9/sys/dev/mps/mpi/mpi2.h Sun Jul 1 05:22:13 2012 (r237875) +++ stable/9/sys/dev/mps/mpi/mpi2.h Sun Jul 1 05:22:45 2012 (r237876) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2011 LSI Corp. + * Copyright (c) 2011, 2012 LSI Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -29,7 +29,7 @@ */ /* - * Copyright (c) 2000-2011 LSI Corporation. + * Copyright (c) 2000-2012 LSI Corporation. * * * Name: mpi2.h Modified: stable/9/sys/dev/mps/mpi/mpi2_cnfg.h ============================================================================== --- stable/9/sys/dev/mps/mpi/mpi2_cnfg.h Sun Jul 1 05:22:13 2012 (r237875) +++ stable/9/sys/dev/mps/mpi/mpi2_cnfg.h Sun Jul 1 05:22:45 2012 (r237876) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2011 LSI Corp. + * Copyright (c) 2011, 2012 LSI Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -29,7 +29,7 @@ */ /* - * Copyright (c) 2000-2011 LSI Corporation. + * Copyright (c) 2000-2012 LSI Corporation. * * * Name: mpi2_cnfg.h Modified: stable/9/sys/dev/mps/mpi/mpi2_hbd.h ============================================================================== --- stable/9/sys/dev/mps/mpi/mpi2_hbd.h Sun Jul 1 05:22:13 2012 (r237875) +++ stable/9/sys/dev/mps/mpi/mpi2_hbd.h Sun Jul 1 05:22:45 2012 (r237876) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2011 LSI Corp. + * Copyright (c) 2011, 2012 LSI Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -29,7 +29,7 @@ */ /* - * Copyright (c) 2009-2011 LSI Corporation. + * Copyright (c) 2009-2012 LSI Corporation. * * * Name: mpi2_hbd.h Modified: stable/9/sys/dev/mps/mpi/mpi2_history.txt ============================================================================== --- stable/9/sys/dev/mps/mpi/mpi2_history.txt Sun Jul 1 05:22:13 2012 (r237875) +++ stable/9/sys/dev/mps/mpi/mpi2_history.txt Sun Jul 1 05:22:45 2012 (r237876) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2011 LSI Corp. + * Copyright (c) 2011, 2012 LSI Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -32,7 +32,7 @@ Fusion-MPT MPI 2.0 Header File Change History ============================== - Copyright (c) 2000-2011 LSI Corporation. + Copyright (c) 2000-2012 LSI Corporation. --------------------------------------- Header Set Release Version: 02.00.18 Modified: stable/9/sys/dev/mps/mpi/mpi2_init.h ============================================================================== --- stable/9/sys/dev/mps/mpi/mpi2_init.h Sun Jul 1 05:22:13 2012 (r237875) +++ stable/9/sys/dev/mps/mpi/mpi2_init.h Sun Jul 1 05:22:45 2012 (r237876) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2011 LSI Corp. + * Copyright (c) 2011, 2012 LSI Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -29,7 +29,7 @@ */ /* - * Copyright (c) 2000-2011 LSI Corporation. + * Copyright (c) 2000-2012 LSI Corporation. * * * Name: mpi2_init.h Modified: stable/9/sys/dev/mps/mpi/mpi2_ioc.h ============================================================================== --- stable/9/sys/dev/mps/mpi/mpi2_ioc.h Sun Jul 1 05:22:13 2012 (r237875) +++ stable/9/sys/dev/mps/mpi/mpi2_ioc.h Sun Jul 1 05:22:45 2012 (r237876) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2011 LSI Corp. + * Copyright (c) 2011, 2012 LSI Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -29,7 +29,7 @@ */ /* - * Copyright (c) 2000-2011 LSI Corporation. + * Copyright (c) 2000-2012 LSI Corporation. * * * Name: mpi2_ioc.h Modified: stable/9/sys/dev/mps/mpi/mpi2_ra.h ============================================================================== --- stable/9/sys/dev/mps/mpi/mpi2_ra.h Sun Jul 1 05:22:13 2012 (r237875) +++ stable/9/sys/dev/mps/mpi/mpi2_ra.h Sun Jul 1 05:22:45 2012 (r237876) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2011 LSI Corp. + * Copyright (c) 2011, 2012 LSI Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -29,7 +29,7 @@ */ /* - * Copyright (c) 2011 LSI Corporation. + * Copyright (c) 2012 LSI Corporation. * * * Name: mpi2_ra.h Modified: stable/9/sys/dev/mps/mpi/mpi2_raid.h ============================================================================== --- stable/9/sys/dev/mps/mpi/mpi2_raid.h Sun Jul 1 05:22:13 2012 (r237875) +++ stable/9/sys/dev/mps/mpi/mpi2_raid.h Sun Jul 1 05:22:45 2012 (r237876) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2011 LSI Corp. + * Copyright (c) 2011, 2012 LSI Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -29,7 +29,7 @@ */ /* - * Copyright (c) 2000-2011 LSI Corporation. + * Copyright (c) 2000-2012 LSI Corporation. * * * Name: mpi2_raid.h Modified: stable/9/sys/dev/mps/mpi/mpi2_sas.h ============================================================================== --- stable/9/sys/dev/mps/mpi/mpi2_sas.h Sun Jul 1 05:22:13 2012 (r237875) +++ stable/9/sys/dev/mps/mpi/mpi2_sas.h Sun Jul 1 05:22:45 2012 (r237876) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2011 LSI Corp. + * Copyright (c) 2011, 2012 LSI Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -29,7 +29,7 @@ */ /* - * Copyright (c) 2000-2011 LSI Corporation. + * Copyright (c) 2000-2012 LSI Corporation. * * * Name: mpi2_sas.h Modified: stable/9/sys/dev/mps/mpi/mpi2_targ.h ============================================================================== --- stable/9/sys/dev/mps/mpi/mpi2_targ.h Sun Jul 1 05:22:13 2012 (r237875) +++ stable/9/sys/dev/mps/mpi/mpi2_targ.h Sun Jul 1 05:22:45 2012 (r237876) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2011 LSI Corp. + * Copyright (c) 2011, 2012 LSI Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -29,7 +29,7 @@ */ /* - * Copyright (c) 2000-2011 LSI Corporation. + * Copyright (c) 2000-2012 LSI Corporation. * * * Name: mpi2_targ.h Modified: stable/9/sys/dev/mps/mpi/mpi2_tool.h ============================================================================== --- stable/9/sys/dev/mps/mpi/mpi2_tool.h Sun Jul 1 05:22:13 2012 (r237875) +++ stable/9/sys/dev/mps/mpi/mpi2_tool.h Sun Jul 1 05:22:45 2012 (r237876) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2011 LSI Corp. + * Copyright (c) 2011, 2012 LSI Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -29,7 +29,7 @@ */ /* - * Copyright (c) 2000-2011 LSI Corporation. + * Copyright (c) 2000-2012 LSI Corporation. * * * Name: mpi2_tool.h Modified: stable/9/sys/dev/mps/mpi/mpi2_type.h ============================================================================== --- stable/9/sys/dev/mps/mpi/mpi2_type.h Sun Jul 1 05:22:13 2012 (r237875) +++ stable/9/sys/dev/mps/mpi/mpi2_type.h Sun Jul 1 05:22:45 2012 (r237876) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2011 LSI Corp. + * Copyright (c) 2011, 2012 LSI Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -29,7 +29,7 @@ */ /* - * Copyright (c) 2000-2011 LSI Corporation. + * Copyright (c) 2000-2012 LSI Corporation. * * * Name: mpi2_type.h Modified: stable/9/sys/dev/mps/mps.c ============================================================================== --- stable/9/sys/dev/mps/mps.c Sun Jul 1 05:22:13 2012 (r237875) +++ stable/9/sys/dev/mps/mps.c Sun Jul 1 05:22:45 2012 (r237876) @@ -1,31 +1,6 @@ /*- * Copyright (c) 2009 Yahoo! Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - */ -/*- - * Copyright (c) 2011 LSI Corp. + * Copyright (c) 2012 LSI Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -82,6 +57,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include @@ -98,9 +74,9 @@ __FBSDID("$FreeBSD$"); #include #include -static int mps_diag_reset(struct mps_softc *sc); +static int mps_diag_reset(struct mps_softc *sc, int sleep_flag); static int mps_init_queues(struct mps_softc *sc); -static int mps_message_unit_reset(struct mps_softc *sc); +static int mps_message_unit_reset(struct mps_softc *sc, int sleep_flag); static int mps_transition_operational(struct mps_softc *sc); static void mps_startup(void *arg); static int mps_send_iocinit(struct mps_softc *sc); @@ -112,7 +88,7 @@ static void mps_config_complete(struct m static void mps_periodic(void *); static int mps_reregister_events(struct mps_softc *sc); static void mps_enqueue_request(struct mps_softc *sc, struct mps_command *cm); - +static int mps_wait_db_ack(struct mps_softc *sc, int timeout, int sleep_flag); SYSCTL_NODE(_hw, OID_AUTO, mps, CTLFLAG_RD, 0, "MPS Driver Parameters"); MALLOC_DEFINE(M_MPT2, "mps", "mpt2 driver memory"); @@ -123,8 +99,32 @@ MALLOC_DEFINE(M_MPT2, "mps", "mpt2 drive */ static char mpt2_reset_magic[] = { 0x00, 0x0f, 0x04, 0x0b, 0x02, 0x07, 0x0d }; +/* Added this union to smoothly convert le64toh cm->cm_desc.Words. + * Compiler only support unint64_t to be passed as argument. + * Otherwise it will through below error + * "aggregate value used where an integer was expected" + */ + +typedef union _reply_descriptor { + u64 word; + struct { + u32 low; + u32 high; + } u; +}reply_descriptor,address_descriptor; + +/* + * sleep_flag can be either CAN_SLEEP or NO_SLEEP. + * If this function is called from process context, it can sleep + * and there is no harm to sleep, in case if this fuction is called + * from Interrupt handler, we can not sleep and need NO_SLEEP flag set. + * based on sleep flags driver will call either msleep, pause or DELAY. + * msleep and pause are of same variant, but pause is used when mps_mtx + * is not hold by driver. + * + */ static int -mps_diag_reset(struct mps_softc *sc) +mps_diag_reset(struct mps_softc *sc,int sleep_flag) { uint32_t reg; int i, error, tries = 0; @@ -134,14 +134,25 @@ mps_diag_reset(struct mps_softc *sc) /* Clear any pending interrupts */ mps_regwrite(sc, MPI2_HOST_INTERRUPT_STATUS_OFFSET, 0x0); + /*Force NO_SLEEP for threads prohibited to sleep + * e.a Thread from interrupt handler are prohibited to sleep. + */ + if(curthread->td_pflags & TDP_NOSLEEPING) + sleep_flag = NO_SLEEP; + /* Push the magic sequence */ error = ETIMEDOUT; while (tries++ < 20) { for (i = 0; i < sizeof(mpt2_reset_magic); i++) mps_regwrite(sc, MPI2_WRITE_SEQUENCE_OFFSET, mpt2_reset_magic[i]); - - DELAY(100 * 1000); + /* wait 100 msec */ + if (mtx_owned(&sc->mps_mtx) && sleep_flag == CAN_SLEEP) + msleep(&sc->msleep_fake_chan, &sc->mps_mtx, 0, "mpsdiag", hz/10); + else if (sleep_flag == CAN_SLEEP) + pause("mpsdiag", hz/10); + else + DELAY(100 * 1000); reg = mps_regread(sc, MPI2_HOST_DIAGNOSTIC_OFFSET); if (reg & MPI2_DIAG_DIAG_WRITE_ENABLE) { @@ -159,7 +170,13 @@ mps_diag_reset(struct mps_softc *sc) /* Wait up to 300 seconds in 50ms intervals */ error = ETIMEDOUT; for (i = 0; i < 60000; i++) { - DELAY(50000); + /* wait 50 msec */ + if (mtx_owned(&sc->mps_mtx) && sleep_flag == CAN_SLEEP) + msleep(&sc->msleep_fake_chan, &sc->mps_mtx, 0, "mpsdiag", hz/20); + else if (sleep_flag == CAN_SLEEP) + pause("mpsdiag", hz/20); + else + DELAY(50 * 1000); reg = mps_regread(sc, MPI2_DOORBELL_OFFSET); if ((reg & MPI2_IOC_STATE_MASK) != MPI2_IOC_STATE_RESET) { error = 0; @@ -175,7 +192,7 @@ mps_diag_reset(struct mps_softc *sc) } static int -mps_message_unit_reset(struct mps_softc *sc) +mps_message_unit_reset(struct mps_softc *sc, int sleep_flag) { mps_dprint(sc, MPS_TRACE, "%s\n", __func__); @@ -183,7 +200,12 @@ mps_message_unit_reset(struct mps_softc mps_regwrite(sc, MPI2_DOORBELL_OFFSET, MPI2_FUNCTION_IOC_MESSAGE_UNIT_RESET << MPI2_DOORBELL_FUNCTION_SHIFT); - DELAY(50000); + + if (mps_wait_db_ack(sc, 5, sleep_flag) != 0) { + mps_dprint(sc, MPS_FAULT, "Doorbell handshake failed : <%s>\n", + __func__); + return (ETIMEDOUT); + } return (0); } @@ -193,9 +215,12 @@ mps_transition_ready(struct mps_softc *s { uint32_t reg, state; int error, tries = 0; + int sleep_flags; mps_dprint(sc, MPS_TRACE, "%s\n", __func__); - + /* If we are in attach call, do not sleep */ + sleep_flags = (sc->mps_flags & MPS_FLAGS_ATTACH_DONE) + ? CAN_SLEEP:NO_SLEEP; error = 0; while (tries++ < 5) { reg = mps_regread(sc, MPI2_DOORBELL_OFFSET); @@ -206,7 +231,7 @@ mps_transition_ready(struct mps_softc *s * resetting it. */ if (reg & MPI2_DOORBELL_USED) { - mps_diag_reset(sc); + mps_diag_reset(sc, sleep_flags); DELAY(50000); continue; } @@ -227,10 +252,10 @@ mps_transition_ready(struct mps_softc *s } else if (state == MPI2_IOC_STATE_FAULT) { mps_dprint(sc, MPS_INFO, "IOC in fault state 0x%x\n", state & MPI2_DOORBELL_FAULT_CODE_MASK); - mps_diag_reset(sc); + mps_diag_reset(sc, sleep_flags); } else if (state == MPI2_IOC_STATE_OPERATIONAL) { /* Need to take ownership */ - mps_message_unit_reset(sc); + mps_message_unit_reset(sc, sleep_flags); } else if (state == MPI2_IOC_STATE_RESET) { /* Wait a bit, IOC might be in transition */ mps_dprint(sc, MPS_FAULT, @@ -310,7 +335,7 @@ mps_reinit(struct mps_softc *sc) mps_printf(sc, "%s mask interrupts\n", __func__); mps_mask_intr(sc); - error = mps_diag_reset(sc); + error = mps_diag_reset(sc, CAN_SLEEP); if (error != 0) { panic("%s hard reset failed with error %d\n", __func__, error); @@ -368,19 +393,56 @@ mps_reinit(struct mps_softc *sc) return 0; } -/* Wait for the chip to ACK a word that we've put into its FIFO */ +/* Wait for the chip to ACK a word that we've put into its FIFO + * Wait for seconds. In single loop wait for busy loop + * for 500 microseconds. + * Total is [ 0.5 * (2000 * ) ] in miliseconds. + * */ static int -mps_wait_db_ack(struct mps_softc *sc) +mps_wait_db_ack(struct mps_softc *sc, int timeout, int sleep_flag) { - int retry; - for (retry = 0; retry < MPS_DB_MAX_WAIT; retry++) { - if ((mps_regread(sc, MPI2_HOST_INTERRUPT_STATUS_OFFSET) & - MPI2_HIS_SYS2IOC_DB_STATUS) == 0) - return (0); - DELAY(2000); - } + u32 cntdn, count; + u32 int_status; + u32 doorbell; + + count = 0; + cntdn = (sleep_flag == CAN_SLEEP) ? 1000*timeout : 2000*timeout; + do { + int_status = mps_regread(sc, MPI2_HOST_INTERRUPT_STATUS_OFFSET); + if (!(int_status & MPI2_HIS_SYS2IOC_DB_STATUS)) { + mps_dprint(sc, MPS_INFO, + "%s: successfull count(%d), timeout(%d)\n", + __func__, count, timeout); + return 0; + } else if (int_status & MPI2_HIS_IOC2SYS_DB_STATUS) { + doorbell = mps_regread(sc, MPI2_DOORBELL_OFFSET); + if ((doorbell & MPI2_IOC_STATE_MASK) == + MPI2_IOC_STATE_FAULT) { + mps_dprint(sc, MPS_FAULT, + "fault_state(0x%04x)!\n", doorbell); + return (EFAULT); + } + } else if (int_status == 0xFFFFFFFF) + goto out; + + /* If it can sleep, sleep for 1 milisecond, else busy loop for + * 0.5 milisecond */ + if (mtx_owned(&sc->mps_mtx) && sleep_flag == CAN_SLEEP) + msleep(&sc->msleep_fake_chan, &sc->mps_mtx, 0, + "mpsdba", hz/1000); + else if (sleep_flag == CAN_SLEEP) + pause("mpsdba", hz/1000); + else + DELAY(500); + count++; + } while (--cntdn); + + out: + mps_dprint(sc, MPS_FAULT, "%s: failed due to timeout count(%d), " + "int_status(%x)!\n", __func__, count, int_status); return (ETIMEDOUT); + } /* Wait for the chip to signal that the next word in its FIFO can be fetched */ @@ -406,6 +468,10 @@ mps_request_sync(struct mps_softc *sc, v uint32_t *data32; uint16_t *data16; int i, count, ioc_sz, residual; + int sleep_flags = CAN_SLEEP; + + if(curthread->td_pflags & TDP_NOSLEEPING) + sleep_flags = NO_SLEEP; /* Step 1 */ mps_regwrite(sc, MPI2_HOST_INTERRUPT_STATUS_OFFSET, 0x0); @@ -430,7 +496,7 @@ mps_request_sync(struct mps_softc *sc, v return (ENXIO); } mps_regwrite(sc, MPI2_HOST_INTERRUPT_STATUS_OFFSET, 0x0); - if (mps_wait_db_ack(sc) != 0) { + if (mps_wait_db_ack(sc, 5, sleep_flags) != 0) { mps_dprint(sc, MPS_FAULT, "Doorbell handshake failed\n"); return (ENXIO); } @@ -439,8 +505,8 @@ mps_request_sync(struct mps_softc *sc, v /* Clock out the message data synchronously in 32-bit dwords*/ data32 = (uint32_t *)req; for (i = 0; i < count; i++) { - mps_regwrite(sc, MPI2_DOORBELL_OFFSET, data32[i]); - if (mps_wait_db_ack(sc) != 0) { + mps_regwrite(sc, MPI2_DOORBELL_OFFSET, htole32(data32[i])); + if (mps_wait_db_ack(sc, 5, sleep_flags) != 0) { mps_dprint(sc, MPS_FAULT, "Timeout while writing doorbell\n"); return (ENXIO); @@ -525,7 +591,7 @@ mps_request_sync(struct mps_softc *sc, v static void mps_enqueue_request(struct mps_softc *sc, struct mps_command *cm) { - + reply_descriptor rd; mps_dprint(sc, MPS_TRACE, "%s SMID %u cm %p ccb %p\n", __func__, cm->cm_desc.Default.SMID, cm, cm->cm_ccb); @@ -534,11 +600,14 @@ mps_enqueue_request(struct mps_softc *sc if (++sc->io_cmds_active > sc->io_cmds_highwater) sc->io_cmds_highwater++; - + rd.u.low = cm->cm_desc.Words.Low; + rd.u.high = cm->cm_desc.Words.High; + rd.word = htole64(rd.word); + /* TODO-We may need to make below regwrite atomic */ mps_regwrite(sc, MPI2_REQUEST_DESCRIPTOR_POST_LOW_OFFSET, - cm->cm_desc.Words.Low); + rd.u.low); mps_regwrite(sc, MPI2_REQUEST_DESCRIPTOR_POST_HIGH_OFFSET, - cm->cm_desc.Words.High); + rd.u.high); } /* @@ -622,21 +691,21 @@ mps_send_iocinit(struct mps_softc *sc) */ init.Function = MPI2_FUNCTION_IOC_INIT; init.WhoInit = MPI2_WHOINIT_HOST_DRIVER; - init.MsgVersion = MPI2_VERSION; - init.HeaderVersion = MPI2_HEADER_VERSION; - init.SystemRequestFrameSize = sc->facts->IOCRequestFrameSize; - init.ReplyDescriptorPostQueueDepth = sc->pqdepth; - init.ReplyFreeQueueDepth = sc->fqdepth; + init.MsgVersion = htole16(MPI2_VERSION); + init.HeaderVersion = htole16(MPI2_HEADER_VERSION); + init.SystemRequestFrameSize = htole16(sc->facts->IOCRequestFrameSize); + init.ReplyDescriptorPostQueueDepth = htole16(sc->pqdepth); + init.ReplyFreeQueueDepth = htole16(sc->fqdepth); init.SenseBufferAddressHigh = 0; init.SystemReplyAddressHigh = 0; init.SystemRequestFrameBaseAddress.High = 0; - init.SystemRequestFrameBaseAddress.Low = (uint32_t)sc->req_busaddr; + init.SystemRequestFrameBaseAddress.Low = htole32((uint32_t)sc->req_busaddr); init.ReplyDescriptorPostQueueAddress.High = 0; - init.ReplyDescriptorPostQueueAddress.Low = (uint32_t)sc->post_busaddr; + init.ReplyDescriptorPostQueueAddress.Low = htole32((uint32_t)sc->post_busaddr); init.ReplyFreeQueueAddress.High = 0; - init.ReplyFreeQueueAddress.Low = (uint32_t)sc->free_busaddr; + init.ReplyFreeQueueAddress.Low = htole32((uint32_t)sc->free_busaddr); init.TimeStamp.High = 0; - init.TimeStamp.Low = (uint32_t)time_uptime; + init.TimeStamp.Low = htole32((uint32_t)time_uptime); error = mps_request_sync(sc, &init, &reply, req_sz, reply_sz, 5); if ((reply.IOCStatus & MPI2_IOCSTATUS_MASK) != MPI2_IOCSTATUS_SUCCESS) @@ -830,6 +899,12 @@ mps_alloc_requests(struct mps_softc *sc) sc->chains = malloc(sizeof(struct mps_chain) * sc->max_chains, M_MPT2, M_WAITOK | M_ZERO); + if(!sc->chains) { + device_printf(sc->mps_dev, + "Cannot allocate chains memory %s %d\n", + __func__, __LINE__); + return (ENOMEM); + } for (i = 0; i < sc->max_chains; i++) { chain = &sc->chains[i]; chain->chain = (MPI2_SGE_IO_UNION *)(sc->chain_frames + @@ -864,6 +939,11 @@ mps_alloc_requests(struct mps_softc *sc) */ sc->commands = malloc(sizeof(struct mps_command) * sc->num_reqs, M_MPT2, M_WAITOK | M_ZERO); + if(!sc->commands) { + device_printf(sc->mps_dev, "Cannot allocate memory %s %d\n", + __func__, __LINE__); + return (ENOMEM); + } for (i = 1; i < sc->num_reqs; i++) { cm = &sc->commands[i]; cm->cm_req = sc->req_frames + @@ -1056,6 +1136,11 @@ mps_attach(struct mps_softc *sc) sc->facts = malloc(sizeof(MPI2_IOC_FACTS_REPLY), M_MPT2, M_ZERO|M_NOWAIT); + if(!sc->facts) { + device_printf(sc->mps_dev, "Cannot allocate memory %s %d\n", + __func__, __LINE__); + return (ENOMEM); + } if ((error = mps_get_iocfacts(sc, sc->facts)) != 0) return (error); @@ -1083,7 +1168,7 @@ mps_attach(struct mps_softc *sc) */ if ((sc->facts->IOCCapabilities & MPI2_IOCFACTS_CAPABILITY_EVENT_REPLAY) == 0) { - mps_diag_reset(sc); + mps_diag_reset(sc, NO_SLEEP); if ((error = mps_transition_ready(sc)) != 0) return (error); } @@ -1163,6 +1248,11 @@ mps_attach(struct mps_softc *sc) sc->pfacts = malloc(sizeof(MPI2_PORT_FACTS_REPLY) * sc->facts->NumberOfPorts, M_MPT2, M_ZERO|M_WAITOK); + if(!sc->pfacts) { + device_printf(sc->mps_dev, "Cannot allocate memory %s %d\n", + __func__, __LINE__); + return (ENOMEM); + } for (i = 0; i < sc->facts->NumberOfPorts; i++) { if ((error = mps_get_portfacts(sc, &sc->pfacts[i], i)) != 0) { mps_printf(sc, "%s failed to get portfacts for port %d\n", @@ -1293,7 +1383,7 @@ mps_log_evt_handler(struct mps_softc *sc static int mps_attach_log(struct mps_softc *sc) { - uint8_t events[16]; + u32 events[MPI2_EVENT_NOTIFY_EVENTMASK_WORDS]; bzero(events, 16); setbit(events, MPI2_EVENT_LOG_DATA); @@ -1441,6 +1531,64 @@ mps_complete_command(struct mps_command } } + +static void +mps_sas_log_info(struct mps_softc *sc , u32 log_info) +{ + union loginfo_type { + u32 loginfo; + struct { + u32 subcode:16; + u32 code:8; + u32 originator:4; + u32 bus_type:4; + } dw; + }; + union loginfo_type sas_loginfo; + char *originator_str = NULL; + + sas_loginfo.loginfo = log_info; + if (sas_loginfo.dw.bus_type != 3 /*SAS*/) + return; + + /* each nexus loss loginfo */ + if (log_info == 0x31170000) + return; + + /* eat the loginfos associated with task aborts */ + if ((log_info == 30050000 || log_info == + 0x31140000 || log_info == 0x31130000)) + return; + + switch (sas_loginfo.dw.originator) { + case 0: + originator_str = "IOP"; + break; + case 1: + originator_str = "PL"; + break; + case 2: + originator_str = "IR"; + break; +} + + mps_dprint(sc, MPS_INFO, "log_info(0x%08x): originator(%s), " + "code(0x%02x), sub_code(0x%04x)\n", log_info, + originator_str, sas_loginfo.dw.code, + sas_loginfo.dw.subcode); +} + +static void +mps_display_reply_info(struct mps_softc *sc, uint8_t *reply) +{ + MPI2DefaultReply_t *mpi_reply; + u16 sc_status; + + mpi_reply = (MPI2DefaultReply_t*)reply; + sc_status = le16toh(mpi_reply->IOCStatus); + if (sc_status & MPI2_IOCSTATUS_FLAG_LOG_INFO_AVAILABLE) + mps_sas_log_info(sc, le32toh(mpi_reply->IOCLogInfo)); +} void mps_intr(void *data) { @@ -1508,7 +1656,7 @@ mps_intr_locked(void *data) flags = desc->Default.ReplyFlags & MPI2_RPY_DESCRIPT_FLAGS_TYPE_MASK; if ((flags == MPI2_RPY_DESCRIPT_FLAGS_UNUSED) - || (desc->Words.High == 0xffffffff)) + || (le32toh(desc->Words.High) == 0xffffffff)) break; /* increment the replypostindex now, so that event handlers @@ -1523,7 +1671,7 @@ mps_intr_locked(void *data) switch (flags) { case MPI2_RPY_DESCRIPT_FLAGS_SCSI_IO_SUCCESS: - cm = &sc->commands[desc->SCSIIOSuccess.SMID]; + cm = &sc->commands[le16toh(desc->SCSIIOSuccess.SMID)]; cm->cm_reply = NULL; break; case MPI2_RPY_DESCRIPT_FLAGS_ADDRESS_REPLY: @@ -1559,9 +1707,10 @@ mps_intr_locked(void *data) sc->reply_frames, sc->fqdepth, sc->facts->ReplyFrameSize * 4); printf("%s: baddr %#x,\n", __func__, baddr); + /* LSI-TODO. See Linux Code. Need Gracefull exit*/ panic("Reply address out of range"); } - if (desc->AddressReply.SMID == 0) { + if (le16toh(desc->AddressReply.SMID) == 0) { if (((MPI2_DEFAULT_REPLY *)reply)->Function == MPI2_FUNCTION_DIAG_BUFFER_POST) { /* @@ -1573,7 +1722,7 @@ mps_intr_locked(void *data) */ rel_rep = (MPI2_DIAG_RELEASE_REPLY *)reply; - if (rel_rep->IOCStatus == + if (le16toh(rel_rep->IOCStatus) == MPI2_IOCSTATUS_DIAGNOSTIC_RELEASED) { pBuffer = @@ -1589,10 +1738,10 @@ mps_intr_locked(void *data) (MPI2_EVENT_NOTIFICATION_REPLY *) reply); } else { - cm = &sc->commands[desc->AddressReply.SMID]; + cm = &sc->commands[le16toh(desc->AddressReply.SMID)]; cm->cm_reply = reply; cm->cm_reply_data = - desc->AddressReply.ReplyFrameAddress; + le32toh(desc->AddressReply.ReplyFrameAddress); } break; } @@ -1606,9 +1755,14 @@ mps_intr_locked(void *data) cm = NULL; break; } + - if (cm != NULL) + if (cm != NULL) { + // Print Error reply frame + if (cm->cm_reply) + mps_display_reply_info(sc,cm->cm_reply); mps_complete_command(cm); + } desc->Words.Low = 0xffffffff; desc->Words.High = 0xffffffff; @@ -1631,7 +1785,7 @@ mps_dispatch_event(struct mps_softc *sc, struct mps_event_handle *eh; int event, handled = 0; - event = reply->Event; + event = le16toh(reply->Event); TAILQ_FOREACH(eh, &sc->event_list, eh_list) { if (isset(eh->mask, event)) { eh->callback(sc, data, reply); @@ -1640,7 +1794,7 @@ mps_dispatch_event(struct mps_softc *sc, } if (handled == 0) - device_printf(sc->mps_dev, "Unhandled event 0x%x\n", event); + device_printf(sc->mps_dev, "Unhandled event 0x%x\n", le16toh(event)); /* * This is the only place that the event/reply should be freed. @@ -1671,13 +1825,18 @@ mps_reregister_events_complete(struct mp * suitable for the controller. */ int -mps_register_events(struct mps_softc *sc, uint8_t *mask, +mps_register_events(struct mps_softc *sc, u32 *mask, mps_evt_callback_t *cb, void *data, struct mps_event_handle **handle) { struct mps_event_handle *eh; int error = 0; eh = malloc(sizeof(struct mps_event_handle), M_MPT2, M_WAITOK|M_ZERO); + if(!eh) { + device_printf(sc->mps_dev, "Cannot allocate memory %s %d\n", + __func__, __LINE__); + return (ENOMEM); + } eh->callback = cb; eh->data = data; TAILQ_INSERT_TAIL(&sc->event_list, eh, eh_list); @@ -1690,24 +1849,25 @@ mps_register_events(struct mps_softc *sc int mps_update_events(struct mps_softc *sc, struct mps_event_handle *handle, - uint8_t *mask) + u32 *mask) { MPI2_EVENT_NOTIFICATION_REQUEST *evtreq; MPI2_EVENT_NOTIFICATION_REPLY *reply; struct mps_command *cm; - struct mps_event_handle *eh; int error, i; mps_dprint(sc, MPS_TRACE, "%s\n", __func__); if ((mask != NULL) && (handle != NULL)) - bcopy(mask, &handle->mask[0], 16); - memset(sc->event_mask, 0xff, 16); + bcopy(mask, &handle->mask[0], sizeof(u32) * + MPI2_EVENT_NOTIFY_EVENTMASK_WORDS); + + for (i = 0; i < MPI2_EVENT_NOTIFY_EVENTMASK_WORDS; i++) + sc->event_mask[i] = -1; + + for (i = 0; i < MPI2_EVENT_NOTIFY_EVENTMASK_WORDS; i++) + sc->event_mask[i] &= ~handle->mask[i]; - TAILQ_FOREACH(eh, &sc->event_list, eh_list) { - for (i = 0; i < 16; i++) - sc->event_mask[i] &= ~eh->mask[i]; - } if ((cm = mps_alloc_command(sc)) == NULL) return (EBUSY); @@ -1719,10 +1879,13 @@ mps_update_events(struct mps_softc *sc, { u_char fullmask[16]; memset(fullmask, 0x00, 16); - bcopy(fullmask, (uint8_t *)&evtreq->EventMasks, 16); + bcopy(fullmask, &evtreq->EventMasks[0], sizeof(u32) * + MPI2_EVENT_NOTIFY_EVENTMASK_WORDS); } #else - bcopy(sc->event_mask, (uint8_t *)&evtreq->EventMasks, 16); + for (i = 0; i < MPI2_EVENT_NOTIFY_EVENTMASK_WORDS; i++) + evtreq->EventMasks[i] = + htole32(sc->event_mask[i]); #endif cm->cm_desc.Default.RequestFlags = MPI2_REQ_DESCRIPT_FLAGS_DEFAULT_TYPE; cm->cm_data = NULL; @@ -1751,10 +1914,11 @@ mps_reregister_events(struct mps_softc * /* first, reregister events */ - memset(sc->event_mask, 0xff, 16); + for (i = 0; i < MPI2_EVENT_NOTIFY_EVENTMASK_WORDS; i++) + sc->event_mask[i] = -1; TAILQ_FOREACH(eh, &sc->event_list, eh_list) { - for (i = 0; i < 16; i++) + for (i = 0; i < MPI2_EVENT_NOTIFY_EVENTMASK_WORDS; i++) sc->event_mask[i] &= ~eh->mask[i]; } @@ -1768,10 +1932,13 @@ mps_reregister_events(struct mps_softc * { u_char fullmask[16]; memset(fullmask, 0x00, 16); - bcopy(fullmask, (uint8_t *)&evtreq->EventMasks, 16); + bcopy(fullmask, &evtreq->EventMasks[0], sizeof(u32) * + MPI2_EVENT_NOTIFY_EVENTMASK_WORDS); } #else - bcopy(sc->event_mask, (uint8_t *)&evtreq->EventMasks, 16); + for (i = 0; i < MPI2_EVENT_NOTIFY_EVENTMASK_WORDS; i++) + evtreq->EventMasks[i] = + htole32(sc->event_mask[i]); #endif cm->cm_desc.Default.RequestFlags = MPI2_REQ_DESCRIPT_FLAGS_DEFAULT_TYPE; cm->cm_data = NULL; @@ -1783,13 +1950,12 @@ mps_reregister_events(struct mps_softc * return (error); } -int +void mps_deregister_events(struct mps_softc *sc, struct mps_event_handle *handle) { TAILQ_REMOVE(&sc->event_list, handle, eh_list); free(handle, M_MPT2); - return (mps_update_events(sc, NULL, NULL)); } /* @@ -1819,10 +1985,16 @@ mps_add_chain(struct mps_command *cm) TAILQ_INSERT_TAIL(&cm->cm_chain_list, chain, chain_link); sgc = (MPI2_SGE_CHAIN32 *)&cm->cm_sge->MpiChain; - sgc->Length = space; + sgc->Length = htole16(space); sgc->NextChainOffset = 0; + /* TODO Looks like bug in Setting sgc->Flags. + * sgc->Flags = ( MPI2_SGE_FLAGS_CHAIN_ELEMENT | MPI2_SGE_FLAGS_64_BIT_ADDRESSING | + * MPI2_SGE_FLAGS_SYSTEM_ADDRESS) << MPI2_SGE_FLAGS_SHIFT + * This is fine.. because we are not using simple element. In case of + * MPI2_SGE_CHAIN32, we have seperate Length and Flags feild. + */ sgc->Flags = MPI2_SGE_FLAGS_CHAIN_ELEMENT; - sgc->Address = chain->chain_busaddr; + sgc->Address = htole32(chain->chain_busaddr); cm->cm_sge = (MPI2_SGE_IO_UNION *)&chain->chain->MpiSimple; cm->cm_sglsize = space; @@ -1842,6 +2014,7 @@ mps_push_sge(struct mps_command *cm, voi MPI2_SGE_SIMPLE64 *sge = sgep; int error, type; uint32_t saved_buf_len, saved_address_low, saved_address_high; + u32 sge_flags; type = (tc->Flags & MPI2_SGE_FLAGS_ELEMENT_MASK); @@ -1910,6 +2083,11 @@ mps_push_sge(struct mps_command *cm, voi * understanding the code. */ cm->cm_sglsize -= len; + /* Endian Safe code */ + sge_flags = sge->FlagsLength; + sge->FlagsLength = htole32(sge_flags); + sge->Address.High = htole32(sge->Address.High); + sge->Address.Low = htole32(sge->Address.Low); bcopy(sgep, cm->cm_sge, len); cm->cm_sge = (MPI2_SGE_IO_UNION *)((uintptr_t)cm->cm_sge + len); return (mps_add_chain(cm)); @@ -1960,6 +2138,11 @@ mps_push_sge(struct mps_command *cm, voi MPI2_SGE_FLAGS_64_BIT_ADDRESSING) << MPI2_SGE_FLAGS_SHIFT); cm->cm_sglsize -= len; + /* Endian Safe code */ + sge_flags = sge->FlagsLength; + sge->FlagsLength = htole32(sge_flags); + sge->Address.High = htole32(sge->Address.High); + sge->Address.Low = htole32(sge->Address.Low); bcopy(sgep, cm->cm_sge, len); cm->cm_sge = (MPI2_SGE_IO_UNION *)((uintptr_t)cm->cm_sge + len); @@ -1985,6 +2168,11 @@ mps_push_sge(struct mps_command *cm, voi } cm->cm_sglsize -= len; + /* Endian Safe code */ + sge_flags = sge->FlagsLength; + sge->FlagsLength = htole32(sge_flags); + sge->Address.High = htole32(sge->Address.High); + sge->Address.Low = htole32(sge->Address.Low); bcopy(sgep, cm->cm_sge, len); cm->cm_sge = (MPI2_SGE_IO_UNION *)((uintptr_t)cm->cm_sge + len); return (0); @@ -2004,6 +2192,7 @@ mps_add_dmaseg(struct mps_command *cm, v */ flags |= MPI2_SGE_FLAGS_SIMPLE_ELEMENT | MPI2_SGE_FLAGS_64_BIT_ADDRESSING; + /* Set Endian safe macro in mps_push_sge */ sge.FlagsLength = len | (flags << MPI2_SGE_FLAGS_SHIFT); mps_from_u64(pa, &sge.Address); @@ -2114,11 +2303,11 @@ mps_map_command(struct mps_softc *sc, st /* Add a zero-length element as needed */ if (cm->cm_sge != NULL) { sge = (MPI2_SGE_SIMPLE32 *)cm->cm_sge; - sge->FlagsLength = (MPI2_SGE_FLAGS_LAST_ELEMENT | + sge->FlagsLength = htole32((MPI2_SGE_FLAGS_LAST_ELEMENT | MPI2_SGE_FLAGS_END_OF_BUFFER | MPI2_SGE_FLAGS_END_OF_LIST | MPI2_SGE_FLAGS_SIMPLE_ELEMENT) << - MPI2_SGE_FLAGS_SHIFT; + MPI2_SGE_FLAGS_SHIFT); sge->Address = 0; } mps_enqueue_request(sc, cm); @@ -2135,9 +2324,12 @@ mps_map_command(struct mps_softc *sc, st int *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 05:25:23 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 255A01067C19; Sun, 1 Jul 2012 05:24:00 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0EDD78FC14; Sun, 1 Jul 2012 05:24:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q615O0NS067766; Sun, 1 Jul 2012 05:24:00 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q615NxgG067751; Sun, 1 Jul 2012 05:23:59 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <201207010523.q615NxgG067751@svn.freebsd.org> From: "Kenneth D. Merry" Date: Sun, 1 Jul 2012 05:23: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: r237877 - in stable/8/sys/dev/mps: . mpi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 05:25:23 -0000 Author: ken Date: Sun Jul 1 05:23:59 2012 New Revision: 237877 URL: http://svn.freebsd.org/changeset/base/237877 Log: MFC 237683: r237683 | ken | 2012-06-27 21:48:54 -0600 (Wed, 27 Jun 2012) | 129 lines Bring in LSI's latest mps(4) 6Gb SAS and WarpDrive driver, version 14.00.00.01-fbsd. Their description of the changes is as follows: 1. Copyright contents has been changed in all respective .c and .h files 2. Support for WRITE12 and READ12 for direct-io (warpdrive only) has been added. 3. Driver has added checks to see if Drive has READ_CAP_16 support before sending it down to the device. If SPC3_SID_PROTECT flag is set in the inquiry data, the device supports protection information, and must support the 16 byte read capacity command, otherwise continue without sending read cap 16. This will optimize driver performance, since it will not send READ_CAP_16 to the drive which does not have support of READ_CAP_16. 4. With new approach, "MPTIOCTL_RESET_ADAPTER" IOCTL will not use DELAY() which is busy loop implementation. It will use (Better way to sleep without busy loop). Also from the HBA reset code path and some other places, DELAY() is replaced with msleep() or "pause()", which is based on sleep/wakeup style calls. Driver use msleep()/pause() instead of DELAY based on CAN_SLEEP/NO_SLEEP flags to avoid busy loop which is not required all the time.e.a a. While driver is getting loaded, driver calls most of the commands with NO_SLEEP. b. When Driver is functional and it needs Reinit of HBA, CAN_SLEEP flag is used. 5. driver is not Endian safe. It will not work on Big Endian machines like Sparc and PowerPC platforms because it assumes it is running on a Little Endian machine. Driver code is modified such way that it does not assume CPU arch is Little Endian. a. All places where Driver interacts from HBA to Host, it converts Little Endian format to CPU format. b. All places where Driver interacts from Host to HBA, it converts CPU format to Little Endian. 6. Findout memory leaks in FreeBSD Driver and resolve those, such as memory leak in targ's luns creation/deletion. Also added additional checks to see memory allocation success/fail. 7. Add loginfo prints as debug message, i.e. When FW sends any loginfo, Driver should print those as debug message. This will help for debugging purpose. 8. There is possibility to get config request timeout. Current driver is able to detect config request timetout, but it does not do anything on config_request timeout. Driver should call mps_reinit() if any request_poll (which is called as part of config_request) is time out. 9. cdb length check is required for 32 byte CDB. Add correct mpi control value for 32 bit CDB as below while submitting SCSI IO Request to controller. mpi_control |= 4 << MPI2_SCSIIO_CONTROL_ADDCDBLEN_SHIFT; 10. Check the actual status of Message unit reset (mps_message_unit_reset).Previously FreeBSD Driver just writes MPI2_FUNCTION_IOC_MESSAGE_UNIT_RESET and never check the ack (it just wait for 50 millisecond). So, Driver now check the status of "MPI2_FUNCTION_IOC_MESSAGE_UNIT_RESET" after writing it to the FW. Now it also checking for whether doorbell ack uses msleep with proper sleep flags, instead of . 11. Previously CAM does not detect Multi-Lun Devices. In order to detect Multi-Lun Devices by CAM the driver needs following change set: a. There is "max_lun" field which Driver need to set based on hw/fw support. Currently LSI released driver does not set this field. b. Default of "max_lun" should not be 0 in OS, but it is currently set to 0 in CAM layer. c. Export max_lun capacity to 255 12. Driver will not reset target info after port enable complete and also do Device removal when Device remove from FW. The detail description is as follows a. When Driver receive WD PD add events, it will add all information in driver local data structure. b. Only for WD, we have below checks after port enable completes, where driver clear off all information retrieved at #1. if ((sc->WD_available && (sc->WD_hide_expose == MPS_WD_HIDE_ALWAYS)) || (sc->WD_valid_config && (sc->WD_hide_expose == MPS_WD_HIDE_IF_VOLUME)) { // clear off target data structure. } It is mainly not to attach PDs to OS. FreeBSD does bus rescan as older Parallel scsi style. So Driver needs to handle which Drive is visible to OS. That is a reason we have to clear off targ information for PDs. Again, above logic was implemented long time ago. Similar concept we have for non-wd also. For that, LSI have introduced different logic to hide PDs. Eventually, because of above gap, when Phy goes offline, we observe below failure. That is what Driver is not doing complete removal of device with FW. (which was pointed by Scott) Apr 5 02:39:24 Freebsd7 kernel: mpslsi0: mpssas_prepare_remove Apr 5 02:39:24 Freebsd7 kernel: mpssas_prepare_remove 497 : invalid handle 0xe Now Driver will not reset target info after port enable complete and also will do Device removal when Device remove from FW. 13. Returning "CAM_SEL_TIMEOUT" instead of "CAM_TID_INVALID" error code on request to the Target IDs that have no devices conected at that moment. As if "CAM_TID_INVALID" error code is returned to the CAM Layaer then it results in a huge chain of errors in verbose kernel messages on boot and every hot-plug event. Submitted by: Sreekanth Reddy Modified: stable/8/sys/dev/mps/mpi/mpi2.h stable/8/sys/dev/mps/mpi/mpi2_cnfg.h stable/8/sys/dev/mps/mpi/mpi2_hbd.h stable/8/sys/dev/mps/mpi/mpi2_history.txt stable/8/sys/dev/mps/mpi/mpi2_init.h stable/8/sys/dev/mps/mpi/mpi2_ioc.h stable/8/sys/dev/mps/mpi/mpi2_ra.h stable/8/sys/dev/mps/mpi/mpi2_raid.h stable/8/sys/dev/mps/mpi/mpi2_sas.h stable/8/sys/dev/mps/mpi/mpi2_targ.h stable/8/sys/dev/mps/mpi/mpi2_tool.h stable/8/sys/dev/mps/mpi/mpi2_type.h stable/8/sys/dev/mps/mps.c stable/8/sys/dev/mps/mps_config.c stable/8/sys/dev/mps/mps_ioctl.h stable/8/sys/dev/mps/mps_mapping.c stable/8/sys/dev/mps/mps_mapping.h stable/8/sys/dev/mps/mps_sas.c stable/8/sys/dev/mps/mps_sas.h stable/8/sys/dev/mps/mps_sas_lsi.c stable/8/sys/dev/mps/mps_user.c stable/8/sys/dev/mps/mpsvar.h Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/dev/mps/mpi/mpi2.h ============================================================================== --- stable/8/sys/dev/mps/mpi/mpi2.h Sun Jul 1 05:22:45 2012 (r237876) +++ stable/8/sys/dev/mps/mpi/mpi2.h Sun Jul 1 05:23:59 2012 (r237877) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2011 LSI Corp. + * Copyright (c) 2011, 2012 LSI Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -29,7 +29,7 @@ */ /* - * Copyright (c) 2000-2011 LSI Corporation. + * Copyright (c) 2000-2012 LSI Corporation. * * * Name: mpi2.h Modified: stable/8/sys/dev/mps/mpi/mpi2_cnfg.h ============================================================================== --- stable/8/sys/dev/mps/mpi/mpi2_cnfg.h Sun Jul 1 05:22:45 2012 (r237876) +++ stable/8/sys/dev/mps/mpi/mpi2_cnfg.h Sun Jul 1 05:23:59 2012 (r237877) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2011 LSI Corp. + * Copyright (c) 2011, 2012 LSI Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -29,7 +29,7 @@ */ /* - * Copyright (c) 2000-2011 LSI Corporation. + * Copyright (c) 2000-2012 LSI Corporation. * * * Name: mpi2_cnfg.h Modified: stable/8/sys/dev/mps/mpi/mpi2_hbd.h ============================================================================== --- stable/8/sys/dev/mps/mpi/mpi2_hbd.h Sun Jul 1 05:22:45 2012 (r237876) +++ stable/8/sys/dev/mps/mpi/mpi2_hbd.h Sun Jul 1 05:23:59 2012 (r237877) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2011 LSI Corp. + * Copyright (c) 2011, 2012 LSI Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -29,7 +29,7 @@ */ /* - * Copyright (c) 2009-2011 LSI Corporation. + * Copyright (c) 2009-2012 LSI Corporation. * * * Name: mpi2_hbd.h Modified: stable/8/sys/dev/mps/mpi/mpi2_history.txt ============================================================================== --- stable/8/sys/dev/mps/mpi/mpi2_history.txt Sun Jul 1 05:22:45 2012 (r237876) +++ stable/8/sys/dev/mps/mpi/mpi2_history.txt Sun Jul 1 05:23:59 2012 (r237877) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2011 LSI Corp. + * Copyright (c) 2011, 2012 LSI Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -32,7 +32,7 @@ Fusion-MPT MPI 2.0 Header File Change History ============================== - Copyright (c) 2000-2011 LSI Corporation. + Copyright (c) 2000-2012 LSI Corporation. --------------------------------------- Header Set Release Version: 02.00.18 Modified: stable/8/sys/dev/mps/mpi/mpi2_init.h ============================================================================== --- stable/8/sys/dev/mps/mpi/mpi2_init.h Sun Jul 1 05:22:45 2012 (r237876) +++ stable/8/sys/dev/mps/mpi/mpi2_init.h Sun Jul 1 05:23:59 2012 (r237877) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2011 LSI Corp. + * Copyright (c) 2011, 2012 LSI Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -29,7 +29,7 @@ */ /* - * Copyright (c) 2000-2011 LSI Corporation. + * Copyright (c) 2000-2012 LSI Corporation. * * * Name: mpi2_init.h Modified: stable/8/sys/dev/mps/mpi/mpi2_ioc.h ============================================================================== --- stable/8/sys/dev/mps/mpi/mpi2_ioc.h Sun Jul 1 05:22:45 2012 (r237876) +++ stable/8/sys/dev/mps/mpi/mpi2_ioc.h Sun Jul 1 05:23:59 2012 (r237877) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2011 LSI Corp. + * Copyright (c) 2011, 2012 LSI Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -29,7 +29,7 @@ */ /* - * Copyright (c) 2000-2011 LSI Corporation. + * Copyright (c) 2000-2012 LSI Corporation. * * * Name: mpi2_ioc.h Modified: stable/8/sys/dev/mps/mpi/mpi2_ra.h ============================================================================== --- stable/8/sys/dev/mps/mpi/mpi2_ra.h Sun Jul 1 05:22:45 2012 (r237876) +++ stable/8/sys/dev/mps/mpi/mpi2_ra.h Sun Jul 1 05:23:59 2012 (r237877) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2011 LSI Corp. + * Copyright (c) 2011, 2012 LSI Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -29,7 +29,7 @@ */ /* - * Copyright (c) 2011 LSI Corporation. + * Copyright (c) 2012 LSI Corporation. * * * Name: mpi2_ra.h Modified: stable/8/sys/dev/mps/mpi/mpi2_raid.h ============================================================================== --- stable/8/sys/dev/mps/mpi/mpi2_raid.h Sun Jul 1 05:22:45 2012 (r237876) +++ stable/8/sys/dev/mps/mpi/mpi2_raid.h Sun Jul 1 05:23:59 2012 (r237877) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2011 LSI Corp. + * Copyright (c) 2011, 2012 LSI Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -29,7 +29,7 @@ */ /* - * Copyright (c) 2000-2011 LSI Corporation. + * Copyright (c) 2000-2012 LSI Corporation. * * * Name: mpi2_raid.h Modified: stable/8/sys/dev/mps/mpi/mpi2_sas.h ============================================================================== --- stable/8/sys/dev/mps/mpi/mpi2_sas.h Sun Jul 1 05:22:45 2012 (r237876) +++ stable/8/sys/dev/mps/mpi/mpi2_sas.h Sun Jul 1 05:23:59 2012 (r237877) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2011 LSI Corp. + * Copyright (c) 2011, 2012 LSI Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -29,7 +29,7 @@ */ /* - * Copyright (c) 2000-2011 LSI Corporation. + * Copyright (c) 2000-2012 LSI Corporation. * * * Name: mpi2_sas.h Modified: stable/8/sys/dev/mps/mpi/mpi2_targ.h ============================================================================== --- stable/8/sys/dev/mps/mpi/mpi2_targ.h Sun Jul 1 05:22:45 2012 (r237876) +++ stable/8/sys/dev/mps/mpi/mpi2_targ.h Sun Jul 1 05:23:59 2012 (r237877) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2011 LSI Corp. + * Copyright (c) 2011, 2012 LSI Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -29,7 +29,7 @@ */ /* - * Copyright (c) 2000-2011 LSI Corporation. + * Copyright (c) 2000-2012 LSI Corporation. * * * Name: mpi2_targ.h Modified: stable/8/sys/dev/mps/mpi/mpi2_tool.h ============================================================================== --- stable/8/sys/dev/mps/mpi/mpi2_tool.h Sun Jul 1 05:22:45 2012 (r237876) +++ stable/8/sys/dev/mps/mpi/mpi2_tool.h Sun Jul 1 05:23:59 2012 (r237877) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2011 LSI Corp. + * Copyright (c) 2011, 2012 LSI Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -29,7 +29,7 @@ */ /* - * Copyright (c) 2000-2011 LSI Corporation. + * Copyright (c) 2000-2012 LSI Corporation. * * * Name: mpi2_tool.h Modified: stable/8/sys/dev/mps/mpi/mpi2_type.h ============================================================================== --- stable/8/sys/dev/mps/mpi/mpi2_type.h Sun Jul 1 05:22:45 2012 (r237876) +++ stable/8/sys/dev/mps/mpi/mpi2_type.h Sun Jul 1 05:23:59 2012 (r237877) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2011 LSI Corp. + * Copyright (c) 2011, 2012 LSI Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -29,7 +29,7 @@ */ /* - * Copyright (c) 2000-2011 LSI Corporation. + * Copyright (c) 2000-2012 LSI Corporation. * * * Name: mpi2_type.h Modified: stable/8/sys/dev/mps/mps.c ============================================================================== --- stable/8/sys/dev/mps/mps.c Sun Jul 1 05:22:45 2012 (r237876) +++ stable/8/sys/dev/mps/mps.c Sun Jul 1 05:23:59 2012 (r237877) @@ -1,31 +1,6 @@ /*- * Copyright (c) 2009 Yahoo! Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - */ -/*- - * Copyright (c) 2011 LSI Corp. + * Copyright (c) 2012 LSI Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -82,6 +57,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include @@ -98,9 +74,9 @@ __FBSDID("$FreeBSD$"); #include #include -static int mps_diag_reset(struct mps_softc *sc); +static int mps_diag_reset(struct mps_softc *sc, int sleep_flag); static int mps_init_queues(struct mps_softc *sc); -static int mps_message_unit_reset(struct mps_softc *sc); +static int mps_message_unit_reset(struct mps_softc *sc, int sleep_flag); static int mps_transition_operational(struct mps_softc *sc); static void mps_startup(void *arg); static int mps_send_iocinit(struct mps_softc *sc); @@ -112,7 +88,7 @@ static void mps_config_complete(struct m static void mps_periodic(void *); static int mps_reregister_events(struct mps_softc *sc); static void mps_enqueue_request(struct mps_softc *sc, struct mps_command *cm); - +static int mps_wait_db_ack(struct mps_softc *sc, int timeout, int sleep_flag); SYSCTL_NODE(_hw, OID_AUTO, mps, CTLFLAG_RD, 0, "MPS Driver Parameters"); MALLOC_DEFINE(M_MPT2, "mps", "mpt2 driver memory"); @@ -123,8 +99,32 @@ MALLOC_DEFINE(M_MPT2, "mps", "mpt2 drive */ static char mpt2_reset_magic[] = { 0x00, 0x0f, 0x04, 0x0b, 0x02, 0x07, 0x0d }; +/* Added this union to smoothly convert le64toh cm->cm_desc.Words. + * Compiler only support unint64_t to be passed as argument. + * Otherwise it will through below error + * "aggregate value used where an integer was expected" + */ + +typedef union _reply_descriptor { + u64 word; + struct { + u32 low; + u32 high; + } u; +}reply_descriptor,address_descriptor; + +/* + * sleep_flag can be either CAN_SLEEP or NO_SLEEP. + * If this function is called from process context, it can sleep + * and there is no harm to sleep, in case if this fuction is called + * from Interrupt handler, we can not sleep and need NO_SLEEP flag set. + * based on sleep flags driver will call either msleep, pause or DELAY. + * msleep and pause are of same variant, but pause is used when mps_mtx + * is not hold by driver. + * + */ static int -mps_diag_reset(struct mps_softc *sc) +mps_diag_reset(struct mps_softc *sc,int sleep_flag) { uint32_t reg; int i, error, tries = 0; @@ -134,14 +134,25 @@ mps_diag_reset(struct mps_softc *sc) /* Clear any pending interrupts */ mps_regwrite(sc, MPI2_HOST_INTERRUPT_STATUS_OFFSET, 0x0); + /*Force NO_SLEEP for threads prohibited to sleep + * e.a Thread from interrupt handler are prohibited to sleep. + */ + if(curthread->td_pflags & TDP_NOSLEEPING) + sleep_flag = NO_SLEEP; + /* Push the magic sequence */ error = ETIMEDOUT; while (tries++ < 20) { for (i = 0; i < sizeof(mpt2_reset_magic); i++) mps_regwrite(sc, MPI2_WRITE_SEQUENCE_OFFSET, mpt2_reset_magic[i]); - - DELAY(100 * 1000); + /* wait 100 msec */ + if (mtx_owned(&sc->mps_mtx) && sleep_flag == CAN_SLEEP) + msleep(&sc->msleep_fake_chan, &sc->mps_mtx, 0, "mpsdiag", hz/10); + else if (sleep_flag == CAN_SLEEP) + pause("mpsdiag", hz/10); + else + DELAY(100 * 1000); reg = mps_regread(sc, MPI2_HOST_DIAGNOSTIC_OFFSET); if (reg & MPI2_DIAG_DIAG_WRITE_ENABLE) { @@ -159,7 +170,13 @@ mps_diag_reset(struct mps_softc *sc) /* Wait up to 300 seconds in 50ms intervals */ error = ETIMEDOUT; for (i = 0; i < 60000; i++) { - DELAY(50000); + /* wait 50 msec */ + if (mtx_owned(&sc->mps_mtx) && sleep_flag == CAN_SLEEP) + msleep(&sc->msleep_fake_chan, &sc->mps_mtx, 0, "mpsdiag", hz/20); + else if (sleep_flag == CAN_SLEEP) + pause("mpsdiag", hz/20); + else + DELAY(50 * 1000); reg = mps_regread(sc, MPI2_DOORBELL_OFFSET); if ((reg & MPI2_IOC_STATE_MASK) != MPI2_IOC_STATE_RESET) { error = 0; @@ -175,7 +192,7 @@ mps_diag_reset(struct mps_softc *sc) } static int -mps_message_unit_reset(struct mps_softc *sc) +mps_message_unit_reset(struct mps_softc *sc, int sleep_flag) { mps_dprint(sc, MPS_TRACE, "%s\n", __func__); @@ -183,7 +200,12 @@ mps_message_unit_reset(struct mps_softc mps_regwrite(sc, MPI2_DOORBELL_OFFSET, MPI2_FUNCTION_IOC_MESSAGE_UNIT_RESET << MPI2_DOORBELL_FUNCTION_SHIFT); - DELAY(50000); + + if (mps_wait_db_ack(sc, 5, sleep_flag) != 0) { + mps_dprint(sc, MPS_FAULT, "Doorbell handshake failed : <%s>\n", + __func__); + return (ETIMEDOUT); + } return (0); } @@ -193,9 +215,12 @@ mps_transition_ready(struct mps_softc *s { uint32_t reg, state; int error, tries = 0; + int sleep_flags; mps_dprint(sc, MPS_TRACE, "%s\n", __func__); - + /* If we are in attach call, do not sleep */ + sleep_flags = (sc->mps_flags & MPS_FLAGS_ATTACH_DONE) + ? CAN_SLEEP:NO_SLEEP; error = 0; while (tries++ < 5) { reg = mps_regread(sc, MPI2_DOORBELL_OFFSET); @@ -206,7 +231,7 @@ mps_transition_ready(struct mps_softc *s * resetting it. */ if (reg & MPI2_DOORBELL_USED) { - mps_diag_reset(sc); + mps_diag_reset(sc, sleep_flags); DELAY(50000); continue; } @@ -227,10 +252,10 @@ mps_transition_ready(struct mps_softc *s } else if (state == MPI2_IOC_STATE_FAULT) { mps_dprint(sc, MPS_INFO, "IOC in fault state 0x%x\n", state & MPI2_DOORBELL_FAULT_CODE_MASK); - mps_diag_reset(sc); + mps_diag_reset(sc, sleep_flags); } else if (state == MPI2_IOC_STATE_OPERATIONAL) { /* Need to take ownership */ - mps_message_unit_reset(sc); + mps_message_unit_reset(sc, sleep_flags); } else if (state == MPI2_IOC_STATE_RESET) { /* Wait a bit, IOC might be in transition */ mps_dprint(sc, MPS_FAULT, @@ -310,7 +335,7 @@ mps_reinit(struct mps_softc *sc) mps_printf(sc, "%s mask interrupts\n", __func__); mps_mask_intr(sc); - error = mps_diag_reset(sc); + error = mps_diag_reset(sc, CAN_SLEEP); if (error != 0) { panic("%s hard reset failed with error %d\n", __func__, error); @@ -368,19 +393,56 @@ mps_reinit(struct mps_softc *sc) return 0; } -/* Wait for the chip to ACK a word that we've put into its FIFO */ +/* Wait for the chip to ACK a word that we've put into its FIFO + * Wait for seconds. In single loop wait for busy loop + * for 500 microseconds. + * Total is [ 0.5 * (2000 * ) ] in miliseconds. + * */ static int -mps_wait_db_ack(struct mps_softc *sc) +mps_wait_db_ack(struct mps_softc *sc, int timeout, int sleep_flag) { - int retry; - for (retry = 0; retry < MPS_DB_MAX_WAIT; retry++) { - if ((mps_regread(sc, MPI2_HOST_INTERRUPT_STATUS_OFFSET) & - MPI2_HIS_SYS2IOC_DB_STATUS) == 0) - return (0); - DELAY(2000); - } + u32 cntdn, count; + u32 int_status; + u32 doorbell; + + count = 0; + cntdn = (sleep_flag == CAN_SLEEP) ? 1000*timeout : 2000*timeout; + do { + int_status = mps_regread(sc, MPI2_HOST_INTERRUPT_STATUS_OFFSET); + if (!(int_status & MPI2_HIS_SYS2IOC_DB_STATUS)) { + mps_dprint(sc, MPS_INFO, + "%s: successfull count(%d), timeout(%d)\n", + __func__, count, timeout); + return 0; + } else if (int_status & MPI2_HIS_IOC2SYS_DB_STATUS) { + doorbell = mps_regread(sc, MPI2_DOORBELL_OFFSET); + if ((doorbell & MPI2_IOC_STATE_MASK) == + MPI2_IOC_STATE_FAULT) { + mps_dprint(sc, MPS_FAULT, + "fault_state(0x%04x)!\n", doorbell); + return (EFAULT); + } + } else if (int_status == 0xFFFFFFFF) + goto out; + + /* If it can sleep, sleep for 1 milisecond, else busy loop for + * 0.5 milisecond */ + if (mtx_owned(&sc->mps_mtx) && sleep_flag == CAN_SLEEP) + msleep(&sc->msleep_fake_chan, &sc->mps_mtx, 0, + "mpsdba", hz/1000); + else if (sleep_flag == CAN_SLEEP) + pause("mpsdba", hz/1000); + else + DELAY(500); + count++; + } while (--cntdn); + + out: + mps_dprint(sc, MPS_FAULT, "%s: failed due to timeout count(%d), " + "int_status(%x)!\n", __func__, count, int_status); return (ETIMEDOUT); + } /* Wait for the chip to signal that the next word in its FIFO can be fetched */ @@ -406,6 +468,10 @@ mps_request_sync(struct mps_softc *sc, v uint32_t *data32; uint16_t *data16; int i, count, ioc_sz, residual; + int sleep_flags = CAN_SLEEP; + + if(curthread->td_pflags & TDP_NOSLEEPING) + sleep_flags = NO_SLEEP; /* Step 1 */ mps_regwrite(sc, MPI2_HOST_INTERRUPT_STATUS_OFFSET, 0x0); @@ -430,7 +496,7 @@ mps_request_sync(struct mps_softc *sc, v return (ENXIO); } mps_regwrite(sc, MPI2_HOST_INTERRUPT_STATUS_OFFSET, 0x0); - if (mps_wait_db_ack(sc) != 0) { + if (mps_wait_db_ack(sc, 5, sleep_flags) != 0) { mps_dprint(sc, MPS_FAULT, "Doorbell handshake failed\n"); return (ENXIO); } @@ -439,8 +505,8 @@ mps_request_sync(struct mps_softc *sc, v /* Clock out the message data synchronously in 32-bit dwords*/ data32 = (uint32_t *)req; for (i = 0; i < count; i++) { - mps_regwrite(sc, MPI2_DOORBELL_OFFSET, data32[i]); - if (mps_wait_db_ack(sc) != 0) { + mps_regwrite(sc, MPI2_DOORBELL_OFFSET, htole32(data32[i])); + if (mps_wait_db_ack(sc, 5, sleep_flags) != 0) { mps_dprint(sc, MPS_FAULT, "Timeout while writing doorbell\n"); return (ENXIO); @@ -525,7 +591,7 @@ mps_request_sync(struct mps_softc *sc, v static void mps_enqueue_request(struct mps_softc *sc, struct mps_command *cm) { - + reply_descriptor rd; mps_dprint(sc, MPS_TRACE, "%s SMID %u cm %p ccb %p\n", __func__, cm->cm_desc.Default.SMID, cm, cm->cm_ccb); @@ -534,11 +600,14 @@ mps_enqueue_request(struct mps_softc *sc if (++sc->io_cmds_active > sc->io_cmds_highwater) sc->io_cmds_highwater++; - + rd.u.low = cm->cm_desc.Words.Low; + rd.u.high = cm->cm_desc.Words.High; + rd.word = htole64(rd.word); + /* TODO-We may need to make below regwrite atomic */ mps_regwrite(sc, MPI2_REQUEST_DESCRIPTOR_POST_LOW_OFFSET, - cm->cm_desc.Words.Low); + rd.u.low); mps_regwrite(sc, MPI2_REQUEST_DESCRIPTOR_POST_HIGH_OFFSET, - cm->cm_desc.Words.High); + rd.u.high); } /* @@ -622,21 +691,21 @@ mps_send_iocinit(struct mps_softc *sc) */ init.Function = MPI2_FUNCTION_IOC_INIT; init.WhoInit = MPI2_WHOINIT_HOST_DRIVER; - init.MsgVersion = MPI2_VERSION; - init.HeaderVersion = MPI2_HEADER_VERSION; - init.SystemRequestFrameSize = sc->facts->IOCRequestFrameSize; - init.ReplyDescriptorPostQueueDepth = sc->pqdepth; - init.ReplyFreeQueueDepth = sc->fqdepth; + init.MsgVersion = htole16(MPI2_VERSION); + init.HeaderVersion = htole16(MPI2_HEADER_VERSION); + init.SystemRequestFrameSize = htole16(sc->facts->IOCRequestFrameSize); + init.ReplyDescriptorPostQueueDepth = htole16(sc->pqdepth); + init.ReplyFreeQueueDepth = htole16(sc->fqdepth); init.SenseBufferAddressHigh = 0; init.SystemReplyAddressHigh = 0; init.SystemRequestFrameBaseAddress.High = 0; - init.SystemRequestFrameBaseAddress.Low = (uint32_t)sc->req_busaddr; + init.SystemRequestFrameBaseAddress.Low = htole32((uint32_t)sc->req_busaddr); init.ReplyDescriptorPostQueueAddress.High = 0; - init.ReplyDescriptorPostQueueAddress.Low = (uint32_t)sc->post_busaddr; + init.ReplyDescriptorPostQueueAddress.Low = htole32((uint32_t)sc->post_busaddr); init.ReplyFreeQueueAddress.High = 0; - init.ReplyFreeQueueAddress.Low = (uint32_t)sc->free_busaddr; + init.ReplyFreeQueueAddress.Low = htole32((uint32_t)sc->free_busaddr); init.TimeStamp.High = 0; - init.TimeStamp.Low = (uint32_t)time_uptime; + init.TimeStamp.Low = htole32((uint32_t)time_uptime); error = mps_request_sync(sc, &init, &reply, req_sz, reply_sz, 5); if ((reply.IOCStatus & MPI2_IOCSTATUS_MASK) != MPI2_IOCSTATUS_SUCCESS) @@ -830,6 +899,12 @@ mps_alloc_requests(struct mps_softc *sc) sc->chains = malloc(sizeof(struct mps_chain) * sc->max_chains, M_MPT2, M_WAITOK | M_ZERO); + if(!sc->chains) { + device_printf(sc->mps_dev, + "Cannot allocate chains memory %s %d\n", + __func__, __LINE__); + return (ENOMEM); + } for (i = 0; i < sc->max_chains; i++) { chain = &sc->chains[i]; chain->chain = (MPI2_SGE_IO_UNION *)(sc->chain_frames + @@ -864,6 +939,11 @@ mps_alloc_requests(struct mps_softc *sc) */ sc->commands = malloc(sizeof(struct mps_command) * sc->num_reqs, M_MPT2, M_WAITOK | M_ZERO); + if(!sc->commands) { + device_printf(sc->mps_dev, "Cannot allocate memory %s %d\n", + __func__, __LINE__); + return (ENOMEM); + } for (i = 1; i < sc->num_reqs; i++) { cm = &sc->commands[i]; cm->cm_req = sc->req_frames + @@ -1056,6 +1136,11 @@ mps_attach(struct mps_softc *sc) sc->facts = malloc(sizeof(MPI2_IOC_FACTS_REPLY), M_MPT2, M_ZERO|M_NOWAIT); + if(!sc->facts) { + device_printf(sc->mps_dev, "Cannot allocate memory %s %d\n", + __func__, __LINE__); + return (ENOMEM); + } if ((error = mps_get_iocfacts(sc, sc->facts)) != 0) return (error); @@ -1083,7 +1168,7 @@ mps_attach(struct mps_softc *sc) */ if ((sc->facts->IOCCapabilities & MPI2_IOCFACTS_CAPABILITY_EVENT_REPLAY) == 0) { - mps_diag_reset(sc); + mps_diag_reset(sc, NO_SLEEP); if ((error = mps_transition_ready(sc)) != 0) return (error); } @@ -1163,6 +1248,11 @@ mps_attach(struct mps_softc *sc) sc->pfacts = malloc(sizeof(MPI2_PORT_FACTS_REPLY) * sc->facts->NumberOfPorts, M_MPT2, M_ZERO|M_WAITOK); + if(!sc->pfacts) { + device_printf(sc->mps_dev, "Cannot allocate memory %s %d\n", + __func__, __LINE__); + return (ENOMEM); + } for (i = 0; i < sc->facts->NumberOfPorts; i++) { if ((error = mps_get_portfacts(sc, &sc->pfacts[i], i)) != 0) { mps_printf(sc, "%s failed to get portfacts for port %d\n", @@ -1293,7 +1383,7 @@ mps_log_evt_handler(struct mps_softc *sc static int mps_attach_log(struct mps_softc *sc) { - uint8_t events[16]; + u32 events[MPI2_EVENT_NOTIFY_EVENTMASK_WORDS]; bzero(events, 16); setbit(events, MPI2_EVENT_LOG_DATA); @@ -1441,6 +1531,64 @@ mps_complete_command(struct mps_command } } + +static void +mps_sas_log_info(struct mps_softc *sc , u32 log_info) +{ + union loginfo_type { + u32 loginfo; + struct { + u32 subcode:16; + u32 code:8; + u32 originator:4; + u32 bus_type:4; + } dw; + }; + union loginfo_type sas_loginfo; + char *originator_str = NULL; + + sas_loginfo.loginfo = log_info; + if (sas_loginfo.dw.bus_type != 3 /*SAS*/) + return; + + /* each nexus loss loginfo */ + if (log_info == 0x31170000) + return; + + /* eat the loginfos associated with task aborts */ + if ((log_info == 30050000 || log_info == + 0x31140000 || log_info == 0x31130000)) + return; + + switch (sas_loginfo.dw.originator) { + case 0: + originator_str = "IOP"; + break; + case 1: + originator_str = "PL"; + break; + case 2: + originator_str = "IR"; + break; +} + + mps_dprint(sc, MPS_INFO, "log_info(0x%08x): originator(%s), " + "code(0x%02x), sub_code(0x%04x)\n", log_info, + originator_str, sas_loginfo.dw.code, + sas_loginfo.dw.subcode); +} + +static void +mps_display_reply_info(struct mps_softc *sc, uint8_t *reply) +{ + MPI2DefaultReply_t *mpi_reply; + u16 sc_status; + + mpi_reply = (MPI2DefaultReply_t*)reply; + sc_status = le16toh(mpi_reply->IOCStatus); + if (sc_status & MPI2_IOCSTATUS_FLAG_LOG_INFO_AVAILABLE) + mps_sas_log_info(sc, le32toh(mpi_reply->IOCLogInfo)); +} void mps_intr(void *data) { @@ -1508,7 +1656,7 @@ mps_intr_locked(void *data) flags = desc->Default.ReplyFlags & MPI2_RPY_DESCRIPT_FLAGS_TYPE_MASK; if ((flags == MPI2_RPY_DESCRIPT_FLAGS_UNUSED) - || (desc->Words.High == 0xffffffff)) + || (le32toh(desc->Words.High) == 0xffffffff)) break; /* increment the replypostindex now, so that event handlers @@ -1523,7 +1671,7 @@ mps_intr_locked(void *data) switch (flags) { case MPI2_RPY_DESCRIPT_FLAGS_SCSI_IO_SUCCESS: - cm = &sc->commands[desc->SCSIIOSuccess.SMID]; + cm = &sc->commands[le16toh(desc->SCSIIOSuccess.SMID)]; cm->cm_reply = NULL; break; case MPI2_RPY_DESCRIPT_FLAGS_ADDRESS_REPLY: @@ -1559,9 +1707,10 @@ mps_intr_locked(void *data) sc->reply_frames, sc->fqdepth, sc->facts->ReplyFrameSize * 4); printf("%s: baddr %#x,\n", __func__, baddr); + /* LSI-TODO. See Linux Code. Need Gracefull exit*/ panic("Reply address out of range"); } - if (desc->AddressReply.SMID == 0) { + if (le16toh(desc->AddressReply.SMID) == 0) { if (((MPI2_DEFAULT_REPLY *)reply)->Function == MPI2_FUNCTION_DIAG_BUFFER_POST) { /* @@ -1573,7 +1722,7 @@ mps_intr_locked(void *data) */ rel_rep = (MPI2_DIAG_RELEASE_REPLY *)reply; - if (rel_rep->IOCStatus == + if (le16toh(rel_rep->IOCStatus) == MPI2_IOCSTATUS_DIAGNOSTIC_RELEASED) { pBuffer = @@ -1589,10 +1738,10 @@ mps_intr_locked(void *data) (MPI2_EVENT_NOTIFICATION_REPLY *) reply); } else { - cm = &sc->commands[desc->AddressReply.SMID]; + cm = &sc->commands[le16toh(desc->AddressReply.SMID)]; cm->cm_reply = reply; cm->cm_reply_data = - desc->AddressReply.ReplyFrameAddress; + le32toh(desc->AddressReply.ReplyFrameAddress); } break; } @@ -1606,9 +1755,14 @@ mps_intr_locked(void *data) cm = NULL; break; } + - if (cm != NULL) + if (cm != NULL) { + // Print Error reply frame + if (cm->cm_reply) + mps_display_reply_info(sc,cm->cm_reply); mps_complete_command(cm); + } desc->Words.Low = 0xffffffff; desc->Words.High = 0xffffffff; @@ -1631,7 +1785,7 @@ mps_dispatch_event(struct mps_softc *sc, struct mps_event_handle *eh; int event, handled = 0; - event = reply->Event; + event = le16toh(reply->Event); TAILQ_FOREACH(eh, &sc->event_list, eh_list) { if (isset(eh->mask, event)) { eh->callback(sc, data, reply); @@ -1640,7 +1794,7 @@ mps_dispatch_event(struct mps_softc *sc, } if (handled == 0) - device_printf(sc->mps_dev, "Unhandled event 0x%x\n", event); + device_printf(sc->mps_dev, "Unhandled event 0x%x\n", le16toh(event)); /* * This is the only place that the event/reply should be freed. @@ -1671,13 +1825,18 @@ mps_reregister_events_complete(struct mp * suitable for the controller. */ int -mps_register_events(struct mps_softc *sc, uint8_t *mask, +mps_register_events(struct mps_softc *sc, u32 *mask, mps_evt_callback_t *cb, void *data, struct mps_event_handle **handle) { struct mps_event_handle *eh; int error = 0; eh = malloc(sizeof(struct mps_event_handle), M_MPT2, M_WAITOK|M_ZERO); + if(!eh) { + device_printf(sc->mps_dev, "Cannot allocate memory %s %d\n", + __func__, __LINE__); + return (ENOMEM); + } eh->callback = cb; eh->data = data; TAILQ_INSERT_TAIL(&sc->event_list, eh, eh_list); @@ -1690,24 +1849,25 @@ mps_register_events(struct mps_softc *sc int mps_update_events(struct mps_softc *sc, struct mps_event_handle *handle, - uint8_t *mask) + u32 *mask) { MPI2_EVENT_NOTIFICATION_REQUEST *evtreq; MPI2_EVENT_NOTIFICATION_REPLY *reply; struct mps_command *cm; - struct mps_event_handle *eh; int error, i; mps_dprint(sc, MPS_TRACE, "%s\n", __func__); if ((mask != NULL) && (handle != NULL)) - bcopy(mask, &handle->mask[0], 16); - memset(sc->event_mask, 0xff, 16); + bcopy(mask, &handle->mask[0], sizeof(u32) * + MPI2_EVENT_NOTIFY_EVENTMASK_WORDS); + + for (i = 0; i < MPI2_EVENT_NOTIFY_EVENTMASK_WORDS; i++) + sc->event_mask[i] = -1; + + for (i = 0; i < MPI2_EVENT_NOTIFY_EVENTMASK_WORDS; i++) + sc->event_mask[i] &= ~handle->mask[i]; - TAILQ_FOREACH(eh, &sc->event_list, eh_list) { - for (i = 0; i < 16; i++) - sc->event_mask[i] &= ~eh->mask[i]; - } if ((cm = mps_alloc_command(sc)) == NULL) return (EBUSY); @@ -1719,10 +1879,13 @@ mps_update_events(struct mps_softc *sc, { u_char fullmask[16]; memset(fullmask, 0x00, 16); - bcopy(fullmask, (uint8_t *)&evtreq->EventMasks, 16); + bcopy(fullmask, &evtreq->EventMasks[0], sizeof(u32) * + MPI2_EVENT_NOTIFY_EVENTMASK_WORDS); } #else - bcopy(sc->event_mask, (uint8_t *)&evtreq->EventMasks, 16); + for (i = 0; i < MPI2_EVENT_NOTIFY_EVENTMASK_WORDS; i++) + evtreq->EventMasks[i] = + htole32(sc->event_mask[i]); #endif cm->cm_desc.Default.RequestFlags = MPI2_REQ_DESCRIPT_FLAGS_DEFAULT_TYPE; cm->cm_data = NULL; @@ -1751,10 +1914,11 @@ mps_reregister_events(struct mps_softc * /* first, reregister events */ - memset(sc->event_mask, 0xff, 16); + for (i = 0; i < MPI2_EVENT_NOTIFY_EVENTMASK_WORDS; i++) + sc->event_mask[i] = -1; TAILQ_FOREACH(eh, &sc->event_list, eh_list) { - for (i = 0; i < 16; i++) + for (i = 0; i < MPI2_EVENT_NOTIFY_EVENTMASK_WORDS; i++) sc->event_mask[i] &= ~eh->mask[i]; } @@ -1768,10 +1932,13 @@ mps_reregister_events(struct mps_softc * { u_char fullmask[16]; memset(fullmask, 0x00, 16); - bcopy(fullmask, (uint8_t *)&evtreq->EventMasks, 16); + bcopy(fullmask, &evtreq->EventMasks[0], sizeof(u32) * + MPI2_EVENT_NOTIFY_EVENTMASK_WORDS); } #else - bcopy(sc->event_mask, (uint8_t *)&evtreq->EventMasks, 16); + for (i = 0; i < MPI2_EVENT_NOTIFY_EVENTMASK_WORDS; i++) + evtreq->EventMasks[i] = + htole32(sc->event_mask[i]); #endif cm->cm_desc.Default.RequestFlags = MPI2_REQ_DESCRIPT_FLAGS_DEFAULT_TYPE; cm->cm_data = NULL; @@ -1783,13 +1950,12 @@ mps_reregister_events(struct mps_softc * return (error); } -int +void mps_deregister_events(struct mps_softc *sc, struct mps_event_handle *handle) { TAILQ_REMOVE(&sc->event_list, handle, eh_list); free(handle, M_MPT2); - return (mps_update_events(sc, NULL, NULL)); } /* @@ -1819,10 +1985,16 @@ mps_add_chain(struct mps_command *cm) TAILQ_INSERT_TAIL(&cm->cm_chain_list, chain, chain_link); sgc = (MPI2_SGE_CHAIN32 *)&cm->cm_sge->MpiChain; - sgc->Length = space; + sgc->Length = htole16(space); sgc->NextChainOffset = 0; + /* TODO Looks like bug in Setting sgc->Flags. + * sgc->Flags = ( MPI2_SGE_FLAGS_CHAIN_ELEMENT | MPI2_SGE_FLAGS_64_BIT_ADDRESSING | + * MPI2_SGE_FLAGS_SYSTEM_ADDRESS) << MPI2_SGE_FLAGS_SHIFT + * This is fine.. because we are not using simple element. In case of + * MPI2_SGE_CHAIN32, we have seperate Length and Flags feild. + */ sgc->Flags = MPI2_SGE_FLAGS_CHAIN_ELEMENT; - sgc->Address = chain->chain_busaddr; + sgc->Address = htole32(chain->chain_busaddr); cm->cm_sge = (MPI2_SGE_IO_UNION *)&chain->chain->MpiSimple; cm->cm_sglsize = space; @@ -1842,6 +2014,7 @@ mps_push_sge(struct mps_command *cm, voi MPI2_SGE_SIMPLE64 *sge = sgep; int error, type; uint32_t saved_buf_len, saved_address_low, saved_address_high; + u32 sge_flags; type = (tc->Flags & MPI2_SGE_FLAGS_ELEMENT_MASK); @@ -1910,6 +2083,11 @@ mps_push_sge(struct mps_command *cm, voi * understanding the code. */ cm->cm_sglsize -= len; + /* Endian Safe code */ + sge_flags = sge->FlagsLength; + sge->FlagsLength = htole32(sge_flags); + sge->Address.High = htole32(sge->Address.High); + sge->Address.Low = htole32(sge->Address.Low); bcopy(sgep, cm->cm_sge, len); cm->cm_sge = (MPI2_SGE_IO_UNION *)((uintptr_t)cm->cm_sge + len); return (mps_add_chain(cm)); @@ -1960,6 +2138,11 @@ mps_push_sge(struct mps_command *cm, voi MPI2_SGE_FLAGS_64_BIT_ADDRESSING) << MPI2_SGE_FLAGS_SHIFT); cm->cm_sglsize -= len; + /* Endian Safe code */ + sge_flags = sge->FlagsLength; + sge->FlagsLength = htole32(sge_flags); + sge->Address.High = htole32(sge->Address.High); + sge->Address.Low = htole32(sge->Address.Low); bcopy(sgep, cm->cm_sge, len); cm->cm_sge = (MPI2_SGE_IO_UNION *)((uintptr_t)cm->cm_sge + len); @@ -1985,6 +2168,11 @@ mps_push_sge(struct mps_command *cm, voi } cm->cm_sglsize -= len; + /* Endian Safe code */ + sge_flags = sge->FlagsLength; + sge->FlagsLength = htole32(sge_flags); + sge->Address.High = htole32(sge->Address.High); + sge->Address.Low = htole32(sge->Address.Low); bcopy(sgep, cm->cm_sge, len); cm->cm_sge = (MPI2_SGE_IO_UNION *)((uintptr_t)cm->cm_sge + len); return (0); @@ -2004,6 +2192,7 @@ mps_add_dmaseg(struct mps_command *cm, v */ flags |= MPI2_SGE_FLAGS_SIMPLE_ELEMENT | MPI2_SGE_FLAGS_64_BIT_ADDRESSING; + /* Set Endian safe macro in mps_push_sge */ sge.FlagsLength = len | (flags << MPI2_SGE_FLAGS_SHIFT); mps_from_u64(pa, &sge.Address); @@ -2114,11 +2303,11 @@ mps_map_command(struct mps_softc *sc, st /* Add a zero-length element as needed */ if (cm->cm_sge != NULL) { sge = (MPI2_SGE_SIMPLE32 *)cm->cm_sge; - sge->FlagsLength = (MPI2_SGE_FLAGS_LAST_ELEMENT | + sge->FlagsLength = htole32((MPI2_SGE_FLAGS_LAST_ELEMENT | MPI2_SGE_FLAGS_END_OF_BUFFER | MPI2_SGE_FLAGS_END_OF_LIST | MPI2_SGE_FLAGS_SIMPLE_ELEMENT) << - MPI2_SGE_FLAGS_SHIFT; + MPI2_SGE_FLAGS_SHIFT); sge->Address = 0; } mps_enqueue_request(sc, cm); @@ -2135,9 +2324,12 @@ mps_map_command(struct mps_softc *sc, st int *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 05:34:30 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A315910672D5; Sun, 1 Jul 2012 05:32:26 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8F74E8FC0C; Sun, 1 Jul 2012 05:32:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q615WQc7068198; Sun, 1 Jul 2012 05:32:26 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q615WQUq068196; Sun, 1 Jul 2012 05:32:26 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <201207010532.q615WQUq068196@svn.freebsd.org> From: "Kenneth D. Merry" Date: Sun, 1 Jul 2012 05:32:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237878 - head/sys/powerpc/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 05:34:31 -0000 Author: ken Date: Sun Jul 1 05:32:26 2012 New Revision: 237878 URL: http://svn.freebsd.org/changeset/base/237878 Log: Now that the mps(4) driver is endian-safe, add it to the powerpc 32-bit GENERIC config file. MFC after: 3 days Reqested by: nwhitehorn Modified: head/sys/powerpc/conf/GENERIC Modified: head/sys/powerpc/conf/GENERIC ============================================================================== --- head/sys/powerpc/conf/GENERIC Sun Jul 1 05:23:59 2012 (r237877) +++ head/sys/powerpc/conf/GENERIC Sun Jul 1 05:32:26 2012 (r237878) @@ -107,6 +107,7 @@ options AHC_REG_PRETTY_PRINT # Print re device isp # Qlogic family device ispfw # Firmware module for Qlogic host adapters device mpt # LSI-Logic MPT-Fusion +device mps # LSI-Logic MPT-Fusion 2 device sym # NCR/Symbios/LSI Logic 53C8XX/53C1010/53C1510D # ATA/SCSI peripherals From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 05:41:03 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 17B5D1065672; Sun, 1 Jul 2012 05:39:50 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0227A8FC1A; Sun, 1 Jul 2012 05:39:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q615dnTc068581; Sun, 1 Jul 2012 05:39:49 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q615dnVS068579; Sun, 1 Jul 2012 05:39:49 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <201207010539.q615dnVS068579@svn.freebsd.org> From: "Kenneth D. Merry" Date: Sun, 1 Jul 2012 05:39:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237879 - stable/9/sys/cam X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 05:41:03 -0000 Author: ken Date: Sun Jul 1 05:39:49 2012 New Revision: 237879 URL: http://svn.freebsd.org/changeset/base/237879 Log: MFC 237682: r237682 | ken | 2012-06-27 21:36:13 -0600 (Wed, 27 Jun 2012) | 6 lines Fix a typo in a panic() call. PR: kern/169497 Submitted by: Steven Hartland Modified: stable/9/sys/cam/cam_periph.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/cam/cam_periph.c ============================================================================== --- stable/9/sys/cam/cam_periph.c Sun Jul 1 05:32:26 2012 (r237878) +++ stable/9/sys/cam/cam_periph.c Sun Jul 1 05:39:49 2012 (r237879) @@ -273,7 +273,7 @@ failure: /* No cleanup to perform. */ break; default: - panic("cam_periph_alloc: Unkown init level"); + panic("%s: Unknown init level", __func__); } return(status); } From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 05:41:26 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0599210657D2; Sun, 1 Jul 2012 05:40:34 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E3F508FC0C; Sun, 1 Jul 2012 05:40:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q615eXUN068650; Sun, 1 Jul 2012 05:40:33 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q615eXjO068648; Sun, 1 Jul 2012 05:40:33 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <201207010540.q615eXjO068648@svn.freebsd.org> From: "Kenneth D. Merry" Date: Sun, 1 Jul 2012 05:40: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: r237880 - stable/8/sys/cam X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 05:41:26 -0000 Author: ken Date: Sun Jul 1 05:40:33 2012 New Revision: 237880 URL: http://svn.freebsd.org/changeset/base/237880 Log: MFC 237682: r237682 | ken | 2012-06-27 21:36:13 -0600 (Wed, 27 Jun 2012) | 6 lines Fix a typo in a panic() call. PR: kern/169497 Submitted by: Steven Hartland Modified: stable/8/sys/cam/cam_periph.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/cam/cam_periph.c ============================================================================== --- stable/8/sys/cam/cam_periph.c Sun Jul 1 05:39:49 2012 (r237879) +++ stable/8/sys/cam/cam_periph.c Sun Jul 1 05:40:33 2012 (r237880) @@ -268,7 +268,7 @@ failure: /* No cleanup to perform. */ break; default: - panic("cam_periph_alloc: Unkown init level"); + panic("%s: Unknown init level", __func__); } return(status); } From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 06:34:18 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0A053106566B; Sun, 1 Jul 2012 06:34:18 +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 E8E888FC08; Sun, 1 Jul 2012 06:34:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q616YHtf070845; Sun, 1 Jul 2012 06:34:17 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q616YHlt070837; Sun, 1 Jul 2012 06:34:17 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201207010634.q616YHlt070837@svn.freebsd.org> From: Warner Losh Date: Sun, 1 Jul 2012 06:34:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237881 - head/sys/arm/at91 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 06:34:18 -0000 Author: imp Date: Sun Jul 1 06:34:17 2012 New Revision: 237881 URL: http://svn.freebsd.org/changeset/base/237881 Log: Opt-in rather than opt-out of the SoC. We don't really support running with multiple SoCs compiled in very well anyway, so this just wastes space. As more and more SoCs arrive in the tree, it is better to edit one master file that builds them all than many board files. Modified: head/sys/arm/at91/std.at91 head/sys/arm/at91/std.at91sam9 head/sys/arm/at91/std.ethernut5 head/sys/arm/at91/std.hl201 head/sys/arm/at91/std.qila9g20 head/sys/arm/at91/std.sam9g20ek head/sys/arm/at91/std.sam9x25ek Modified: head/sys/arm/at91/std.at91 ============================================================================== --- head/sys/arm/at91/std.at91 Sun Jul 1 05:40:33 2012 (r237880) +++ head/sys/arm/at91/std.at91 Sun Jul 1 06:34:17 2012 (r237881) @@ -1,6 +1,6 @@ # $FreeBSD$ -files "../at91/files.at91" +files "../at91/files.at91" cpu CPU_ARM9 makeoptions CONF_CFLAGS=-mcpu=arm9 options PHYSADDR=0x20000000 Modified: head/sys/arm/at91/std.at91sam9 ============================================================================== --- head/sys/arm/at91/std.at91sam9 Sun Jul 1 05:40:33 2012 (r237880) +++ head/sys/arm/at91/std.at91sam9 Sun Jul 1 06:34:17 2012 (r237881) @@ -1,13 +1,9 @@ # $FreeBSD$ -files "../at91/files.at91" +files "../at91/files.at91" cpu CPU_ARM9 makeoptions CONF_CFLAGS=-mcpu=arm9 options PHYSADDR=0x20000000 # bring in the sam specific timers and such device at91sam9 - -device at91sam9260 -device at91sam9g20 -device at91sam9x25 Modified: head/sys/arm/at91/std.ethernut5 ============================================================================== --- head/sys/arm/at91/std.ethernut5 Sun Jul 1 05:40:33 2012 (r237880) +++ head/sys/arm/at91/std.ethernut5 Sun Jul 1 06:34:17 2012 (r237881) @@ -8,5 +8,4 @@ options KERNPHYSADDR=0x20000000 options KERNVIRTADDR=0xc0000000 device at91_board_ethernut5 -nodevice at91sam9g20 -nodevice at91sam9x25 +device at91sam9260 Modified: head/sys/arm/at91/std.hl201 ============================================================================== --- head/sys/arm/at91/std.hl201 Sun Jul 1 05:40:33 2012 (r237880) +++ head/sys/arm/at91/std.hl201 Sun Jul 1 06:34:17 2012 (r237881) @@ -8,3 +8,4 @@ options KERNPHYSADDR=0x20000000 options KERNVIRTADDR=0xc0000000 device at91_board_hl201 +device at91sam9g20 Modified: head/sys/arm/at91/std.qila9g20 ============================================================================== --- head/sys/arm/at91/std.qila9g20 Sun Jul 1 05:40:33 2012 (r237880) +++ head/sys/arm/at91/std.qila9g20 Sun Jul 1 06:34:17 2012 (r237881) @@ -8,3 +8,4 @@ options KERNPHYSADDR=0x20000000 options KERNVIRTADDR=0xc0000000 device at91_board_qila9g20 +device at91sam9g20 Modified: head/sys/arm/at91/std.sam9g20ek ============================================================================== --- head/sys/arm/at91/std.sam9g20ek Sun Jul 1 05:40:33 2012 (r237880) +++ head/sys/arm/at91/std.sam9g20ek Sun Jul 1 06:34:17 2012 (r237881) @@ -8,3 +8,4 @@ options KERNPHYSADDR=0x20000000 options KERNVIRTADDR=0xc0000000 device at91_board_sam9g20ek +device at91sam9g20 Modified: head/sys/arm/at91/std.sam9x25ek ============================================================================== --- head/sys/arm/at91/std.sam9x25ek Sun Jul 1 05:40:33 2012 (r237880) +++ head/sys/arm/at91/std.sam9x25ek Sun Jul 1 06:34:17 2012 (r237881) @@ -8,5 +8,4 @@ options KERNPHYSADDR=0x20000000 options KERNVIRTADDR=0xc0000000 device at91_board_sam9x25ek -nodevice at91sam9g20 -nodevice at91sam9260 +device at91sam9x25 From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 06:41:39 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E5147106564A; Sun, 1 Jul 2012 06:41:39 +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 CFBF78FC0A; Sun, 1 Jul 2012 06:41:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q616fdwW071242; Sun, 1 Jul 2012 06:41:39 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q616fdjG071240; Sun, 1 Jul 2012 06:41:39 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201207010641.q616fdjG071240@svn.freebsd.org> From: Alexander Motin Date: Sun, 1 Jul 2012 06:41:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237882 - stable/9/sys/dev/drm2 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 06:41:40 -0000 Author: mav Date: Sun Jul 1 06:41:39 2012 New Revision: 237882 URL: http://svn.freebsd.org/changeset/base/237882 Log: MFC r237718: Fix millisecond to ticks conversion in drm_msleep(). On systems with HZ=100 it caused Intel eDP video output initialization (and Xorg startup) to take several minutes instead of several seconds. Reviewed by: kib Modified: stable/9/sys/dev/drm2/drmP.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/drm2/drmP.h ============================================================================== --- stable/9/sys/dev/drm2/drmP.h Sun Jul 1 06:34:17 2012 (r237881) +++ stable/9/sys/dev/drm2/drmP.h Sun Jul 1 06:41:39 2012 (r237882) @@ -250,7 +250,7 @@ enum { #define msecs_to_jiffies(x) (((int64_t)(x)) * hz / 1000) #define time_after(a,b) ((long)(b) - (long)(a) < 0) #define time_after_eq(a,b) ((long)(b) - (long)(a) <= 0) -#define drm_msleep(x, msg) pause((msg), ((int64_t)(x)) * 1000 / hz) +#define drm_msleep(x, msg) pause((msg), ((int64_t)(x)) * hz / 1000) typedef vm_paddr_t dma_addr_t; typedef uint64_t u64; From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 06:56:42 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4752F106566B; Sun, 1 Jul 2012 06:56:42 +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 320078FC08; Sun, 1 Jul 2012 06:56:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q616ugSk071882; Sun, 1 Jul 2012 06:56:42 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q616ufcY071880; Sun, 1 Jul 2012 06:56:41 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201207010656.q616ufcY071880@svn.freebsd.org> From: Warner Losh Date: Sun, 1 Jul 2012 06:56:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237883 - in head/sys/arm: at91 conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 06:56:42 -0000 Author: imp Date: Sun Jul 1 06:56:41 2012 New Revision: 237883 URL: http://svn.freebsd.org/changeset/base/237883 Log: Create a pseudo-lint kernel for all at91 SoCs. This kernel will not currently boot, but will serve as a good linting. make universe could now be altered to skip building all the other at91 kernels... Added: head/sys/arm/at91/std.atmel (contents, props changed) head/sys/arm/conf/ATMEL (contents, props changed) Added: head/sys/arm/at91/std.atmel ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/at91/std.atmel Sun Jul 1 06:56:41 2012 (r237883) @@ -0,0 +1,15 @@ +# $FreeBSD$ + +files "../at91/files.at91" +cpu CPU_ARM9 +makeoptions CONF_CFLAGS=-mcpu=arm9 +options PHYSADDR=0x20000000 + +# Supported SoCs for the at91 platform +device at91rm9200 +device at91sam9260 +device at91sam9g20 +device at91sam9x25 + +# bring in the sam specific timers and such +device at91sam9 Added: head/sys/arm/conf/ATMEL ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/conf/ATMEL Sun Jul 1 06:56:41 2012 (r237883) @@ -0,0 +1,166 @@ +# Kernel configuration to test compile all the atmel bits with one +# configuration. This kernel will not (presently) boot. Do not copy +# it to create your own custom config file. +# +# $FreeBSD$ + +ident ATMEL + +include "../at91/std.atmel" + +# Arbitrary values for testing purposes. +options STARTUP_PAGETABLE_ADDR=0x20800000 +makeoptions KERNPHYSADDR=0x20000000 +makeoptions KERNVIRTADDR=0xc0000000 +options KERNPHYSADDR=0x20000000 +options KERNVIRTADDR=0xc0000000 + +makeoptions MODULES_OVERRIDE="" + +# list all boards here, but not just yet (no multiboard in mainline). +#device at91_board_bwct +#device at91_board_ethernut5 +#device at91_board_hl200 +#device at91_board_hl201 +#device at91_board_kb920x +#device at91_board_qila9g20 +device at91_board_sam9g20ek +#device at91_board_sam9x25ek +#device at91_board_tsc4370 + +#makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols + +options SCHED_4BSD # 4BSD scheduler +#options PREEMPTION # Enable kernel thread preemption +options INET # InterNETworking +options INET6 # IPv6 communications protocols +options SCTP # Stream Control Transmission Protocol +options FFS # Berkeley Fast Filesystem +options SOFTUPDATES # Enable FFS soft updates support +options UFS_ACL # Support for access control lists +options UFS_DIRHASH # Improve performance on big directories +options UFS_GJOURNAL # Enable gjournal-based UFS journaling +options MD_ROOT # MD is a potential root device +options NFSCL # New Network Filesystem Client +options NFSD # New Network Filesystem Server +options NFSLOCKD # Network Lock Manager +options NFS_ROOT # NFS usable as /, requires NFSCL +options MSDOSFS # MSDOS Filesystem +options CD9660 # ISO 9660 Filesystem +options PROCFS # Process filesystem (requires PSEUDOFS) +options PSEUDOFS # Pseudo-filesystem framework +options GEOM_PART_GPT # GUID Partition Tables. +options GEOM_LABEL # Provides labelization +options COMPAT_FREEBSD5 # Compatible with FreeBSD5 +options COMPAT_FREEBSD6 # Compatible with FreeBSD6 +options COMPAT_FREEBSD7 # Compatible with FreeBSD7 +options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI +options KTRACE # ktrace(1) support +options STACK # stack(9) support +options SYSVSHM # SYSV-style shared memory +options SYSVMSG # SYSV-style message queues +options SYSVSEM # SYSV-style semaphores +options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions +options PRINTF_BUFR_SIZE=128 # Prevent printf output being interspersed. +#options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4) +#options AUDIT # Security event auditing +#options CAPABILITY_MODE # Capsicum capability mode +#options CAPABILITIES # Capsicum capabilities +#options MAC # TrustedBSD MAC Framework +#options INCLUDE_CONFIG_FILE # Include this file in kernel + +# required for netbooting +options BOOTP +options BOOTP_COMPAT +options BOOTP_NFSROOT +options BOOTP_NFSV3 +options BOOTP_WIRED_TO=ate0 + +# alternatively, boot from a MMC/SD memory card +#options ROOTDEVNAME=\"ufs:/dev/mmcsd0a\" + +# kernel/memory size reduction +options MUTEX_NOINLINE +options NO_FFS_SNAPSHOT +options NO_SWAPPING +options NO_SYSCTL_DESCR +options RWLOCK_NOINLINE + +# Debugging support. Always need this: +options KDB # Enable kernel debugger support. +# For minimum debugger support (stable branch) use: +options KDB_TRACE # Print a stack trace for a panic. +# For full debugger support use this instead: +options DDB # Support DDB. +options GDB # Support remote GDB. +#options DEADLKRES # Enable the deadlock resolver +#options INVARIANTS # Enable calls of extra sanity checking +#options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS +#options WITNESS # Enable checks to detect deadlocks and cycles +#options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed +#options MALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) zones + +# The `bpf' device enables the Berkeley Packet Filter. +# Be aware of the administrative consequences of enabling this! +# Note that 'bpf' is required for DHCP. +device bpf # Berkeley packet filter + +# Ethernet +device mii # Minimal MII support +device ate # Atmel AT91 Ethernet friver + +# I2C +device at91_twi # Atmel AT91 Two-wire Interface +device iic # I2C generic I/O device driver +device iicbus # I2C bus system +device pcf8563 # NXP PCF8563 clock/calendar + +# MMC/SD +device at91_mci # Atmel AT91 Multimedia Card Interface +options AT91_MCI_HAS_4WIRE +device mmc # MMC/SD bus +device mmcsd # MMC/SD memory card + +# DataFlash +device at91_spi # Atmel AT91 Serial Peripheral Interface +device spibus # SPI bus +device at45d # Atmel AT45D +device geom_map # GEOM partition mapping + +# Pseudo devices. +device loop # Network loopback +device random # Entropy device +device ether # Ethernet support +device vlan # 802.1Q VLAN support +device tun # Packet tunnel. +device md # Memory "disks" +device gif # IPv6 and IPv4 tunneling +device faith # IPv6-to-IPv4 relaying (translation) +#device firmware # firmware assist module + +# SCSI peripherals +device scbus # SCSI bus (required for ATA/SCSI) +device ch # SCSI media changers +device da # Direct Access (disks) +device sa # Sequential Access (tape etc) +device cd # CD +device pass # Passthrough device (direct ATA/SCSI access) +device ses # Enclosure Services (SES and SAF-TE) +device ctl # CAM Target Layer + +# Serial (COM) ports +device uart # Multi-uart driver +options ALT_BREAK_TO_DEBUGGER + +# USB support +options USB_DEBUG # enable debug msgs +device ohci # OHCI PCI->USB interface +device usb # USB Bus (required) +device umass # Disks/Mass storage - Requires scbus and da + +# watchdog +device at91_wdt # Atmel AT91 Watchdog Timer + +device at91_rtc +device at91_ssc +#device at91_tc # missing? From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 07:28:15 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B09B210657F1; Sun, 1 Jul 2012 07:28:15 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 97E748FC1B; Sun, 1 Jul 2012 07:28:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q617SF5b073250; Sun, 1 Jul 2012 07:28:15 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q617SFd9073239; Sun, 1 Jul 2012 07:28:15 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201207010728.q617SFd9073239@svn.freebsd.org> From: Michael Tuexen Date: Sun, 1 Jul 2012 07:28:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237884 - in stable/9/sys: netinet netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 07:28:15 -0000 Author: tuexen Date: Sun Jul 1 07:28:15 2012 New Revision: 237884 URL: http://svn.freebsd.org/changeset/base/237884 Log: MFC r235360: Provide in the association change notification the received ABORT chunk if case of SCTP_COMM_LOST or SCTP_CANT_STR_ASSOC as required by RFC 6458. Modified: stable/9/sys/netinet/sctp_asconf.c stable/9/sys/netinet/sctp_indata.c stable/9/sys/netinet/sctp_input.c stable/9/sys/netinet/sctp_output.c stable/9/sys/netinet/sctp_pcb.c stable/9/sys/netinet/sctp_timer.c stable/9/sys/netinet/sctp_usrreq.c stable/9/sys/netinet/sctputil.c stable/9/sys/netinet/sctputil.h stable/9/sys/netinet6/sctp6_usrreq.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp_asconf.c ============================================================================== --- stable/9/sys/netinet/sctp_asconf.c Sun Jul 1 06:56:41 2012 (r237883) +++ stable/9/sys/netinet/sctp_asconf.c Sun Jul 1 07:28:15 2012 (r237884) @@ -1789,8 +1789,7 @@ sctp_handle_asconf_ack(struct mbuf *m, i */ if (serial_num == (asoc->asconf_seq_out + 1)) { SCTPDBG(SCTP_DEBUG_ASCONF1, "handle_asconf_ack: got unexpected next serial number! Aborting asoc!\n"); - sctp_abort_an_association(stcb->sctp_ep, stcb, - SCTP_CAUSE_ILLEGAL_ASCONF_ACK, NULL, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, NULL, SCTP_SO_NOT_LOCKED); *abort_no_unlock = 1; return; } Modified: stable/9/sys/netinet/sctp_indata.c ============================================================================== --- stable/9/sys/netinet/sctp_indata.c Sun Jul 1 06:56:41 2012 (r237883) +++ stable/9/sys/netinet/sctp_indata.c Sun Jul 1 07:28:15 2012 (r237884) @@ -607,9 +607,7 @@ protocol_error: *ippp = ((control->sinfo_stream << 16) | control->sinfo_ssn); } stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_1; - sctp_abort_an_association(stcb->sctp_ep, stcb, - SCTP_PEER_FAULTY, oper, SCTP_SO_NOT_LOCKED); - + sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return; @@ -892,8 +890,7 @@ sctp_queue_data_for_reasm(struct sctp_tc } stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_2; - sctp_abort_an_association(stcb->sctp_ep, stcb, - SCTP_PEER_FAULTY, oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); *abort_flag = 1; } else if (asoc->fragmented_delivery_inprogress && (chk->rec.data.rcv_flags & SCTP_DATA_FIRST_FRAG) == SCTP_DATA_FIRST_FRAG) { @@ -924,8 +921,7 @@ sctp_queue_data_for_reasm(struct sctp_tc *ippp = ((chk->rec.data.stream_number << 16) | chk->rec.data.stream_seq); } stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_3; - sctp_abort_an_association(stcb->sctp_ep, stcb, - SCTP_PEER_FAULTY, oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); *abort_flag = 1; } else if (asoc->fragmented_delivery_inprogress) { /* @@ -961,8 +957,7 @@ sctp_queue_data_for_reasm(struct sctp_tc *ippp = ((chk->rec.data.stream_number << 16) | chk->rec.data.stream_seq); } stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_4; - sctp_abort_an_association(stcb->sctp_ep, - stcb, SCTP_PEER_FAULTY, oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); *abort_flag = 1; } else if ((asoc->fragment_flags & SCTP_DATA_UNORDERED) != SCTP_DATA_UNORDERED && @@ -995,8 +990,7 @@ sctp_queue_data_for_reasm(struct sctp_tc } stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_5; - sctp_abort_an_association(stcb->sctp_ep, - stcb, SCTP_PEER_FAULTY, oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); *abort_flag = 1; } } @@ -1090,8 +1084,7 @@ sctp_queue_data_for_reasm(struct sctp_tc } stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_6; - sctp_abort_an_association(stcb->sctp_ep, - stcb, SCTP_PEER_FAULTY, oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return; } @@ -1127,9 +1120,7 @@ sctp_queue_data_for_reasm(struct sctp_tc *ippp = ((chk->rec.data.stream_number << 16) | chk->rec.data.stream_seq); } stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_7; - sctp_abort_an_association(stcb->sctp_ep, - stcb, SCTP_PEER_FAULTY, oper, SCTP_SO_NOT_LOCKED); - + sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return; } @@ -1166,9 +1157,7 @@ sctp_queue_data_for_reasm(struct sctp_tc *ippp = ((chk->rec.data.stream_number << 16) | chk->rec.data.stream_seq); } stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_8; - sctp_abort_an_association(stcb->sctp_ep, - stcb, SCTP_PEER_FAULTY, oper, SCTP_SO_NOT_LOCKED); - + sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return; } @@ -1202,9 +1191,7 @@ sctp_queue_data_for_reasm(struct sctp_tc } stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_9; - sctp_abort_an_association(stcb->sctp_ep, - stcb, SCTP_PEER_FAULTY, oper, SCTP_SO_NOT_LOCKED); - + sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return; } @@ -1247,9 +1234,7 @@ sctp_queue_data_for_reasm(struct sctp_tc *ippp = ((chk->rec.data.stream_number << 16) | chk->rec.data.stream_seq); } stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_10; - sctp_abort_an_association(stcb->sctp_ep, - stcb, SCTP_PEER_FAULTY, oper, SCTP_SO_NOT_LOCKED); - + sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return; } @@ -1289,9 +1274,7 @@ sctp_queue_data_for_reasm(struct sctp_tc } stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_11; - sctp_abort_an_association(stcb->sctp_ep, - stcb, SCTP_PEER_FAULTY, oper, SCTP_SO_NOT_LOCKED); - + sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return; } @@ -1328,9 +1311,7 @@ sctp_queue_data_for_reasm(struct sctp_tc } stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_12; - sctp_abort_an_association(stcb->sctp_ep, - stcb, SCTP_PEER_FAULTY, oper, SCTP_SO_NOT_LOCKED); - + sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return; } @@ -1367,9 +1348,7 @@ sctp_queue_data_for_reasm(struct sctp_tc *ippp = ((chk->rec.data.stream_number << 16) | chk->rec.data.stream_seq); } stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_13; - sctp_abort_an_association(stcb->sctp_ep, - stcb, SCTP_PEER_FAULTY, oper, SCTP_SO_NOT_LOCKED); - + sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return; } @@ -1531,7 +1510,7 @@ sctp_process_a_data_chunk(struct sctp_tc struct mbuf *op_err; op_err = sctp_generate_invmanparam(SCTP_CAUSE_OUT_OF_RESC); - sctp_abort_an_association(stcb->sctp_ep, stcb, 0, op_err, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return (0); } @@ -1678,8 +1657,7 @@ sctp_process_a_data_chunk(struct sctp_tc } stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_14; - sctp_abort_an_association(stcb->sctp_ep, stcb, - SCTP_PEER_FAULTY, oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return (0); } @@ -1942,9 +1920,7 @@ failed_pdapi_express_del: *ippp = ((strmno << 16) | strmseq); } stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_15; - sctp_abort_an_association(stcb->sctp_ep, stcb, - SCTP_PEER_FAULTY, oper, SCTP_SO_NOT_LOCKED); - + sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return (0); } else { @@ -1980,9 +1956,7 @@ failed_pdapi_express_del: *ippp = ((strmno << 16) | strmseq); } stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_16; - sctp_abort_an_association(stcb->sctp_ep, - stcb, SCTP_PEER_FAULTY, oper, SCTP_SO_NOT_LOCKED); - + sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return (0); } @@ -2027,9 +2001,7 @@ failed_pdapi_express_del: *ippp = ((strmno << 16) | strmseq); } stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_17; - sctp_abort_an_association(stcb->sctp_ep, - stcb, SCTP_PEER_FAULTY, oper, SCTP_SO_NOT_LOCKED); - + sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return (0); } @@ -3878,7 +3850,7 @@ sctp_express_handle_sack(struct sctp_tcb *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); + sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); return; #endif } @@ -4240,7 +4212,7 @@ again: *ippp = htonl(SCTP_FROM_SCTP_INDATA + SCTP_LOC_24); } stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_24; - sctp_abort_an_association(stcb->sctp_ep, stcb, SCTP_RESPONSE_TO_USER_REQ, oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); } else { struct sctp_nets *netp; @@ -4463,7 +4435,7 @@ sctp_handle_sack(struct mbuf *m, int off *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); + sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); return; } } @@ -4966,7 +4938,7 @@ sctp_handle_sack(struct mbuf *m, int off *ippp = htonl(SCTP_FROM_SCTP_INDATA + SCTP_LOC_31); } stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_31; - sctp_abort_an_association(stcb->sctp_ep, stcb, SCTP_RESPONSE_TO_USER_REQ, oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); return; } else { struct sctp_nets *netp; @@ -5421,8 +5393,7 @@ sctp_handle_forward_tsn(struct sctp_tcb *ippp = new_cum_tsn; } stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_33; - sctp_abort_an_association(stcb->sctp_ep, stcb, - SCTP_PEER_FAULTY, oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); return; } SCTP_STAT_INCR(sctps_fwdtsn_map_over); Modified: stable/9/sys/netinet/sctp_input.c ============================================================================== --- stable/9/sys/netinet/sctp_input.c Sun Jul 1 06:56:41 2012 (r237883) +++ stable/9/sys/netinet/sctp_input.c Sun Jul 1 07:28:15 2012 (r237884) @@ -428,7 +428,7 @@ sctp_process_init_ack(struct mbuf *m, in &abort_flag, (struct sctp_chunkhdr *)cp, &nat_friendly); if (abort_flag) { /* Send an abort and notify peer */ - sctp_abort_an_association(stcb->sctp_ep, stcb, SCTP_CAUSE_PROTOCOL_VIOLATION, op_err, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); *abort_no_unlock = 1; return (-1); } @@ -739,7 +739,7 @@ sctp_handle_nat_missing_state(struct sct static void -sctp_handle_abort(struct sctp_abort_chunk *cp, +sctp_handle_abort(struct sctp_abort_chunk *abort, struct sctp_tcb *stcb, struct sctp_nets *net) { #if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) @@ -747,43 +747,42 @@ sctp_handle_abort(struct sctp_abort_chun #endif uint16_t len; + uint16_t error; SCTPDBG(SCTP_DEBUG_INPUT2, "sctp_handle_abort: handling ABORT\n"); if (stcb == NULL) return; - len = ntohs(cp->ch.chunk_length); + len = ntohs(abort->ch.chunk_length); if (len > sizeof(struct sctp_chunkhdr)) { /* * Need to check the cause codes for our two magic nat * aborts which don't kill the assoc necessarily. */ - struct sctp_abort_chunk *cpnext; struct sctp_missing_nat_state *natc; - uint16_t cause; - cpnext = cp; - cpnext++; - natc = (struct sctp_missing_nat_state *)cpnext; - cause = ntohs(natc->cause); - if (cause == SCTP_CAUSE_NAT_COLLIDING_STATE) { + natc = (struct sctp_missing_nat_state *)(abort + 1); + error = ntohs(natc->cause); + if (error == SCTP_CAUSE_NAT_COLLIDING_STATE) { SCTPDBG(SCTP_DEBUG_INPUT2, "Received Colliding state abort flags:%x\n", - cp->ch.chunk_flags); + abort->ch.chunk_flags); if (sctp_handle_nat_colliding_state(stcb)) { return; } - } else if (cause == SCTP_CAUSE_NAT_MISSING_STATE) { + } else if (error == SCTP_CAUSE_NAT_MISSING_STATE) { SCTPDBG(SCTP_DEBUG_INPUT2, "Received missing state abort flags:%x\n", - cp->ch.chunk_flags); + abort->ch.chunk_flags); if (sctp_handle_nat_missing_state(stcb, net)) { return; } } + } else { + error = 0; } /* stop any receive timers */ sctp_timer_stop(SCTP_TIMER_TYPE_RECV, stcb->sctp_ep, stcb, net, SCTP_FROM_SCTP_INPUT + SCTP_LOC_6); /* notify user of the abort and clean up... */ - sctp_abort_notification(stcb, 0, SCTP_SO_NOT_LOCKED); + sctp_abort_notification(stcb, error, abort, SCTP_SO_NOT_LOCKED); /* free the tcb */ SCTP_STAT_INCR_COUNTER32(sctps_aborted); if ((SCTP_GET_STATE(&stcb->asoc) == SCTP_STATE_OPEN) || @@ -1174,7 +1173,7 @@ sctp_handle_error(struct sctp_chunkhdr * asoc->stale_cookie_count++; if (asoc->stale_cookie_count > asoc->max_init_times) { - sctp_abort_notification(stcb, 0, SCTP_SO_NOT_LOCKED); + sctp_abort_notification(stcb, 0, NULL, SCTP_SO_NOT_LOCKED); /* now free the asoc */ #if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) so = SCTP_INP_SO(stcb->sctp_ep); Modified: stable/9/sys/netinet/sctp_output.c ============================================================================== --- stable/9/sys/netinet/sctp_output.c Sun Jul 1 06:56:41 2012 (r237883) +++ stable/9/sys/netinet/sctp_output.c Sun Jul 1 07:28:15 2012 (r237884) @@ -6573,9 +6573,7 @@ sctp_sendall_iterator(struct sctp_inpcb * dis-appearing on us. */ atomic_add_int(&stcb->asoc.refcnt, 1); - sctp_abort_an_association(inp, stcb, - SCTP_RESPONSE_TO_USER_REQ, - m, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(inp, stcb, m, SCTP_SO_NOT_LOCKED); /* * sctp_abort_an_association calls sctp_free_asoc() * free association will NOT free it since we @@ -6669,7 +6667,6 @@ sctp_sendall_iterator(struct sctp_inpcb abort_anyway: atomic_add_int(&stcb->asoc.refcnt, 1); sctp_abort_an_association(stcb->sctp_ep, stcb, - SCTP_RESPONSE_TO_USER_REQ, NULL, SCTP_SO_NOT_LOCKED); atomic_add_int(&stcb->asoc.refcnt, -1); goto no_chunk_output; @@ -9504,7 +9501,7 @@ sctp_chunk_retransmission(struct sctp_in chk->snd_count, SCTP_BASE_SYSCTL(sctp_max_retran_chunk)); atomic_add_int(&stcb->asoc.refcnt, 1); - sctp_abort_an_association(stcb->sctp_ep, stcb, 0, NULL, so_locked); + sctp_abort_an_association(stcb->sctp_ep, stcb, NULL, so_locked); SCTP_TCB_LOCK(stcb); atomic_subtract_int(&stcb->asoc.refcnt, 1); return (SCTP_RETRAN_EXIT); @@ -13138,9 +13135,7 @@ sctp_lower_sosend(struct socket *so, atomic_add_int(&stcb->asoc.refcnt, -1); free_cnt_applied = 0; /* release this lock, otherwise we hang on ourselves */ - sctp_abort_an_association(stcb->sctp_ep, stcb, - SCTP_RESPONSE_TO_USER_REQ, - mm, SCTP_SO_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, mm, SCTP_SO_LOCKED); /* now relock the stcb so everything is sane */ hold_tcblock = 0; stcb = NULL; @@ -13695,7 +13690,6 @@ dataless_eof: free_cnt_applied = 0; } sctp_abort_an_association(stcb->sctp_ep, stcb, - SCTP_RESPONSE_TO_USER_REQ, NULL, SCTP_SO_LOCKED); /* * now relock the stcb so everything Modified: stable/9/sys/netinet/sctp_pcb.c ============================================================================== --- stable/9/sys/netinet/sctp_pcb.c Sun Jul 1 06:56:41 2012 (r237883) +++ stable/9/sys/netinet/sctp_pcb.c Sun Jul 1 07:28:15 2012 (r237884) @@ -6347,7 +6347,7 @@ sctp_load_addresses_from_init(struct sct * abort this guy */ sctp_abort_an_association(stcb_tmp->sctp_ep, - stcb_tmp, 1, NULL, 0); + stcb_tmp, NULL, SCTP_SO_NOT_LOCKED); goto add_it_now; } SCTP_TCB_UNLOCK(stcb_tmp); @@ -6438,7 +6438,7 @@ sctp_load_addresses_from_init(struct sct * abort this guy */ sctp_abort_an_association(stcb_tmp->sctp_ep, - stcb_tmp, 1, NULL, 0); + stcb_tmp, NULL, SCTP_SO_NOT_LOCKED); goto add_it_now6; } SCTP_TCB_UNLOCK(stcb_tmp); Modified: stable/9/sys/netinet/sctp_timer.c ============================================================================== --- stable/9/sys/netinet/sctp_timer.c Sun Jul 1 06:56:41 2012 (r237883) +++ stable/9/sys/netinet/sctp_timer.c Sun Jul 1 07:28:15 2012 (r237884) @@ -167,7 +167,7 @@ sctp_threshold_management(struct sctp_in *ippp = htonl(SCTP_FROM_SCTP_TIMER + SCTP_LOC_1); } inp->last_abort_code = SCTP_FROM_SCTP_TIMER + SCTP_LOC_1; - sctp_abort_an_association(inp, stcb, SCTP_FAILED_THRESHOLD, oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(inp, stcb, oper, SCTP_SO_NOT_LOCKED); return (1); } return (0); @@ -1066,8 +1066,7 @@ sctp_cookie_timer(struct sctp_inpcb *inp *ippp = htonl(SCTP_FROM_SCTP_TIMER + SCTP_LOC_3); } inp->last_abort_code = SCTP_FROM_SCTP_TIMER + SCTP_LOC_4; - sctp_abort_an_association(inp, stcb, SCTP_INTERNAL_ERROR, - oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(inp, stcb, oper, SCTP_SO_NOT_LOCKED); } else { #ifdef INVARIANTS panic("Cookie timer expires in wrong state?"); Modified: stable/9/sys/netinet/sctp_usrreq.c ============================================================================== --- stable/9/sys/netinet/sctp_usrreq.c Sun Jul 1 06:56:41 2012 (r237883) +++ stable/9/sys/netinet/sctp_usrreq.c Sun Jul 1 07:28:15 2012 (r237884) @@ -229,11 +229,9 @@ sctp_notify(struct sctp_inpcb *inp, struct socket *so; #endif - /* protection */ - int reason; struct icmp *icmph; - + /* protection */ if ((inp == NULL) || (stcb == NULL) || (net == NULL) || (sh == NULL) || (to == NULL)) { if (stcb) @@ -285,8 +283,7 @@ sctp_notify(struct sctp_inpcb *inp, * now is dead. In either case treat it like a OOTB abort * with no TCB */ - reason = SCTP_PEER_FAULTY; - sctp_abort_notification(stcb, reason, SCTP_SO_NOT_LOCKED); + sctp_abort_notification(stcb, 0, NULL, SCTP_SO_NOT_LOCKED); #if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) so = SCTP_INP_SO(inp); atomic_add_int(&stcb->asoc.refcnt, 1); @@ -1098,7 +1095,6 @@ sctp_shutdown(struct socket *so) } stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_USRREQ + SCTP_LOC_6; sctp_abort_an_association(stcb->sctp_ep, stcb, - SCTP_RESPONSE_TO_USER_REQ, op_err, SCTP_SO_LOCKED); goto skip_unlock; } else { Modified: stable/9/sys/netinet/sctputil.c ============================================================================== --- stable/9/sys/netinet/sctputil.c Sun Jul 1 06:56:41 2012 (r237883) +++ stable/9/sys/netinet/sctputil.c Sun Jul 1 07:28:15 2012 (r237884) @@ -1725,8 +1725,7 @@ sctp_timeout_handler(void *t) break; } SCTP_STAT_INCR(sctps_timoshutdownguard); - sctp_abort_an_association(inp, stcb, - SCTP_SHUTDOWN_GUARD_EXPIRES, NULL, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(inp, stcb, NULL, SCTP_SO_NOT_LOCKED); /* no need to unlock on tcb its gone */ goto out_decr; @@ -2593,7 +2592,7 @@ sctp_pad_lastmbuf(struct mbuf *m, int pa static void sctp_notify_assoc_change(uint16_t state, struct sctp_tcb *stcb, - uint16_t error, int so_locked + uint16_t error, struct sctp_abort_chunk *abort, int so_locked #if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING) SCTP_UNUSED #endif @@ -2602,7 +2601,7 @@ sctp_notify_assoc_change(uint16_t state, struct mbuf *m_notify; struct sctp_assoc_change *sac; struct sctp_queued_to_read *control; - size_t len; + size_t notif_len, abort_len; unsigned int i; #if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) @@ -2652,16 +2651,27 @@ sctp_notify_assoc_change(uint16_t state, /* event not enabled */ return; } - len = sizeof(struct sctp_assoc_change); + notif_len = sizeof(struct sctp_assoc_change); + if (abort != NULL) { + abort_len = htons(abort->ch.chunk_length); + } else { + abort_len = 0; + } if ((state == SCTP_COMM_UP) || (state == SCTP_RESTART)) { - len += SCTP_ASSOC_SUPPORTS_MAX; + notif_len += SCTP_ASSOC_SUPPORTS_MAX; + } else if ((state == SCTP_COMM_LOST) || (state == SCTP_CANT_STR_ASSOC)) { + notif_len += abort_len; } - m_notify = sctp_get_mbuf_for_msg(len, 0, M_DONTWAIT, 1, MT_DATA); - if (m_notify == NULL) - /* no space left */ - return; - SCTP_BUF_LEN(m_notify) = 0; - + m_notify = sctp_get_mbuf_for_msg(notif_len, 0, M_DONTWAIT, 1, MT_DATA); + if (m_notify == NULL) { + /* Retry with smaller value. */ + notif_len = sizeof(struct sctp_assoc_change); + m_notify = sctp_get_mbuf_for_msg(notif_len, 0, M_DONTWAIT, 1, MT_DATA); + if (m_notify == NULL) { + return; + } + } + SCTP_BUF_NEXT(m_notify) = NULL; sac = mtod(m_notify, struct sctp_assoc_change *); sac->sac_type = SCTP_ASSOC_CHANGE; sac->sac_flags = 0; @@ -2672,25 +2682,29 @@ sctp_notify_assoc_change(uint16_t state, sac->sac_outbound_streams = stcb->asoc.streamoutcnt; sac->sac_inbound_streams = stcb->asoc.streamincnt; sac->sac_assoc_id = sctp_get_associd(stcb); - if ((state == SCTP_COMM_UP) || (state == SCTP_RESTART)) { - i = 0; - if (stcb->asoc.peer_supports_prsctp) { - sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_PR; - } - if (stcb->asoc.peer_supports_auth) { - sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_AUTH; + if (notif_len > sizeof(struct sctp_assoc_change)) { + if ((state == SCTP_COMM_UP) || (state == SCTP_RESTART)) { + i = 0; + if (stcb->asoc.peer_supports_prsctp) { + sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_PR; + } + if (stcb->asoc.peer_supports_auth) { + sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_AUTH; + } + if (stcb->asoc.peer_supports_asconf) { + sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_ASCONF; + } + sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_MULTIBUF; + if (stcb->asoc.peer_supports_strreset) { + sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_RE_CONFIG; + } + sac->sac_length += i; + } else if ((state == SCTP_COMM_LOST) || (state == SCTP_CANT_STR_ASSOC)) { + memcpy(sac->sac_info, abort, abort_len); + sac->sac_length += abort_len; } - if (stcb->asoc.peer_supports_asconf) { - sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_ASCONF; - } - sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_MULTIBUF; - if (stcb->asoc.peer_supports_strreset) { - sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_RE_CONFIG; - } - sac->sac_length += i; } SCTP_BUF_LEN(m_notify) = sac->sac_length; - SCTP_BUF_NEXT(m_notify) = NULL; control = sctp_build_readq_entry(stcb, stcb->asoc.primary_destination, 0, 0, stcb->asoc.context, 0, 0, 0, m_notify); @@ -3500,7 +3514,7 @@ sctp_ulp_notify(uint32_t notification, s switch (notification) { case SCTP_NOTIFY_ASSOC_UP: if (stcb->asoc.assoc_up_sent == 0) { - sctp_notify_assoc_change(SCTP_COMM_UP, stcb, error, so_locked); + sctp_notify_assoc_change(SCTP_COMM_UP, stcb, error, NULL, so_locked); stcb->asoc.assoc_up_sent = 1; } if (stcb->asoc.adaptation_needed && (stcb->asoc.adaptation_sent == 0)) { @@ -3512,7 +3526,7 @@ sctp_ulp_notify(uint32_t notification, s } break; case SCTP_NOTIFY_ASSOC_DOWN: - sctp_notify_assoc_change(SCTP_SHUTDOWN_COMP, stcb, error, so_locked); + sctp_notify_assoc_change(SCTP_SHUTDOWN_COMP, stcb, error, NULL, so_locked); break; case SCTP_NOTIFY_INTERFACE_DOWN: { @@ -3563,9 +3577,9 @@ sctp_ulp_notify(uint32_t notification, s case SCTP_NOTIFY_ASSOC_ABORTED: if ((stcb) && (((stcb->asoc.state & SCTP_STATE_MASK) == SCTP_STATE_COOKIE_WAIT) || ((stcb->asoc.state & SCTP_STATE_MASK) == SCTP_STATE_COOKIE_ECHOED))) { - sctp_notify_assoc_change(SCTP_CANT_STR_ASSOC, stcb, error, so_locked); + sctp_notify_assoc_change(SCTP_CANT_STR_ASSOC, stcb, error, data, so_locked); } else { - sctp_notify_assoc_change(SCTP_COMM_LOST, stcb, error, so_locked); + sctp_notify_assoc_change(SCTP_COMM_LOST, stcb, error, data, so_locked); } break; case SCTP_NOTIFY_PEER_OPENED_STREAM: @@ -3573,7 +3587,7 @@ sctp_ulp_notify(uint32_t notification, s case SCTP_NOTIFY_STREAM_OPENED_OK: break; case SCTP_NOTIFY_ASSOC_RESTART: - sctp_notify_assoc_change(SCTP_RESTART, stcb, error, so_locked); + sctp_notify_assoc_change(SCTP_RESTART, stcb, error, NULL, so_locked); if (stcb->asoc.peer_supports_auth == 0) { sctp_ulp_notify(SCTP_NOTIFY_NO_PEER_AUTH, stcb, 0, NULL, so_locked); @@ -3742,7 +3756,8 @@ sctp_report_all_outbound(struct sctp_tcb } void -sctp_abort_notification(struct sctp_tcb *stcb, int error, int so_locked +sctp_abort_notification(struct sctp_tcb *stcb, uint16_t error, + struct sctp_abort_chunk *abort, int so_locked #if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING) SCTP_UNUSED #endif @@ -3763,7 +3778,7 @@ sctp_abort_notification(struct sctp_tcb } /* Tell them we lost the asoc */ sctp_report_all_outbound(stcb, 1, so_locked); - sctp_ulp_notify(SCTP_NOTIFY_ASSOC_ABORTED, stcb, error, NULL, so_locked); + sctp_ulp_notify(SCTP_NOTIFY_ASSOC_ABORTED, stcb, error, abort, so_locked); } void @@ -3782,7 +3797,7 @@ sctp_abort_association(struct sctp_inpcb if (stcb != NULL) { /* We have a TCB to abort, send notification too */ vtag = stcb->asoc.peer_vtag; - sctp_abort_notification(stcb, 0, SCTP_SO_NOT_LOCKED); + sctp_abort_notification(stcb, 0, NULL, SCTP_SO_NOT_LOCKED); /* get the assoc vrf id and table id */ vrf_id = stcb->asoc.vrf_id; stcb->asoc.state |= SCTP_STATE_WAS_ABORTED; @@ -3876,7 +3891,7 @@ none_in: void sctp_abort_an_association(struct sctp_inpcb *inp, struct sctp_tcb *stcb, - int error, struct mbuf *op_err, + struct mbuf *op_err, int so_locked #if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING) SCTP_UNUSED @@ -3904,8 +3919,9 @@ sctp_abort_an_association(struct sctp_in stcb->asoc.state |= SCTP_STATE_WAS_ABORTED; } /* notify the ulp */ - if ((inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE) == 0) - sctp_abort_notification(stcb, error, so_locked); + if ((inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE) == 0) { + sctp_abort_notification(stcb, 0, NULL, so_locked); + } /* notify the peer */ sctp_send_abort_tcb(stcb, op_err, so_locked); SCTP_STAT_INCR_COUNTER32(sctps_aborted); Modified: stable/9/sys/netinet/sctputil.h ============================================================================== --- stable/9/sys/netinet/sctputil.h Sun Jul 1 06:56:41 2012 (r237883) +++ stable/9/sys/netinet/sctputil.h Sun Jul 1 07:28:15 2012 (r237884) @@ -179,7 +179,8 @@ sctp_report_all_outbound(struct sctp_tcb int sctp_expand_mapping_array(struct sctp_association *, uint32_t); void -sctp_abort_notification(struct sctp_tcb *, int, int +sctp_abort_notification(struct sctp_tcb *, uint16_t, + struct sctp_abort_chunk *, int #if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING) SCTP_UNUSED #endif @@ -193,7 +194,7 @@ sctp_abort_association(struct sctp_inpcb /* We choose to abort via user input */ void -sctp_abort_an_association(struct sctp_inpcb *, struct sctp_tcb *, int, +sctp_abort_an_association(struct sctp_inpcb *, struct sctp_tcb *, struct mbuf *, int #if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING) SCTP_UNUSED Modified: stable/9/sys/netinet6/sctp6_usrreq.c ============================================================================== --- stable/9/sys/netinet6/sctp6_usrreq.c Sun Jul 1 06:56:41 2012 (r237883) +++ stable/9/sys/netinet6/sctp6_usrreq.c Sun Jul 1 07:28:15 2012 (r237884) @@ -388,10 +388,8 @@ sctp6_notify(struct sctp_inpcb *inp, struct socket *so; #endif - /* protection */ - int reason; - + /* protection */ if ((inp == NULL) || (stcb == NULL) || (net == NULL) || (sh == NULL) || (to == NULL)) { if (stcb) @@ -441,8 +439,7 @@ sctp6_notify(struct sctp_inpcb *inp, * now is dead. In either case treat it like a OOTB abort * with no TCB */ - reason = SCTP_PEER_FAULTY; - sctp_abort_notification(stcb, reason, SCTP_SO_NOT_LOCKED); + sctp_abort_notification(stcb, 0, NULL, SCTP_SO_NOT_LOCKED); #if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) so = SCTP_INP_SO(inp); atomic_add_int(&stcb->asoc.refcnt, 1); From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 07:31:26 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3BD67106568A; Sun, 1 Jul 2012 07:31:26 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D48758FC18; Sun, 1 Jul 2012 07:31:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q617VPhL073434; Sun, 1 Jul 2012 07:31:25 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q617VPaZ073432; Sun, 1 Jul 2012 07:31:25 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201207010731.q617VPaZ073432@svn.freebsd.org> From: Michael Tuexen Date: Sun, 1 Jul 2012 07:31:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237885 - stable/9/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 07:31:26 -0000 Author: tuexen Date: Sun Jul 1 07:31:25 2012 New Revision: 237885 URL: http://svn.freebsd.org/changeset/base/237885 Log: MFC r235402: Ensure the user can read COMM_LOST notifications on 1-to-1 style sockets. Modified: stable/9/sys/netinet/sctputil.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctputil.c ============================================================================== --- stable/9/sys/netinet/sctputil.c Sun Jul 1 07:28:15 2012 (r237884) +++ stable/9/sys/netinet/sctputil.c Sun Jul 1 07:31:25 2012 (r237885) @@ -2609,10 +2609,82 @@ sctp_notify_assoc_change(uint16_t state, #endif + if (sctp_stcb_is_feature_on(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_RECVASSOCEVNT)) { + notif_len = sizeof(struct sctp_assoc_change); + if (abort != NULL) { + abort_len = htons(abort->ch.chunk_length); + } else { + abort_len = 0; + } + if ((state == SCTP_COMM_UP) || (state == SCTP_RESTART)) { + notif_len += SCTP_ASSOC_SUPPORTS_MAX; + } else if ((state == SCTP_COMM_LOST) || (state == SCTP_CANT_STR_ASSOC)) { + notif_len += abort_len; + } + m_notify = sctp_get_mbuf_for_msg(notif_len, 0, M_DONTWAIT, 1, MT_DATA); + if (m_notify == NULL) { + /* Retry with smaller value. */ + notif_len = sizeof(struct sctp_assoc_change); + m_notify = sctp_get_mbuf_for_msg(notif_len, 0, M_DONTWAIT, 1, MT_DATA); + if (m_notify == NULL) { + goto set_error; + } + } + SCTP_BUF_NEXT(m_notify) = NULL; + sac = mtod(m_notify, struct sctp_assoc_change *); + sac->sac_type = SCTP_ASSOC_CHANGE; + sac->sac_flags = 0; + sac->sac_length = sizeof(struct sctp_assoc_change); + sac->sac_state = state; + sac->sac_error = error; + /* XXX verify these stream counts */ + sac->sac_outbound_streams = stcb->asoc.streamoutcnt; + sac->sac_inbound_streams = stcb->asoc.streamincnt; + sac->sac_assoc_id = sctp_get_associd(stcb); + if (notif_len > sizeof(struct sctp_assoc_change)) { + if ((state == SCTP_COMM_UP) || (state == SCTP_RESTART)) { + i = 0; + if (stcb->asoc.peer_supports_prsctp) { + sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_PR; + } + if (stcb->asoc.peer_supports_auth) { + sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_AUTH; + } + if (stcb->asoc.peer_supports_asconf) { + sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_ASCONF; + } + sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_MULTIBUF; + if (stcb->asoc.peer_supports_strreset) { + sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_RE_CONFIG; + } + sac->sac_length += i; + } else if ((state == SCTP_COMM_LOST) || (state == SCTP_CANT_STR_ASSOC)) { + memcpy(sac->sac_info, abort, abort_len); + sac->sac_length += abort_len; + } + } + SCTP_BUF_LEN(m_notify) = sac->sac_length; + control = sctp_build_readq_entry(stcb, stcb->asoc.primary_destination, + 0, 0, stcb->asoc.context, 0, 0, 0, + m_notify); + if (control != NULL) { + control->length = SCTP_BUF_LEN(m_notify); + /* not that we need this */ + control->tail_mbuf = m_notify; + control->spec_flags = M_NOTIFICATION; + sctp_add_to_readq(stcb->sctp_ep, stcb, + control, + &stcb->sctp_socket->so_rcv, 1, SCTP_READ_LOCK_NOT_HELD, + so_locked); + } else { + sctp_m_freem(m_notify); + } + } /* - * For TCP model AND UDP connected sockets we will send an error up - * when an ABORT comes in. + * For 1-to-1 style sockets, we send up and error when an ABORT + * comes in. */ +set_error: if (((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL)) && ((state == SCTP_COMM_LOST) || (state == SCTP_CANT_STR_ASSOC))) { @@ -2623,127 +2695,34 @@ sctp_notify_assoc_change(uint16_t state, SCTP_LTRACE_ERR_RET(NULL, stcb, NULL, SCTP_FROM_SCTPUTIL, ECONNRESET); stcb->sctp_socket->so_error = ECONNRESET; } - /* Wake ANY sleepers */ -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - so = SCTP_INP_SO(stcb->sctp_ep); - if (!so_locked) { - 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) { - SCTP_SOCKET_UNLOCK(so, 1); - return; - } - } -#endif - socantrcvmore(stcb->sctp_socket); - sorwakeup(stcb->sctp_socket); - sowwakeup(stcb->sctp_socket); + } + /* Wake ANY sleepers */ #if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - if (!so_locked) { + so = SCTP_INP_SO(stcb->sctp_ep); + if (!so_locked) { + 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) { SCTP_SOCKET_UNLOCK(so, 1); - } -#endif - } - if (sctp_stcb_is_feature_off(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_RECVASSOCEVNT)) { - /* event not enabled */ - return; - } - notif_len = sizeof(struct sctp_assoc_change); - if (abort != NULL) { - abort_len = htons(abort->ch.chunk_length); - } else { - abort_len = 0; - } - if ((state == SCTP_COMM_UP) || (state == SCTP_RESTART)) { - notif_len += SCTP_ASSOC_SUPPORTS_MAX; - } else if ((state == SCTP_COMM_LOST) || (state == SCTP_CANT_STR_ASSOC)) { - notif_len += abort_len; - } - m_notify = sctp_get_mbuf_for_msg(notif_len, 0, M_DONTWAIT, 1, MT_DATA); - if (m_notify == NULL) { - /* Retry with smaller value. */ - notif_len = sizeof(struct sctp_assoc_change); - m_notify = sctp_get_mbuf_for_msg(notif_len, 0, M_DONTWAIT, 1, MT_DATA); - if (m_notify == NULL) { return; } } - SCTP_BUF_NEXT(m_notify) = NULL; - sac = mtod(m_notify, struct sctp_assoc_change *); - sac->sac_type = SCTP_ASSOC_CHANGE; - sac->sac_flags = 0; - sac->sac_length = sizeof(struct sctp_assoc_change); - sac->sac_state = state; - sac->sac_error = error; - /* XXX verify these stream counts */ - sac->sac_outbound_streams = stcb->asoc.streamoutcnt; - sac->sac_inbound_streams = stcb->asoc.streamincnt; - sac->sac_assoc_id = sctp_get_associd(stcb); - if (notif_len > sizeof(struct sctp_assoc_change)) { - if ((state == SCTP_COMM_UP) || (state == SCTP_RESTART)) { - i = 0; - if (stcb->asoc.peer_supports_prsctp) { - sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_PR; - } - if (stcb->asoc.peer_supports_auth) { - sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_AUTH; - } - if (stcb->asoc.peer_supports_asconf) { - sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_ASCONF; - } - sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_MULTIBUF; - if (stcb->asoc.peer_supports_strreset) { - sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_RE_CONFIG; - } - sac->sac_length += i; - } else if ((state == SCTP_COMM_LOST) || (state == SCTP_CANT_STR_ASSOC)) { - memcpy(sac->sac_info, abort, abort_len); - sac->sac_length += abort_len; - } - } - SCTP_BUF_LEN(m_notify) = sac->sac_length; - control = sctp_build_readq_entry(stcb, stcb->asoc.primary_destination, - 0, 0, stcb->asoc.context, 0, 0, 0, - m_notify); - if (control == NULL) { - /* no memory */ - sctp_m_freem(m_notify); - return; - } - control->length = SCTP_BUF_LEN(m_notify); - /* not that we need this */ - control->tail_mbuf = m_notify; - control->spec_flags = M_NOTIFICATION; - sctp_add_to_readq(stcb->sctp_ep, stcb, - control, - &stcb->sctp_socket->so_rcv, 1, SCTP_READ_LOCK_NOT_HELD, - so_locked); - if (state == SCTP_COMM_LOST) { - /* Wake up any sleeper */ -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - so = SCTP_INP_SO(stcb->sctp_ep); - if (!so_locked) { - 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) { - SCTP_SOCKET_UNLOCK(so, 1); - return; - } - } #endif - sctp_sowwakeup(stcb->sctp_ep, stcb->sctp_socket); + if (((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || + (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL)) && + ((state == SCTP_COMM_LOST) || (state == SCTP_CANT_STR_ASSOC))) { + socantrcvmore(stcb->sctp_socket); + } + sorwakeup(stcb->sctp_socket); + sowwakeup(stcb->sctp_socket); #if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - if (!so_locked) { - SCTP_SOCKET_UNLOCK(so, 1); - } -#endif + if (!so_locked) { + SCTP_SOCKET_UNLOCK(so, 1); } +#endif } static void @@ -5220,7 +5199,7 @@ restart_nosblocks: (inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_ALLGONE)) { goto out; } - if (so->so_rcv.sb_state & SBS_CANTRCVMORE) { + if ((so->so_rcv.sb_state & SBS_CANTRCVMORE) && (so->so_rcv.sb_cc == 0)) { if (so->so_error) { error = so->so_error; if ((in_flags & MSG_PEEK) == 0) @@ -5228,7 +5207,6 @@ restart_nosblocks: goto out; } else { if (so->so_rcv.sb_cc == 0) { - SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTPUTIL, ENOTCONN); /* indicate EOF */ error = 0; goto out; From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 07:34:08 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0B4071065675; Sun, 1 Jul 2012 07:34:08 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E810D8FC12; Sun, 1 Jul 2012 07:34:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q617Y7T7073617; Sun, 1 Jul 2012 07:34:07 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q617Y7KT073610; Sun, 1 Jul 2012 07:34:07 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201207010734.q617Y7KT073610@svn.freebsd.org> From: Michael Tuexen Date: Sun, 1 Jul 2012 07:34:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237886 - in stable/9/sys: netinet netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 07:34:08 -0000 Author: tuexen Date: Sun Jul 1 07:34:07 2012 New Revision: 237886 URL: http://svn.freebsd.org/changeset/base/237886 Log: MFC r235403: Use ECONNABORTED in cases where the ABORT was sent to the peer. Modified: stable/9/sys/netinet/sctp_constants.h stable/9/sys/netinet/sctp_input.c stable/9/sys/netinet/sctp_usrreq.c stable/9/sys/netinet/sctputil.c stable/9/sys/netinet/sctputil.h stable/9/sys/netinet6/sctp6_usrreq.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp_constants.h ============================================================================== --- stable/9/sys/netinet/sctp_constants.h Sun Jul 1 07:31:25 2012 (r237885) +++ stable/9/sys/netinet/sctp_constants.h Sun Jul 1 07:34:07 2012 (r237886) @@ -757,7 +757,7 @@ __FBSDID("$FreeBSD$"); #define SCTP_NOTIFY_INTERFACE_UP 4 #define SCTP_NOTIFY_DG_FAIL 5 #define SCTP_NOTIFY_STRDATA_ERR 6 -#define SCTP_NOTIFY_ASSOC_ABORTED 7 +#define SCTP_NOTIFY_ASSOC_LOC_ABORTED 7 #define SCTP_NOTIFY_PEER_OPENED_STREAM 8 #define SCTP_NOTIFY_STREAM_OPENED_OK 9 #define SCTP_NOTIFY_ASSOC_RESTART 10 @@ -781,7 +781,8 @@ __FBSDID("$FreeBSD$"); #define SCTP_NOTIFY_SENDER_DRY 29 #define SCTP_NOTIFY_STR_RESET_DENIED_OUT 30 #define SCTP_NOTIFY_STR_RESET_DENIED_IN 31 -#define SCTP_NOTIFY_MAX 31 +#define SCTP_NOTIFY_ASSOC_REM_ABORTED 32 +#define SCTP_NOTIFY_MAX 32 /* This is the value for messages that are NOT completely Modified: stable/9/sys/netinet/sctp_input.c ============================================================================== --- stable/9/sys/netinet/sctp_input.c Sun Jul 1 07:31:25 2012 (r237885) +++ stable/9/sys/netinet/sctp_input.c Sun Jul 1 07:34:07 2012 (r237886) @@ -782,7 +782,7 @@ sctp_handle_abort(struct sctp_abort_chun /* stop any receive timers */ sctp_timer_stop(SCTP_TIMER_TYPE_RECV, stcb->sctp_ep, stcb, net, SCTP_FROM_SCTP_INPUT + SCTP_LOC_6); /* notify user of the abort and clean up... */ - sctp_abort_notification(stcb, error, abort, SCTP_SO_NOT_LOCKED); + sctp_abort_notification(stcb, 1, error, abort, SCTP_SO_NOT_LOCKED); /* free the tcb */ SCTP_STAT_INCR_COUNTER32(sctps_aborted); if ((SCTP_GET_STATE(&stcb->asoc) == SCTP_STATE_OPEN) || @@ -1173,7 +1173,7 @@ sctp_handle_error(struct sctp_chunkhdr * asoc->stale_cookie_count++; if (asoc->stale_cookie_count > asoc->max_init_times) { - sctp_abort_notification(stcb, 0, NULL, SCTP_SO_NOT_LOCKED); + sctp_abort_notification(stcb, 0, 0, NULL, SCTP_SO_NOT_LOCKED); /* now free the asoc */ #if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) so = SCTP_INP_SO(stcb->sctp_ep); Modified: stable/9/sys/netinet/sctp_usrreq.c ============================================================================== --- stable/9/sys/netinet/sctp_usrreq.c Sun Jul 1 07:31:25 2012 (r237885) +++ stable/9/sys/netinet/sctp_usrreq.c Sun Jul 1 07:34:07 2012 (r237886) @@ -283,7 +283,7 @@ sctp_notify(struct sctp_inpcb *inp, * now is dead. In either case treat it like a OOTB abort * with no TCB */ - sctp_abort_notification(stcb, 0, NULL, SCTP_SO_NOT_LOCKED); + sctp_abort_notification(stcb, 1, 0, NULL, SCTP_SO_NOT_LOCKED); #if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) so = SCTP_INP_SO(inp); atomic_add_int(&stcb->asoc.refcnt, 1); Modified: stable/9/sys/netinet/sctputil.c ============================================================================== --- stable/9/sys/netinet/sctputil.c Sun Jul 1 07:31:25 2012 (r237885) +++ stable/9/sys/netinet/sctputil.c Sun Jul 1 07:34:07 2012 (r237886) @@ -2592,7 +2592,7 @@ sctp_pad_lastmbuf(struct mbuf *m, int pa static void sctp_notify_assoc_change(uint16_t state, struct sctp_tcb *stcb, - uint16_t error, struct sctp_abort_chunk *abort, int so_locked + uint16_t error, struct sctp_abort_chunk *abort, uint8_t from_peer, int so_locked #if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING) SCTP_UNUSED #endif @@ -2688,12 +2688,17 @@ set_error: if (((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL)) && ((state == SCTP_COMM_LOST) || (state == SCTP_CANT_STR_ASSOC))) { - if (SCTP_GET_STATE(&stcb->asoc) == SCTP_STATE_COOKIE_WAIT) { - SCTP_LTRACE_ERR_RET(NULL, stcb, NULL, SCTP_FROM_SCTPUTIL, ECONNREFUSED); - stcb->sctp_socket->so_error = ECONNREFUSED; + if (from_peer) { + if (SCTP_GET_STATE(&stcb->asoc) == SCTP_STATE_COOKIE_WAIT) { + SCTP_LTRACE_ERR_RET(NULL, stcb, NULL, SCTP_FROM_SCTPUTIL, ECONNREFUSED); + stcb->sctp_socket->so_error = ECONNREFUSED; + } else { + SCTP_LTRACE_ERR_RET(NULL, stcb, NULL, SCTP_FROM_SCTPUTIL, ECONNRESET); + stcb->sctp_socket->so_error = ECONNRESET; + } } else { - SCTP_LTRACE_ERR_RET(NULL, stcb, NULL, SCTP_FROM_SCTPUTIL, ECONNRESET); - stcb->sctp_socket->so_error = ECONNRESET; + SCTP_LTRACE_ERR_RET(NULL, stcb, NULL, SCTP_FROM_SCTPUTIL, ECONNABORTED); + stcb->sctp_socket->so_error = ECONNABORTED; } } /* Wake ANY sleepers */ @@ -3493,7 +3498,7 @@ sctp_ulp_notify(uint32_t notification, s switch (notification) { case SCTP_NOTIFY_ASSOC_UP: if (stcb->asoc.assoc_up_sent == 0) { - sctp_notify_assoc_change(SCTP_COMM_UP, stcb, error, NULL, so_locked); + sctp_notify_assoc_change(SCTP_COMM_UP, stcb, error, NULL, 0, so_locked); stcb->asoc.assoc_up_sent = 1; } if (stcb->asoc.adaptation_needed && (stcb->asoc.adaptation_sent == 0)) { @@ -3505,7 +3510,7 @@ sctp_ulp_notify(uint32_t notification, s } break; case SCTP_NOTIFY_ASSOC_DOWN: - sctp_notify_assoc_change(SCTP_SHUTDOWN_COMP, stcb, error, NULL, so_locked); + sctp_notify_assoc_change(SCTP_SHUTDOWN_COMP, stcb, error, NULL, 0, so_locked); break; case SCTP_NOTIFY_INTERFACE_DOWN: { @@ -3553,12 +3558,20 @@ sctp_ulp_notify(uint32_t notification, s } case SCTP_NOTIFY_STRDATA_ERR: break; - case SCTP_NOTIFY_ASSOC_ABORTED: + case SCTP_NOTIFY_ASSOC_LOC_ABORTED: if ((stcb) && (((stcb->asoc.state & SCTP_STATE_MASK) == SCTP_STATE_COOKIE_WAIT) || ((stcb->asoc.state & SCTP_STATE_MASK) == SCTP_STATE_COOKIE_ECHOED))) { - sctp_notify_assoc_change(SCTP_CANT_STR_ASSOC, stcb, error, data, so_locked); + sctp_notify_assoc_change(SCTP_CANT_STR_ASSOC, stcb, error, data, 0, so_locked); } else { - sctp_notify_assoc_change(SCTP_COMM_LOST, stcb, error, data, so_locked); + sctp_notify_assoc_change(SCTP_COMM_LOST, stcb, error, data, 0, so_locked); + } + break; + case SCTP_NOTIFY_ASSOC_REM_ABORTED: + if ((stcb) && (((stcb->asoc.state & SCTP_STATE_MASK) == SCTP_STATE_COOKIE_WAIT) || + ((stcb->asoc.state & SCTP_STATE_MASK) == SCTP_STATE_COOKIE_ECHOED))) { + sctp_notify_assoc_change(SCTP_CANT_STR_ASSOC, stcb, error, data, 1, so_locked); + } else { + sctp_notify_assoc_change(SCTP_COMM_LOST, stcb, error, data, 1, so_locked); } break; case SCTP_NOTIFY_PEER_OPENED_STREAM: @@ -3566,7 +3579,7 @@ sctp_ulp_notify(uint32_t notification, s case SCTP_NOTIFY_STREAM_OPENED_OK: break; case SCTP_NOTIFY_ASSOC_RESTART: - sctp_notify_assoc_change(SCTP_RESTART, stcb, error, NULL, so_locked); + sctp_notify_assoc_change(SCTP_RESTART, stcb, error, NULL, 0, so_locked); if (stcb->asoc.peer_supports_auth == 0) { sctp_ulp_notify(SCTP_NOTIFY_NO_PEER_AUTH, stcb, 0, NULL, so_locked); @@ -3735,7 +3748,7 @@ sctp_report_all_outbound(struct sctp_tcb } void -sctp_abort_notification(struct sctp_tcb *stcb, uint16_t error, +sctp_abort_notification(struct sctp_tcb *stcb, uint8_t from_peer, uint16_t error, struct sctp_abort_chunk *abort, int so_locked #if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING) SCTP_UNUSED @@ -3757,7 +3770,11 @@ sctp_abort_notification(struct sctp_tcb } /* Tell them we lost the asoc */ sctp_report_all_outbound(stcb, 1, so_locked); - sctp_ulp_notify(SCTP_NOTIFY_ASSOC_ABORTED, stcb, error, abort, so_locked); + if (from_peer) { + sctp_ulp_notify(SCTP_NOTIFY_ASSOC_REM_ABORTED, stcb, error, abort, so_locked); + } else { + sctp_ulp_notify(SCTP_NOTIFY_ASSOC_LOC_ABORTED, stcb, error, abort, so_locked); + } } void @@ -3776,7 +3793,7 @@ sctp_abort_association(struct sctp_inpcb if (stcb != NULL) { /* We have a TCB to abort, send notification too */ vtag = stcb->asoc.peer_vtag; - sctp_abort_notification(stcb, 0, NULL, SCTP_SO_NOT_LOCKED); + sctp_abort_notification(stcb, 0, 0, NULL, SCTP_SO_NOT_LOCKED); /* get the assoc vrf id and table id */ vrf_id = stcb->asoc.vrf_id; stcb->asoc.state |= SCTP_STATE_WAS_ABORTED; @@ -3899,7 +3916,7 @@ sctp_abort_an_association(struct sctp_in } /* notify the ulp */ if ((inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE) == 0) { - sctp_abort_notification(stcb, 0, NULL, so_locked); + sctp_abort_notification(stcb, 0, 0, NULL, so_locked); } /* notify the peer */ sctp_send_abort_tcb(stcb, op_err, so_locked); Modified: stable/9/sys/netinet/sctputil.h ============================================================================== --- stable/9/sys/netinet/sctputil.h Sun Jul 1 07:31:25 2012 (r237885) +++ stable/9/sys/netinet/sctputil.h Sun Jul 1 07:34:07 2012 (r237886) @@ -179,7 +179,7 @@ sctp_report_all_outbound(struct sctp_tcb int sctp_expand_mapping_array(struct sctp_association *, uint32_t); void -sctp_abort_notification(struct sctp_tcb *, uint16_t, +sctp_abort_notification(struct sctp_tcb *, uint8_t, uint16_t, struct sctp_abort_chunk *, int #if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING) SCTP_UNUSED Modified: stable/9/sys/netinet6/sctp6_usrreq.c ============================================================================== --- stable/9/sys/netinet6/sctp6_usrreq.c Sun Jul 1 07:31:25 2012 (r237885) +++ stable/9/sys/netinet6/sctp6_usrreq.c Sun Jul 1 07:34:07 2012 (r237886) @@ -439,7 +439,7 @@ sctp6_notify(struct sctp_inpcb *inp, * now is dead. In either case treat it like a OOTB abort * with no TCB */ - sctp_abort_notification(stcb, 0, NULL, SCTP_SO_NOT_LOCKED); + sctp_abort_notification(stcb, 1, 0, NULL, SCTP_SO_NOT_LOCKED); #if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) so = SCTP_INP_SO(inp); atomic_add_int(&stcb->asoc.refcnt, 1); From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 07:36:34 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4FEB4106564A; Sun, 1 Jul 2012 07:36:34 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2F40F8FC0C; Sun, 1 Jul 2012 07:36:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q617aYQB073775; Sun, 1 Jul 2012 07:36:34 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q617aXoU073772; Sun, 1 Jul 2012 07:36:33 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201207010736.q617aXoU073772@svn.freebsd.org> From: Michael Tuexen Date: Sun, 1 Jul 2012 07:36:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237887 - stable/9/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 07:36:34 -0000 Author: tuexen Date: Sun Jul 1 07:36:33 2012 New Revision: 237887 URL: http://svn.freebsd.org/changeset/base/237887 Log: MFC r235412: Remove unused constants. Modified: stable/9/sys/netinet/sctp_constants.h stable/9/sys/netinet/sctputil.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp_constants.h ============================================================================== --- stable/9/sys/netinet/sctp_constants.h Sun Jul 1 07:34:07 2012 (r237886) +++ stable/9/sys/netinet/sctp_constants.h Sun Jul 1 07:36:33 2012 (r237887) @@ -756,34 +756,26 @@ __FBSDID("$FreeBSD$"); #define SCTP_NOTIFY_INTERFACE_DOWN 3 #define SCTP_NOTIFY_INTERFACE_UP 4 #define SCTP_NOTIFY_DG_FAIL 5 -#define SCTP_NOTIFY_STRDATA_ERR 6 +#define SCTP_NOTIFY_SPECIAL_SP_FAIL 6 #define SCTP_NOTIFY_ASSOC_LOC_ABORTED 7 -#define SCTP_NOTIFY_PEER_OPENED_STREAM 8 -#define SCTP_NOTIFY_STREAM_OPENED_OK 9 -#define SCTP_NOTIFY_ASSOC_RESTART 10 -#define SCTP_NOTIFY_HB_RESP 11 -#define SCTP_NOTIFY_ASCONF_SUCCESS 12 -#define SCTP_NOTIFY_ASCONF_FAILED 13 -#define SCTP_NOTIFY_PEER_SHUTDOWN 14 -#define SCTP_NOTIFY_ASCONF_ADD_IP 15 -#define SCTP_NOTIFY_ASCONF_DELETE_IP 16 -#define SCTP_NOTIFY_ASCONF_SET_PRIMARY 17 -#define SCTP_NOTIFY_PARTIAL_DELVIERY_INDICATION 18 -#define SCTP_NOTIFY_INTERFACE_CONFIRMED 20 -#define SCTP_NOTIFY_STR_RESET_RECV 21 -#define SCTP_NOTIFY_STR_RESET_SEND 22 -#define SCTP_NOTIFY_STR_RESET_FAILED_OUT 23 -#define SCTP_NOTIFY_STR_RESET_FAILED_IN 24 -#define SCTP_NOTIFY_AUTH_NEW_KEY 25 -#define SCTP_NOTIFY_AUTH_FREE_KEY 26 -#define SCTP_NOTIFY_SPECIAL_SP_FAIL 27 -#define SCTP_NOTIFY_NO_PEER_AUTH 28 -#define SCTP_NOTIFY_SENDER_DRY 29 -#define SCTP_NOTIFY_STR_RESET_DENIED_OUT 30 -#define SCTP_NOTIFY_STR_RESET_DENIED_IN 31 -#define SCTP_NOTIFY_ASSOC_REM_ABORTED 32 -#define SCTP_NOTIFY_MAX 32 - +#define SCTP_NOTIFY_ASSOC_REM_ABORTED 8 +#define SCTP_NOTIFY_ASSOC_RESTART 9 +#define SCTP_NOTIFY_PEER_SHUTDOWN 10 +#define SCTP_NOTIFY_ASCONF_ADD_IP 11 +#define SCTP_NOTIFY_ASCONF_DELETE_IP 12 +#define SCTP_NOTIFY_ASCONF_SET_PRIMARY 13 +#define SCTP_NOTIFY_PARTIAL_DELVIERY_INDICATION 14 +#define SCTP_NOTIFY_INTERFACE_CONFIRMED 15 +#define SCTP_NOTIFY_STR_RESET_RECV 16 +#define SCTP_NOTIFY_STR_RESET_SEND 17 +#define SCTP_NOTIFY_STR_RESET_FAILED_OUT 18 +#define SCTP_NOTIFY_STR_RESET_FAILED_IN 19 +#define SCTP_NOTIFY_STR_RESET_DENIED_OUT 20 +#define SCTP_NOTIFY_STR_RESET_DENIED_IN 21 +#define SCTP_NOTIFY_AUTH_NEW_KEY 22 +#define SCTP_NOTIFY_AUTH_FREE_KEY 23 +#define SCTP_NOTIFY_NO_PEER_AUTH 24 +#define SCTP_NOTIFY_SENDER_DRY 25 /* This is the value for messages that are NOT completely * copied down where we will start to split the message. Modified: stable/9/sys/netinet/sctputil.c ============================================================================== --- stable/9/sys/netinet/sctputil.c Sun Jul 1 07:34:07 2012 (r237886) +++ stable/9/sys/netinet/sctputil.c Sun Jul 1 07:36:33 2012 (r237887) @@ -3556,8 +3556,6 @@ sctp_ulp_notify(uint32_t notification, s sctp_notify_partial_delivery_indication(stcb, error, val, so_locked); break; } - case SCTP_NOTIFY_STRDATA_ERR: - break; case SCTP_NOTIFY_ASSOC_LOC_ABORTED: if ((stcb) && (((stcb->asoc.state & SCTP_STATE_MASK) == SCTP_STATE_COOKIE_WAIT) || ((stcb->asoc.state & SCTP_STATE_MASK) == SCTP_STATE_COOKIE_ECHOED))) { @@ -3574,10 +3572,6 @@ sctp_ulp_notify(uint32_t notification, s sctp_notify_assoc_change(SCTP_COMM_LOST, stcb, error, data, 1, so_locked); } break; - case SCTP_NOTIFY_PEER_OPENED_STREAM: - break; - case SCTP_NOTIFY_STREAM_OPENED_OK: - break; case SCTP_NOTIFY_ASSOC_RESTART: sctp_notify_assoc_change(SCTP_RESTART, stcb, error, NULL, 0, so_locked); if (stcb->asoc.peer_supports_auth == 0) { @@ -3585,8 +3579,6 @@ sctp_ulp_notify(uint32_t notification, s NULL, so_locked); } break; - case SCTP_NOTIFY_HB_RESP: - break; case SCTP_NOTIFY_STR_RESET_SEND: sctp_notify_stream_reset(stcb, error, ((uint16_t *) data), SCTP_STREAM_RESET_OUTGOING_SSN); break; @@ -3621,10 +3613,6 @@ sctp_ulp_notify(uint32_t notification, s sctp_notify_peer_addr_change(stcb, SCTP_ADDR_MADE_PRIM, data, error); break; - case SCTP_NOTIFY_ASCONF_SUCCESS: - break; - case SCTP_NOTIFY_ASCONF_FAILED: - break; case SCTP_NOTIFY_PEER_SHUTDOWN: sctp_notify_shutdown_event(stcb); break; From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 07:39:37 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F1E3A106566B; Sun, 1 Jul 2012 07:39:37 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DB5BD8FC15; Sun, 1 Jul 2012 07:39:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q617db78073971; Sun, 1 Jul 2012 07:39:37 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q617dbhZ073964; Sun, 1 Jul 2012 07:39:37 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201207010739.q617dbhZ073964@svn.freebsd.org> From: Michael Tuexen Date: Sun, 1 Jul 2012 07:39:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237888 - in stable/9/sys: netinet netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 07:39:38 -0000 Author: tuexen Date: Sun Jul 1 07:39:37 2012 New Revision: 237888 URL: http://svn.freebsd.org/changeset/base/237888 Log: MFC r235414,r235415: Provide the error code in SCTP_PEER_ADDR_CHANGE notifications as specified in RFC 6458. Modified: stable/9/sys/netinet/sctp_indata.c stable/9/sys/netinet/sctp_input.c stable/9/sys/netinet/sctp_output.c stable/9/sys/netinet/sctp_timer.c stable/9/sys/netinet/sctp_usrreq.c stable/9/sys/netinet6/sctp6_usrreq.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp_indata.c ============================================================================== --- stable/9/sys/netinet/sctp_indata.c Sun Jul 1 07:36:33 2012 (r237887) +++ stable/9/sys/netinet/sctp_indata.c Sun Jul 1 07:39:37 2012 (r237888) @@ -4024,7 +4024,7 @@ sctp_express_handle_sack(struct sctp_tcb /* addr came good */ net->dest_state |= SCTP_ADDR_REACHABLE; sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_UP, stcb, - SCTP_RECEIVED_SACK, (void *)net, SCTP_SO_NOT_LOCKED); + 0, (void *)net, SCTP_SO_NOT_LOCKED); } if (net == stcb->asoc.primary_destination) { if (stcb->asoc.alternate) { @@ -4831,7 +4831,7 @@ sctp_handle_sack(struct mbuf *m, int off /* addr came good */ net->dest_state |= SCTP_ADDR_REACHABLE; sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_UP, stcb, - SCTP_RECEIVED_SACK, (void *)net, SCTP_SO_NOT_LOCKED); + 0, (void *)net, SCTP_SO_NOT_LOCKED); } if (net == stcb->asoc.primary_destination) { if (stcb->asoc.alternate) { Modified: stable/9/sys/netinet/sctp_input.c ============================================================================== --- stable/9/sys/netinet/sctp_input.c Sun Jul 1 07:36:33 2012 (r237887) +++ stable/9/sys/netinet/sctp_input.c Sun Jul 1 07:39:37 2012 (r237888) @@ -632,7 +632,7 @@ sctp_handle_heartbeat_ack(struct sctp_he if (!(r_net->dest_state & SCTP_ADDR_REACHABLE)) { r_net->dest_state |= SCTP_ADDR_REACHABLE; sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_UP, stcb, - SCTP_HEARTBEAT_SUCCESS, (void *)r_net, SCTP_SO_NOT_LOCKED); + 0, (void *)r_net, SCTP_SO_NOT_LOCKED); } if (r_net->dest_state & SCTP_ADDR_PF) { r_net->dest_state &= ~SCTP_ADDR_PF; Modified: stable/9/sys/netinet/sctp_output.c ============================================================================== --- stable/9/sys/netinet/sctp_output.c Sun Jul 1 07:36:33 2012 (r237887) +++ stable/9/sys/netinet/sctp_output.c Sun Jul 1 07:39:37 2012 (r237888) @@ -3815,8 +3815,7 @@ sctp_handle_no_route(struct sctp_tcb *st if ((net->dest_state & SCTP_ADDR_REACHABLE) && stcb) { SCTPDBG(SCTP_DEBUG_OUTPUT1, "no route takes interface %p down\n", net); sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_DOWN, - stcb, - SCTP_FAILED_THRESHOLD, + stcb, 0, (void *)net, so_locked); net->dest_state &= ~SCTP_ADDR_REACHABLE; Modified: stable/9/sys/netinet/sctp_timer.c ============================================================================== --- stable/9/sys/netinet/sctp_timer.c Sun Jul 1 07:36:33 2012 (r237887) +++ stable/9/sys/netinet/sctp_timer.c Sun Jul 1 07:39:37 2012 (r237888) @@ -101,8 +101,7 @@ sctp_threshold_management(struct sctp_in net->dest_state &= ~SCTP_ADDR_REQ_PRIMARY; net->dest_state &= ~SCTP_ADDR_PF; sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_DOWN, - stcb, - SCTP_FAILED_THRESHOLD, + stcb, 0, (void *)net, SCTP_SO_NOT_LOCKED); } } else if ((net->pf_threshold < net->failure_threshold) && Modified: stable/9/sys/netinet/sctp_usrreq.c ============================================================================== --- stable/9/sys/netinet/sctp_usrreq.c Sun Jul 1 07:36:33 2012 (r237887) +++ stable/9/sys/netinet/sctp_usrreq.c Sun Jul 1 07:39:37 2012 (r237888) @@ -270,7 +270,7 @@ sctp_notify(struct sctp_inpcb *inp, net->dest_state &= ~SCTP_ADDR_REACHABLE; net->dest_state &= ~SCTP_ADDR_PF; sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_DOWN, - stcb, SCTP_FAILED_THRESHOLD, + stcb, 0, (void *)net, SCTP_SO_NOT_LOCKED); } SCTP_TCB_UNLOCK(stcb); @@ -4826,12 +4826,12 @@ sctp_setopt(struct socket *so, int optna if (net->dest_state & SCTP_ADDR_REACHABLE) { if (net->error_count > paddrp->spp_pathmaxrxt) { net->dest_state &= ~SCTP_ADDR_REACHABLE; - sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_DOWN, stcb, SCTP_RESPONSE_TO_USER_REQ, net, SCTP_SO_LOCKED); + sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_DOWN, stcb, 0, net, SCTP_SO_LOCKED); } } else { if (net->error_count <= paddrp->spp_pathmaxrxt) { net->dest_state |= SCTP_ADDR_REACHABLE; - sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_UP, stcb, SCTP_RESPONSE_TO_USER_REQ, net, SCTP_SO_LOCKED); + sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_UP, stcb, 0, net, SCTP_SO_LOCKED); } } net->failure_threshold = paddrp->spp_pathmaxrxt; @@ -4869,12 +4869,12 @@ sctp_setopt(struct socket *so, int optna if (net->dest_state & SCTP_ADDR_REACHABLE) { if (net->error_count > paddrp->spp_pathmaxrxt) { net->dest_state &= ~SCTP_ADDR_REACHABLE; - sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_DOWN, stcb, SCTP_RESPONSE_TO_USER_REQ, net, SCTP_SO_LOCKED); + sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_DOWN, stcb, 0, net, SCTP_SO_LOCKED); } } else { if (net->error_count <= paddrp->spp_pathmaxrxt) { net->dest_state |= SCTP_ADDR_REACHABLE; - sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_UP, stcb, SCTP_RESPONSE_TO_USER_REQ, net, SCTP_SO_LOCKED); + sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_UP, stcb, 0, net, SCTP_SO_LOCKED); } } net->failure_threshold = paddrp->spp_pathmaxrxt; @@ -5680,12 +5680,12 @@ sctp_setopt(struct socket *so, int optna if (net->dest_state & SCTP_ADDR_REACHABLE) { if (net->failure_threshold > thlds->spt_pathmaxrxt) { net->dest_state &= ~SCTP_ADDR_REACHABLE; - sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_DOWN, stcb, SCTP_RESPONSE_TO_USER_REQ, net, SCTP_SO_LOCKED); + sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_DOWN, stcb, 0, net, SCTP_SO_LOCKED); } } else { if (net->failure_threshold <= thlds->spt_pathmaxrxt) { net->dest_state |= SCTP_ADDR_REACHABLE; - sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_UP, stcb, SCTP_RESPONSE_TO_USER_REQ, net, SCTP_SO_LOCKED); + sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_UP, stcb, 0, net, SCTP_SO_LOCKED); } } net->failure_threshold = thlds->spt_pathmaxrxt; @@ -5709,12 +5709,12 @@ sctp_setopt(struct socket *so, int optna if (net->dest_state & SCTP_ADDR_REACHABLE) { if (net->failure_threshold > thlds->spt_pathmaxrxt) { net->dest_state &= ~SCTP_ADDR_REACHABLE; - sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_DOWN, stcb, SCTP_RESPONSE_TO_USER_REQ, net, SCTP_SO_LOCKED); + sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_DOWN, stcb, 0, net, SCTP_SO_LOCKED); } } else { if (net->failure_threshold <= thlds->spt_pathmaxrxt) { net->dest_state |= SCTP_ADDR_REACHABLE; - sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_UP, stcb, SCTP_RESPONSE_TO_USER_REQ, net, SCTP_SO_LOCKED); + sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_UP, stcb, 0, net, SCTP_SO_LOCKED); } } net->failure_threshold = thlds->spt_pathmaxrxt; Modified: stable/9/sys/netinet6/sctp6_usrreq.c ============================================================================== --- stable/9/sys/netinet6/sctp6_usrreq.c Sun Jul 1 07:36:33 2012 (r237887) +++ stable/9/sys/netinet6/sctp6_usrreq.c Sun Jul 1 07:39:37 2012 (r237888) @@ -426,8 +426,7 @@ sctp6_notify(struct sctp_inpcb *inp, net->dest_state &= ~SCTP_ADDR_REACHABLE; net->dest_state &= ~SCTP_ADDR_PF; sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_DOWN, - stcb, SCTP_FAILED_THRESHOLD, - (void *)net, SCTP_SO_NOT_LOCKED); + stcb, 0, (void *)net, SCTP_SO_NOT_LOCKED); } SCTP_TCB_UNLOCK(stcb); } else if ((icmph->icmp6_code == ICMP_UNREACH_PROTOCOL) || From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 07:42:59 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D0602106566C; Sun, 1 Jul 2012 07:42:59 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B96BC8FC0A; Sun, 1 Jul 2012 07:42:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q617gxf0074193; Sun, 1 Jul 2012 07:42:59 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q617gx7J074184; Sun, 1 Jul 2012 07:42:59 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201207010742.q617gx7J074184@svn.freebsd.org> From: Michael Tuexen Date: Sun, 1 Jul 2012 07:42:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237889 - stable/9/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 07:42:59 -0000 Author: tuexen Date: Sun Jul 1 07:42:59 2012 New Revision: 237889 URL: http://svn.freebsd.org/changeset/base/237889 Log: MFC r235416: Provide in the SCTP_SEND_FAILED and SCTP_SEND_FAILED_EVENT notifications the correct ssf_error or ssfe_error as required by RFC 6458. Modified: stable/9/sys/netinet/sctp_constants.h stable/9/sys/netinet/sctp_indata.c stable/9/sys/netinet/sctp_input.c stable/9/sys/netinet/sctp_output.c stable/9/sys/netinet/sctp_pcb.c stable/9/sys/netinet/sctp_timer.c stable/9/sys/netinet/sctputil.c stable/9/sys/netinet/sctputil.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp_constants.h ============================================================================== --- stable/9/sys/netinet/sctp_constants.h Sun Jul 1 07:39:37 2012 (r237888) +++ stable/9/sys/netinet/sctp_constants.h Sun Jul 1 07:42:59 2012 (r237889) @@ -460,18 +460,6 @@ __FBSDID("$FreeBSD$"); #define SCTP_HAS_NAT_SUPPORT 0xc007 #define SCTP_NAT_VTAGS 0xc008 -/* Notification error codes */ -#define SCTP_NOTIFY_DATAGRAM_UNSENT 0x0001 -#define SCTP_NOTIFY_DATAGRAM_SENT 0x0002 -#define SCTP_FAILED_THRESHOLD 0x0004 -#define SCTP_HEARTBEAT_SUCCESS 0x0008 -#define SCTP_RESPONSE_TO_USER_REQ 0x0010 -#define SCTP_INTERNAL_ERROR 0x0020 -#define SCTP_SHUTDOWN_GUARD_EXPIRES 0x0040 -#define SCTP_RECEIVED_SACK 0x0080 -#define SCTP_PEER_FAULTY 0x0100 -#define SCTP_ICMP_REFUSED 0x0200 - /* bits for TOS field */ #define SCTP_ECT0_BIT 0x02 #define SCTP_ECT1_BIT 0x01 @@ -755,27 +743,28 @@ __FBSDID("$FreeBSD$"); #define SCTP_NOTIFY_ASSOC_DOWN 2 #define SCTP_NOTIFY_INTERFACE_DOWN 3 #define SCTP_NOTIFY_INTERFACE_UP 4 -#define SCTP_NOTIFY_DG_FAIL 5 -#define SCTP_NOTIFY_SPECIAL_SP_FAIL 6 -#define SCTP_NOTIFY_ASSOC_LOC_ABORTED 7 -#define SCTP_NOTIFY_ASSOC_REM_ABORTED 8 -#define SCTP_NOTIFY_ASSOC_RESTART 9 -#define SCTP_NOTIFY_PEER_SHUTDOWN 10 -#define SCTP_NOTIFY_ASCONF_ADD_IP 11 -#define SCTP_NOTIFY_ASCONF_DELETE_IP 12 -#define SCTP_NOTIFY_ASCONF_SET_PRIMARY 13 -#define SCTP_NOTIFY_PARTIAL_DELVIERY_INDICATION 14 -#define SCTP_NOTIFY_INTERFACE_CONFIRMED 15 -#define SCTP_NOTIFY_STR_RESET_RECV 16 -#define SCTP_NOTIFY_STR_RESET_SEND 17 -#define SCTP_NOTIFY_STR_RESET_FAILED_OUT 18 -#define SCTP_NOTIFY_STR_RESET_FAILED_IN 19 -#define SCTP_NOTIFY_STR_RESET_DENIED_OUT 20 -#define SCTP_NOTIFY_STR_RESET_DENIED_IN 21 -#define SCTP_NOTIFY_AUTH_NEW_KEY 22 -#define SCTP_NOTIFY_AUTH_FREE_KEY 23 -#define SCTP_NOTIFY_NO_PEER_AUTH 24 -#define SCTP_NOTIFY_SENDER_DRY 25 +#define SCTP_NOTIFY_SENT_DG_FAIL 5 +#define SCTP_NOTIFY_UNSENT_DG_FAIL 6 +#define SCTP_NOTIFY_SPECIAL_SP_FAIL 7 +#define SCTP_NOTIFY_ASSOC_LOC_ABORTED 8 +#define SCTP_NOTIFY_ASSOC_REM_ABORTED 9 +#define SCTP_NOTIFY_ASSOC_RESTART 10 +#define SCTP_NOTIFY_PEER_SHUTDOWN 11 +#define SCTP_NOTIFY_ASCONF_ADD_IP 12 +#define SCTP_NOTIFY_ASCONF_DELETE_IP 13 +#define SCTP_NOTIFY_ASCONF_SET_PRIMARY 14 +#define SCTP_NOTIFY_PARTIAL_DELVIERY_INDICATION 15 +#define SCTP_NOTIFY_INTERFACE_CONFIRMED 16 +#define SCTP_NOTIFY_STR_RESET_RECV 17 +#define SCTP_NOTIFY_STR_RESET_SEND 18 +#define SCTP_NOTIFY_STR_RESET_FAILED_OUT 19 +#define SCTP_NOTIFY_STR_RESET_FAILED_IN 20 +#define SCTP_NOTIFY_STR_RESET_DENIED_OUT 21 +#define SCTP_NOTIFY_STR_RESET_DENIED_IN 22 +#define SCTP_NOTIFY_AUTH_NEW_KEY 23 +#define SCTP_NOTIFY_AUTH_FREE_KEY 24 +#define SCTP_NOTIFY_NO_PEER_AUTH 25 +#define SCTP_NOTIFY_SENDER_DRY 26 /* This is the value for messages that are NOT completely * copied down where we will start to split the message. Modified: stable/9/sys/netinet/sctp_indata.c ============================================================================== --- stable/9/sys/netinet/sctp_indata.c Sun Jul 1 07:39:37 2012 (r237888) +++ stable/9/sys/netinet/sctp_indata.c Sun Jul 1 07:42:59 2012 (r237889) @@ -3194,8 +3194,7 @@ sctp_strike_gap_ack_chunks(struct sctp_t if (timevalcmp(&now, &tp1->rec.data.timetodrop, >)) { /* Yes so drop it */ if (tp1->data != NULL) { - (void)sctp_release_pr_sctp_chunk(stcb, tp1, - (SCTP_RESPONSE_TO_USER_REQ | SCTP_NOTIFY_DATAGRAM_SENT), + (void)sctp_release_pr_sctp_chunk(stcb, tp1, 1, SCTP_SO_NOT_LOCKED); } continue; @@ -3452,8 +3451,7 @@ sctp_strike_gap_ack_chunks(struct sctp_t if (tp1->snd_count > tp1->rec.data.timetodrop.tv_sec) { /* Yes, so drop it */ if (tp1->data != NULL) { - (void)sctp_release_pr_sctp_chunk(stcb, tp1, - (SCTP_RESPONSE_TO_USER_REQ | SCTP_NOTIFY_DATAGRAM_SENT), + (void)sctp_release_pr_sctp_chunk(stcb, tp1, 1, SCTP_SO_NOT_LOCKED); } /* Make sure to flag we had a FR */ @@ -3632,8 +3630,7 @@ sctp_try_advance_peer_ack_point(struct s /* Yes so drop it */ if (tp1->data) { (void)sctp_release_pr_sctp_chunk(stcb, tp1, - (SCTP_RESPONSE_TO_USER_REQ | SCTP_NOTIFY_DATAGRAM_SENT), - SCTP_SO_NOT_LOCKED); + 1, SCTP_SO_NOT_LOCKED); } } else { /* Modified: stable/9/sys/netinet/sctp_input.c ============================================================================== --- stable/9/sys/netinet/sctp_input.c Sun Jul 1 07:39:37 2012 (r237888) +++ stable/9/sys/netinet/sctp_input.c Sun Jul 1 07:42:59 2012 (r237889) @@ -300,8 +300,8 @@ sctp_process_init(struct sctp_init_chunk asoc->send_queue_cnt--; if (chk->data != NULL) { sctp_free_bufspace(stcb, asoc, chk, 1); - sctp_ulp_notify(SCTP_NOTIFY_DG_FAIL, stcb, - SCTP_NOTIFY_DATAGRAM_UNSENT, chk, SCTP_SO_NOT_LOCKED); + sctp_ulp_notify(SCTP_NOTIFY_UNSENT_DG_FAIL, stcb, + 0, chk, SCTP_SO_NOT_LOCKED); if (chk->data) { sctp_m_freem(chk->data); chk->data = NULL; @@ -318,8 +318,7 @@ sctp_process_init(struct sctp_init_chunk TAILQ_REMOVE(&outs->outqueue, sp, next); asoc->stream_queue_cnt--; sctp_ulp_notify(SCTP_NOTIFY_SPECIAL_SP_FAIL, - stcb, SCTP_NOTIFY_DATAGRAM_UNSENT, - sp, SCTP_SO_NOT_LOCKED); + stcb, 0, sp, SCTP_SO_NOT_LOCKED); if (sp->data) { sctp_m_freem(sp->data); sp->data = NULL; @@ -1006,7 +1005,7 @@ sctp_handle_shutdown_ack(struct sctp_shu if (!TAILQ_EMPTY(&asoc->send_queue) || !TAILQ_EMPTY(&asoc->sent_queue) || !stcb->asoc.ss_functions.sctp_ss_is_empty(stcb, asoc)) { - sctp_report_all_outbound(stcb, 0, SCTP_SO_NOT_LOCKED); + sctp_report_all_outbound(stcb, 0, 0, SCTP_SO_NOT_LOCKED); } /* stop the timer */ sctp_timer_stop(SCTP_TIMER_TYPE_SHUTDOWN, stcb->sctp_ep, stcb, net, SCTP_FROM_SCTP_INPUT + SCTP_LOC_9); @@ -1889,7 +1888,7 @@ sctp_process_cookie_existing(struct mbuf /* send up all the data */ SCTP_TCB_SEND_LOCK(stcb); - sctp_report_all_outbound(stcb, 1, SCTP_SO_NOT_LOCKED); + sctp_report_all_outbound(stcb, 0, 1, SCTP_SO_NOT_LOCKED); for (i = 0; i < stcb->asoc.streamoutcnt; i++) { stcb->asoc.strmout[i].stream_no = i; stcb->asoc.strmout[i].next_sequence_sent = 0; @@ -3176,7 +3175,7 @@ sctp_handle_shutdown_complete(struct sct if (!TAILQ_EMPTY(&asoc->send_queue) || !TAILQ_EMPTY(&asoc->sent_queue) || !stcb->asoc.ss_functions.sctp_ss_is_empty(stcb, asoc)) { - sctp_report_all_outbound(stcb, 0, SCTP_SO_NOT_LOCKED); + sctp_report_all_outbound(stcb, 0, 0, SCTP_SO_NOT_LOCKED); } } /* stop the timer */ Modified: stable/9/sys/netinet/sctp_output.c ============================================================================== --- stable/9/sys/netinet/sctp_output.c Sun Jul 1 07:39:37 2012 (r237888) +++ stable/9/sys/netinet/sctp_output.c Sun Jul 1 07:42:59 2012 (r237889) @@ -6091,14 +6091,14 @@ sctp_prune_prsctp(struct sctp_tcb *stcb, * if the mbuf is here */ int ret_spc; - int cause; + uint8_t sent; if (chk->sent > SCTP_DATAGRAM_UNSENT) - cause = SCTP_RESPONSE_TO_USER_REQ | SCTP_NOTIFY_DATAGRAM_SENT; + sent = 1; else - cause = SCTP_RESPONSE_TO_USER_REQ | SCTP_NOTIFY_DATAGRAM_UNSENT; + sent = 0; ret_spc = sctp_release_pr_sctp_chunk(stcb, chk, - cause, + sent, SCTP_SO_LOCKED); freed_spc += ret_spc; if (freed_spc >= dataout) { @@ -6121,8 +6121,7 @@ sctp_prune_prsctp(struct sctp_tcb *stcb, int ret_spc; ret_spc = sctp_release_pr_sctp_chunk(stcb, chk, - SCTP_RESPONSE_TO_USER_REQ | SCTP_NOTIFY_DATAGRAM_UNSENT, - SCTP_SO_LOCKED); + 0, SCTP_SO_LOCKED); freed_spc += ret_spc; if (freed_spc >= dataout) { Modified: stable/9/sys/netinet/sctp_pcb.c ============================================================================== --- stable/9/sys/netinet/sctp_pcb.c Sun Jul 1 07:39:37 2012 (r237888) +++ stable/9/sys/netinet/sctp_pcb.c Sun Jul 1 07:42:59 2012 (r237889) @@ -4990,8 +4990,7 @@ sctp_free_assoc(struct sctp_inpcb *inp, if (so) { /* Still an open socket - report */ sctp_ulp_notify(SCTP_NOTIFY_SPECIAL_SP_FAIL, stcb, - SCTP_NOTIFY_DATAGRAM_UNSENT, - (void *)sp, SCTP_SO_LOCKED); + 0, (void *)sp, SCTP_SO_LOCKED); } if (sp->data) { sctp_m_freem(sp->data); @@ -5051,8 +5050,8 @@ sctp_free_assoc(struct sctp_inpcb *inp, if (chk->data) { if (so) { /* Still a socket? */ - sctp_ulp_notify(SCTP_NOTIFY_DG_FAIL, stcb, - SCTP_NOTIFY_DATAGRAM_UNSENT, chk, SCTP_SO_LOCKED); + sctp_ulp_notify(SCTP_NOTIFY_UNSENT_DG_FAIL, stcb, + 0, chk, SCTP_SO_LOCKED); } if (chk->data) { sctp_m_freem(chk->data); @@ -5075,8 +5074,8 @@ sctp_free_assoc(struct sctp_inpcb *inp, if (chk->data) { if (so) { /* Still a socket? */ - sctp_ulp_notify(SCTP_NOTIFY_DG_FAIL, stcb, - SCTP_NOTIFY_DATAGRAM_SENT, chk, SCTP_SO_LOCKED); + sctp_ulp_notify(SCTP_NOTIFY_SENT_DG_FAIL, stcb, + 0, chk, SCTP_SO_LOCKED); } if (chk->data) { sctp_m_freem(chk->data); Modified: stable/9/sys/netinet/sctp_timer.c ============================================================================== --- stable/9/sys/netinet/sctp_timer.c Sun Jul 1 07:39:37 2012 (r237888) +++ stable/9/sys/netinet/sctp_timer.c Sun Jul 1 07:42:59 2012 (r237889) @@ -614,7 +614,7 @@ start_again: if (chk->data) { (void)sctp_release_pr_sctp_chunk(stcb, chk, - (SCTP_RESPONSE_TO_USER_REQ | SCTP_NOTIFY_DATAGRAM_SENT), + 1, SCTP_SO_NOT_LOCKED); cnt_abandoned++; } @@ -627,7 +627,7 @@ start_again: if (chk->data) { (void)sctp_release_pr_sctp_chunk(stcb, chk, - (SCTP_RESPONSE_TO_USER_REQ | SCTP_NOTIFY_DATAGRAM_SENT), + 1, SCTP_SO_NOT_LOCKED); cnt_abandoned++; } Modified: stable/9/sys/netinet/sctputil.c ============================================================================== --- stable/9/sys/netinet/sctputil.c Sun Jul 1 07:39:37 2012 (r237888) +++ stable/9/sys/netinet/sctputil.c Sun Jul 1 07:42:59 2012 (r237889) @@ -2810,7 +2810,7 @@ sctp_notify_peer_addr_change(struct sctp static void -sctp_notify_send_failed(struct sctp_tcb *stcb, uint32_t error, +sctp_notify_send_failed(struct sctp_tcb *stcb, uint8_t sent, uint32_t error, struct sctp_tmit_chunk *chk, int so_locked #if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING) SCTP_UNUSED @@ -2844,10 +2844,11 @@ sctp_notify_send_failed(struct sctp_tcb if (sctp_stcb_is_feature_on(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_RECVNSENDFAILEVNT)) { ssfe = mtod(m_notify, struct sctp_send_failed_event *); ssfe->ssfe_type = SCTP_SEND_FAILED_EVENT; - if (error == SCTP_NOTIFY_DATAGRAM_UNSENT) - ssfe->ssfe_flags = SCTP_DATA_UNSENT; - else + if (sent) { ssfe->ssfe_flags = SCTP_DATA_SENT; + } else { + ssfe->ssfe_flags = SCTP_DATA_UNSENT; + } ssfe->ssfe_length = length; ssfe->ssfe_error = error; /* not exactly what the user sent in, but should be close :) */ @@ -2862,10 +2863,11 @@ sctp_notify_send_failed(struct sctp_tcb } else { ssf = mtod(m_notify, struct sctp_send_failed *); ssf->ssf_type = SCTP_SEND_FAILED; - if (error == SCTP_NOTIFY_DATAGRAM_UNSENT) - ssf->ssf_flags = SCTP_DATA_UNSENT; - else + if (sent) { ssf->ssf_flags = SCTP_DATA_SENT; + } else { + ssf->ssf_flags = SCTP_DATA_UNSENT; + } ssf->ssf_length = length; ssf->ssf_error = error; /* not exactly what the user sent in, but should be close :) */ @@ -2954,10 +2956,7 @@ sctp_notify_send_failed2(struct sctp_tcb if (sctp_stcb_is_feature_on(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_RECVNSENDFAILEVNT)) { ssfe = mtod(m_notify, struct sctp_send_failed_event *); ssfe->ssfe_type = SCTP_SEND_FAILED; - if (error == SCTP_NOTIFY_DATAGRAM_UNSENT) - ssfe->ssfe_flags = SCTP_DATA_UNSENT; - else - ssfe->ssfe_flags = SCTP_DATA_SENT; + ssfe->ssfe_flags = SCTP_DATA_UNSENT; ssfe->ssfe_length = length; ssfe->ssfe_error = error; /* not exactly what the user sent in, but should be close :) */ @@ -2976,10 +2975,7 @@ sctp_notify_send_failed2(struct sctp_tcb } else { ssf = mtod(m_notify, struct sctp_send_failed *); ssf->ssf_type = SCTP_SEND_FAILED; - if (error == SCTP_NOTIFY_DATAGRAM_UNSENT) - ssf->ssf_flags = SCTP_DATA_UNSENT; - else - ssf->ssf_flags = SCTP_DATA_SENT; + ssf->ssf_flags = SCTP_DATA_UNSENT; ssf->ssf_length = length; ssf->ssf_error = error; /* not exactly what the user sent in, but should be close :) */ @@ -3543,8 +3539,12 @@ sctp_ulp_notify(uint32_t notification, s sctp_notify_send_failed2(stcb, error, (struct sctp_stream_queue_pending *)data, so_locked); break; - case SCTP_NOTIFY_DG_FAIL: - sctp_notify_send_failed(stcb, error, + case SCTP_NOTIFY_SENT_DG_FAIL: + sctp_notify_send_failed(stcb, 1, error, + (struct sctp_tmit_chunk *)data, so_locked); + break; + case SCTP_NOTIFY_UNSENT_DG_FAIL: + sctp_notify_send_failed(stcb, 0, error, (struct sctp_tmit_chunk *)data, so_locked); break; case SCTP_NOTIFY_PARTIAL_DELVIERY_INDICATION: @@ -3642,7 +3642,7 @@ sctp_ulp_notify(uint32_t notification, s } void -sctp_report_all_outbound(struct sctp_tcb *stcb, int holds_lock, int so_locked +sctp_report_all_outbound(struct sctp_tcb *stcb, uint16_t error, int holds_lock, int so_locked #if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING) SCTP_UNUSED #endif @@ -3677,8 +3677,8 @@ sctp_report_all_outbound(struct sctp_tcb asoc->sent_queue_cnt--; if (chk->data != NULL) { sctp_free_bufspace(stcb, asoc, chk, 1); - sctp_ulp_notify(SCTP_NOTIFY_DG_FAIL, stcb, - SCTP_NOTIFY_DATAGRAM_SENT, chk, so_locked); + sctp_ulp_notify(SCTP_NOTIFY_SENT_DG_FAIL, stcb, + error, chk, so_locked); if (chk->data) { sctp_m_freem(chk->data); chk->data = NULL; @@ -3693,8 +3693,8 @@ sctp_report_all_outbound(struct sctp_tcb asoc->send_queue_cnt--; if (chk->data != NULL) { sctp_free_bufspace(stcb, asoc, chk, 1); - sctp_ulp_notify(SCTP_NOTIFY_DG_FAIL, stcb, - SCTP_NOTIFY_DATAGRAM_UNSENT, chk, so_locked); + sctp_ulp_notify(SCTP_NOTIFY_UNSENT_DG_FAIL, stcb, + error, chk, so_locked); if (chk->data) { sctp_m_freem(chk->data); chk->data = NULL; @@ -3714,7 +3714,7 @@ sctp_report_all_outbound(struct sctp_tcb sctp_free_spbufspace(stcb, asoc, sp); if (sp->data) { sctp_ulp_notify(SCTP_NOTIFY_SPECIAL_SP_FAIL, stcb, - SCTP_NOTIFY_DATAGRAM_UNSENT, (void *)sp, so_locked); + error, (void *)sp, so_locked); if (sp->data) { sctp_m_freem(sp->data); sp->data = NULL; @@ -3757,7 +3757,7 @@ sctp_abort_notification(struct sctp_tcb return; } /* Tell them we lost the asoc */ - sctp_report_all_outbound(stcb, 1, so_locked); + sctp_report_all_outbound(stcb, error, 1, so_locked); if (from_peer) { sctp_ulp_notify(SCTP_NOTIFY_ASSOC_REM_ABORTED, stcb, error, abort, so_locked); } else { @@ -4655,7 +4655,7 @@ sctp_free_bufspace(struct sctp_tcb *stcb int sctp_release_pr_sctp_chunk(struct sctp_tcb *stcb, struct sctp_tmit_chunk *tp1, - int reason, int so_locked + uint8_t sent, int so_locked #if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING) SCTP_UNUSED #endif @@ -4682,7 +4682,11 @@ sctp_release_pr_sctp_chunk(struct sctp_t sctp_free_bufspace(stcb, &stcb->asoc, tp1, 1); stcb->asoc.peers_rwnd += tp1->send_size; stcb->asoc.peers_rwnd += SCTP_BASE_SYSCTL(sctp_peer_chunk_oh); - sctp_ulp_notify(SCTP_NOTIFY_DG_FAIL, stcb, reason, tp1, so_locked); + if (sent) { + sctp_ulp_notify(SCTP_NOTIFY_SENT_DG_FAIL, stcb, 0, tp1, so_locked); + } else { + sctp_ulp_notify(SCTP_NOTIFY_UNSENT_DG_FAIL, stcb, 0, tp1, so_locked); + } if (tp1->data) { sctp_m_freem(tp1->data); tp1->data = NULL; @@ -4729,7 +4733,11 @@ sctp_release_pr_sctp_chunk(struct sctp_t chk = tp1; ret_sz += tp1->book_size; sctp_free_bufspace(stcb, &stcb->asoc, tp1, 1); - sctp_ulp_notify(SCTP_NOTIFY_DG_FAIL, stcb, reason, tp1, so_locked); + if (sent) { + sctp_ulp_notify(SCTP_NOTIFY_SENT_DG_FAIL, stcb, 0, tp1, so_locked); + } else { + sctp_ulp_notify(SCTP_NOTIFY_UNSENT_DG_FAIL, stcb, 0, tp1, so_locked); + } if (tp1->data) { sctp_m_freem(tp1->data); tp1->data = NULL; Modified: stable/9/sys/netinet/sctputil.h ============================================================================== --- stable/9/sys/netinet/sctputil.h Sun Jul 1 07:39:37 2012 (r237888) +++ stable/9/sys/netinet/sctputil.h Sun Jul 1 07:42:59 2012 (r237889) @@ -170,7 +170,7 @@ sctp_pull_off_control_to_new_inp(struct void sctp_stop_timers_for_shutdown(struct sctp_tcb *); void -sctp_report_all_outbound(struct sctp_tcb *, int, int +sctp_report_all_outbound(struct sctp_tcb *, uint16_t, int, int #if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING) SCTP_UNUSED #endif @@ -244,7 +244,7 @@ void sctp_print_address_pkt(struct ip *, int sctp_release_pr_sctp_chunk(struct sctp_tcb *, struct sctp_tmit_chunk *, - int, int + uint8_t, int #if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING) SCTP_UNUSED #endif From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 07:49:14 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BF4A21065673; Sun, 1 Jul 2012 07:49:14 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9F7548FC18; Sun, 1 Jul 2012 07:49:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q617nEYV074520; Sun, 1 Jul 2012 07:49:14 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q617nEQi074516; Sun, 1 Jul 2012 07:49:14 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201207010749.q617nEQi074516@svn.freebsd.org> From: Michael Tuexen Date: Sun, 1 Jul 2012 07:49:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237890 - stable/9/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 07:49:14 -0000 Author: tuexen Date: Sun Jul 1 07:49:14 2012 New Revision: 237890 URL: http://svn.freebsd.org/changeset/base/237890 Log: MFC r235418: Support SCTP_REMOTE_ERROR notification. Modified: stable/9/sys/netinet/sctp_constants.h stable/9/sys/netinet/sctp_input.c stable/9/sys/netinet/sctputil.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp_constants.h ============================================================================== --- stable/9/sys/netinet/sctp_constants.h Sun Jul 1 07:42:59 2012 (r237889) +++ stable/9/sys/netinet/sctp_constants.h Sun Jul 1 07:49:14 2012 (r237890) @@ -765,6 +765,7 @@ __FBSDID("$FreeBSD$"); #define SCTP_NOTIFY_AUTH_FREE_KEY 24 #define SCTP_NOTIFY_NO_PEER_AUTH 25 #define SCTP_NOTIFY_SENDER_DRY 26 +#define SCTP_NOTIFY_REMOTE_ERROR 27 /* This is the value for messages that are NOT completely * copied down where we will start to split the message. Modified: stable/9/sys/netinet/sctp_input.c ============================================================================== --- stable/9/sys/netinet/sctp_input.c Sun Jul 1 07:42:59 2012 (r237889) +++ stable/9/sys/netinet/sctp_input.c Sun Jul 1 07:49:14 2012 (r237890) @@ -1111,7 +1111,7 @@ sctp_handle_error(struct sctp_chunkhdr * { int chklen; struct sctp_paramhdr *phdr; - uint16_t error_type; + uint16_t error, error_type; uint16_t error_len; struct sctp_association *asoc; int adjust; @@ -1126,6 +1126,7 @@ sctp_handle_error(struct sctp_chunkhdr * phdr = (struct sctp_paramhdr *)((caddr_t)ch + sizeof(struct sctp_chunkhdr)); chklen = ntohs(ch->chunk_length) - sizeof(struct sctp_chunkhdr); + error = 0; while ((size_t)chklen >= sizeof(struct sctp_paramhdr)) { /* Process an Error Cause */ error_type = ntohs(phdr->param_type); @@ -1136,6 +1137,10 @@ sctp_handle_error(struct sctp_chunkhdr * chklen, error_len); return (0); } + if (error == 0) { + /* report the first error cause */ + error = error_type; + } switch (error_type) { case SCTP_CAUSE_INVALID_STREAM: case SCTP_CAUSE_MISSING_PARAM: @@ -1252,6 +1257,7 @@ sctp_handle_error(struct sctp_chunkhdr * chklen -= adjust; phdr = (struct sctp_paramhdr *)((caddr_t)phdr + adjust); } + sctp_ulp_notify(SCTP_NOTIFY_REMOTE_ERROR, stcb, error, ch, SCTP_SO_NOT_LOCKED); return (0); } Modified: stable/9/sys/netinet/sctputil.c ============================================================================== --- stable/9/sys/netinet/sctputil.c Sun Jul 1 07:42:59 2012 (r237889) +++ stable/9/sys/netinet/sctputil.c Sun Jul 1 07:49:14 2012 (r237890) @@ -3464,6 +3464,63 @@ sctp_notify_stream_reset(struct sctp_tcb } +static void +sctp_notify_remote_error(struct sctp_tcb *stcb, uint16_t error, struct sctp_error_chunk *chunk) +{ + struct mbuf *m_notify; + struct sctp_remote_error *sre; + struct sctp_queued_to_read *control; + size_t notif_len, chunk_len; + + if ((stcb == NULL) || + sctp_stcb_is_feature_off(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_RECVPEERERR)) { + return; + } + if (chunk != NULL) { + chunk_len = htons(chunk->ch.chunk_length); + } else { + chunk_len = 0; + } + notif_len = sizeof(struct sctp_remote_error) + chunk_len; + m_notify = sctp_get_mbuf_for_msg(notif_len, 0, M_DONTWAIT, 1, MT_DATA); + if (m_notify == NULL) { + /* Retry with smaller value. */ + notif_len = sizeof(struct sctp_remote_error); + m_notify = sctp_get_mbuf_for_msg(notif_len, 0, M_DONTWAIT, 1, MT_DATA); + if (m_notify == NULL) { + return; + } + } + SCTP_BUF_NEXT(m_notify) = NULL; + sre = mtod(m_notify, struct sctp_remote_error *); + sre->sre_type = SCTP_REMOTE_ERROR; + sre->sre_flags = 0; + sre->sre_length = sizeof(struct sctp_remote_error); + sre->sre_error = error; + sre->sre_assoc_id = sctp_get_associd(stcb); + if (notif_len > sizeof(struct sctp_remote_error)) { + memcpy(sre->sre_data, chunk, chunk_len); + sre->sre_length += chunk_len; + } + SCTP_BUF_LEN(m_notify) = sre->sre_length; + control = sctp_build_readq_entry(stcb, stcb->asoc.primary_destination, + 0, 0, stcb->asoc.context, 0, 0, 0, + m_notify); + if (control != NULL) { + control->length = SCTP_BUF_LEN(m_notify); + /* not that we need this */ + control->tail_mbuf = m_notify; + control->spec_flags = M_NOTIFICATION; + 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 { + sctp_m_freem(m_notify); + } +} + + void sctp_ulp_notify(uint32_t notification, struct sctp_tcb *stcb, uint32_t error, void *data, int so_locked @@ -3634,6 +3691,9 @@ sctp_ulp_notify(uint32_t notification, s case SCTP_NOTIFY_SENDER_DRY: sctp_notify_sender_dry_event(stcb, so_locked); break; + case SCTP_NOTIFY_REMOTE_ERROR: + sctp_notify_remote_error(stcb, error, data); + break; default: SCTPDBG(SCTP_DEBUG_UTIL1, "%s: unknown notification %xh (%u)\n", __FUNCTION__, notification, notification); From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 07:51:32 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C269D1065674; Sun, 1 Jul 2012 07:51:32 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AD46B8FC0C; Sun, 1 Jul 2012 07:51:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q617pWi2074675; Sun, 1 Jul 2012 07:51:32 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q617pWB9074673; Sun, 1 Jul 2012 07:51:32 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201207010751.q617pWB9074673@svn.freebsd.org> From: Michael Tuexen Date: Sun, 1 Jul 2012 07:51:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237891 - stable/9/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 07:51:32 -0000 Author: tuexen Date: Sun Jul 1 07:51:32 2012 New Revision: 237891 URL: http://svn.freebsd.org/changeset/base/237891 Log: MFC r235554: Support SCTP_EOF also for 1-to-1 style sockets. Modified: stable/9/sys/netinet/sctp_output.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp_output.c ============================================================================== --- stable/9/sys/netinet/sctp_output.c Sun Jul 1 07:49:14 2012 (r237890) +++ stable/9/sys/netinet/sctp_output.c Sun Jul 1 07:51:32 2012 (r237891) @@ -13610,8 +13610,7 @@ skip_preblock: dataless_eof: /* EOF thing ? */ if ((srcv->sinfo_flags & SCTP_EOF) && - (got_all_of_the_send == 1) && - (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE)) { + (got_all_of_the_send == 1)) { int cnt; SCTP_STAT_INCR(sctps_sends_with_eof); From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 07:53:51 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1D43C1065674; Sun, 1 Jul 2012 07:53:51 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0633B8FC0A; Sun, 1 Jul 2012 07:53:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q617rogu074820; Sun, 1 Jul 2012 07:53:50 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q617rono074817; Sun, 1 Jul 2012 07:53:50 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201207010753.q617rono074817@svn.freebsd.org> From: Martin Matuska Date: Sun, 1 Jul 2012 07:53:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237892 - in vendor/illumos/dist/man: . man1m X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 07:53:51 -0000 Author: mm Date: Sun Jul 1 07:53:50 2012 New Revision: 237892 URL: http://svn.freebsd.org/changeset/base/237892 Log: Add illumos manual pages to vendor/illumos (original location) illumos-gate revision 13742:b6bbdd77139c Added: vendor/illumos/dist/man/ vendor/illumos/dist/man/man1m/ vendor/illumos/dist/man/man1m/dtrace.1m vendor/illumos/dist/man/man1m/lockstat.1m vendor/illumos/dist/man/man1m/plockstat.1m Added: vendor/illumos/dist/man/man1m/dtrace.1m ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/illumos/dist/man/man1m/dtrace.1m Sun Jul 1 07:53:50 2012 (r237892) @@ -0,0 +1,768 @@ +'\" te +.\" Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. +.\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the +.\" fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH DTRACE 1M "Aug 4, 2009" +.SH NAME +dtrace \- DTrace dynamic tracing compiler and tracing utility +.SH SYNOPSIS +.LP +.nf +\fBdtrace\fR [\fB-32\fR | \fB-64\fR] [\fB-aACeFGHhlqSvVwZ\fR] [\fB-b\fR \fIbufsz\fR] [\fB-c\fR \fIcmd\fR] + [\fB-D\fR \fIname\fR [\fI=value\fR]] [\fB-I\fR \fIpath\fR] [\fB-L\fR \fIpath\fR] [\fB-o\fR \fIoutput\fR] + [\fB-s\fR \fIscript\fR] [\fB-U\fR \fIname\fR] [\fB-x\fR \fIarg\fR [\fI=val\fR]] + [\fB-X\fR a | c | s | t] [\fB-p\fR \fIpid\fR] + [\fB-P\fR \fIprovider\fR [[\fIpredicate\fR] \fIaction\fR]] + [\fB-m\fR [\fIprovider:\fR] \fImodule\fR [[\fIpredicate\fR] \fIaction\fR]] + [\fB-f\fR [[\fIprovider:\fR] \fImodule:\fR] \fIfunction\fR [[\fIpredicate\fR] \fIaction\fR]] + [\fB-n\fR [[[\fIprovider:\fR] \fImodule:\fR] \fIfunction:\fR] \fIname\fR [[\fIpredicate\fR] \fIaction\fR]] + [\fB-i\fR \fIprobe-id\fR [[\fIpredicate\fR] \fIaction\fR]] +.fi + +.SH DESCRIPTION +.sp +.LP +DTrace is a comprehensive dynamic tracing framework for the Solaris Operating +System. DTrace provides a powerful infrastructure that permits administrators, +developers, and service personnel to concisely answer arbitrary questions about +the behavior of the operating system and user programs. +.sp +.LP +The \fISolaris Dynamic Tracing Guide\fR describes how to use DTrace to observe, +debug, and tune system behavior. Refer to this book for a detailed description +of DTrace features, including the bundled DTrace observability tools, +instrumentation providers, and the D programming language. +.sp +.LP +The \fBdtrace\fR command provides a generic interface to the essential services +provided by the DTrace facility, including: +.RS +4 +.TP +.ie t \(bu +.el o +Options that list the set of probes and providers currently published by DTrace +.RE +.RS +4 +.TP +.ie t \(bu +.el o +Options that enable probes directly using any of the probe description +specifiers (provider, module, function, name) +.RE +.RS +4 +.TP +.ie t \(bu +.el o +Options that run the D compiler and compile one or more D program files or +programs written directly on the command line +.RE +.RS +4 +.TP +.ie t \(bu +.el o +Options that generate anonymous tracing programs +.RE +.RS +4 +.TP +.ie t \(bu +.el o +Options that generate program stability reports +.RE +.RS +4 +.TP +.ie t \(bu +.el o +Options that modify DTrace tracing and buffering behavior and enable additional +D compiler features +.RE +.sp +.LP +You can use \fBdtrace\fR to create D scripts by using it in a \fB#!\fR +declaration to create an interpreter file. You can also use \fBdtrace\fR to +attempt to compile D programs and determine their properties without actually +enabling tracing using the \fB-e\fR option. See \fBOPTIONS\fR. See the +\fISolaris Dynamic Tracing Guide\fR for detailed examples of how to use the +\fBdtrace\fR utility to perform these tasks. +.SH OPTIONS +.sp +.LP +The arguments accepted by the \fB-P\fR, \fB-m\fR, \fB-f\fR, \fB-n\fR, and +\fB-i\fR options can include an optional D language \fIpredicate\fR enclosed in +slashes \fB//\fR and optional D language \fIaction\fR statement list enclosed +in braces \fB{}\fR. D program code specified on the command line must be +appropriately quoted to avoid interpretation of meta-characters by the shell. +.sp +.LP +The following options are supported: +.sp +.ne 2 +.na +\fB\fB-32\fR | \fB-64\fR\fR +.ad +.sp .6 +.RS 4n +The D compiler produces programs using the native data model of the operating +system kernel. You can use the \fBisainfo\fR \fB-b\fR command to determine the +current operating system data model. If the \fB-32\fR option is specified, +\fBdtrace\fR forces the D compiler to compile a D program using the 32-bit data +model. If the \fB-64\fR option is specified, \fBdtrace\fR forces the D compiler +to compile a D program using the 64-bit data model. These options are typically +not required as \fBdtrace\fR selects the native data model as the default. The +data model affects the sizes of integer types and other language properties. D +programs compiled for either data model can be executed on both 32-bit and +64-bit kernels. The \fB-32\fR and \fB-64\fR options also determine the ELF file +format (ELF32 or ELF64) produced by the \fB-G\fR option. +.RE + +.sp +.ne 2 +.na +\fB\fB-a\fR\fR +.ad +.sp .6 +.RS 4n +Claim anonymous tracing state and display the traced data. You can combine the +\fB-a\fR option with the \fB-e\fR option to force \fBdtrace\fR to exit +immediately after consuming the anonymous tracing state rather than continuing +to wait for new data. See the \fISolaris Dynamic Tracing Guide\fR for more +information about anonymous tracing. +.RE + +.sp +.ne 2 +.na +\fB\fB-A\fR\fR +.ad +.sp .6 +.RS 4n +Generate \fBdriver.conf\fR(4) directives for anonymous tracing. This option +constructs a set of \fBdtrace\fR(7D) configuration file directives to enable +the specified probes for anonymous tracing and then exits. By default, +\fBdtrace\fR attempts to store the directives to the file +\fB/kernel/drv/dtrace.conf\fR. You can modify this behavior if you use the +\fB-o\fR option to specify an alternate output file. +.RE + +.sp +.ne 2 +.na +\fB\fB-b\fR \fIbufsz\fR\fR +.ad +.sp .6 +.RS 4n +Set principal trace buffer size (\fIbufsz\fR). The trace buffer size can +include any of the size suffixes \fBk\fR, \fBm\fR, \fBg\fR, or \fBt\fR. If the +buffer space cannot be allocated, \fBdtrace\fR attempts to reduce the buffer +size or exit depending on the setting of the \fBbufresize\fR property. +.RE + +.sp +.ne 2 +.na +\fB\fB-c\fR \fIcmd\fR\fR +.ad +.sp .6 +.RS 4n +Run the specified command \fIcmd\fR and exit upon its completion. If more than +one \fB-c\fR option is present on the command line, \fBdtrace\fR exits when all +commands have exited, reporting the exit status for each child process as it +terminates. The process-ID of the first command is made available to any D +programs specified on the command line or using the \fB-s\fR option through the +\fB$target\fR macro variable. Refer to the \fISolaris Dynamic Tracing Guide\fR +for more information on macro variables. +.RE + +.sp +.ne 2 +.na +\fB\fB-C\fR\fR +.ad +.sp .6 +.RS 4n +Run the C preprocessor \fBcpp\fR(1) over D programs before compiling them. You +can pass options to the C preprocessor using the \fB-D\fR, \fB-U\fR, \fB-I\fR, +and \fB-H\fR options. You can select the degree of C standard conformance if +you use the \fB-X\fR option. For a description of the set of tokens defined by +the D compiler when invoking the C preprocessor, see \fB-X\fR. +.RE + +.sp +.ne 2 +.na +\fB\fB-D\fR \fIname\fR \fB[=\fR\fIvalue\fR\fB]\fR\fR +.ad +.sp .6 +.RS 4n +Define \fIname\fR when invoking \fBcpp\fR(1) (enabled using the \fB-C\fR +option). If you specify the equals sign (\fB=\fR) and additional \fIvalue\fR, +the name is assigned the corresponding value. This option passes the \fB-D\fR +option to each \fBcpp\fR invocation. +.RE + +.sp +.ne 2 +.na +\fB\fB-e\fR\fR +.ad +.sp .6 +.RS 4n +Exit after compiling any requests and consuming anonymous tracing state +(\fB-a\fR option) but prior to enabling any probes. You can combine this option +with the \fB-a\fR option to print anonymous tracing data and exit. You can also +combine this option with D compiler options. This combination verifies that the +programs compile without actually executing them and enabling the corresponding +instrumentation. +.RE + +.sp +.ne 2 +.na +\fB\fB-f\fR\fB[[\fR\fIprovider\fR\fB:]\fR\fImodule\fR\fB:]\fR\fIfunction\fR\fB[ +[\fR\fIpredicate\fR\fB]\fR\fIaction\fR\fB]]\fR\fR +.ad +.sp .6 +.RS 4n +Specify function name to trace or list (\fB-l\fR option). The corresponding +argument can include any of the probe description forms +\fIprovider:module:function\fR, \fImodule:function\fR, or \fIfunction\fR. +Unspecified probe description fields are left blank and match any probes +regardless of the values in those fields. If no qualifiers other than +\fIfunction\fR are specified in the description, all probes with the +corresponding \fIfunction\fR are matched. The \fB-f\fR argument can be suffixed +with an optional D probe clause. You can specify more than one \fB-f\fR option +on the command line at a time. +.RE + +.sp +.ne 2 +.na +\fB\fB-F\fR\fR +.ad +.sp .6 +.RS 4n +Coalesce trace output by identifying function entry and return. Function entry +probe reports are indented and their output is prefixed with \fB->\fR. Function +return probe reports are unindented and their output is prefixed with +\fB<-\fR\&. System call entry probe reports are indented and their output is +prefixed with \fB=>\fR. System call return probe reports are unindented and +their output is prefixed with \fB<=\fR\&. +.RE + +.sp +.ne 2 +.na +\fB\fB-G\fR\fR +.ad +.sp .6 +.RS 4n +Generate an ELF file containing an embedded DTrace program. The DTrace probes +specified in the program are saved inside of a relocatable ELF object which can +be linked into another program. If the \fB-o\fR option is present, the ELF file +is saved using the pathname specified as the argument for this operand. If the +\fB-o\fR option is not present and the DTrace program is contained with a file +whose name is \fB\fIfilename\fR.d\fR, then the ELF file is saved using the name +\fB\fIfilename\fR.o\fR. Otherwise the ELF file is saved using the name +\fBd.out\fR. +.RE + +.sp +.ne 2 +.na +\fB\fB-H\fR\fR +.ad +.sp .6 +.RS 4n +Print the pathnames of included files when invoking \fBcpp\fR(1) (enabled using +the \fB-C\fR option). This option passes the \fB-H\fR option to each \fBcpp\fR +invocation, causing it to display the list of pathnames, one for each line, to +\fBstderr\fR. +.RE + +.sp +.ne 2 +.na +\fB\fB-h\fR\fR +.ad +.sp .6 +.RS 4n +Generate a header file containing macros that correspond to probes in the +specified provider definitions. This option should be used to generate a header +file that is included by other source files for later use with the \fB-G\fR +option. If the \fB-o\fR option is present, the header file is saved using the +pathname specified as the argument for that option. If the \fB-o\fR option is +not present and the DTrace program is contained with a file whose name is +\fIfilename\fR\fB\&.d\fR, then the header file is saved using the name +\fIfilename\fR\fB\&.h\fR. +.RE + +.sp +.ne 2 +.na +\fB\fB-i\fR \fIprobe-id\fR\fB[[\fR\fIpredicate\fR] \fIaction\fR\fB]\fR\fR +.ad +.sp .6 +.RS 4n +Specify probe identifier (\fIprobe-id\fR) to trace or list (\fB-l\fR option). +You can specify probe IDs using decimal integers as shown by \fBdtrace\fR +\fB-l\fR. The \fB-i\fR argument can be suffixed with an optional D probe +clause. You can specify more than one \fB-i\fR option at a time. +.RE + +.sp +.ne 2 +.na +\fB\fB-I\fR \fIpath\fR\fR +.ad +.sp .6 +.RS 4n +Add the specified directory \fIpath\fR to the search path for \fB#include\fR +files when invoking \fBcpp\fR(1) (enabled using the \fB-C\fR option). This +option passes the \fB-I\fR option to each \fBcpp\fR invocation. The specified +\fIpath\fR is inserted into the search path ahead of the default directory +list. +.RE + +.sp +.ne 2 +.na +\fB\fB-L\fR \fIpath\fR\fR +.ad +.sp .6 +.RS 4n +Add the specified directory \fIpath\fR to the search path for DTrace libraries. +DTrace libraries are used to contain common definitions that can be used when +writing D programs. The specified \fIpath\fR is added after the default library +search path. +.RE + +.sp +.ne 2 +.na +\fB\fB-l\fR\fR +.ad +.sp .6 +.RS 4n +List probes instead of enabling them. If the \fB-l\fR option is specified, +\fBdtrace\fR produces a report of the probes matching the descriptions given +using the \fB-P\fR, \fB-m\fR, \fB-f\fR, \fB-n\fR, \fB-i\fR, and \fB-s\fR +options. If none of these options are specified, this option lists all probes. +.RE + +.sp +.ne 2 +.na +\fB\fB-m\fR [[\fIprovider:\fR] \fImodule:\fR [[\fIpredicate\fR] +\fIaction\fR]]\fR +.ad +.sp .6 +.RS 4n +Specify module name to trace or list (\fB-l\fR option). The corresponding +argument can include any of the probe description forms \fIprovider:module\fR +or \fImodule\fR. Unspecified probe description fields are left blank and match +any probes regardless of the values in those fields. If no qualifiers other +than \fImodule\fR are specified in the description, all probes with a +corresponding \fImodule\fR are matched. The \fB-m\fR argument can be suffixed +with an optional D probe clause. More than one \fB-m\fR option can be specified +on the command line at a time. +.RE + +.sp +.ne 2 +.na +\fB\fB-n\fR [[[\fIprovider:\fR] \fImodule:\fR] \fIfunction:\fR] \fIname\fR +[[\fIpredicate\fR] \fIaction\fR]\fR +.ad +.sp .6 +.RS 4n +Specify probe name to trace or list (\fB-l\fR option). The corresponding +argument can include any of the probe description forms +\fIprovider:module:function:name\fR, \fImodule:function:name\fR, +\fIfunction:name\fR, or \fIname\fR. Unspecified probe description fields are +left blank and match any probes regardless of the values in those fields. If no +qualifiers other than \fIname\fR are specified in the description, all probes +with a corresponding \fIname\fR are matched. The \fB-n\fR argument can be +suffixed with an optional D probe clause. More than one \fB-n\fR option can be +specified on the command line at a time. +.RE + +.sp +.ne 2 +.na +\fB\fB-o\fR \fIoutput\fR\fR +.ad +.sp .6 +.RS 4n +Specify the \fIoutput\fR file for the \fB-A\fR , \fB-G\fR, \fB-h\fR, and +\fB-l\fR options, or for the traced data itself. If the \fB-A\fR option is +present and \fB-o\fR is not present, the default output file is +\fB/kernel/drv/dtrace.conf\fR. If the \fB-G\fR option is present and the +\fB-s\fR option's argument is of the form \fB\fIfilename\fR.d\fR and \fB-o\fR +is not present, the default output file is \fB\fIfilename\fR.o\fR. Otherwise +the default output file is \fBd.out\fR. +.RE + +.sp +.ne 2 +.na +\fB\fB-p\fR \fIpid\fR\fR +.ad +.sp .6 +.RS 4n +Grab the specified process-ID \fIpid\fR, cache its symbol tables, and exit upon +its completion. If more than one \fB-p\fR option is present on the command +line, \fBdtrace\fR exits when all commands have exited, reporting the exit +status for each process as it terminates. The first process-ID is made +available to any D programs specified on the command line or using the \fB-s\fR +option through the \fB$target\fR macro variable. Refer to the \fISolaris +Dynamic Tracing Guide\fR for more information on macro variables. +.RE + +.sp +.ne 2 +.na +\fB\fB-P\fR \fIprovider\fR \fB[[\fR\fIpredicate\fR\fB]\fR \fIaction\fR]\fR +.ad +.sp .6 +.RS 4n +Specify provider name to trace or list (\fB-l\fR option). The remaining probe +description fields module, function, and name are left blank and match any +probes regardless of the values in those fields. The \fB-P\fR argument can be +suffixed with an optional D probe clause. You can specify more than one +\fB-P\fR option on the command line at a time. +.RE + +.sp +.ne 2 +.na +\fB\fB-q\fR\fR +.ad +.sp .6 +.RS 4n +Set quiet mode. \fBdtrace\fR suppresses messages such as the number of probes +matched by the specified options and D programs and does not print column +headers, the CPU ID, the probe ID, or insert newlines into the output. Only +data traced and formatted by D program statements such as \fBtrace()\fR and +\fBprintf()\fR is displayed to \fBstdout\fR. +.RE + +.sp +.ne 2 +.na +\fB\fB-s\fR\fR +.ad +.sp .6 +.RS 4n +Compile the specified D program source file. If the \fB-e\fR option is present, +the program is compiled but instrumentation is not enabled. If the \fB-l\fR +option is present, the program is compiled and the set of probes matched by it +is listed, but instrumentation is not enabled. If none of \fB-e\fR, \fB-l\fR, +\fB-G\fR, or \fB-A\fR are present, the instrumentation specified by the D +program is enabled and tracing begins. +.RE + +.sp +.ne 2 +.na +\fB\fB-S\fR\fR +.ad +.sp .6 +.RS 4n +Show D compiler intermediate code. The D compiler produces a report of the +intermediate code generated for each D program to \fBstderr\fR. +.RE + +.sp +.ne 2 +.na +\fB\fB-U\fR \fIname\fR\fR +.ad +.sp .6 +.RS 4n +Undefine the specified \fIname\fR when invoking \fBcpp\fR(1) (enabled using the +\fB-C\fR option). This option passes the \fB-U\fR option to each \fBcpp\fR +invocation. +.RE + +.sp +.ne 2 +.na +\fB\fB-v\fR\fR +.ad +.sp .6 +.RS 4n +Set verbose mode. If the \fB-v\fR option is specified, \fBdtrace\fR produces a +program stability report showing the minimum interface stability and dependency +level for the specified D programs. DTrace stability levels are explained in +further detail in the \fISolaris Dynamic Tracing Guide\fR. +.RE + +.sp +.ne 2 +.na +\fB\fB-V\fR\fR +.ad +.sp .6 +.RS 4n +Report the highest D programming interface version supported by \fBdtrace\fR. +The version information is printed to \fBstdout\fR and the \fBdtrace\fR command +exits. Refer to the \fISolaris Dynamic Tracing Guide\fR for more information +about DTrace versioning features. +.RE + +.sp +.ne 2 +.na +\fB\fB-w\fR\fR +.ad +.sp .6 +.RS 4n +Permit destructive actions in D programs specified using the \fB-s\fR, +\fB-P\fR, \fB-m\fR, \fB-f\fR, \fB-n\fR, or \fB-i\fR options. If the \fB-w\fR +option is not specified, \fBdtrace\fR does not permit the compilation or +enabling of a D program that contains destructive actions. +.RE + +.sp +.ne 2 +.na +\fB\fB-x\fR \fIarg\fR [\fI=val\fR]\fR +.ad +.sp .6 +.RS 4n +Enable or modify a DTrace runtime option or D compiler option. The list of +options is found in the \fISolaris Dynamic Tracing Guide\fR. Boolean options +are enabled by specifying their name. Options with values are set by separating +the option name and value with an equals sign (\fB=\fR). +.RE + +.sp +.ne 2 +.na +\fB\fB-X\fR \fBa | c | s | t\fR\fR +.ad +.sp .6 +.RS 4n +Specify the degree of conformance to the ISO C standard that should be selected +when invoking \fBcpp\fR(1) (enabled using the \fB-C\fR option). The \fB-X\fR +option argument affects the value and presence of the \fB__STDC__\fR macro +depending upon the value of the argument letter. +.sp +The \fB-X\fR option supports the following arguments: +.sp +.ne 2 +.na +\fB\fBa\fR\fR +.ad +.RS 5n +Default. ISO C plus K&R compatibility extensions, with semantic changes +required by ISO C. This is the default mode if \fB-X\fR is not specified. The +predefined macro \fB__STDC__\fR has a value of 0 when \fBcpp\fR is invoked in +conjunction with the \fB-Xa\fR option. +.RE + +.sp +.ne 2 +.na +\fB\fBc\fR\fR +.ad +.RS 5n +Conformance. Strictly conformant ISO C, without K&R C compatibility extensions. +The predefined macro \fB__STDC__\fR has a value of 1 when \fBcpp\fR is invoked +in conjunction with the \fB-Xc\fR option. +.RE + +.sp +.ne 2 +.na +\fB\fBs\fR\fR +.ad +.RS 5n +K&R C only. The macro \fB__STDC__\fR is not defined when \fBcpp\fR is invoked +in conjunction with the \fB-Xs\fR option. +.RE + +.sp +.ne 2 +.na +\fB\fBt\fR\fR +.ad +.RS 5n +Transition. ISO C plus K&R C compatibility extensions, without semantic changes +required by ISO C. The predefined macro \fB__STDC__\fR has a value of 0 when +\fBcpp\fR is invoked in conjunction with the \fB-Xt\fR option. +.RE + +As the \fB-X\fR option only affects how the D compiler invokes the C +preprocessor, the \fB-Xa\fR and \fB-Xt\fR options are equivalent from the +perspective of D and both are provided only to ease re-use of settings from a C +build environment. +.sp +Regardless of the \fB-X\fR mode, the following additional C preprocessor +definitions are always specified and valid in all modes: +.RS +4 +.TP +.ie t \(bu +.el o +\fB__sun\fR +.RE +.RS +4 +.TP +.ie t \(bu +.el o +\fB__unix\fR +.RE +.RS +4 +.TP +.ie t \(bu +.el o +\fB__SVR4\fR +.RE +.RS +4 +.TP +.ie t \(bu +.el o +\fB__sparc\fR (on SPARC systems only) +.RE +.RS +4 +.TP +.ie t \(bu +.el o +\fB__sparcv9\fR (on SPARC systems only when 64-bit programs are compiled) +.RE +.RS +4 +.TP +.ie t \(bu +.el o +\fB__i386\fR (on x86 systems only when 32-bit programs are compiled) +.RE +.RS +4 +.TP +.ie t \(bu +.el o +\fB__amd64\fR (on x86 systems only when 64-bit programs are compiled) +.RE +.RS +4 +.TP +.ie t \(bu +.el o +\fB__\fI`uname -s`\fR_\fI`uname -r`\fR\fR (for example, \fB__SunOS_5_10\fR) +.RE +.RS +4 +.TP +.ie t \(bu +.el o +\fB__SUNW_D=1\fR +.RE +.RS +4 +.TP +.ie t \(bu +.el o +\fB__SUNW_D_VERSION=0x\fIMMmmmuuu\fR\fR +.sp +Where \fIMM\fR is the major release value in hexadecimal, \fImmm\fR is the +minor release value in hexadecimal, and \fIuuu\fR is the micro release value in +hexadecimal. Refer to the \fISolaris Dynamic Tracing Guide\fR for more +information about DTrace versioning. +.RE +.RE + +.sp +.ne 2 +.na +\fB\fB-Z\fR\fR +.ad +.sp .6 +.RS 4n +Permit probe descriptions that match zero probes. If the \fB-Z\fR option is not +specified, \fBdtrace\fR reports an error and exits if any probe descriptions +specified in D program files (\fB-s\fR option) or on the command line +(\fB-P\fR, \fB-m\fR, \fB-f\fR, \fB-n\fR, or \fB-i\fR options) contain +descriptions that do not match any known probes. +.RE + +.SH OPERANDS +.sp +.LP +You can specify zero or more additional arguments on the \fBdtrace\fR command +line to define a set of macro variables (\fB$1\fR, \fB$2\fR, and so forth). The +additional arguments can be used in D programs specified using the \fB-s\fR +option or on the command line. The use of macro variables is described further +in the \fISolaris Dynamic Tracing Guide\fR. +.SH EXIT STATUS +.sp +.LP +The following exit values are returned: +.sp +.ne 2 +.na +\fB0\fR +.ad +.RS 5n +Successful completion. +.sp +For D program requests, an exit status of \fB0\fR indicates that programs were +successfully compiled, probes were successfully enabled, or anonymous state was +successfully retrieved. \fBdtrace\fR returns \fB0\fR even if the specified +tracing requests encountered errors or drops. +.RE + +.sp +.ne 2 +.na +\fB\fB1\fR\fR +.ad +.RS 5n +An error occurred. +.sp +For D program requests, an exit status of \fB1\fR indicates that program +compilation failed or that the specified request could not be satisfied. +.RE + +.sp +.ne 2 +.na +\fB\fB2\fR\fR +.ad +.RS 5n +Invalid command line options or arguments were specified. +.RE + +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +box; +c | c +l | l . +ATTRIBUTE TYPE ATTRIBUTE VALUE +_ +Interface Stability See below. +.TE + +.sp +.LP +The command-line syntax is Committed. The human-readable output is Uncommitted. +.SH SEE ALSO +.sp +.LP +\fBcpp\fR(1), \fBisainfo\fR(1), \fBssh\fR(1), \fBlibdtrace\fR(3LIB), +\fBdriver.conf\fR(4), \fBattributes\fR(5), \fBdtrace\fR(7D) +.sp +.LP +\fISolaris Dynamic Tracing Guide\fR +.SH USAGE +.sp +.LP +When using the \fB-p\fR flag, \fBdtrace\fR stops the target processes while it +is inspecting them and reporting results. A process can do nothing while it is +stopped. This means that, if , for example, the X server is inspected by +\fBdtrace\fR running in a window under the X server's control, the whole window +system can become deadlocked, because the \fBproc\fR tool would be attempting +to display its results to a window that cannot be refreshed. In such a case, +logging in from another system using \fBssh\fR(1) and killing the offending +\fBproc\fR tool clears the deadlock. Added: vendor/illumos/dist/man/man1m/lockstat.1m ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/illumos/dist/man/man1m/lockstat.1m Sun Jul 1 07:53:50 2012 (r237892) @@ -0,0 +1,873 @@ +'\" te +.\" Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH LOCKSTAT 1M "Feb 28, 2008" +.SH NAME +lockstat \- report kernel lock and profiling statistics +.SH SYNOPSIS +.LP +.nf +\fBlockstat\fR [\fB-ACEHI\fR] [\fB-e\fR \fIevent_list\fR] [\fB-i\fR \fIrate\fR] + [\fB-b\fR | \fB-t\fR | \fB-h\fR | \fB-s\fR \fIdepth\fR] [\fB-n\fR \fInrecords\fR] + [\fB-l\fR \fIlock\fR [, \fIsize\fR]] [\fB-d\fR \fIduration\fR] + [\fB-f\fR \fIfunction\fR [, \fIsize\fR]] [\fB-T\fR] [\fB-ckgwWRpP\fR] [\fB-D\fR \fIcount\fR] + [\fB-o\fR \fIfilename\fR] [\fB-x\fR \fIopt\fR [=val]] \fIcommand\fR [\fIargs\fR] +.fi + +.SH DESCRIPTION +.sp +.LP +The \fBlockstat\fR utility gathers and displays kernel locking and profiling +statistics. \fBlockstat\fR allows you to specify which events to watch (for +example, spin on adaptive mutex, block on read access to rwlock due to waiting +writers, and so forth) how much data to gather for each event, and how to +display the data. By default, \fBlockstat\fR monitors all lock contention +events, gathers frequency and timing data about those events, and displays the +data in decreasing frequency order, so that the most common events appear +first. +.sp +.LP +\fBlockstat\fR gathers data until the specified command completes. For example, +to gather statistics for a fixed-time interval, use \fBsleep\fR(1) as the +command, as follows: +.sp +.LP +\fBexample#\fR \fBlockstat\fR \fBsleep\fR \fB5\fR +.sp +.LP +When the \fB-I\fR option is specified, \fBlockstat\fR establishes a +per-processor high-level periodic interrupt source to gather profiling data. +The interrupt handler simply generates a \fBlockstat\fR event whose caller is +the interrupted PC (program counter). The profiling event is just like any +other \fBlockstat\fR event, so all of the normal \fBlockstat\fR options are +applicable. +.sp +.LP +\fBlockstat\fR relies on DTrace to modify the running kernel's text to +intercept events of interest. This imposes a small but measurable overhead on +all system activity, so access to \fBlockstat\fR is restricted to super-user by +default. The system administrator can permit other users to use \fBlockstat\fR +by granting them additional DTrace privileges. Refer to the \fISolaris Dynamic +Tracing Guide\fR for more information about DTrace security features. +.SH OPTIONS +.sp +.LP +The following options are supported: +.SS "Event Selection" +.sp +.LP +If no event selection options are specified, the default is \fB-C\fR. +.sp +.ne 2 +.na +\fB\fB-A\fR\fR +.ad +.sp .6 +.RS 4n +Watch all lock events. \fB-A\fR is equivalent to \fB-CH\fR. +.RE + +.sp +.ne 2 +.na +\fB\fB-C\fR\fR +.ad +.sp .6 +.RS 4n +Watch contention events. +.RE + +.sp +.ne 2 +.na +\fB\fB-E\fR\fR +.ad +.sp .6 +.RS 4n +Watch error events. +.RE + +.sp +.ne 2 +.na +\fB\fB\fR\fB-e\fR \fIevent_list\fR\fR +.ad +.sp .6 +.RS 4n +Only watch the specified events. \fIevent\fR \fIlist\fR is a comma-separated +list of events or ranges of events such as 1,4-7,35. Run \fBlockstat\fR with no +arguments to get a brief description of all events. +.RE + +.sp +.ne 2 +.na +\fB\fB-H\fR\fR +.ad +.sp .6 +.RS 4n +Watch hold events. +.RE + +.sp +.ne 2 +.na +\fB\fB-I\fR\fR +.ad +.sp .6 +.RS 4n +Watch profiling interrupt events. +.RE + +.sp +.ne 2 +.na +\fB\fB\fR\fB-i\fR \fIrate\fR\fR +.ad +.sp .6 +.RS 4n +Interrupt rate (per second) for \fB-I\fR. The default is 97 Hz, so that +profiling doesn't run in lockstep with the clock interrupt (which runs at 100 +Hz). +.RE + +.SS "Data Gathering" +.sp +.ne 2 +.na +\fB\fB-x\fR \fIarg\fR[=\fIval\fR]\fR +.ad +.sp .6 +.RS 4n +Enable or modify a DTrace runtime option or D compiler option. The list of +options is found in the \fI\fR. Boolean options are enabled by specifying their +name. Options with values are set by separating the option name and value with +an equals sign (=). +.RE + +.SS "Data Gathering (Mutually Exclusive)" +.sp +.ne 2 +.na +\fB\fB-b\fR\fR +.ad +.sp .6 +.RS 4n +Basic statistics: lock, caller, number of events. +.RE + +.sp +.ne 2 +.na +\fB\fB-h\fR\fR +.ad +.sp .6 +.RS 4n +Histogram: Timing plus time-distribution histograms. +.RE + +.sp +.ne 2 +.na +\fB\fB\fR\fB-s\fR \fIdepth\fR\fR +.ad +.sp .6 +.RS 4n +Stack trace: Histogram plus stack traces up to \fIdepth\fR frames deep. +.RE + +.sp +.ne 2 +.na +\fB\fB-t\fR\fR +.ad +.sp .6 +.RS 4n +Timing: Basic plus timing for all events [default]. +.RE + +.SS "Data Filtering" +.sp +.ne 2 +.na +\fB\fB\fR\fB-d\fR \fIduration\fR\fR +.ad +.sp .6 +.RS 4n +Only watch events longer than \fIduration\fR. +.RE + +.sp +.ne 2 +.na +\fB\fB\fR\fB-f\fR \fIfunc[,size]\fR\fR +.ad +.sp .6 +.RS 4n +Only watch events generated by \fIfunc\fR, which can be specified as a symbolic +name or hex address. \fIsize\fR defaults to the \fBELF\fR symbol size if +available, or \fB1\fR if not. +.RE + +.sp +.ne 2 +.na +\fB\fB\fR\fB-l\fR \fIlock[,size]\fR\fR +.ad +.sp .6 +.RS 4n +Only watch \fIlock\fR, which can be specified as a symbolic name or hex +address. \fBsize\fR defaults to the \fBELF\fR symbol size or \fB1\fR if the +symbol size is not available. +.RE + +.sp *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 07:53:54 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F23931065672; Sun, 1 Jul 2012 07:53:54 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DD9028FC19; Sun, 1 Jul 2012 07:53:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q617rsuc074855; Sun, 1 Jul 2012 07:53:54 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q617rs19074852; Sun, 1 Jul 2012 07:53:54 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201207010753.q617rs19074852@svn.freebsd.org> From: Michael Tuexen Date: Sun, 1 Jul 2012 07:53:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237893 - stable/9/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 07:53:55 -0000 Author: tuexen Date: Sun Jul 1 07:53:54 2012 New Revision: 237893 URL: http://svn.freebsd.org/changeset/base/237893 Log: MFC r235557: Use a default for max_burst of 4 and l2var of 2. This was discussed with rrs@. Modified: stable/9/sys/netinet/sctp_constants.h stable/9/sys/netinet/sctp_sysctl.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp_constants.h ============================================================================== --- stable/9/sys/netinet/sctp_constants.h Sun Jul 1 07:53:50 2012 (r237892) +++ stable/9/sys/netinet/sctp_constants.h Sun Jul 1 07:53:54 2012 (r237893) @@ -348,7 +348,7 @@ __FBSDID("$FreeBSD$"); #define SCTP_NO_FR_UNLESS_SEGMENT_SMALLER 1 /* default max I can burst out after a fast retransmit, 0 disables it */ -#define SCTP_DEF_MAX_BURST 0 +#define SCTP_DEF_MAX_BURST 4 #define SCTP_DEF_HBMAX_BURST 4 #define SCTP_DEF_FRMAX_BURST 4 Modified: stable/9/sys/netinet/sctp_sysctl.h ============================================================================== --- stable/9/sys/netinet/sctp_sysctl.h Sun Jul 1 07:53:50 2012 (r237892) +++ stable/9/sys/netinet/sctp_sysctl.h Sun Jul 1 07:53:54 2012 (r237893) @@ -377,7 +377,7 @@ struct sctp_sysctl { #define SCTPCTL_ABC_L_VAR_DESC "SCTP ABC max increase per SACK (L)" #define SCTPCTL_ABC_L_VAR_MIN 0 #define SCTPCTL_ABC_L_VAR_MAX 0xFFFFFFFF -#define SCTPCTL_ABC_L_VAR_DEFAULT 1 +#define SCTPCTL_ABC_L_VAR_DEFAULT 2 /* max_chained_mbufs: Default max number of small mbufs on a chain */ #define SCTPCTL_MAX_CHAINED_MBUFS_DESC "Default max number of small mbufs on a chain" From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 07:55:42 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B2F33106566B; Sun, 1 Jul 2012 07:55:42 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9D8A78FC0A; Sun, 1 Jul 2012 07:55:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q617tgWK075001; Sun, 1 Jul 2012 07:55:42 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q617tgL8074999; Sun, 1 Jul 2012 07:55:42 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201207010755.q617tgL8074999@svn.freebsd.org> From: Michael Tuexen Date: Sun, 1 Jul 2012 07:55:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237894 - stable/9/lib/libc/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 07:55:42 -0000 Author: tuexen Date: Sun Jul 1 07:55:42 2012 New Revision: 237894 URL: http://svn.freebsd.org/changeset/base/237894 Log: MFC r235827: Update copyright date. Modified: stable/9/lib/libc/net/sctp_sys_calls.c Directory Properties: stable/9/lib/ (props changed) stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/net/sctp_sys_calls.c ============================================================================== --- stable/9/lib/libc/net/sctp_sys_calls.c Sun Jul 1 07:53:54 2012 (r237893) +++ stable/9/lib/libc/net/sctp_sys_calls.c Sun Jul 1 07:55:42 2012 (r237894) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -32,6 +32,7 @@ #include __FBSDID("$FreeBSD$"); + #include #include #include From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 07:57:18 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EB8D2106566B; Sun, 1 Jul 2012 07:57:18 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D255B8FC12; Sun, 1 Jul 2012 07:57:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q617vINJ075125; Sun, 1 Jul 2012 07:57:18 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q617vIxa075119; Sun, 1 Jul 2012 07:57:18 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201207010757.q617vIxa075119@svn.freebsd.org> From: Martin Matuska Date: Sun, 1 Jul 2012 07:57:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237895 - in vendor/illumos/dist: cmd/pyzfs cmd/stat cmd/stat/common cmd/zdb cmd/zfs cmd/zhack cmd/zinject cmd/zlook cmd/zpool cmd/zstreamdump cmd/ztest head lib/libnvpair lib/libuutil ... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 07:57:19 -0000 Author: mm Date: Sun Jul 1 07:57:18 2012 New Revision: 237895 URL: http://svn.freebsd.org/changeset/base/237895 Log: Add userland ZFS to vendor/illumos illumos-gate revision 13742:b6bbdd77139c Added: vendor/illumos/dist/cmd/pyzfs/ vendor/illumos/dist/cmd/pyzfs/pyzfs.py vendor/illumos/dist/cmd/stat/ vendor/illumos/dist/cmd/stat/common/ vendor/illumos/dist/cmd/stat/common/statcommon.h vendor/illumos/dist/cmd/stat/common/timestamp.c vendor/illumos/dist/cmd/zdb/ vendor/illumos/dist/cmd/zdb/zdb.c vendor/illumos/dist/cmd/zdb/zdb_il.c vendor/illumos/dist/cmd/zfs/ vendor/illumos/dist/cmd/zfs/zfs_iter.c vendor/illumos/dist/cmd/zfs/zfs_iter.h vendor/illumos/dist/cmd/zfs/zfs_main.c vendor/illumos/dist/cmd/zfs/zfs_util.h vendor/illumos/dist/cmd/zhack/ vendor/illumos/dist/cmd/zhack/zhack.c vendor/illumos/dist/cmd/zinject/ vendor/illumos/dist/cmd/zinject/translate.c vendor/illumos/dist/cmd/zinject/zinject.c vendor/illumos/dist/cmd/zinject/zinject.h vendor/illumos/dist/cmd/zlook/ vendor/illumos/dist/cmd/zlook/zlook.c vendor/illumos/dist/cmd/zpool/ vendor/illumos/dist/cmd/zpool/zpool_iter.c vendor/illumos/dist/cmd/zpool/zpool_main.c vendor/illumos/dist/cmd/zpool/zpool_util.c vendor/illumos/dist/cmd/zpool/zpool_util.h vendor/illumos/dist/cmd/zpool/zpool_vdev.c vendor/illumos/dist/cmd/zstreamdump/ vendor/illumos/dist/cmd/zstreamdump/zstreamdump.c vendor/illumos/dist/cmd/ztest/ vendor/illumos/dist/cmd/ztest/ztest.c vendor/illumos/dist/head/atomic.h vendor/illumos/dist/head/libintl.h vendor/illumos/dist/head/stdio_ext.h vendor/illumos/dist/head/synch.h vendor/illumos/dist/head/thread.h vendor/illumos/dist/lib/libnvpair/ vendor/illumos/dist/lib/libnvpair/libnvpair.c vendor/illumos/dist/lib/libnvpair/libnvpair.h vendor/illumos/dist/lib/libnvpair/nvpair_alloc_system.c vendor/illumos/dist/lib/libuutil/ vendor/illumos/dist/lib/libuutil/common/ vendor/illumos/dist/lib/libuutil/common/libuutil.h vendor/illumos/dist/lib/libuutil/common/libuutil_common.h vendor/illumos/dist/lib/libuutil/common/libuutil_impl.h vendor/illumos/dist/lib/libuutil/common/uu_alloc.c vendor/illumos/dist/lib/libuutil/common/uu_avl.c vendor/illumos/dist/lib/libuutil/common/uu_dprintf.c vendor/illumos/dist/lib/libuutil/common/uu_ident.c vendor/illumos/dist/lib/libuutil/common/uu_list.c vendor/illumos/dist/lib/libuutil/common/uu_misc.c vendor/illumos/dist/lib/libuutil/common/uu_open.c vendor/illumos/dist/lib/libuutil/common/uu_pname.c vendor/illumos/dist/lib/libuutil/common/uu_string.c vendor/illumos/dist/lib/libuutil/common/uu_strtoint.c vendor/illumos/dist/lib/libzfs/ vendor/illumos/dist/lib/libzfs/common/ vendor/illumos/dist/lib/libzfs/common/libzfs.h vendor/illumos/dist/lib/libzfs/common/libzfs_changelist.c vendor/illumos/dist/lib/libzfs/common/libzfs_config.c vendor/illumos/dist/lib/libzfs/common/libzfs_dataset.c vendor/illumos/dist/lib/libzfs/common/libzfs_diff.c vendor/illumos/dist/lib/libzfs/common/libzfs_fru.c vendor/illumos/dist/lib/libzfs/common/libzfs_impl.h vendor/illumos/dist/lib/libzfs/common/libzfs_import.c vendor/illumos/dist/lib/libzfs/common/libzfs_iter.c vendor/illumos/dist/lib/libzfs/common/libzfs_mount.c vendor/illumos/dist/lib/libzfs/common/libzfs_pool.c vendor/illumos/dist/lib/libzfs/common/libzfs_sendrecv.c vendor/illumos/dist/lib/libzfs/common/libzfs_status.c vendor/illumos/dist/lib/libzfs/common/libzfs_util.c vendor/illumos/dist/lib/libzpool/ vendor/illumos/dist/lib/libzpool/common/ vendor/illumos/dist/lib/libzpool/common/kernel.c vendor/illumos/dist/lib/libzpool/common/sys/ vendor/illumos/dist/lib/libzpool/common/sys/zfs_context.h vendor/illumos/dist/lib/libzpool/common/taskq.c vendor/illumos/dist/lib/libzpool/common/util.c vendor/illumos/dist/lib/pyzfs/ vendor/illumos/dist/lib/pyzfs/common/ vendor/illumos/dist/lib/pyzfs/common/__init__.py vendor/illumos/dist/lib/pyzfs/common/allow.py vendor/illumos/dist/lib/pyzfs/common/dataset.py vendor/illumos/dist/lib/pyzfs/common/groupspace.py vendor/illumos/dist/lib/pyzfs/common/holds.py vendor/illumos/dist/lib/pyzfs/common/ioctl.c vendor/illumos/dist/lib/pyzfs/common/table.py vendor/illumos/dist/lib/pyzfs/common/unallow.py vendor/illumos/dist/lib/pyzfs/common/userspace.py vendor/illumos/dist/lib/pyzfs/common/util.py Added: vendor/illumos/dist/cmd/pyzfs/pyzfs.py ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/illumos/dist/cmd/pyzfs/pyzfs.py Sun Jul 1 07:57:18 2012 (r237895) @@ -0,0 +1,82 @@ +#! /usr/bin/python2.6 -S +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. +# + +# Note, we want SIGINT (control-c) to exit the process quietly, to mimic +# the standard behavior of C programs. The best we can do with pure +# Python is to run with -S (to disable "import site"), and start our +# program with a "try" statement. Hopefully nobody hits ^C before our +# try statement is executed. + +try: + import site + import gettext + import zfs.util + import zfs.ioctl + import sys + import errno + import solaris.misc + + """This is the main script for doing zfs subcommands. It doesn't know + what subcommands there are, it just looks for a module zfs. + that implements that subcommand.""" + + try: + _ = gettext.translation("SUNW_OST_OSCMD", "/usr/lib/locale", + fallback=True).gettext + except: + _ = solaris.misc.gettext + + if len(sys.argv) < 2: + sys.exit(_("missing subcommand argument")) + + zfs.ioctl.set_cmdstr(" ".join(["zfs"] + sys.argv[1:])) + + try: + # import zfs. + # subfunc = zfs..do_ + + subcmd = sys.argv[1] + __import__("zfs." + subcmd) + submod = getattr(zfs, subcmd) + subfunc = getattr(submod, "do_" + subcmd) + except (ImportError, AttributeError): + sys.exit(_("invalid subcommand")) + + try: + subfunc() + except zfs.util.ZFSError, e: + print(e) + sys.exit(1) + +except IOError, e: + import errno + import sys + + if e.errno == errno.EPIPE: + sys.exit(1) + raise +except KeyboardInterrupt: + import sys + + sys.exit(1) Added: vendor/illumos/dist/cmd/stat/common/statcommon.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/illumos/dist/cmd/stat/common/statcommon.h Sun Jul 1 07:57:18 2012 (r237895) @@ -0,0 +1,328 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. + * + * Common routines for acquiring snapshots of kstats for + * iostat, mpstat, and vmstat. + */ + +#ifndef _STATCOMMON_H +#define _STATCOMMON_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* No CPU present at this CPU position */ +#define ID_NO_CPU -1 +/* CPU belongs to no pset (we number this as "pset 0") */ +#define ID_NO_PSET 0 +/* CPU is usable */ +#define CPU_ONLINE(s) ((s) == P_ONLINE || (s) == P_NOINTR) +/* will the CPU have kstats */ +#define CPU_ACTIVE(c) (CPU_ONLINE((c)->cs_state) && (c)->cs_id != ID_NO_CPU) +/* IO device has no identified ID */ +#define IODEV_NO_ID -1 +/* no limit to iodevs to collect */ +#define UNLIMITED_IODEVS ((size_t)-1) + +#define NODATE 0 /* Default: No time stamp */ +#define DDATE 1 /* Standard date format */ +#define UDATE 2 /* Internal representation of Unix time */ + + +enum snapshot_types { + /* All CPUs separately */ + SNAP_CPUS = 1 << 0, + /* Aggregated processor sets */ + SNAP_PSETS = 1 << 1, + /* sys-wide stats including aggregated CPU stats */ + SNAP_SYSTEM = 1 << 2, + /* interrupt sources and counts */ + SNAP_INTERRUPTS = 1 << 3, + /* disk etc. stats */ + SNAP_IODEVS = 1 << 4, + /* disk controller aggregates */ + SNAP_CONTROLLERS = 1 << 5, + /* mpxio L I (multipath) paths: -X: Lun,LunInitiator */ + SNAP_IOPATHS_LI = 1 << 6, + /* mpxio LTI (multipath) paths: -Y: Lun,LunTarget,LunTargetInitiator */ + SNAP_IOPATHS_LTI = 1 << 7, + /* disk error stats */ + SNAP_IODEV_ERRORS = 1 << 8, + /* pretty names for iodevs */ + SNAP_IODEV_PRETTY = 1 << 9, + /* devid for iodevs */ + SNAP_IODEV_DEVID = 1 << 10 +}; + +struct cpu_snapshot { + /* may be ID_NO_CPU if no CPU present */ + processorid_t cs_id; + /* may be ID_NO_PSET if no pset */ + psetid_t cs_pset_id; + /* as in p_online(2) */ + int cs_state; + /* stats for this CPU */ + kstat_t cs_vm; + kstat_t cs_sys; +}; + +struct pset_snapshot { + /* ID may be zero to indicate the "none set" */ + psetid_t ps_id; + /* number of CPUs in set */ + size_t ps_nr_cpus; + /* the CPUs in this set */ + struct cpu_snapshot **ps_cpus; +}; + +struct intr_snapshot { + /* name of interrupt source */ + char is_name[KSTAT_STRLEN]; + /* total number of interrupts from this source */ + ulong_t is_total; +}; + +struct sys_snapshot { + sysinfo_t ss_sysinfo; + vminfo_t ss_vminfo; + struct nc_stats ss_nc; + /* vm/sys stats aggregated across all CPUs */ + kstat_t ss_agg_vm; + kstat_t ss_agg_sys; + /* ticks since boot */ + ulong_t ss_ticks; + long ss_deficit; +}; + +/* order is significant (see sort_before()) */ +enum iodev_type { + IODEV_CONTROLLER = 1 << 0, + IODEV_DISK = 1 << 1, + IODEV_PARTITION = 1 << 2, + IODEV_TAPE = 1 << 3, + IODEV_NFS = 1 << 4, + IODEV_IOPATH_LT = 1 << 5, /* synthetic LunTarget */ + IODEV_IOPATH_LI = 1 << 6, /* synthetic LunInitiator */ + IODEV_IOPATH_LTI = 1 << 7, /* LunTgtInitiator (pathinfo) */ + IODEV_UNKNOWN = 1 << 8 +}; + +/* identify a disk, partition, etc. */ +struct iodev_id { + int id; + /* target id (for disks) */ + char tid[KSTAT_STRLEN]; +}; + +/* + * Used for disks, partitions, tapes, nfs, controllers, iopaths + * Each entry can be a branch of a tree; for example, the disks + * of a controller constitute the children of the controller + * iodev_snapshot. This relationship is not strictly maintained + * if is_pretty can't be found. + */ +struct iodev_snapshot { + /* original kstat name */ + char is_name[KSTAT_STRLEN]; + /* type of kstat */ + enum iodev_type is_type; + /* ID if meaningful */ + struct iodev_id is_id; + /* parent ID if meaningful */ + struct iodev_id is_parent_id; + /* user-friendly name if found */ + char *is_pretty; + /* device ID if applicable */ + char *is_devid; + /* mount-point if applicable */ + char *is_dname; + /* number of direct children */ + int is_nr_children; + /* children of this I/O device */ + struct iodev_snapshot *is_children; + /* standard I/O stats */ + kstat_io_t is_stats; + /* iodev error stats */ + kstat_t is_errors; + /* creation time of the stats */ + hrtime_t is_crtime; + /* time at which iodev snapshot was taken */ + hrtime_t is_snaptime; + /* kstat module */ + char is_module[KSTAT_STRLEN]; + /* kstat instance */ + int is_instance; + /* kstat (only used temporarily) */ + kstat_t *is_ksp; + struct iodev_snapshot *is_prev; + struct iodev_snapshot *is_next; + /* AVL structures to speedup insertion */ + avl_tree_t *avl_list; /* list this element belongs to */ + avl_node_t avl_link; +}; + +/* which iodevs to show. */ +struct iodev_filter { + /* nr. of iodevs to choose */ + size_t if_max_iodevs; + /* bit mask of enum io_types to allow */ + int if_allowed_types; + /* should we show floppy ? if_names can override this */ + int if_skip_floppy; + /* nr. of named iodevs */ + size_t if_nr_names; + char **if_names; +}; + +/* The primary structure of a system snapshot. */ +struct snapshot { + /* what types were *requested* */ + enum snapshot_types s_types; + size_t s_nr_cpus; + struct cpu_snapshot *s_cpus; + size_t s_nr_psets; + struct pset_snapshot *s_psets; + size_t s_nr_intrs; + struct intr_snapshot *s_intrs; + size_t s_nr_iodevs; + struct iodev_snapshot *s_iodevs; + size_t s_iodevs_is_name_maxlen; + struct sys_snapshot s_sys; + struct biostats s_biostats; +}; + +/* print a message and exit with failure */ +void fail(int do_perror, char *message, ...); + +/* strdup str, or exit with failure */ +char *safe_strdup(char *str); + +/* malloc successfully, or exit with failure */ +void *safe_alloc(size_t size); + +/* + * Copy a kstat from src to dst. If the source kstat contains no data, + * then set the destination kstat data to NULL and size to zero. + * Returns 0 on success. + */ +int kstat_copy(const kstat_t *src, kstat_t *dst); + +/* + * Look up the named kstat, and give the ui64 difference i.e. + * new - old, or if old is NULL, return new. + */ +uint64_t kstat_delta(kstat_t *old, kstat_t *new, char *name); + +/* Return the number of ticks delta between two hrtime_t values. */ +uint64_t hrtime_delta(hrtime_t old, hrtime_t new); + +/* + * Add the integer-valued stats from "src" to the + * existing ones in "dst". If "dst" does not contain + * stats, then a kstat_copy() is performed. + */ +int kstat_add(const kstat_t *src, kstat_t *dst); + +/* return the number of CPUs with kstats (i.e. present and online) */ +int nr_active_cpus(struct snapshot *ss); + +/* + * Return the difference in CPU ticks between the two sys + * kstats. + */ +uint64_t cpu_ticks_delta(kstat_t *old, kstat_t *new); + +/* + * Open the kstat chain. Cannot fail. + */ +kstat_ctl_t *open_kstat(void); + +/* + * Return a struct snapshot based on the snapshot_types parameter + * passed in. iodev_filter may be NULL in which case all iodevs + * are selected if SNAP_IODEVS is passed. + */ +struct snapshot *acquire_snapshot(kstat_ctl_t *, int, struct iodev_filter *); + +/* free a snapshot */ +void free_snapshot(struct snapshot *ss); + +typedef void (*snapshot_cb)(void *old, void *new, void *data); + +/* + * Call the call back for each pair of data items of the given type, + * passing the data pointer passed in as well. If an item has been + * added, the first pointer will be NULL; if removed, the second pointer + * will be NULL. + * + * A non-zero return value indicates configuration has changed. + */ +int snapshot_walk(enum snapshot_types type, struct snapshot *old, + struct snapshot *new, snapshot_cb cb, void *data); + +/* + * Output a line detailing any configuration changes such as a CPU + * brought online, etc, bracketed by << >>. + */ +void snapshot_report_changes(struct snapshot *old, struct snapshot *new); + +/* Return non-zero if configuration has changed. */ +int snapshot_has_changed(struct snapshot *old, struct snapshot *new); + +/* free the given iodev */ +void free_iodev(struct iodev_snapshot *iodev); + +/* acquire the I/O devices */ +int acquire_iodevs(struct snapshot *ss, kstat_ctl_t *kc, + struct iodev_filter *df); + +/* strcmp-style I/O device comparator */ +int iodev_cmp(struct iodev_snapshot *io1, struct iodev_snapshot *io2); + +/* sleep until *wakeup + interval, keeping cadence where desired */ +void sleep_until(hrtime_t *wakeup, hrtime_t interval, int forever, + int *caught_cont); + +/* signal handler - so we can be aware of SIGCONT */ +void cont_handler(int sig_number); + +/* Print a timestamp in either Unix or standard format. */ +void print_timestamp(uint_t); + +#ifdef __cplusplus +} +#endif + +#endif /* _STATCOMMON_H */ Added: vendor/illumos/dist/cmd/stat/common/timestamp.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/illumos/dist/cmd/stat/common/timestamp.c Sun Jul 1 07:57:18 2012 (r237895) @@ -0,0 +1,54 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#include "statcommon.h" + +#include + +/* + * Print timestamp as decimal reprentation of time_t value (-T u was specified) + * or in date(1) format (-T d was specified). + */ +void +print_timestamp(uint_t timestamp_fmt) +{ + time_t t = time(NULL); + static char *fmt = NULL; + + /* We only need to retrieve this once per invocation */ + if (fmt == NULL) + fmt = nl_langinfo(_DATE_FMT); + + if (timestamp_fmt == UDATE) { + (void) printf("%ld\n", t); + } else if (timestamp_fmt == DDATE) { + char dstr[64]; + int len; + + len = strftime(dstr, sizeof (dstr), fmt, localtime(&t)); + if (len > 0) + (void) printf("%s\n", dstr); + } +} Added: vendor/illumos/dist/cmd/zdb/zdb.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/illumos/dist/cmd/zdb/zdb.c Sun Jul 1 07:57:18 2012 (r237895) @@ -0,0 +1,3219 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012 by Delphix. All rights reserved. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#undef ZFS_MAXNAMELEN +#undef verify +#include + +#define ZDB_COMPRESS_NAME(idx) ((idx) < ZIO_COMPRESS_FUNCTIONS ? \ + zio_compress_table[(idx)].ci_name : "UNKNOWN") +#define ZDB_CHECKSUM_NAME(idx) ((idx) < ZIO_CHECKSUM_FUNCTIONS ? \ + zio_checksum_table[(idx)].ci_name : "UNKNOWN") +#define ZDB_OT_NAME(idx) ((idx) < DMU_OT_NUMTYPES ? \ + dmu_ot[(idx)].ot_name : DMU_OT_IS_VALID(idx) ? \ + dmu_ot_byteswap[DMU_OT_BYTESWAP(idx)].ob_name : "UNKNOWN") +#define ZDB_OT_TYPE(idx) ((idx) < DMU_OT_NUMTYPES ? (idx) : DMU_OT_NUMTYPES) + +#ifndef lint +extern int zfs_recover; +#else +int zfs_recover; +#endif + +const char cmdname[] = "zdb"; +uint8_t dump_opt[256]; + +typedef void object_viewer_t(objset_t *, uint64_t, void *data, size_t size); + +extern void dump_intent_log(zilog_t *); +uint64_t *zopt_object = NULL; +int zopt_objects = 0; +libzfs_handle_t *g_zfs; + +/* + * These libumem hooks provide a reasonable set of defaults for the allocator's + * debugging facilities. + */ +const char * +_umem_debug_init() +{ + return ("default,verbose"); /* $UMEM_DEBUG setting */ +} + +const char * +_umem_logging_init(void) +{ + return ("fail,contents"); /* $UMEM_LOGGING setting */ +} + +static void +usage(void) +{ + (void) fprintf(stderr, + "Usage: %s [-CumdibcsDvhLXFPA] [-t txg] [-e [-p path...]] " + "poolname [object...]\n" + " %s [-divPA] [-e -p path...] dataset [object...]\n" + " %s -m [-LXFPA] [-t txg] [-e [-p path...]] " + "poolname [vdev [metaslab...]]\n" + " %s -R [-A] [-e [-p path...]] poolname " + "vdev:offset:size[:flags]\n" + " %s -S [-PA] [-e [-p path...]] poolname\n" + " %s -l [-uA] device\n" + " %s -C [-A] [-U config]\n\n", + cmdname, cmdname, cmdname, cmdname, cmdname, cmdname, cmdname); + + (void) fprintf(stderr, " Dataset name must include at least one " + "separator character '/' or '@'\n"); + (void) fprintf(stderr, " If dataset name is specified, only that " + "dataset is dumped\n"); + (void) fprintf(stderr, " If object numbers are specified, only " + "those objects are dumped\n\n"); + (void) fprintf(stderr, " Options to control amount of output:\n"); + (void) fprintf(stderr, " -u uberblock\n"); + (void) fprintf(stderr, " -d dataset(s)\n"); + (void) fprintf(stderr, " -i intent logs\n"); + (void) fprintf(stderr, " -C config (or cachefile if alone)\n"); + (void) fprintf(stderr, " -h pool history\n"); + (void) fprintf(stderr, " -b block statistics\n"); + (void) fprintf(stderr, " -m metaslabs\n"); + (void) fprintf(stderr, " -c checksum all metadata (twice for " + "all data) blocks\n"); + (void) fprintf(stderr, " -s report stats on zdb's I/O\n"); + (void) fprintf(stderr, " -D dedup statistics\n"); + (void) fprintf(stderr, " -S simulate dedup to measure effect\n"); + (void) fprintf(stderr, " -v verbose (applies to all others)\n"); + (void) fprintf(stderr, " -l dump label contents\n"); + (void) fprintf(stderr, " -L disable leak tracking (do not " + "load spacemaps)\n"); + (void) fprintf(stderr, " -R read and display block from a " + "device\n\n"); + (void) fprintf(stderr, " Below options are intended for use " + "with other options (except -l):\n"); + (void) fprintf(stderr, " -A ignore assertions (-A), enable " + "panic recovery (-AA) or both (-AAA)\n"); + (void) fprintf(stderr, " -F attempt automatic rewind within " + "safe range of transaction groups\n"); + (void) fprintf(stderr, " -U -- use alternate " + "cachefile\n"); + (void) fprintf(stderr, " -X attempt extreme rewind (does not " + "work with dataset)\n"); + (void) fprintf(stderr, " -e pool is exported/destroyed/" + "has altroot/not in a cachefile\n"); + (void) fprintf(stderr, " -p -- use one or more with " + "-e to specify path to vdev dir\n"); + (void) fprintf(stderr, " -P print numbers in parseable form\n"); + (void) fprintf(stderr, " -t -- highest txg to use when " + "searching for uberblocks\n"); + (void) fprintf(stderr, "Specify an option more than once (e.g. -bb) " + "to make only that option verbose\n"); + (void) fprintf(stderr, "Default is to dump everything non-verbosely\n"); + exit(1); +} + +/* + * Called for usage errors that are discovered after a call to spa_open(), + * dmu_bonus_hold(), or pool_match(). abort() is called for other errors. + */ + +static void +fatal(const char *fmt, ...) +{ + va_list ap; + + va_start(ap, fmt); + (void) fprintf(stderr, "%s: ", cmdname); + (void) vfprintf(stderr, fmt, ap); + va_end(ap); + (void) fprintf(stderr, "\n"); + + exit(1); +} + +/* ARGSUSED */ +static void +dump_packed_nvlist(objset_t *os, uint64_t object, void *data, size_t size) +{ + nvlist_t *nv; + size_t nvsize = *(uint64_t *)data; + char *packed = umem_alloc(nvsize, UMEM_NOFAIL); + + VERIFY(0 == dmu_read(os, object, 0, nvsize, packed, DMU_READ_PREFETCH)); + + VERIFY(nvlist_unpack(packed, nvsize, &nv, 0) == 0); + + umem_free(packed, nvsize); + + dump_nvlist(nv, 8); + + nvlist_free(nv); +} + +static void +zdb_nicenum(uint64_t num, char *buf) +{ + if (dump_opt['P']) + (void) sprintf(buf, "%llu", (longlong_t)num); + else + nicenum(num, buf); +} + +const char dump_zap_stars[] = "****************************************"; +const int dump_zap_width = sizeof (dump_zap_stars) - 1; + +static void +dump_zap_histogram(uint64_t histo[ZAP_HISTOGRAM_SIZE]) +{ + int i; + int minidx = ZAP_HISTOGRAM_SIZE - 1; + int maxidx = 0; + uint64_t max = 0; + + for (i = 0; i < ZAP_HISTOGRAM_SIZE; i++) { + if (histo[i] > max) + max = histo[i]; + if (histo[i] > 0 && i > maxidx) + maxidx = i; + if (histo[i] > 0 && i < minidx) + minidx = i; + } + + if (max < dump_zap_width) + max = dump_zap_width; + + for (i = minidx; i <= maxidx; i++) + (void) printf("\t\t\t%u: %6llu %s\n", i, (u_longlong_t)histo[i], + &dump_zap_stars[(max - histo[i]) * dump_zap_width / max]); +} + +static void +dump_zap_stats(objset_t *os, uint64_t object) +{ + int error; + zap_stats_t zs; + + error = zap_get_stats(os, object, &zs); + if (error) + return; + + if (zs.zs_ptrtbl_len == 0) { + ASSERT(zs.zs_num_blocks == 1); + (void) printf("\tmicrozap: %llu bytes, %llu entries\n", + (u_longlong_t)zs.zs_blocksize, + (u_longlong_t)zs.zs_num_entries); + return; + } + + (void) printf("\tFat ZAP stats:\n"); + + (void) printf("\t\tPointer table:\n"); + (void) printf("\t\t\t%llu elements\n", + (u_longlong_t)zs.zs_ptrtbl_len); + (void) printf("\t\t\tzt_blk: %llu\n", + (u_longlong_t)zs.zs_ptrtbl_zt_blk); + (void) printf("\t\t\tzt_numblks: %llu\n", + (u_longlong_t)zs.zs_ptrtbl_zt_numblks); + (void) printf("\t\t\tzt_shift: %llu\n", + (u_longlong_t)zs.zs_ptrtbl_zt_shift); + (void) printf("\t\t\tzt_blks_copied: %llu\n", + (u_longlong_t)zs.zs_ptrtbl_blks_copied); + (void) printf("\t\t\tzt_nextblk: %llu\n", + (u_longlong_t)zs.zs_ptrtbl_nextblk); + + (void) printf("\t\tZAP entries: %llu\n", + (u_longlong_t)zs.zs_num_entries); + (void) printf("\t\tLeaf blocks: %llu\n", + (u_longlong_t)zs.zs_num_leafs); + (void) printf("\t\tTotal blocks: %llu\n", + (u_longlong_t)zs.zs_num_blocks); + (void) printf("\t\tzap_block_type: 0x%llx\n", + (u_longlong_t)zs.zs_block_type); + (void) printf("\t\tzap_magic: 0x%llx\n", + (u_longlong_t)zs.zs_magic); + (void) printf("\t\tzap_salt: 0x%llx\n", + (u_longlong_t)zs.zs_salt); + + (void) printf("\t\tLeafs with 2^n pointers:\n"); + dump_zap_histogram(zs.zs_leafs_with_2n_pointers); + + (void) printf("\t\tBlocks with n*5 entries:\n"); + dump_zap_histogram(zs.zs_blocks_with_n5_entries); + + (void) printf("\t\tBlocks n/10 full:\n"); + dump_zap_histogram(zs.zs_blocks_n_tenths_full); + + (void) printf("\t\tEntries with n chunks:\n"); + dump_zap_histogram(zs.zs_entries_using_n_chunks); + + (void) printf("\t\tBuckets with n entries:\n"); + dump_zap_histogram(zs.zs_buckets_with_n_entries); +} + +/*ARGSUSED*/ +static void +dump_none(objset_t *os, uint64_t object, void *data, size_t size) +{ +} + +/*ARGSUSED*/ +static void +dump_unknown(objset_t *os, uint64_t object, void *data, size_t size) +{ + (void) printf("\tUNKNOWN OBJECT TYPE\n"); +} + +/*ARGSUSED*/ +void +dump_uint8(objset_t *os, uint64_t object, void *data, size_t size) +{ +} + +/*ARGSUSED*/ +static void +dump_uint64(objset_t *os, uint64_t object, void *data, size_t size) +{ +} + +/*ARGSUSED*/ +static void +dump_zap(objset_t *os, uint64_t object, void *data, size_t size) +{ + zap_cursor_t zc; + zap_attribute_t attr; + void *prop; + int i; + + dump_zap_stats(os, object); + (void) printf("\n"); + + for (zap_cursor_init(&zc, os, object); + zap_cursor_retrieve(&zc, &attr) == 0; + zap_cursor_advance(&zc)) { + (void) printf("\t\t%s = ", attr.za_name); + if (attr.za_num_integers == 0) { + (void) printf("\n"); + continue; + } + prop = umem_zalloc(attr.za_num_integers * + attr.za_integer_length, UMEM_NOFAIL); + (void) zap_lookup(os, object, attr.za_name, + attr.za_integer_length, attr.za_num_integers, prop); + if (attr.za_integer_length == 1) { + (void) printf("%s", (char *)prop); + } else { + for (i = 0; i < attr.za_num_integers; i++) { + switch (attr.za_integer_length) { + case 2: + (void) printf("%u ", + ((uint16_t *)prop)[i]); + break; + case 4: + (void) printf("%u ", + ((uint32_t *)prop)[i]); + break; + case 8: + (void) printf("%lld ", + (u_longlong_t)((int64_t *)prop)[i]); + break; + } + } + } + (void) printf("\n"); + umem_free(prop, attr.za_num_integers * attr.za_integer_length); + } + zap_cursor_fini(&zc); +} + +/*ARGSUSED*/ +static void +dump_ddt_zap(objset_t *os, uint64_t object, void *data, size_t size) +{ + dump_zap_stats(os, object); + /* contents are printed elsewhere, properly decoded */ +} + +/*ARGSUSED*/ +static void +dump_sa_attrs(objset_t *os, uint64_t object, void *data, size_t size) +{ + zap_cursor_t zc; + zap_attribute_t attr; + + dump_zap_stats(os, object); + (void) printf("\n"); + + for (zap_cursor_init(&zc, os, object); + zap_cursor_retrieve(&zc, &attr) == 0; + zap_cursor_advance(&zc)) { + (void) printf("\t\t%s = ", attr.za_name); + if (attr.za_num_integers == 0) { + (void) printf("\n"); + continue; + } + (void) printf(" %llx : [%d:%d:%d]\n", + (u_longlong_t)attr.za_first_integer, + (int)ATTR_LENGTH(attr.za_first_integer), + (int)ATTR_BSWAP(attr.za_first_integer), + (int)ATTR_NUM(attr.za_first_integer)); + } + zap_cursor_fini(&zc); +} + +/*ARGSUSED*/ +static void +dump_sa_layouts(objset_t *os, uint64_t object, void *data, size_t size) +{ + zap_cursor_t zc; + zap_attribute_t attr; + uint16_t *layout_attrs; + int i; + + dump_zap_stats(os, object); + (void) printf("\n"); + + for (zap_cursor_init(&zc, os, object); + zap_cursor_retrieve(&zc, &attr) == 0; + zap_cursor_advance(&zc)) { + (void) printf("\t\t%s = [", attr.za_name); + if (attr.za_num_integers == 0) { + (void) printf("\n"); + continue; + } + + VERIFY(attr.za_integer_length == 2); + layout_attrs = umem_zalloc(attr.za_num_integers * + attr.za_integer_length, UMEM_NOFAIL); + + VERIFY(zap_lookup(os, object, attr.za_name, + attr.za_integer_length, + attr.za_num_integers, layout_attrs) == 0); + + for (i = 0; i != attr.za_num_integers; i++) + (void) printf(" %d ", (int)layout_attrs[i]); + (void) printf("]\n"); + umem_free(layout_attrs, + attr.za_num_integers * attr.za_integer_length); + } + zap_cursor_fini(&zc); +} + +/*ARGSUSED*/ +static void +dump_zpldir(objset_t *os, uint64_t object, void *data, size_t size) +{ + zap_cursor_t zc; + zap_attribute_t attr; + const char *typenames[] = { + /* 0 */ "not specified", + /* 1 */ "FIFO", + /* 2 */ "Character Device", + /* 3 */ "3 (invalid)", + /* 4 */ "Directory", + /* 5 */ "5 (invalid)", + /* 6 */ "Block Device", + /* 7 */ "7 (invalid)", + /* 8 */ "Regular File", + /* 9 */ "9 (invalid)", + /* 10 */ "Symbolic Link", + /* 11 */ "11 (invalid)", + /* 12 */ "Socket", + /* 13 */ "Door", + /* 14 */ "Event Port", + /* 15 */ "15 (invalid)", + }; + + dump_zap_stats(os, object); + (void) printf("\n"); + + for (zap_cursor_init(&zc, os, object); + zap_cursor_retrieve(&zc, &attr) == 0; + zap_cursor_advance(&zc)) { + (void) printf("\t\t%s = %lld (type: %s)\n", + attr.za_name, ZFS_DIRENT_OBJ(attr.za_first_integer), + typenames[ZFS_DIRENT_TYPE(attr.za_first_integer)]); + } + zap_cursor_fini(&zc); +} + +static void +dump_spacemap(objset_t *os, space_map_obj_t *smo, space_map_t *sm) +{ + uint64_t alloc, offset, entry; + uint8_t mapshift = sm->sm_shift; + uint64_t mapstart = sm->sm_start; + char *ddata[] = { "ALLOC", "FREE", "CONDENSE", "INVALID", + "INVALID", "INVALID", "INVALID", "INVALID" }; + + if (smo->smo_object == 0) + return; + + /* + * Print out the freelist entries in both encoded and decoded form. + */ + alloc = 0; + for (offset = 0; offset < smo->smo_objsize; offset += sizeof (entry)) { + VERIFY3U(0, ==, dmu_read(os, smo->smo_object, offset, + sizeof (entry), &entry, DMU_READ_PREFETCH)); + if (SM_DEBUG_DECODE(entry)) { + (void) printf("\t [%6llu] %s: txg %llu, pass %llu\n", + (u_longlong_t)(offset / sizeof (entry)), + ddata[SM_DEBUG_ACTION_DECODE(entry)], + (u_longlong_t)SM_DEBUG_TXG_DECODE(entry), + (u_longlong_t)SM_DEBUG_SYNCPASS_DECODE(entry)); + } else { + (void) printf("\t [%6llu] %c range:" + " %010llx-%010llx size: %06llx\n", + (u_longlong_t)(offset / sizeof (entry)), + SM_TYPE_DECODE(entry) == SM_ALLOC ? 'A' : 'F', + (u_longlong_t)((SM_OFFSET_DECODE(entry) << + mapshift) + mapstart), *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 07:59:01 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EDC691065674; Sun, 1 Jul 2012 07:59:01 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D55178FC12; Sun, 1 Jul 2012 07:59:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q617x144075281; Sun, 1 Jul 2012 07:59:01 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q617x16w075239; Sun, 1 Jul 2012 07:59:01 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201207010759.q617x16w075239@svn.freebsd.org> From: Michael Tuexen Date: Sun, 1 Jul 2012 07:59:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237896 - in stable/9/sys: netinet netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 07:59:02 -0000 Author: tuexen Date: Sun Jul 1 07:59:00 2012 New Revision: 237896 URL: http://svn.freebsd.org/changeset/base/237896 Log: MFC r235828: Use consistent text at the begining of the files. Modified: stable/9/sys/netinet/sctp.h stable/9/sys/netinet/sctp_asconf.c stable/9/sys/netinet/sctp_asconf.h stable/9/sys/netinet/sctp_auth.c stable/9/sys/netinet/sctp_auth.h stable/9/sys/netinet/sctp_bsd_addr.c stable/9/sys/netinet/sctp_bsd_addr.h stable/9/sys/netinet/sctp_cc_functions.c stable/9/sys/netinet/sctp_constants.h stable/9/sys/netinet/sctp_crc32.c stable/9/sys/netinet/sctp_crc32.h stable/9/sys/netinet/sctp_dtrace_declare.h stable/9/sys/netinet/sctp_dtrace_define.h stable/9/sys/netinet/sctp_header.h stable/9/sys/netinet/sctp_indata.c stable/9/sys/netinet/sctp_indata.h stable/9/sys/netinet/sctp_input.c stable/9/sys/netinet/sctp_input.h stable/9/sys/netinet/sctp_lock_bsd.h stable/9/sys/netinet/sctp_os.h stable/9/sys/netinet/sctp_os_bsd.h stable/9/sys/netinet/sctp_output.c stable/9/sys/netinet/sctp_output.h stable/9/sys/netinet/sctp_pcb.c stable/9/sys/netinet/sctp_pcb.h stable/9/sys/netinet/sctp_peeloff.c stable/9/sys/netinet/sctp_peeloff.h stable/9/sys/netinet/sctp_ss_functions.c stable/9/sys/netinet/sctp_structs.h stable/9/sys/netinet/sctp_sysctl.c stable/9/sys/netinet/sctp_sysctl.h stable/9/sys/netinet/sctp_timer.c stable/9/sys/netinet/sctp_timer.h stable/9/sys/netinet/sctp_uio.h stable/9/sys/netinet/sctp_usrreq.c stable/9/sys/netinet/sctp_var.h stable/9/sys/netinet/sctputil.c stable/9/sys/netinet/sctputil.h stable/9/sys/netinet6/sctp6_usrreq.c stable/9/sys/netinet6/sctp6_var.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp.h ============================================================================== --- stable/9/sys/netinet/sctp.h Sun Jul 1 07:57:18 2012 (r237895) +++ stable/9/sys/netinet/sctp.h Sun Jul 1 07:59:00 2012 (r237896) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2001-2008, by Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -29,7 +29,6 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ -/* $KAME: sctp.h,v 1.18 2005/03/06 16:04:16 itojun Exp $ */ #include __FBSDID("$FreeBSD$"); @@ -37,6 +36,7 @@ __FBSDID("$FreeBSD$"); #ifndef _NETINET_SCTP_H_ #define _NETINET_SCTP_H_ + #include Modified: stable/9/sys/netinet/sctp_asconf.c ============================================================================== --- stable/9/sys/netinet/sctp_asconf.c Sun Jul 1 07:57:18 2012 (r237895) +++ stable/9/sys/netinet/sctp_asconf.c Sun Jul 1 07:59:00 2012 (r237896) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -30,10 +30,9 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -/* $KAME: sctp_asconf.c,v 1.24 2005/03/06 16:04:16 itojun Exp $ */ - #include __FBSDID("$FreeBSD$"); + #include #include #include Modified: stable/9/sys/netinet/sctp_asconf.h ============================================================================== --- stable/9/sys/netinet/sctp_asconf.h Sun Jul 1 07:57:18 2012 (r237895) +++ stable/9/sys/netinet/sctp_asconf.h Sun Jul 1 07:59:00 2012 (r237896) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -30,8 +30,6 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -/* $KAME: sctp_asconf.h,v 1.8 2005/03/06 16:04:16 itojun Exp $ */ - #include __FBSDID("$FreeBSD$"); Modified: stable/9/sys/netinet/sctp_auth.c ============================================================================== --- stable/9/sys/netinet/sctp_auth.c Sun Jul 1 07:57:18 2012 (r237895) +++ stable/9/sys/netinet/sctp_auth.c Sun Jul 1 07:59:00 2012 (r237896) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2001-2008, by Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: Modified: stable/9/sys/netinet/sctp_auth.h ============================================================================== --- stable/9/sys/netinet/sctp_auth.h Sun Jul 1 07:57:18 2012 (r237895) +++ stable/9/sys/netinet/sctp_auth.h Sun Jul 1 07:59:00 2012 (r237896) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2001-2008, by Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -33,8 +33,8 @@ #include __FBSDID("$FreeBSD$"); -#ifndef __SCTP_AUTH_H__ -#define __SCTP_AUTH_H__ +#ifndef _NETINET_SCTP_AUTH_H_ +#define _NETINET_SCTP_AUTH_H_ /* digest lengths */ Modified: stable/9/sys/netinet/sctp_bsd_addr.c ============================================================================== --- stable/9/sys/netinet/sctp_bsd_addr.c Sun Jul 1 07:57:18 2012 (r237895) +++ stable/9/sys/netinet/sctp_bsd_addr.c Sun Jul 1 07:59:00 2012 (r237896) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -30,8 +30,6 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -/* $KAME: sctp_output.c,v 1.46 2005/03/06 16:04:17 itojun Exp $ */ - #include __FBSDID("$FreeBSD$"); Modified: stable/9/sys/netinet/sctp_bsd_addr.h ============================================================================== --- stable/9/sys/netinet/sctp_bsd_addr.h Sun Jul 1 07:57:18 2012 (r237895) +++ stable/9/sys/netinet/sctp_bsd_addr.h Sun Jul 1 07:59:00 2012 (r237896) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -33,8 +33,9 @@ #include __FBSDID("$FreeBSD$"); -#ifndef __sctp_bsd_addr_h__ -#define __sctp_bsd_addr_h__ +#ifndef _NETINET_SCTP_BSD_ADDR_H_ +#define _NETINET_SCTP_BSD_ADDR_H_ + #include #if defined(_KERNEL) || defined(__Userspace__) Modified: stable/9/sys/netinet/sctp_cc_functions.c ============================================================================== --- stable/9/sys/netinet/sctp_cc_functions.c Sun Jul 1 07:57:18 2012 (r237895) +++ stable/9/sys/netinet/sctp_cc_functions.c Sun Jul 1 07:59:00 2012 (r237896) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -30,6 +30,9 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ +#include +__FBSDID("$FreeBSD$"); + #include #include #include @@ -44,8 +47,6 @@ #include #include #include -#include -__FBSDID("$FreeBSD$"); #define SHIFT_MPTCP_MULTI_N 40 #define SHIFT_MPTCP_MULTI_Z 16 Modified: stable/9/sys/netinet/sctp_constants.h ============================================================================== --- stable/9/sys/netinet/sctp_constants.h Sun Jul 1 07:57:18 2012 (r237895) +++ stable/9/sys/netinet/sctp_constants.h Sun Jul 1 07:59:00 2012 (r237896) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2001-2008, by Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -30,13 +30,11 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -/* $KAME: sctp_constants.h,v 1.17 2005/03/06 16:04:17 itojun Exp $ */ - #include __FBSDID("$FreeBSD$"); -#ifndef __sctp_constants_h__ -#define __sctp_constants_h__ +#ifndef _NETINET_SCTP_CONSTANTS_H_ +#define _NETINET_SCTP_CONSTANTS_H_ /* IANA assigned port number for SCTP over UDP encapsulation */ /* For freebsd we cannot bind the port at Modified: stable/9/sys/netinet/sctp_crc32.c ============================================================================== --- stable/9/sys/netinet/sctp_crc32.c Sun Jul 1 07:57:18 2012 (r237895) +++ stable/9/sys/netinet/sctp_crc32.c Sun Jul 1 07:59:00 2012 (r237896) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -30,9 +30,6 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -/* $KAME: sctp_crc32.c,v 1.12 2005/03/06 16:04:17 itojun Exp $ */ - - #include __FBSDID("$FreeBSD$"); Modified: stable/9/sys/netinet/sctp_crc32.h ============================================================================== --- stable/9/sys/netinet/sctp_crc32.h Sun Jul 1 07:57:18 2012 (r237895) +++ stable/9/sys/netinet/sctp_crc32.h Sun Jul 1 07:59:00 2012 (r237896) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -30,13 +30,11 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -/* $KAME: sctp_crc32.h,v 1.5 2004/08/17 04:06:16 itojun Exp $ */ - #include __FBSDID("$FreeBSD$"); -#ifndef __crc32c_h__ -#define __crc32c_h__ +#ifndef _NETINET_SCTP_CRC32_H_ +#define _NETINET_SCTP_CRC32_H_ #if defined(_KERNEL) #if !defined(SCTP_WITH_NO_CSUM) Modified: stable/9/sys/netinet/sctp_dtrace_declare.h ============================================================================== --- stable/9/sys/netinet/sctp_dtrace_declare.h Sun Jul 1 07:57:18 2012 (r237895) +++ stable/9/sys/netinet/sctp_dtrace_declare.h Sun Jul 1 07:59:00 2012 (r237896) @@ -1,6 +1,6 @@ /*- - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -28,9 +28,13 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + #include __FBSDID("$FreeBSD$"); -#ifndef __sctp_dtrace_declare_h__ + +#ifndef _NETINET_SCTP_DTRACE_DECLARE_H_ +#define _NETINET_SCTP_DTRACE_DECLARE_H_ + #include "opt_kdtrace.h" #include #include Modified: stable/9/sys/netinet/sctp_dtrace_define.h ============================================================================== --- stable/9/sys/netinet/sctp_dtrace_define.h Sun Jul 1 07:57:18 2012 (r237895) +++ stable/9/sys/netinet/sctp_dtrace_define.h Sun Jul 1 07:59:00 2012 (r237896) @@ -1,6 +1,6 @@ /*- - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -28,9 +28,13 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + #include __FBSDID("$FreeBSD$"); -#ifndef __sctp_dtrace_define_h__ + +#ifndef _NETINET_SCTP_DTRACE_DEFINE_H_ +#define _NETINET_SCTP_DTRACE_DEFINE_H_ + #include "opt_kdtrace.h" #include #include Modified: stable/9/sys/netinet/sctp_header.h ============================================================================== --- stable/9/sys/netinet/sctp_header.h Sun Jul 1 07:57:18 2012 (r237895) +++ stable/9/sys/netinet/sctp_header.h Sun Jul 1 07:59:00 2012 (r237896) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -30,13 +30,11 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -/* $KAME: sctp_header.h,v 1.14 2005/03/06 16:04:17 itojun Exp $ */ - #include __FBSDID("$FreeBSD$"); -#ifndef __sctp_header_h__ -#define __sctp_header_h__ +#ifndef _NETINET_SCTP_HEADER_H_ +#define _NETINET_SCTP_HEADER_H_ #include #include Modified: stable/9/sys/netinet/sctp_indata.c ============================================================================== --- stable/9/sys/netinet/sctp_indata.c Sun Jul 1 07:57:18 2012 (r237895) +++ stable/9/sys/netinet/sctp_indata.c Sun Jul 1 07:59:00 2012 (r237896) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -30,8 +30,6 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -/* $KAME: sctp_indata.c,v 1.36 2005/03/06 16:04:17 itojun Exp $ */ - #include __FBSDID("$FreeBSD$"); Modified: stable/9/sys/netinet/sctp_indata.h ============================================================================== --- stable/9/sys/netinet/sctp_indata.h Sun Jul 1 07:57:18 2012 (r237895) +++ stable/9/sys/netinet/sctp_indata.h Sun Jul 1 07:59:00 2012 (r237896) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -30,13 +30,11 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -/* $KAME: sctp_indata.h,v 1.9 2005/03/06 16:04:17 itojun Exp $ */ - #include __FBSDID("$FreeBSD$"); -#ifndef __sctp_indata_h__ -#define __sctp_indata_h__ +#ifndef _NETINET_SCTP_INDATA_H_ +#define _NETINET_SCTP_INDATA_H_ #if defined(_KERNEL) || defined(__Userspace__) Modified: stable/9/sys/netinet/sctp_input.c ============================================================================== --- stable/9/sys/netinet/sctp_input.c Sun Jul 1 07:57:18 2012 (r237895) +++ stable/9/sys/netinet/sctp_input.c Sun Jul 1 07:59:00 2012 (r237896) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2001-2008, by Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -30,8 +30,6 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -/* $KAME: sctp_input.c,v 1.27 2005/03/06 16:04:17 itojun Exp $ */ - #include __FBSDID("$FreeBSD$"); Modified: stable/9/sys/netinet/sctp_input.h ============================================================================== --- stable/9/sys/netinet/sctp_input.h Sun Jul 1 07:57:18 2012 (r237895) +++ stable/9/sys/netinet/sctp_input.h Sun Jul 1 07:59:00 2012 (r237896) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -30,13 +30,11 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -/* $KAME: sctp_input.h,v 1.6 2005/03/06 16:04:17 itojun Exp $ */ - #include __FBSDID("$FreeBSD$"); -#ifndef __sctp_input_h__ -#define __sctp_input_h__ +#ifndef _NETINET_SCTP_INPUT_H_ +#define _NETINET_SCTP_INPUT_H_ #if defined(_KERNEL) || defined(__Userspace__) void Modified: stable/9/sys/netinet/sctp_lock_bsd.h ============================================================================== --- stable/9/sys/netinet/sctp_lock_bsd.h Sun Jul 1 07:57:18 2012 (r237895) +++ stable/9/sys/netinet/sctp_lock_bsd.h Sun Jul 1 07:59:00 2012 (r237896) @@ -1,9 +1,7 @@ -#ifndef __sctp_lock_bsd_h__ -#define __sctp_lock_bsd_h__ /*- * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -32,6 +30,12 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ +#include +__FBSDID("$FreeBSD$"); + +#ifndef _NETINET_SCTP_LOCK_BSD_H_ +#define _NETINET_SCTP_LOCK_BSD_H_ + /* * General locking concepts: The goal of our locking is to of course provide * consistency and yet minimize overhead. We will attempt to use @@ -70,9 +74,6 @@ * SCTP_INP_INFO_RLOCK() and then when we want to add a new association to * the SCTP_BASE_INFO() list's we will do a SCTP_INP_INFO_WLOCK(). */ -#include -__FBSDID("$FreeBSD$"); - extern struct sctp_foo_stuff sctp_logoff[]; extern int sctp_logoff_stuff; Modified: stable/9/sys/netinet/sctp_os.h ============================================================================== --- stable/9/sys/netinet/sctp_os.h Sun Jul 1 07:57:18 2012 (r237895) +++ stable/9/sys/netinet/sctp_os.h Sun Jul 1 07:59:00 2012 (r237896) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2006-2007, by Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -29,10 +29,12 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + #include __FBSDID("$FreeBSD$"); -#ifndef __sctp_os_h__ -#define __sctp_os_h__ + +#ifndef _NETINET_SCTP_OS_H_ +#define _NETINET_SCTP_OS_H_ /* * General kernel memory allocation: Modified: stable/9/sys/netinet/sctp_os_bsd.h ============================================================================== --- stable/9/sys/netinet/sctp_os_bsd.h Sun Jul 1 07:57:18 2012 (r237895) +++ stable/9/sys/netinet/sctp_os_bsd.h Sun Jul 1 07:59:00 2012 (r237896) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2006-2007, by Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -29,10 +29,12 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + #include __FBSDID("$FreeBSD$"); -#ifndef __sctp_os_bsd_h__ -#define __sctp_os_bsd_h__ + +#ifndef _NETINET_SCTP_OS_BSD_H_ +#define _NETINET_SCTP_OS_BSD_H_ /* * includes */ Modified: stable/9/sys/netinet/sctp_output.c ============================================================================== --- stable/9/sys/netinet/sctp_output.c Sun Jul 1 07:57:18 2012 (r237895) +++ stable/9/sys/netinet/sctp_output.c Sun Jul 1 07:59:00 2012 (r237896) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2001-2008, by Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -30,8 +30,6 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -/* $KAME: sctp_output.c,v 1.46 2005/03/06 16:04:17 itojun Exp $ */ - #include __FBSDID("$FreeBSD$"); Modified: stable/9/sys/netinet/sctp_output.h ============================================================================== --- stable/9/sys/netinet/sctp_output.h Sun Jul 1 07:57:18 2012 (r237895) +++ stable/9/sys/netinet/sctp_output.h Sun Jul 1 07:59:00 2012 (r237896) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -30,13 +30,11 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -/* $KAME: sctp_output.h,v 1.14 2005/03/06 16:04:18 itojun Exp $ */ - #include __FBSDID("$FreeBSD$"); -#ifndef __sctp_output_h__ -#define __sctp_output_h__ +#ifndef _NETINET_SCTP_OUTPUT_H_ +#define _NETINET_SCTP_OUTPUT_H_ #include Modified: stable/9/sys/netinet/sctp_pcb.c ============================================================================== --- stable/9/sys/netinet/sctp_pcb.c Sun Jul 1 07:57:18 2012 (r237895) +++ stable/9/sys/netinet/sctp_pcb.c Sun Jul 1 07:59:00 2012 (r237896) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2001-2008, by Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -30,8 +30,6 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -/* $KAME: sctp_pcb.c,v 1.38 2005/03/06 16:04:18 itojun Exp $ */ - #include __FBSDID("$FreeBSD$"); Modified: stable/9/sys/netinet/sctp_pcb.h ============================================================================== --- stable/9/sys/netinet/sctp_pcb.h Sun Jul 1 07:57:18 2012 (r237895) +++ stable/9/sys/netinet/sctp_pcb.h Sun Jul 1 07:59:00 2012 (r237896) @@ -1,7 +1,8 @@ /*- * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * @@ -29,13 +30,11 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -/* $KAME: sctp_pcb.h,v 1.21 2005/07/16 01:18:47 suz Exp $ */ - #include __FBSDID("$FreeBSD$"); -#ifndef __sctp_pcb_h__ -#define __sctp_pcb_h__ +#ifndef _NETINET_SCTP_PCB_H_ +#define _NETINET_SCTP_PCB_H_ #include #include Modified: stable/9/sys/netinet/sctp_peeloff.c ============================================================================== --- stable/9/sys/netinet/sctp_peeloff.c Sun Jul 1 07:57:18 2012 (r237895) +++ stable/9/sys/netinet/sctp_peeloff.c Sun Jul 1 07:59:00 2012 (r237896) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -30,11 +30,9 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ - -/* $KAME: sctp_peeloff.c,v 1.13 2005/03/06 16:04:18 itojun Exp $ */ - #include __FBSDID("$FreeBSD$"); + #include #include #include Modified: stable/9/sys/netinet/sctp_peeloff.h ============================================================================== --- stable/9/sys/netinet/sctp_peeloff.h Sun Jul 1 07:57:18 2012 (r237895) +++ stable/9/sys/netinet/sctp_peeloff.h Sun Jul 1 07:59:00 2012 (r237896) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -30,13 +30,11 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -/* $KAME: sctp_peeloff.h,v 1.6 2005/03/06 16:04:18 itojun Exp $ */ - #include __FBSDID("$FreeBSD$"); -#ifndef __sctp_peeloff_h__ -#define __sctp_peeloff_h__ +#ifndef _NETINET_SCTP_PEELOFF_H_ +#define _NETINET_SCTP_PEELOFF_H_ Modified: stable/9/sys/netinet/sctp_ss_functions.c ============================================================================== --- stable/9/sys/netinet/sctp_ss_functions.c Sun Jul 1 07:57:18 2012 (r237895) +++ stable/9/sys/netinet/sctp_ss_functions.c Sun Jul 1 07:59:00 2012 (r237896) @@ -1,7 +1,7 @@ /*- - * Copyright (c) 2010-2011, by Michael Tuexen. All rights reserved. - * Copyright (c) 2010-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2010-2011, by Robin Seggelmann. All rights reserved. + * Copyright (c) 2010-2012, by Michael Tuexen. All rights reserved. + * Copyright (c) 2010-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2010-2012, by Robin Seggelmann. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: Modified: stable/9/sys/netinet/sctp_structs.h ============================================================================== --- stable/9/sys/netinet/sctp_structs.h Sun Jul 1 07:57:18 2012 (r237895) +++ stable/9/sys/netinet/sctp_structs.h Sun Jul 1 07:59:00 2012 (r237896) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2001-2008, by Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -30,13 +30,11 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -/* $KAME: sctp_structs.h,v 1.13 2005/03/06 16:04:18 itojun Exp $ */ - #include __FBSDID("$FreeBSD$"); -#ifndef __sctp_structs_h__ -#define __sctp_structs_h__ +#ifndef _NETINET_SCTP_STRUCTS_H_ +#define _NETINET_SCTP_STRUCTS_H_ #include #include Modified: stable/9/sys/netinet/sctp_sysctl.c ============================================================================== --- stable/9/sys/netinet/sctp_sysctl.c Sun Jul 1 07:57:18 2012 (r237895) +++ stable/9/sys/netinet/sctp_sysctl.c Sun Jul 1 07:59:00 2012 (r237896) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2007, by Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: Modified: stable/9/sys/netinet/sctp_sysctl.h ============================================================================== --- stable/9/sys/netinet/sctp_sysctl.h Sun Jul 1 07:57:18 2012 (r237895) +++ stable/9/sys/netinet/sctp_sysctl.h Sun Jul 1 07:59:00 2012 (r237896) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2007, by Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -33,8 +33,8 @@ #include __FBSDID("$FreeBSD$"); -#ifndef __sctp_sysctl_h__ -#define __sctp_sysctl_h__ +#ifndef _NETINET_SCTP_SYSCTL_H_ +#define _NETINET_SCTP_SYSCTL_H_ #include #include Modified: stable/9/sys/netinet/sctp_timer.c ============================================================================== --- stable/9/sys/netinet/sctp_timer.c Sun Jul 1 07:57:18 2012 (r237895) +++ stable/9/sys/netinet/sctp_timer.c Sun Jul 1 07:59:00 2012 (r237896) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -30,8 +30,6 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -/* $KAME: sctp_timer.c,v 1.29 2005/03/06 16:04:18 itojun Exp $ */ - #include __FBSDID("$FreeBSD$"); Modified: stable/9/sys/netinet/sctp_timer.h ============================================================================== --- stable/9/sys/netinet/sctp_timer.h Sun Jul 1 07:57:18 2012 (r237895) +++ stable/9/sys/netinet/sctp_timer.h Sun Jul 1 07:59:00 2012 (r237896) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -30,12 +30,11 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -/* $KAME: sctp_timer.h,v 1.6 2005/03/06 16:04:18 itojun Exp $ */ #include __FBSDID("$FreeBSD$"); -#ifndef __sctp_timer_h__ -#define __sctp_timer_h__ +#ifndef _NETINET_SCTP_TIMER_H_ +#define _NETINET_SCTP_TIMER_H_ #if defined(_KERNEL) || defined(__Userspace__) Modified: stable/9/sys/netinet/sctp_uio.h ============================================================================== --- stable/9/sys/netinet/sctp_uio.h Sun Jul 1 07:57:18 2012 (r237895) +++ stable/9/sys/netinet/sctp_uio.h Sun Jul 1 07:59:00 2012 (r237896) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -30,12 +30,11 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -/* $KAME: sctp_uio.h,v 1.11 2005/03/06 16:04:18 itojun Exp $ */ #include __FBSDID("$FreeBSD$"); -#ifndef __sctp_uio_h__ -#define __sctp_uio_h__ +#ifndef _NETINET_SCTP_UIO_H_ +#define _NETINET_SCTP_UIO_H_ #if ! defined(_KERNEL) Modified: stable/9/sys/netinet/sctp_usrreq.c ============================================================================== --- stable/9/sys/netinet/sctp_usrreq.c Sun Jul 1 07:57:18 2012 (r237895) +++ stable/9/sys/netinet/sctp_usrreq.c Sun Jul 1 07:59:00 2012 (r237896) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2001-2008, by Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -30,10 +30,9 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -/* $KAME: sctp_usrreq.c,v 1.48 2005/03/07 23:26:08 itojun Exp $ */ - #include __FBSDID("$FreeBSD$"); + #include #include #include Modified: stable/9/sys/netinet/sctp_var.h ============================================================================== --- stable/9/sys/netinet/sctp_var.h Sun Jul 1 07:57:18 2012 (r237895) +++ stable/9/sys/netinet/sctp_var.h Sun Jul 1 07:59:00 2012 (r237896) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2001-2008, by Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -30,8 +30,6 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -/* $KAME: sctp_var.h,v 1.24 2005/03/06 16:04:19 itojun Exp $ */ - #include __FBSDID("$FreeBSD$"); Modified: stable/9/sys/netinet/sctputil.c ============================================================================== --- stable/9/sys/netinet/sctputil.c Sun Jul 1 07:57:18 2012 (r237895) +++ stable/9/sys/netinet/sctputil.c Sun Jul 1 07:59:00 2012 (r237896) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2001-2008, by Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -30,8 +30,6 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -/* $KAME: sctputil.c,v 1.37 2005/03/07 23:26:09 itojun Exp $ */ - #include __FBSDID("$FreeBSD$"); Modified: stable/9/sys/netinet/sctputil.h ============================================================================== --- stable/9/sys/netinet/sctputil.h Sun Jul 1 07:57:18 2012 (r237895) +++ stable/9/sys/netinet/sctputil.h Sun Jul 1 07:59:00 2012 (r237896) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -30,14 +30,11 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ - -/* $KAME: sctputil.h,v 1.15 2005/03/06 16:04:19 itojun Exp $ */ - #include __FBSDID("$FreeBSD$"); -#ifndef __sctputil_h__ -#define __sctputil_h__ +#ifndef _NETINET_SCTP_UTIL_H_ +#define _NETINET_SCTP_UTIL_H_ #if defined(_KERNEL) || defined(__Userspace__) Modified: stable/9/sys/netinet6/sctp6_usrreq.c ============================================================================== --- stable/9/sys/netinet6/sctp6_usrreq.c Sun Jul 1 07:57:18 2012 (r237895) +++ stable/9/sys/netinet6/sctp6_usrreq.c Sun Jul 1 07:59:00 2012 (r237896) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -29,7 +29,6 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ -/* $KAME: sctp6_usrreq.c,v 1.38 2005/08/24 08:08:56 suz Exp $ */ #include __FBSDID("$FreeBSD$"); Modified: stable/9/sys/netinet6/sctp6_var.h ============================================================================== --- stable/9/sys/netinet6/sctp6_var.h Sun Jul 1 07:57:18 2012 (r237895) +++ stable/9/sys/netinet6/sctp6_var.h Sun Jul 1 07:59:00 2012 (r237896) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -29,14 +29,13 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ -/* $KAME: sctp6_var.h,v 1.7 2004/08/17 04:06:22 itojun Exp $ */ - -#ifndef _NETINET6_SCTP6_VAR_H_ -#define _NETINET6_SCTP6_VAR_H_ #include __FBSDID("$FreeBSD$"); +#ifndef _NETINET6_SCTP6_VAR_H_ +#define _NETINET6_SCTP6_VAR_H_ + #if defined(_KERNEL) SYSCTL_DECL(_net_inet6_sctp6); From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 08:01:43 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6563D1065672; Sun, 1 Jul 2012 08:01:43 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 502008FC0A; Sun, 1 Jul 2012 08:01:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6181hIm075493; Sun, 1 Jul 2012 08:01:43 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6181hg3075491; Sun, 1 Jul 2012 08:01:43 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201207010801.q6181hg3075491@svn.freebsd.org> From: Michael Tuexen Date: Sun, 1 Jul 2012 08:01:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237897 - stable/9/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 08:01:43 -0000 Author: tuexen Date: Sun Jul 1 08:01:42 2012 New Revision: 237897 URL: http://svn.freebsd.org/changeset/base/237897 Log: MFC r235903: Add sn_send_failed_event to sctp_notification. Modified: stable/9/sys/netinet/sctp_uio.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp_uio.h ============================================================================== --- stable/9/sys/netinet/sctp_uio.h Sun Jul 1 07:59:00 2012 (r237896) +++ stable/9/sys/netinet/sctp_uio.h Sun Jul 1 08:01:42 2012 (r237897) @@ -523,10 +523,10 @@ union sctp_notification { struct sctp_pdapi_event sn_pdapi_event; struct sctp_authkey_event sn_auth_event; struct sctp_sender_dry_event sn_sender_dry_event; + struct sctp_send_failed_event sn_send_failed_event; struct sctp_stream_reset_event sn_strreset_event; struct sctp_assoc_reset_event sn_assocreset_event; struct sctp_stream_change_event sn_strchange_event; - }; /* notification types */ From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 08:04:11 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CC7BC106564A; Sun, 1 Jul 2012 08:04:10 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B6CD28FC12; Sun, 1 Jul 2012 08:04:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6184A1Z075662; Sun, 1 Jul 2012 08:04:10 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6184Ak7075660; Sun, 1 Jul 2012 08:04:10 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201207010804.q6184Ak7075660@svn.freebsd.org> From: Michael Tuexen Date: Sun, 1 Jul 2012 08:04:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237898 - stable/9/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 08:04:11 -0000 Author: tuexen Date: Sun Jul 1 08:04:10 2012 New Revision: 237898 URL: http://svn.freebsd.org/changeset/base/237898 Log: MFC r235990: Undefine SCTP_PACKED before including sctp_uio.h, which doesn't use it. Spotted by Irene Ruengeler. Modified: stable/9/sys/netinet/sctp.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp.h ============================================================================== --- stable/9/sys/netinet/sctp.h Sun Jul 1 08:01:42 2012 (r237897) +++ stable/9/sys/netinet/sctp.h Sun Jul 1 08:04:10 2012 (r237898) @@ -556,6 +556,8 @@ struct sctp_error_unrecognized_chunk { #define SCTP_SMALLEST_PMTU 512 /* smallest pmtu allowed when disabling PMTU * discovery */ +#undef SCTP_PACKED + #include /* This dictates the size of the packet @@ -607,7 +609,4 @@ struct sctp_error_unrecognized_chunk { #define SCTP_LOG_AT_SEND_2_OUTQ 0x08000000 #define SCTP_LOG_TRY_ADVANCE 0x10000000 - -#undef SCTP_PACKED - #endif /* !_NETINET_SCTP_H_ */ From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 08:06:43 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E32191065672; Sun, 1 Jul 2012 08:06:43 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CDF098FC12; Sun, 1 Jul 2012 08:06:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6186hjc075919; Sun, 1 Jul 2012 08:06:43 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6186hbE075916; Sun, 1 Jul 2012 08:06:43 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201207010806.q6186hbE075916@svn.freebsd.org> From: Michael Tuexen Date: Sun, 1 Jul 2012 08:06:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237899 - stable/9/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 08:06:44 -0000 Author: tuexen Date: Sun Jul 1 08:06:43 2012 New Revision: 237899 URL: http://svn.freebsd.org/changeset/base/237899 Log: MFC r236391: Small cleanups. No functional change. Modified: stable/9/sys/netinet/sctp_asconf.c stable/9/sys/netinet/sctputil.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp_asconf.c ============================================================================== --- stable/9/sys/netinet/sctp_asconf.c Sun Jul 1 08:04:10 2012 (r237898) +++ stable/9/sys/netinet/sctp_asconf.c Sun Jul 1 08:06:43 2012 (r237899) @@ -48,8 +48,6 @@ __FBSDID("$FreeBSD$"); * SCTP_DEBUG_ASCONF1: protocol info, general info and errors * SCTP_DEBUG_ASCONF2: detailed info */ -#ifdef SCTP_DEBUG -#endif /* SCTP_DEBUG */ static void Modified: stable/9/sys/netinet/sctputil.h ============================================================================== --- stable/9/sys/netinet/sctputil.h Sun Jul 1 08:04:10 2012 (r237898) +++ stable/9/sys/netinet/sctputil.h Sun Jul 1 08:06:43 2012 (r237899) @@ -381,7 +381,5 @@ sctp_auditing(int, struct sctp_inpcb *, void sctp_audit_log(uint8_t, uint8_t); #endif - - #endif /* _KERNEL */ #endif From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 08:09:06 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8C1301065670; Sun, 1 Jul 2012 08:09:06 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3AFF28FC0C; Sun, 1 Jul 2012 08:09:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q618961U076065; Sun, 1 Jul 2012 08:09:06 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q61895MJ076061; Sun, 1 Jul 2012 08:09:05 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201207010809.q61895MJ076061@svn.freebsd.org> From: Michael Tuexen Date: Sun, 1 Jul 2012 08:09:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237900 - stable/9/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 08:09:06 -0000 Author: tuexen Date: Sun Jul 1 08:09:05 2012 New Revision: 237900 URL: http://svn.freebsd.org/changeset/base/237900 Log: MFC r236450: Remove an unused parameter. Modified: stable/9/sys/netinet/sctp_input.c stable/9/sys/netinet/sctputil.c stable/9/sys/netinet/sctputil.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp_input.c ============================================================================== --- stable/9/sys/netinet/sctp_input.c Sun Jul 1 08:06:43 2012 (r237899) +++ stable/9/sys/netinet/sctp_input.c Sun Jul 1 08:09:05 2012 (r237900) @@ -4516,7 +4516,7 @@ __attribute__((noinline)) } if (stcb == NULL) { /* no association, so it's out of the blue... */ - sctp_handle_ootb(m, iphlen, *offset, sh, inp, NULL, + sctp_handle_ootb(m, iphlen, *offset, sh, inp, vrf_id, port); *offset = length; if (locked_tcb) { @@ -4554,7 +4554,7 @@ __attribute__((noinline)) SCTP_TCB_UNLOCK(locked_tcb); } sctp_handle_ootb(m, iphlen, *offset, sh, inp, - NULL, vrf_id, port); + vrf_id, port); return (NULL); } } else { @@ -5586,7 +5586,7 @@ sctp_common_input_processing(struct mbuf * NOT respond to any packet.. its OOTB. */ SCTP_TCB_UNLOCK(stcb); - sctp_handle_ootb(m, iphlen, offset, sh, inp, NULL, + sctp_handle_ootb(m, iphlen, offset, sh, inp, vrf_id, port); goto out_now; } @@ -5630,7 +5630,7 @@ sctp_common_input_processing(struct mbuf } if (stcb == NULL) { /* out of the blue DATA chunk */ - sctp_handle_ootb(m, iphlen, offset, sh, inp, NULL, + sctp_handle_ootb(m, iphlen, offset, sh, inp, vrf_id, port); goto out_now; } @@ -5699,7 +5699,7 @@ sctp_common_input_processing(struct mbuf /* * We consider OOTB any data sent during asoc setup. */ - sctp_handle_ootb(m, iphlen, offset, sh, inp, NULL, + sctp_handle_ootb(m, iphlen, offset, sh, inp, vrf_id, port); SCTP_TCB_UNLOCK(stcb); goto out_now; Modified: stable/9/sys/netinet/sctputil.c ============================================================================== --- stable/9/sys/netinet/sctputil.c Sun Jul 1 08:06:43 2012 (r237899) +++ stable/9/sys/netinet/sctputil.c Sun Jul 1 08:09:05 2012 (r237900) @@ -3994,7 +3994,7 @@ sctp_abort_an_association(struct sctp_in void sctp_handle_ootb(struct mbuf *m, int iphlen, int offset, struct sctphdr *sh, - struct sctp_inpcb *inp, struct mbuf *op_err, uint32_t vrf_id, uint16_t port) + struct sctp_inpcb *inp, uint32_t vrf_id, uint16_t port) { struct sctp_chunkhdr *ch, chunk_buf; unsigned int chk_length; @@ -4049,7 +4049,7 @@ sctp_handle_ootb(struct mbuf *m, int iph if ((SCTP_BASE_SYSCTL(sctp_blackhole) == 0) || ((SCTP_BASE_SYSCTL(sctp_blackhole) == 1) && (contains_init_chunk == 0))) { - sctp_send_abort(m, iphlen, sh, 0, op_err, vrf_id, port); + sctp_send_abort(m, iphlen, sh, 0, NULL, vrf_id, port); } } Modified: stable/9/sys/netinet/sctputil.h ============================================================================== --- stable/9/sys/netinet/sctputil.h Sun Jul 1 08:06:43 2012 (r237899) +++ stable/9/sys/netinet/sctputil.h Sun Jul 1 08:09:05 2012 (r237900) @@ -200,7 +200,7 @@ sctp_abort_an_association(struct sctp_in void sctp_handle_ootb(struct mbuf *, int, int, struct sctphdr *, - struct sctp_inpcb *, struct mbuf *, uint32_t, uint16_t); + struct sctp_inpcb *, uint32_t, uint16_t); int sctp_connectx_helper_add(struct sctp_tcb *stcb, struct sockaddr *addr, From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 08:10:49 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 97E0D106566B; Sun, 1 Jul 2012 08:10:49 +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 8377F8FC0A; Sun, 1 Jul 2012 08:10:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q618Anpd076191; Sun, 1 Jul 2012 08:10:49 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q618AniJ076189; Sun, 1 Jul 2012 08:10:49 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201207010810.q618AniJ076189@svn.freebsd.org> From: Xin LI Date: Sun, 1 Jul 2012 08:10:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237901 - head/sys/amd64/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 08:10:49 -0000 Author: delphij Date: Sun Jul 1 08:10:49 2012 New Revision: 237901 URL: http://svn.freebsd.org/changeset/base/237901 Log: tws(4) is interfaced with CAM so move it to the same section. Reported by: joel MFC after: 3 days Modified: head/sys/amd64/conf/GENERIC Modified: head/sys/amd64/conf/GENERIC ============================================================================== --- head/sys/amd64/conf/GENERIC Sun Jul 1 08:09:05 2012 (r237900) +++ head/sys/amd64/conf/GENERIC Sun Jul 1 08:10:49 2012 (r237901) @@ -152,6 +152,7 @@ device iir # Intel Integrated RAID device ips # IBM (Adaptec) ServeRAID device mly # Mylex AcceleRAID/eXtremeRAID device twa # 3ware 9000 series PATA/SATA RAID +device tws # LSI 3ware 9750 SATA+SAS 6Gb/s RAID controller # RAID controllers device aac # Adaptec FSA RAID @@ -162,7 +163,6 @@ device mlx # Mylex DAC960 family #XXX pointer/int warnings #device pst # Promise Supertrak SX6000 device twe # 3ware ATA RAID -device tws # LSI 3ware 9750 SATA+SAS 6Gb/s RAID controller # atkbdc0 controls both the keyboard and the PS/2 mouse device atkbdc # AT keyboard controller From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 08:11:16 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7D55B106564A; Sun, 1 Jul 2012 08:11:16 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4E2948FC19; Sun, 1 Jul 2012 08:11:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q618BGLL076259; Sun, 1 Jul 2012 08:11:16 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q618BG0w076257; Sun, 1 Jul 2012 08:11:16 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201207010811.q618BG0w076257@svn.freebsd.org> From: Michael Tuexen Date: Sun, 1 Jul 2012 08:11:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237902 - stable/9/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 08:11:16 -0000 Author: tuexen Date: Sun Jul 1 08:11:15 2012 New Revision: 237902 URL: http://svn.freebsd.org/changeset/base/237902 Log: MFC r236492: Don't request data from the IPv6 layer, which is not used. Modified: stable/9/sys/netinet/sctp_output.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp_output.c ============================================================================== --- stable/9/sys/netinet/sctp_output.c Sun Jul 1 08:10:49 2012 (r237901) +++ stable/9/sys/netinet/sctp_output.c Sun Jul 1 08:11:15 2012 (r237902) @@ -11059,11 +11059,8 @@ sctp_send_shutdown_complete2(struct mbuf #endif #ifdef INET6 if (ip6_out != NULL) { - struct route_in6 ro; int ret; - struct ifnet *ifp = NULL; - bzero(&ro, sizeof(ro)); mlen = SCTP_BUF_LEN(mout); #ifdef SCTP_PACKET_LOGGING if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_LAST_PACKET_TRACING) @@ -11089,11 +11086,7 @@ sctp_send_shutdown_complete2(struct mbuf SCTP_STAT_INCR(sctps_sendhwcrc); #endif } - SCTP_IP6_OUTPUT(ret, o_pak, &ro, &ifp, NULL, vrf_id); - - /* Free the route if we got one back */ - if (ro.ro_rt) - RTFREE(ro.ro_rt); + SCTP_IP6_OUTPUT(ret, o_pak, NULL, NULL, NULL, vrf_id); } #endif SCTP_STAT_INCR(sctps_sendpackets); @@ -12160,12 +12153,8 @@ sctp_send_abort(struct mbuf *m, int iphl #endif #ifdef INET6 if (ip6_out != NULL) { - struct route_in6 ro; int ret; - struct ifnet *ifp = NULL; - /* zap the stack pointer to the route */ - bzero(&ro, sizeof(ro)); if (port) { udp->uh_ulen = htons(len - sizeof(struct ip6_hdr)); } @@ -12196,11 +12185,7 @@ sctp_send_abort(struct mbuf *m, int iphl SCTP_STAT_INCR(sctps_sendhwcrc); #endif } - SCTP_IP6_OUTPUT(ret, o_pak, &ro, &ifp, NULL, vrf_id); - - /* Free the route if we got one back */ - if (ro.ro_rt) - RTFREE(ro.ro_rt); + SCTP_IP6_OUTPUT(ret, o_pak, NULL, NULL, NULL, vrf_id); } #endif SCTP_STAT_INCR(sctps_sendpackets); @@ -12426,12 +12411,8 @@ sctp_send_operr_to(struct mbuf *m, int i #endif #ifdef INET6 if (ip6_out != NULL) { - struct route_in6 ro; int ret; - struct ifnet *ifp = NULL; - /* zap the stack pointer to the route */ - bzero(&ro, sizeof(ro)); if (port) { udp->uh_ulen = htons(len - sizeof(struct ip6_hdr)); } @@ -12460,11 +12441,7 @@ sctp_send_operr_to(struct mbuf *m, int i SCTP_STAT_INCR(sctps_sendhwcrc); #endif } - SCTP_IP6_OUTPUT(ret, o_pak, &ro, &ifp, NULL, vrf_id); - - /* Free the route if we got one back */ - if (ro.ro_rt) - RTFREE(ro.ro_rt); + SCTP_IP6_OUTPUT(ret, o_pak, NULL, NULL, NULL, vrf_id); } #endif SCTP_STAT_INCR(sctps_sendpackets); From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 08:13:21 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8F25B1065673; Sun, 1 Jul 2012 08:13:21 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 79F998FC18; Sun, 1 Jul 2012 08:13:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q618DLQK076402; Sun, 1 Jul 2012 08:13:21 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q618DLhn076400; Sun, 1 Jul 2012 08:13:21 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201207010813.q618DLhn076400@svn.freebsd.org> From: Michael Tuexen Date: Sun, 1 Jul 2012 08:13:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237903 - stable/9/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 08:13:21 -0000 Author: tuexen Date: Sun Jul 1 08:13:20 2012 New Revision: 237903 URL: http://svn.freebsd.org/changeset/base/237903 Log: MFC r236493: Honor sysctl for TTL. Modified: stable/9/sys/netinet/sctp_output.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp_output.c ============================================================================== --- stable/9/sys/netinet/sctp_output.c Sun Jul 1 08:11:15 2012 (r237902) +++ stable/9/sys/netinet/sctp_output.c Sun Jul 1 08:13:20 2012 (r237903) @@ -10935,7 +10935,7 @@ sctp_send_shutdown_complete2(struct mbuf iph_out->ip_tos = (u_char)0; iph_out->ip_id = 0; iph_out->ip_off = 0; - iph_out->ip_ttl = MAXTTL; + iph_out->ip_ttl = MODULE_GLOBAL(ip_defttl); if (port) { iph_out->ip_p = IPPROTO_UDP; } else { @@ -12004,7 +12004,7 @@ sctp_send_abort(struct mbuf *m, int iphl iph_out->ip_tos = (u_char)0; iph_out->ip_id = 0; iph_out->ip_off = 0; - iph_out->ip_ttl = MAXTTL; + iph_out->ip_ttl = MODULE_GLOBAL(ip_defttl); if (port) { iph_out->ip_p = IPPROTO_UDP; } else { @@ -12267,7 +12267,7 @@ sctp_send_operr_to(struct mbuf *m, int i iph_out->ip_tos = (u_char)0; iph_out->ip_id = 0; iph_out->ip_off = 0; - iph_out->ip_ttl = MAXTTL; + iph_out->ip_ttl = MODULE_GLOBAL(ip_defttl); if (port) { iph_out->ip_p = IPPROTO_UDP; } else { From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 08:18:41 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5BC9C106564A; Sun, 1 Jul 2012 08:18:41 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3CB9E8FC08; Sun, 1 Jul 2012 08:18:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q618IfcT076693; Sun, 1 Jul 2012 08:18:41 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q618IfHc076691; Sun, 1 Jul 2012 08:18:41 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201207010818.q618IfHc076691@svn.freebsd.org> From: Michael Tuexen Date: Sun, 1 Jul 2012 08:18:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237904 - stable/9/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 08:18:41 -0000 Author: tuexen Date: Sun Jul 1 08:18:40 2012 New Revision: 237904 URL: http://svn.freebsd.org/changeset/base/237904 Log: MFC r236515: Use an existing function to get the source address. Modified: stable/9/sys/netinet/sctp_asconf.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp_asconf.c ============================================================================== --- stable/9/sys/netinet/sctp_asconf.c Sun Jul 1 08:13:20 2012 (r237903) +++ stable/9/sys/netinet/sctp_asconf.c Sun Jul 1 08:18:40 2012 (r237904) @@ -856,70 +856,20 @@ send_reply: * this could happen if the source address was just newly * added */ - struct ip *iph; - struct sctphdr *sh; - struct sockaddr_storage from_store; - struct sockaddr *from = (struct sockaddr *)&from_store; + struct sockaddr_storage addr; + struct sockaddr *src = (struct sockaddr *)&addr; SCTPDBG(SCTP_DEBUG_ASCONF1, "handle_asconf: looking up net for IP source address\n"); - /* pullup already done, IP options already stripped */ - iph = mtod(m, struct ip *); - switch (iph->ip_v) { -#ifdef INET - case IPVERSION: - { - struct sockaddr_in *from4; - - sh = (struct sctphdr *)((caddr_t)iph + sizeof(*iph)); - from4 = (struct sockaddr_in *)&from_store; - bzero(from4, sizeof(*from4)); - from4->sin_family = AF_INET; - from4->sin_len = sizeof(struct sockaddr_in); - from4->sin_addr.s_addr = iph->ip_src.s_addr; - from4->sin_port = sh->src_port; - break; - } -#endif -#ifdef INET6 - case IPV6_VERSION >> 4: - { - struct ip6_hdr *ip6; - struct sockaddr_in6 *from6; - - ip6 = mtod(m, struct ip6_hdr *); - sh = (struct sctphdr *)((caddr_t)ip6 + sizeof(*ip6)); - from6 = (struct sockaddr_in6 *)&from_store; - bzero(from6, sizeof(*from6)); - from6->sin6_family = AF_INET6; - from6->sin6_len = sizeof(struct sockaddr_in6); - from6->sin6_addr = ip6->ip6_src; - from6->sin6_port = sh->src_port; - /* - * Get the scopes in properly to the sin6 - * addr's - */ - /* we probably don't need these operations */ - (void)sa6_recoverscope(from6); - sa6_embedscope(from6, - MODULE_GLOBAL(ip6_use_defzone)); - - break; - } -#endif - default: - /* unknown address type */ - from = NULL; - } - if (from != NULL) { - SCTPDBG(SCTP_DEBUG_ASCONF1, "Looking for IP source: "); - SCTPDBG_ADDR(SCTP_DEBUG_ASCONF1, from); - /* look up the from address */ - stcb->asoc.last_control_chunk_from = sctp_findnet(stcb, from); + sctp_asconf_get_source_ip(m, src); + SCTPDBG(SCTP_DEBUG_ASCONF1, "Looking for IP source: "); + SCTPDBG_ADDR(SCTP_DEBUG_ASCONF1, src); + /* look up the from address */ + stcb->asoc.last_control_chunk_from = sctp_findnet(stcb, src); #ifdef SCTP_DEBUG - if (stcb->asoc.last_control_chunk_from == NULL) - SCTPDBG(SCTP_DEBUG_ASCONF1, "handle_asconf: IP source address not found?!\n"); -#endif + if (stcb->asoc.last_control_chunk_from == NULL) { + SCTPDBG(SCTP_DEBUG_ASCONF1, "handle_asconf: IP source address not found?!\n"); } +#endif } } From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 08:20:13 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B075C1065670; Sun, 1 Jul 2012 08:20:13 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9948D8FC0C; Sun, 1 Jul 2012 08:20:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q618KD4D076827; Sun, 1 Jul 2012 08:20:13 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q618KDuL076824; Sun, 1 Jul 2012 08:20:13 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201207010820.q618KDuL076824@svn.freebsd.org> From: Martin Matuska Date: Sun, 1 Jul 2012 08:20:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237905 - vendor/illumos/dist/man/man1m X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 08:20:13 -0000 Author: mm Date: Sun Jul 1 08:20:13 2012 New Revision: 237905 URL: http://svn.freebsd.org/changeset/base/237905 Log: Add zfs manual pages missing in r237895 Added: vendor/illumos/dist/man/man1m/zdb.1m vendor/illumos/dist/man/man1m/zfs.1m vendor/illumos/dist/man/man1m/zpool.1m vendor/illumos/dist/man/man1m/zstreamdump.1m Added: vendor/illumos/dist/man/man1m/zdb.1m ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/illumos/dist/man/man1m/zdb.1m Sun Jul 1 08:20:13 2012 (r237905) @@ -0,0 +1,484 @@ +'\" t +.\" +.\" This file and its contents are supplied under the terms of the +.\" Common Development and Distribution License ("CDDL"), version 1.0. +.\" You may only use this file in accordance with the terms of version +.\" 1.0 of the CDDL. +.\" +.\" A full copy of the text of the CDDL should have accompanied this +.\" source. A copy of the CDDL is also available via the Internet at +.\" http://www.illumos.org/license/CDDL. +.\" +.\" +.\" Copyright 2012, Richard Lowe. +.\" +.TH "ZDB" "1M" "February 15, 2012" "" "" + +.SH "NAME" +\fBzdb\fR - Display zpool debugging and consistency information + +.SH "SYNOPSIS" +\fBzdb\fR [-CumdibcsDvhLXFPA] [-e [-p \fIpath\fR...]] [-t \fItxg\fR] + \fIpoolname\fR [\fIobject\fR ...] + +.P +\fBzdb\fR [-divPA] [-e [-p \fIpath\fR...]] \fIdataset\fR [\fIobject\fR ...] + +.P +\fBzdb\fR -m [-LXFPA] [-t \fItxg\fR] [-e [-p \fIpath\fR...]] \fIpoolname\fR + [\fIvdev\fR [\fImetaslab\fR ...]] + +.P +\fBzdb\fR -R [-A] [-e [-p \fIpath\fR...]] \fIpoolname\fR + \fIvdev\fR:\fIoffset\fR:\fIsize\fR[:\fIflags\fR] + +.P +\fBzdb\fR -S [-AP] [-e [-p \fIpath\fR...]] \fIpoolname\fR + +.P +\fBzdb\fR -l [-uA] \fIdevice\fR + +.P +\fBzdb\fR -C [-A] [-U \fIcache\fR] + +.SH "DESCRIPTION" +The \fBzdb\fR utility displays information about a ZFS pool useful for +debugging and performs some amount of consistency checking. It is a not a +general purpose tool and options (and facilities) may change. This is neither +a fsck(1M) nor an fsdb(1M) utility. + +.P +The output of this command in general reflects the on-disk structure of a ZFS +pool, and is inherently unstable. The precise output of most invocations is +not documented, a knowledge of ZFS internals is assumed. + +.P +When operating on an imported and active pool it is possible, though unlikely, +that zdb may interpret inconsistent pool data and behave erratically. + +.SH "OPTIONS" +Display options: + +.sp +.ne 2 +.na +\fB-b\fR +.ad +.sp .6 +.RS 4n +Display statistics regarding the number, size (logical, physical and +allocated) and deduplication of blocks. +.RE + +.sp +.ne 2 +.na +\fB-c\fR +.ad +.sp .6 +.RS 4n +Verify the checksum of all metadata blocks while printing block statistics +(see \fB-b\fR). +.sp +If specified multiple times, verify the checksums of all blocks. +.RE + +.sp +.ne 2 +.na +\fB-C\fR +.ad +.sp .6 +.RS 4n +Display information about the configuration. If specified with no other +options, instead display information about the cache file +(\fB/etc/zfs/zpool.cache\fR). To specify the cache file to display, see +\fB-U\fR. +.P +If specified multiple times, and a pool name is also specified display both +the cached configuration and the on-disk configuration. If specified multiple +times with \fB-e\fR also display the configuration that would be used were the +pool to be imported. +.RE + +.sp +.ne 2 +.na +\fB-d\fR +.ad +.sp .6 +.RS 4n +Display information about datasets. Specified once, displays basic dataset +information: ID, create transaction, size, and object count. +.sp +If specified multiple times provides greater and greater verbosity. +.sp +If object IDs are specified, display information about those specific objects only. +.RE + +.sp +.ne 2 +.na +\fB-D\fR +.ad +.sp .6 +.RS 4n +Display deduplication statistics, including the deduplication ratio (dedup), +compression ratio (compress), inflation due to the zfs copies property +(copies), and an overall effective ratio (dedup * compress / copies). +.sp +If specified twice, display a histogram of deduplication statistics, showing +the allocated (physically present on disk) and referenced (logically +referenced in the pool) block counts and sizes by reference count. +.RE + +.sp +.ne 2 +.na +\fB-h\fR +.ad +.sp .6 +.RS 4n +Display pool history similar to \fBzpool history\fR, but include internal +changes, transaction, and dataset information. +.RE + +.sp +.ne 2 +.na +\fB-i\fR +.ad +.sp .6 +.RS 4n +Display information about intent log (ZIL) entries relating to each +dataset. If specified multiple times, display counts of each intent log +transaction type. +.RE + +.sp +.ne 2 +.na +\fB-l\fR \fIdevice\fR +.ad +.sp .6 +.RS 4n +Display the vdev labels from the specified device. If the \fB-u\fR option is +also specified, also display the uberblocks on this device. +.RE + +.sp +.ne 2 +.na +\fB-L\fR +.ad +.sp .6 +.RS 4n +Disable leak tracing and the loading of space maps. By default, \fBzdb\fR +verifies that all non-free blocks are referenced, which can be very expensive. +.RE + +.sp +.ne 2 +.na +\fB-m\fR +.ad +.sp .6 +.RS 4n +Display the offset, spacemap, and free space of each metaslab. +When specified twice, also display information about the maximum contiguous +free space and the percentage of free space in each space map. When specified +three times display every spacemap record. +.RE + +.sp +.ne 2 +.na +\fB-R\fR \fIpoolname\fR \fIvdev\fR:\fIoffset\fR:\fIsize\fR[:\fIflags\fR] +.ad +.sp .6 +.RS 4n +Read and display a block from the specified device. By default the block is +displayed as a hex dump, but see the description of the \'r\' flag, below. +.sp +The block is specified in terms of a colon-separated tuple \fIvdev\fR (an +integer vdev identifier) \fIoffset\fR (the offset within the vdev) \fIsize\fR +(the size of the block to read) and, optionally, \fIflags\fR (a set of flags, +described below). + +.sp +.ne 2 +.na +\fBb\fR \fIoffset\fR +.ad +.sp .6 +.RS 4n +Print block pointer +.RE + +.sp +.ne 2 +.na +\fBd\fR +.ad +.sp .6 +.RS 4n +Decompress the block +.RE + +.sp +.ne 2 +.na +\fBe\fR +.ad +.sp .6 +.RS 4n +Byte swap the block +.RE + +.sp +.ne 2 +.na +\fBg\fR +.ad +.sp .6 +.RS 4n +Dump gang block header +.RE + +.sp +.ne 2 +.na +\fBi\fR +.ad +.sp .6 +.RS 4n +Dump indirect block +.RE + +.sp +.ne 2 +.na +\fBr\fR +.ad +.sp .6 +.RS 4n +Dump raw uninterpreted block data +.RE +.RE + +.sp +.ne 2 +.na +\fB-s\fR +.ad +.sp .6 +.RS 4n +Report statistics on \fBzdb\fR\'s I/O. Display operation counts, bandwidth, +and error counts of I/O to the pool from \fBzdb\fR. +.RE + +.sp +.ne 2 +.na +\fB-S\fR +.ad +.sp .6 +.RS 4n +Simulate the effects of deduplication, constructing a DDT and then display +that DDT as with \fB-DD\fR. +.RE + +.sp +.ne 2 +.na +\fB-u\fR +.ad +.sp .6 +.RS 4n +Display the current uberblock. +.RE + +.P +Other options: + +.sp +.ne 2 +.na +\fB-A\fR +.ad +.sp .6 +.RS 4n +Do not abort should any assertion fail. +.RE + +.sp +.ne 2 +.na +\fB-AA\fR +.ad +.sp .6 +.RS 4n +Enable panic recovery, certain errors which would otherwise be fatal are +demoted to warnings. +.RE + +.sp +.ne 2 +.na +\fB-AAA\fR +.ad +.sp .6 +.RS 4n +Do not abort if asserts fail and also enable panic recovery. +.RE + +.sp +.ne 2 +.na +\fB-e\fR [-p \fIpath\fR]... +.ad +.sp .6 +.RS 4n +Operate on an exported pool, not present in \fB/etc/zfs/zpool.cache\fR. The +\fB-p\fR flag specifies the path under which devices are to be searched. +.RE + +.sp +.ne 2 +.na +\fB-F\fR +.ad +.sp .6 +.RS 4n +Attempt to make an unreadable pool readable by trying progressively older +transactions. +.RE + +.sp +.ne 2 +.na +\fB-P\fR +.ad +.sp .6 +.RS 4n +Print numbers in an unscaled form more amenable to parsing, eg. 1000000 rather +than 1M. +.RE + +.sp +.ne 2 +.na +\fB-t\fR \fItransaction\fR +.ad +.sp .6 +.RS 4n +Specify the highest transaction to use when searching for uberblocks. See also +the \fB-u\fR and \fB-l\fR options for a means to see the available uberblocks +and their associated transaction numbers. +.RE + +.sp +.ne 2 +.na +\fB-U\fR \fIcachefile\fR +.ad +.sp .6 +.RS 4n +Use a cache file other than \fB/etc/zfs/zpool.cache\fR. This option is only +valid with \fB-C\fR +.RE + +.sp +.ne 2 +.na +\fB-v\fR +.ad +.sp .6 +.RS 4n +Enable verbosity. Specify multiple times for increased verbosity. +.RE + +.sp +.ne 2 +.na +\fB-X\fR +.ad +.sp .6 +.RS 4n +Attempt \'extreme\' transaction rewind, that is attempt the same recovery as +\fB-F\fR but read transactions otherwise deemed too old. +.RE + +.P +Specifying a display option more than once enables verbosity for only that +option, with more occurrences enabling more verbosity. +.P +If no options are specified, all information about the named pool will be +displayed at default verbosity. + +.SH "EXAMPLES" +.LP +\fBExample 1 \fRDisplay the configuration of imported pool 'rpool' +.sp +.in +2 +.nf +# zdb -C rpool + +MOS Configuration: + version: 28 + name: 'rpool' + ... +.fi +.in -2 +.sp + +.LP +\fBExample 2 \fRDisplay basic dataset information about 'rpool' +.sp +.in +2 +.nf +# zdb -d rpool +Dataset mos [META], ID 0, cr_txg 4, 26.9M, 1051 objects +Dataset rpool/swap [ZVOL], ID 59, cr_txg 356, 486M, 2 objects + ... +.fi +.in -2 +.sp + +.LP +\fBExample 3 \fRDisplay basic information about object 0 in +'rpool/export/home' +.sp +.in +2 +.nf +# zdb -d rpool/export/home 0 +Dataset rpool/export/home [ZPL], ID 137, cr_txg 1546, 32K, 8 objects + + Object lvl iblk dblk dsize lsize %full type + 0 7 16K 16K 15.0K 16K 25.00 DMU dnode +.fi +.in -2 +.sp + +.LP +\fBExample 4 \fRDisplay the predicted effect of enabling deduplication on 'rpool' +.sp +.in +2 +.nf +# zdb -S rpool +Simulated DDT histogram: + +bucket allocated referenced +______ ______________________________ ______________________________ +refcnt blocks LSIZE PSIZE DSIZE blocks LSIZE PSIZE DSIZE +------ ------ ----- ----- ----- ------ ----- ----- ----- + 1 694K 27.1G 15.0G 15.0G 694K 27.1G 15.0G 15.0G + 2 35.0K 1.33G 699M 699M 74.7K 2.79G 1.45G 1.45G + ... +dedup = 1.11, compress = 1.80, copies = 1.00, dedup * compress / copies = 2.00 +.fi +.in -2 +.sp + +.SH "SEE ALSO" +zfs(1M), zpool(1M) Added: vendor/illumos/dist/man/man1m/zfs.1m ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/illumos/dist/man/man1m/zfs.1m Sun Jul 1 08:20:13 2012 (r237905) @@ -0,0 +1,3863 @@ +'\" te +.\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved. +.\" Copyright (c) 2012 by Delphix. All rights reserved. +.\" Copyright (c) 2012 Nexenta Systems, Inc. All Rights Reserved. +.\" Copyright (c) 2012, Joyent, Inc. All rights reserved. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. +.\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with +.\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.\" Copyright 2011 Joshua M. Clulow +.TH ZFS 1M "28 Jul 2011" +.SH NAME +zfs \- configures ZFS file systems +.SH SYNOPSIS +.LP +.nf +\fBzfs\fR [\fB-?\fR] +.fi + +.LP +.nf +\fBzfs\fR \fBcreate\fR [\fB-p\fR] [\fB-o\fR \fIproperty\fR=\fIvalue\fR] ... \fIfilesystem\fR +.fi + +.LP +.nf +\fBzfs\fR \fBcreate\fR [\fB-ps\fR] [\fB-b\fR \fIblocksize\fR] [\fB-o\fR \fIproperty\fR=\fIvalue\fR] ... \fB-V\fR \fIsize\fR \fIvolume\fR +.fi + +.LP +.nf +\fBzfs\fR \fBdestroy\fR [\fB-fnpRrv\fR] \fIfilesystem\fR|\fIvolume\fR +.fi + +.LP +.nf +\fBzfs\fR \fBdestroy\fR [\fB-dnpRrv\fR] \fIfilesystem\fR|\fIvolume\fR@\fIsnap\fR[%\fIsnap\fR][,...] +.fi + +.LP +.nf +\fBzfs\fR \fBsnapshot\fR [\fB-r\fR] [\fB-o\fR \fIproperty\fR=\fIvalue\fR]... + \fIfilesystem@snapname\fR|\fIvolume@snapname\fR +.fi + +.LP +.nf +\fBzfs\fR \fBrollback\fR [\fB-rRf\fR] \fIsnapshot\fR +.fi + +.LP +.nf +\fBzfs\fR \fBclone\fR [\fB-p\fR] [\fB-o\fR \fIproperty\fR=\fIvalue\fR] ... \fIsnapshot\fR \fIfilesystem\fR|\fIvolume\fR +.fi + +.LP +.nf +\fBzfs\fR \fBpromote\fR \fIclone-filesystem\fR +.fi + +.LP +.nf +\fBzfs\fR \fBrename\fR [\fB-f\fR] \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR + \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR +.fi + +.LP +.nf +\fBzfs\fR \fBrename\fR [\fB-fp\fR] \fIfilesystem\fR|\fIvolume\fR \fIfilesystem\fR|\fIvolume\fR +.fi + +.LP +.nf +\fBzfs\fR \fBrename\fR \fB-r\fR \fIsnapshot\fR \fIsnapshot\fR +.fi + +.LP +.nf +\fBzfs\fR \fBlist\fR [\fB-r\fR|\fB-d\fR \fIdepth\fR][\fB-H\fR][\fB-o\fR \fIproperty\fR[,...]] [\fB-t\fR \fItype\fR[,...]] + [\fB-s\fR \fIproperty\fR] ... [\fB-S\fR \fIproperty\fR] ... [\fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR] ... +.fi + +.LP +.nf +\fBzfs\fR \fBset\fR \fIproperty\fR=\fIvalue\fR \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR ... +.fi + +.LP +.nf +\fBzfs\fR \fBget\fR [\fB-r\fR|\fB-d\fR \fIdepth\fR][\fB-Hp\fR][\fB-o\fR \fIfield\fR[,...]] [\fB-t\fR \fItype\fR[,...]] + [\fB-s\fR \fIsource\fR[,...]] "\fIall\fR" | \fIproperty\fR[,...] \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR ... +.fi + +.LP +.nf +\fBzfs\fR \fBinherit\fR [\fB-r\fR] \fIproperty\fR \fIfilesystem\fR|\fIvolume|snapshot\fR ... +.fi + +.LP +.nf +\fBzfs\fR \fBupgrade\fR [\fB-v\fR] +.fi + +.LP +.nf +\fBzfs\fR \fBupgrade\fR [\fB-r\fR] [\fB-V\fR \fIversion\fR] \fB-a\fR | \fIfilesystem\fR +.fi + +.LP +.nf +\fBzfs\fR \fBuserspace\fR [\fB-niHp\fR] [\fB-o\fR \fIfield\fR[,...]] [\fB-sS\fR \fIfield\fR] ... + [\fB-t\fR \fItype\fR[,...]] \fIfilesystem\fR|\fIsnapshot\fR +.fi + +.LP +.nf +\fBzfs\fR \fBgroupspace\fR [\fB-niHp\fR] [\fB-o\fR \fIfield\fR[,...]] [\fB-sS\fR \fIfield\fR] ... + [\fB-t\fR \fItype\fR[,...]] \fIfilesystem\fR|\fIsnapshot\fR +.fi + +.LP +.nf +\fBzfs\fR \fBmount\fR +.fi + +.LP +.nf +\fBzfs\fR \fBmount\fR [\fB-vO\fR] [\fB-o \fIoptions\fR\fR] \fB-a\fR | \fIfilesystem\fR +.fi + +.LP +.nf +\fBzfs\fR \fBunmount\fR [\fB-f\fR] \fB-a\fR | \fIfilesystem\fR|\fImountpoint\fR +.fi + +.LP +.nf +\fBzfs\fR \fBshare\fR \fB-a\fR | \fIfilesystem\fR +.fi + +.LP +.nf +\fBzfs\fR \fBunshare\fR \fB-a\fR \fIfilesystem\fR|\fImountpoint\fR +.fi + +.LP +.nf +\fBzfs\fR \fBsend\fR [\fB-DnPpRrv\fR] [\fB-\fR[\fBiI\fR] \fIsnapshot\fR] \fIsnapshot\fR +.fi + +.LP +.nf +\fBzfs\fR \fBreceive\fR [\fB-vnFu\fR] \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR +.fi + +.LP +.nf +\fBzfs\fR \fBreceive\fR [\fB-vnFu\fR] [\fB-d\fR|\fB-e\fR] \fIfilesystem\fR +.fi + +.LP +.nf +\fBzfs\fR \fBallow\fR \fIfilesystem\fR|\fIvolume\fR +.fi + +.LP +.nf +\fBzfs\fR \fBallow\fR [\fB-ldug\fR] "\fIeveryone\fR"|\fIuser\fR|\fIgroup\fR[,...] \fIperm\fR|\fI@setname\fR[,...] + \fIfilesystem\fR|\fIvolume\fR +.fi + +.LP +.nf +\fBzfs\fR \fBallow\fR [\fB-ld\fR] \fB-e\fR \fIperm\fR|@\fIsetname\fR[,...] \fIfilesystem\fR|\fIvolume\fR +.fi + +.LP +.nf +\fBzfs\fR \fBallow\fR \fB-c\fR \fIperm\fR|@\fIsetname\fR[,...] \fIfilesystem\fR|\fIvolume\fR +.fi + +.LP +.nf +\fBzfs\fR \fBallow\fR \fB-s\fR @\fIsetname\fR \fIperm\fR|@\fIsetname\fR[,...] \fIfilesystem\fR|\fIvolume\fR +.fi + +.LP +.nf +\fBzfs\fR \fBunallow\fR [\fB-rldug\fR] "\fIeveryone\fR"|\fIuser\fR|\fIgroup\fR[,...] [\fIperm\fR|@\fIsetname\fR[,... ]] + \fIfilesystem\fR|\fIvolume\fR +.fi + +.LP +.nf +\fBzfs\fR \fBunallow\fR [\fB-rld\fR] \fB-e\fR [\fIperm\fR|@\fIsetname\fR[,... ]] \fIfilesystem\fR|\fIvolume\fR +.fi + +.LP +.nf +\fBzfs\fR \fBunallow\fR [\fB-r\fR] \fB-c\fR [\fIperm\fR|@\fIsetname\fR[ ... ]] \fIfilesystem\fR|\fIvolume\fR +.fi + +.LP +.nf +\fBzfs\fR \fBunallow\fR [\fB-r\fR] \fB-s\fR @\fIsetname\fR [\fIperm\fR|@\fIsetname\fR[,... ]] \fIfilesystem\fR|\fIvolume\fR +.fi + +.LP +.nf +\fBzfs\fR \fBhold\fR [\fB-r\fR] \fItag\fR \fIsnapshot\fR... +.fi + +.LP +.nf +\fBzfs\fR \fBholds\fR [\fB-r\fR] \fIsnapshot\fR... +.fi + +.LP +.nf +\fBzfs\fR \fBrelease\fR [\fB-r\fR] \fItag\fR \fIsnapshot\fR... +.fi + +.SH DESCRIPTION +.sp +.LP +The \fBzfs\fR command configures \fBZFS\fR datasets within a \fBZFS\fR storage +pool, as described in \fBzpool\fR(1M). A dataset is identified by a unique path +within the \fBZFS\fR namespace. For example: +.sp +.in +2 +.nf +pool/{filesystem,volume,snapshot} +.fi +.in -2 +.sp + +.sp +.LP +where the maximum length of a dataset name is \fBMAXNAMELEN\fR (256 bytes). +.sp +.LP +A dataset can be one of the following: +.sp +.ne 2 +.na +\fB\fIfile system\fR\fR +.ad +.sp .6 +.RS 4n +A \fBZFS\fR dataset of type \fBfilesystem\fR can be mounted within the standard +system namespace and behaves like other file systems. While \fBZFS\fR file +systems are designed to be \fBPOSIX\fR compliant, known issues exist that +prevent compliance in some cases. Applications that depend on standards +conformance might fail due to nonstandard behavior when checking file system +free space. +.RE + +.sp +.ne 2 +.na +\fB\fIvolume\fR\fR +.ad +.sp .6 +.RS 4n +A logical volume exported as a raw or block device. This type of dataset should +only be used under special circumstances. File systems are typically used in +most environments. +.RE + +.sp +.ne 2 +.na +\fB\fIsnapshot\fR\fR +.ad +.sp .6 +.RS 4n +A read-only version of a file system or volume at a given point in time. It is +specified as \fIfilesystem@name\fR or \fIvolume@name\fR. +.RE + +.SS "ZFS File System Hierarchy" +.sp +.LP +A \fBZFS\fR storage pool is a logical collection of devices that provide space +for datasets. A storage pool is also the root of the \fBZFS\fR file system +hierarchy. +.sp +.LP +The root of the pool can be accessed as a file system, such as mounting and +unmounting, taking snapshots, and setting properties. The physical storage +characteristics, however, are managed by the \fBzpool\fR(1M) command. +.sp +.LP +See \fBzpool\fR(1M) for more information on creating and administering pools. +.SS "Snapshots" +.sp +.LP +A snapshot is a read-only copy of a file system or volume. Snapshots can be +created extremely quickly, and initially consume no additional space within the +pool. As data within the active dataset changes, the snapshot consumes more +data than would otherwise be shared with the active dataset. +.sp +.LP +Snapshots can have arbitrary names. Snapshots of volumes can be cloned or +rolled back, but cannot be accessed independently. +.sp +.LP +File system snapshots can be accessed under the \fB\&.zfs/snapshot\fR directory +in the root of the file system. Snapshots are automatically mounted on demand +and may be unmounted at regular intervals. The visibility of the \fB\&.zfs\fR +directory can be controlled by the \fBsnapdir\fR property. +.SS "Clones" +.sp +.LP +A clone is a writable volume or file system whose initial contents are the same +as another dataset. As with snapshots, creating a clone is nearly +instantaneous, and initially consumes no additional space. +.sp +.LP +Clones can only be created from a snapshot. When a snapshot is cloned, it +creates an implicit dependency between the parent and child. Even though the +clone is created somewhere else in the dataset hierarchy, the original snapshot +cannot be destroyed as long as a clone exists. The \fBorigin\fR property +exposes this dependency, and the \fBdestroy\fR command lists any such +dependencies, if they exist. +.sp +.LP +The clone parent-child dependency relationship can be reversed by using the +\fBpromote\fR subcommand. This causes the "origin" file system to become a +clone of the specified file system, which makes it possible to destroy the file +system that the clone was created from. +.SS "Mount Points" +.sp +.LP +Creating a \fBZFS\fR file system is a simple operation, so the number of file +systems per system is likely to be numerous. To cope with this, \fBZFS\fR +automatically manages mounting and unmounting file systems without the need to +edit the \fB/etc/vfstab\fR file. All automatically managed file systems are +mounted by \fBZFS\fR at boot time. +.sp +.LP +By default, file systems are mounted under \fB/\fIpath\fR\fR, where \fIpath\fR +is the name of the file system in the \fBZFS\fR namespace. Directories are +created and destroyed as needed. +.sp +.LP +A file system can also have a mount point set in the \fBmountpoint\fR property. +This directory is created as needed, and \fBZFS\fR automatically mounts the +file system when the \fBzfs mount -a\fR command is invoked (without editing +\fB/etc/vfstab\fR). The \fBmountpoint\fR property can be inherited, so if +\fBpool/home\fR has a mount point of \fB/export/stuff\fR, then +\fBpool/home/user\fR automatically inherits a mount point of +\fB/export/stuff/user\fR. +.sp +.LP +A file system \fBmountpoint\fR property of \fBnone\fR prevents the file system +from being mounted. +.sp +.LP +If needed, \fBZFS\fR file systems can also be managed with traditional tools +(\fBmount\fR, \fBumount\fR, \fB/etc/vfstab\fR). If a file system's mount point +is set to \fBlegacy\fR, \fBZFS\fR makes no attempt to manage the file system, +and the administrator is responsible for mounting and unmounting the file +system. +.SS "Zones" +.sp +.LP +A \fBZFS\fR file system can be added to a non-global zone by using the +\fBzonecfg\fR \fBadd fs\fR subcommand. A \fBZFS\fR file system that is added to +a non-global zone must have its \fBmountpoint\fR property set to \fBlegacy\fR. +.sp +.LP +The physical properties of an added file system are controlled by the global +administrator. However, the zone administrator can create, modify, or destroy +files within the added file system, depending on how the file system is +mounted. +.sp +.LP +A dataset can also be delegated to a non-global zone by using the \fBzonecfg\fR +\fBadd dataset\fR subcommand. You cannot delegate a dataset to one zone and the +children of the same dataset to another zone. The zone administrator can change +properties of the dataset or any of its children. However, the \fBquota\fR +property is controlled by the global administrator. +.sp +.LP +A \fBZFS\fR volume can be added as a device to a non-global zone by using the +\fBzonecfg\fR \fBadd device\fR subcommand. However, its physical properties can +be modified only by the global administrator. +.sp +.LP +For more information about \fBzonecfg\fR syntax, see \fBzonecfg\fR(1M). +.sp +.LP +After a dataset is delegated to a non-global zone, the \fBzoned\fR property is +automatically set. A zoned file system cannot be mounted in the global zone, +since the zone administrator might have to set the mount point to an +unacceptable value. +.sp +.LP +The global administrator can forcibly clear the \fBzoned\fR property, though +this should be done with extreme care. The global administrator should verify +that all the mount points are acceptable before clearing the property. +.SS "Native Properties" +.sp +.LP +Properties are divided into two types, native properties and user-defined (or +"user") properties. Native properties either export internal statistics or +control \fBZFS\fR behavior. In addition, native properties are either editable +or read-only. User properties have no effect on \fBZFS\fR behavior, but you can +use them to annotate datasets in a way that is meaningful in your environment. +For more information about user properties, see the "User Properties" section, +below. +.sp +.LP +Every dataset has a set of properties that export statistics about the dataset +as well as control various behaviors. Properties are inherited from the parent +unless overridden by the child. Some properties apply only to certain types of +datasets (file systems, volumes, or snapshots). +.sp +.LP +The values of numeric properties can be specified using human-readable suffixes +(for example, \fBk\fR, \fBKB\fR, \fBM\fR, \fBGb\fR, and so forth, up to \fBZ\fR +for zettabyte). The following are all valid (and equal) specifications: +.sp +.in +2 +.nf +1536M, 1.5g, 1.50GB +.fi +.in -2 +.sp + +.sp +.LP +The values of non-numeric properties are case sensitive and must be lowercase, +except for \fBmountpoint\fR, \fBsharenfs\fR, and \fBsharesmb\fR. +.sp +.LP +The following native properties consist of read-only statistics about the +dataset. These properties can be neither set, nor inherited. Native properties +apply to all dataset types unless otherwise noted. +.sp +.ne 2 +.na +\fB\fBavailable\fR\fR +.ad +.sp .6 +.RS 4n +The amount of space available to the dataset and all its children, assuming +that there is no other activity in the pool. Because space is shared within a +pool, availability can be limited by any number of factors, including physical +pool size, quotas, reservations, or other datasets within the pool. +.sp +This property can also be referred to by its shortened column name, +\fBavail\fR. +.RE + +.sp +.ne 2 +.na +\fB\fBcompressratio\fR\fR +.ad +.sp .6 +.RS 4n +For non-snapshots, the compression ratio achieved for the \fBused\fR +space of this dataset, expressed as a multiplier. The \fBused\fR +property includes descendant datasets, and, for clones, does not include +the space shared with the origin snapshot. For snapshots, the +\fBcompressratio\fR is the same as the \fBrefcompressratio\fR property. +Compression can be turned on by running: \fBzfs set compression=on +\fIdataset\fR\fR. The default value is \fBoff\fR. +.RE + +.sp +.ne 2 +.na +\fB\fBcreation\fR\fR +.ad +.sp .6 +.RS 4n +The time this dataset was created. +.RE + +.sp +.ne 2 +.na +\fB\fBclones\fR\fR +.ad +.sp .6 +.RS 4n +For snapshots, this property is a comma-separated list of filesystems or +volumes which are clones of this snapshot. The clones' \fBorigin\fR property +is this snapshot. If the \fBclones\fR property is not empty, then this +snapshot can not be destroyed (even with the \fB-r\fR or \fB-f\fR options). +.RE + +.sp +.ne 2 +.na +\fB\fBdefer_destroy\fR\fR +.ad +.sp .6 +.RS 4n +This property is \fBon\fR if the snapshot has been marked for deferred destroy +by using the \fBzfs destroy\fR \fB-d\fR command. Otherwise, the property is +\fBoff\fR. +.RE + +.sp +.ne 2 +.na +\fB\fBmounted\fR\fR *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 08:21:09 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2010C106566B; Sun, 1 Jul 2012 08:21:09 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0A80B8FC18; Sun, 1 Jul 2012 08:21:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q618L8o8076907; Sun, 1 Jul 2012 08:21:08 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q618L8uP076905; Sun, 1 Jul 2012 08:21:08 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201207010821.q618L8uP076905@svn.freebsd.org> From: Michael Tuexen Date: Sun, 1 Jul 2012 08:21:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237906 - stable/9/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 08:21:09 -0000 Author: tuexen Date: Sun Jul 1 08:21:08 2012 New Revision: 237906 URL: http://svn.freebsd.org/changeset/base/237906 Log: MFC r236522: Remove code which is not needed. Modified: stable/9/sys/netinet/sctp_pcb.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp_pcb.c ============================================================================== --- stable/9/sys/netinet/sctp_pcb.c Sun Jul 1 08:20:13 2012 (r237905) +++ stable/9/sys/netinet/sctp_pcb.c Sun Jul 1 08:21:08 2012 (r237906) @@ -2187,8 +2187,6 @@ sctp_findassociation_addr(struct mbuf *m from6->sin6_addr = ip6->ip6_src; from6->sin6_port = sh->src_port; /* Get the scopes in properly to the sin6 addr's */ - /* we probably don't need these operations */ - (void)sa6_recoverscope(from6); sa6_embedscope(from6, MODULE_GLOBAL(ip6_use_defzone)); break; } @@ -2230,8 +2228,6 @@ sctp_findassociation_addr(struct mbuf *m to6->sin6_addr = ip6->ip6_dst; to6->sin6_port = sh->dest_port; /* Get the scopes in properly to the sin6 addr's */ - /* we probably don't need these operations */ - (void)sa6_recoverscope(to6); sa6_embedscope(to6, MODULE_GLOBAL(ip6_use_defzone)); break; } From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 08:23:17 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 26A351065673; Sun, 1 Jul 2012 08:23:17 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 11BA18FC15; Sun, 1 Jul 2012 08:23:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q618NG1v077060; Sun, 1 Jul 2012 08:23:16 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q618NGXj077058; Sun, 1 Jul 2012 08:23:16 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201207010823.q618NGXj077058@svn.freebsd.org> From: Michael Tuexen Date: Sun, 1 Jul 2012 08:23:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237907 - stable/9/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 08:23:17 -0000 Author: tuexen Date: Sun Jul 1 08:23:16 2012 New Revision: 237907 URL: http://svn.freebsd.org/changeset/base/237907 Log: MFC r236640: The cmsg_len field includes the cmsg header. So use CMSG_LEN(). Modified: stable/9/share/man/man4/ip.4 Directory Properties: stable/9/share/ (props changed) stable/9/share/man/ (props changed) stable/9/share/man/man4/ (props changed) Modified: stable/9/share/man/man4/ip.4 ============================================================================== --- stable/9/share/man/man4/ip.4 Sun Jul 1 08:21:08 2012 (r237906) +++ stable/9/share/man/man4/ip.4 Sun Jul 1 08:23:16 2012 (r237907) @@ -165,7 +165,7 @@ The .Vt cmsghdr fields have the following values: .Bd -literal -cmsg_len = sizeof(struct in_addr) +cmsg_len = CMSG_LEN(sizeof(struct in_addr)) cmsg_level = IPPROTO_IP cmsg_type = IP_RECVDSTADDR .Ed @@ -184,7 +184,7 @@ structure followed by the address. The cmsghdr fields should have the following values: .Bd -literal -cmsg_len = sizeof(struct in_addr) +cmsg_len = CMSG_LEN(sizeof(struct in_addr)) cmsg_level = IPPROTO_IP cmsg_type = IP_SENDSRCADDR .Ed @@ -279,7 +279,7 @@ that contains a cmsghdr structure follow .Tn TTL . The cmsghdr fields have the following values: .Bd -literal -cmsg_len = sizeof(u_char) +cmsg_len = CMSG_LEN(sizeof(u_char)) cmsg_level = IPPROTO_IP cmsg_type = IP_RECVTTL .Ed @@ -307,7 +307,7 @@ The .Vt cmsghdr fields have the following values: .Bd -literal -cmsg_len = sizeof(struct sockaddr_dl) +cmsg_len = CMSG_LEN(sizeof(struct sockaddr_dl)) cmsg_level = IPPROTO_IP cmsg_type = IP_RECVIF .Ed From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 08:27:03 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 50B02106566C; Sun, 1 Jul 2012 08:27:03 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3BC318FC14; Sun, 1 Jul 2012 08:27:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q618R3nr077286; Sun, 1 Jul 2012 08:27:03 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q618R3P9077284; Sun, 1 Jul 2012 08:27:03 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201207010827.q618R3P9077284@svn.freebsd.org> From: Michael Tuexen Date: Sun, 1 Jul 2012 08:27:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237908 - stable/9/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 08:27:03 -0000 Author: tuexen Date: Sun Jul 1 08:27:02 2012 New Revision: 237908 URL: http://svn.freebsd.org/changeset/base/237908 Log: MFC r236949: Small cleanup. Modified: stable/9/sys/netinet/sctputil.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctputil.c ============================================================================== --- stable/9/sys/netinet/sctputil.c Sun Jul 1 08:23:16 2012 (r237907) +++ stable/9/sys/netinet/sctputil.c Sun Jul 1 08:27:02 2012 (r237908) @@ -2573,15 +2573,13 @@ sctp_pad_lastmbuf(struct mbuf *m, int pa /* find the last mbuf in chain and pad it */ struct mbuf *m_at; - m_at = m; if (last_mbuf) { return (sctp_add_pad_tombuf(last_mbuf, padval)); } else { - while (m_at) { + for (m_at = m; m_at; m_at = SCTP_BUF_NEXT(m_at)) { if (SCTP_BUF_NEXT(m_at) == NULL) { return (sctp_add_pad_tombuf(m_at, padval)); } - m_at = SCTP_BUF_NEXT(m_at); } } SCTP_LTRACE_ERR_RET_PKT(m, NULL, NULL, NULL, SCTP_FROM_SCTPUTIL, EFAULT); From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 08:32:49 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8EF20106566B; Sun, 1 Jul 2012 08:32:49 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 797C78FC08; Sun, 1 Jul 2012 08:32:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q618WnE7077597; Sun, 1 Jul 2012 08:32:49 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q618Wn3o077595; Sun, 1 Jul 2012 08:32:49 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201207010832.q618Wn3o077595@svn.freebsd.org> From: Michael Tuexen Date: Sun, 1 Jul 2012 08:32:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237909 - stable/9/sys/netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 08:32:49 -0000 Author: tuexen Date: Sun Jul 1 08:32:48 2012 New Revision: 237909 URL: http://svn.freebsd.org/changeset/base/237909 Log: MFC r236958: Deliver IPV6_TCLASS, IPV6_HOPLIMIT and IPV6_PKTINFO cmsgs (if requested) on IPV6 sockets, which have been marked to be not IPV6_V6ONLY, for each received IPV4 packet. Modified: stable/9/sys/netinet6/ip6_input.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet6/ip6_input.c ============================================================================== --- stable/9/sys/netinet6/ip6_input.c Sun Jul 1 08:27:02 2012 (r237908) +++ stable/9/sys/netinet6/ip6_input.c Sun Jul 1 08:32:48 2012 (r237909) @@ -1299,19 +1299,28 @@ ip6_savecontrol_v4(struct inpcb *inp, st } #endif - if ((ip6->ip6_vfc & IPV6_VERSION_MASK) != IPV6_VERSION) { - if (v4only != NULL) - *v4only = 1; - return (mp); - } - #define IS2292(inp, x, y) (((inp)->inp_flags & IN6P_RFC2292) ? (x) : (y)) /* RFC 2292 sec. 5 */ if ((inp->inp_flags & IN6P_PKTINFO) != 0) { struct in6_pktinfo pi6; - bcopy(&ip6->ip6_dst, &pi6.ipi6_addr, sizeof(struct in6_addr)); - in6_clearscope(&pi6.ipi6_addr); /* XXX */ + if ((ip6->ip6_vfc & IPV6_VERSION_MASK) != IPV6_VERSION) { +#ifdef INET + struct ip *ip; + + ip = mtod(m, struct ip *); + pi6.ipi6_addr.s6_addr32[0] = 0; + pi6.ipi6_addr.s6_addr32[1] = 0; + pi6.ipi6_addr.s6_addr32[2] = IPV6_ADDR_INT32_SMP; + pi6.ipi6_addr.s6_addr32[3] = ip->ip_dst.s_addr; +#else + /* We won't hit this code */ + bzero(&pi6.ipi6_addr, sizeof(struct in6_addr)); +#endif + } else { + bcopy(&ip6->ip6_dst, &pi6.ipi6_addr, sizeof(struct in6_addr)); + in6_clearscope(&pi6.ipi6_addr); /* XXX */ + } pi6.ipi6_ifindex = (m && m->m_pkthdr.rcvif) ? m->m_pkthdr.rcvif->if_index : 0; @@ -1323,8 +1332,21 @@ ip6_savecontrol_v4(struct inpcb *inp, st } if ((inp->inp_flags & IN6P_HOPLIMIT) != 0) { - int hlim = ip6->ip6_hlim & 0xff; + int hlim; + + if ((ip6->ip6_vfc & IPV6_VERSION_MASK) != IPV6_VERSION) { +#ifdef INET + struct ip *ip; + ip = mtod(m, struct ip *); + hlim = ip->ip_ttl; +#else + /* We won't hit this code */ + hlim = 0; +#endif + } else { + hlim = ip6->ip6_hlim & 0xff; + } *mp = sbcreatecontrol((caddr_t) &hlim, sizeof(int), IS2292(inp, IPV6_2292HOPLIMIT, IPV6_HOPLIMIT), IPPROTO_IPV6); @@ -1332,8 +1354,40 @@ ip6_savecontrol_v4(struct inpcb *inp, st mp = &(*mp)->m_next; } - if (v4only != NULL) - *v4only = 0; + if ((inp->inp_flags & IN6P_TCLASS) != 0) { + int tclass; + + if ((ip6->ip6_vfc & IPV6_VERSION_MASK) != IPV6_VERSION) { +#ifdef INET + struct ip *ip; + + ip = mtod(m, struct ip *); + tclass = ip->ip_tos; +#else + /* We won't hit this code */ + tclass = 0; +#endif + } else { + u_int32_t flowinfo; + + flowinfo = (u_int32_t)ntohl(ip6->ip6_flow & IPV6_FLOWINFO_MASK); + flowinfo >>= 20; + tclass = flowinfo & 0xff; + } + *mp = sbcreatecontrol((caddr_t) &tclass, sizeof(int), + IPV6_TCLASS, IPPROTO_IPV6); + if (*mp) + mp = &(*mp)->m_next; + } + + if (v4only != NULL) { + if ((ip6->ip6_vfc & IPV6_VERSION_MASK) != IPV6_VERSION) { + *v4only = 1; + } else { + *v4only = 0; + } + } + return (mp); } @@ -1347,20 +1401,6 @@ ip6_savecontrol(struct inpcb *in6p, stru if (v4only) return; - if ((in6p->inp_flags & IN6P_TCLASS) != 0) { - u_int32_t flowinfo; - int tclass; - - flowinfo = (u_int32_t)ntohl(ip6->ip6_flow & IPV6_FLOWINFO_MASK); - flowinfo >>= 20; - - tclass = flowinfo & 0xff; - *mp = sbcreatecontrol((caddr_t) &tclass, sizeof(tclass), - IPV6_TCLASS, IPPROTO_IPV6); - if (*mp) - mp = &(*mp)->m_next; - } - /* * IPV6_HOPOPTS socket option. Recall that we required super-user * privilege for the option (see ip6_ctloutput), but it might be too From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 08:47:16 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 97423106566C; Sun, 1 Jul 2012 08:47:16 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 774B28FC14; Sun, 1 Jul 2012 08:47:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q618lGVZ078259; Sun, 1 Jul 2012 08:47:16 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q618lG5n078251; Sun, 1 Jul 2012 08:47:16 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201207010847.q618lG5n078251@svn.freebsd.org> From: Michael Tuexen Date: Sun, 1 Jul 2012 08:47:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237910 - in stable/9: share/man/man4 sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 08:47:16 -0000 Author: tuexen Date: Sun Jul 1 08:47:15 2012 New Revision: 237910 URL: http://svn.freebsd.org/changeset/base/237910 Log: MFC r236959: Add a IP_RECVTOS socket option to receive for received UDP/IPv4 packets a cmsg of type IP_RECVTOS which contains the TOS byte. Much like IP_RECVTTL does for TTL. This allows to implement a protocol on top of UDP and implementing ECN. Modified: stable/9/share/man/man4/ip.4 stable/9/sys/netinet/in.h stable/9/sys/netinet/in_pcb.c stable/9/sys/netinet/in_pcb.h stable/9/sys/netinet/ip_input.c stable/9/sys/netinet/ip_output.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/share/man/man4/ip.4 ============================================================================== --- stable/9/share/man/man4/ip.4 Sun Jul 1 08:32:48 2012 (r237909) +++ stable/9/share/man/man4/ip.4 Sun Jul 1 08:47:15 2012 (r237910) @@ -32,7 +32,7 @@ .\" @(#)ip.4 8.2 (Berkeley) 11/30/93 .\" $FreeBSD$ .\" -.Dd June 1, 2009 +.Dd June 12, 2012 .Dt IP 4 .Os .Sh NAME @@ -286,6 +286,29 @@ cmsg_type = IP_RECVTTL .\" .Pp If the +.Dv IP_RECVTOS +option is enabled on a +.Dv SOCK_DGRAM +socket, the +.Xr recvmsg 2 +call will return the +.Tn IP +.Tn TOS +(type of service) field for a +.Tn UDP +datagram. +The msg_control field in the msghdr structure points to a buffer +that contains a cmsghdr structure followed by the +.Tn TOS . +The cmsghdr fields have the following values: +.Bd -literal +cmsg_len = CMSG_LEN(sizeof(u_char)) +cmsg_level = IPPROTO_IP +cmsg_type = IP_RECVTOS +.Ed +.\" +.Pp +If the .Dv IP_RECVIF option is enabled on a .Dv SOCK_DGRAM Modified: stable/9/sys/netinet/in.h ============================================================================== --- stable/9/sys/netinet/in.h Sun Jul 1 08:32:48 2012 (r237909) +++ stable/9/sys/netinet/in.h Sun Jul 1 08:47:15 2012 (r237910) @@ -461,6 +461,7 @@ __END_DECLS #define IP_RECVTTL 65 /* bool; receive IP TTL w/dgram */ #define IP_MINTTL 66 /* minimum TTL for packet or drop */ #define IP_DONTFRAG 67 /* don't fragment packet */ +#define IP_RECVTOS 68 /* bool; receive IP TOS w/dgram */ /* IPv4 Source Filter Multicast API [RFC3678] */ #define IP_ADD_SOURCE_MEMBERSHIP 70 /* join a source-specific group */ Modified: stable/9/sys/netinet/in_pcb.c ============================================================================== --- stable/9/sys/netinet/in_pcb.c Sun Jul 1 08:32:48 2012 (r237909) +++ stable/9/sys/netinet/in_pcb.c Sun Jul 1 08:47:15 2012 (r237910) @@ -2295,6 +2295,10 @@ db_print_inpflags(int inp_flags) db_printf("%sINP_DONTFRAG", comma ? ", " : ""); comma = 1; } + if (inp_flags & INP_RECVTOS) { + db_printf("%sINP_RECVTOS", comma ? ", " : ""); + comma = 1; + } if (inp_flags & IN6P_IPV6_V6ONLY) { db_printf("%sIN6P_IPV6_V6ONLY", comma ? ", " : ""); comma = 1; Modified: stable/9/sys/netinet/in_pcb.h ============================================================================== --- stable/9/sys/netinet/in_pcb.h Sun Jul 1 08:32:48 2012 (r237909) +++ stable/9/sys/netinet/in_pcb.h Sun Jul 1 08:47:15 2012 (r237910) @@ -509,6 +509,7 @@ void inp_4tuple_get(struct inpcb *inp, #define INP_DONTFRAG 0x00000800 /* don't fragment packet */ #define INP_BINDANY 0x00001000 /* allow bind to any address */ #define INP_INHASHLIST 0x00002000 /* in_pcbinshash() has been called */ +#define INP_RECVTOS 0x00004000 /* receive incoming IP TOS */ #define IN6P_IPV6_V6ONLY 0x00008000 /* restrict AF_INET6 socket for v6 */ #define IN6P_PKTINFO 0x00010000 /* receive IP6 dst and I/F */ #define IN6P_HOPLIMIT 0x00020000 /* receive hoplimit */ @@ -528,7 +529,7 @@ void inp_4tuple_get(struct inpcb *inp, #define IN6P_MTU 0x80000000 /* receive path MTU */ #define INP_CONTROLOPTS (INP_RECVOPTS|INP_RECVRETOPTS|INP_RECVDSTADDR|\ - INP_RECVIF|INP_RECVTTL|\ + INP_RECVIF|INP_RECVTTL|INP_RECVTOS|\ IN6P_PKTINFO|IN6P_HOPLIMIT|IN6P_HOPOPTS|\ IN6P_DSTOPTS|IN6P_RTHDR|IN6P_RTHDRDSTOPTS|\ IN6P_TCLASS|IN6P_AUTOFLOWLABEL|IN6P_RFC2292|\ Modified: stable/9/sys/netinet/ip_input.c ============================================================================== --- stable/9/sys/netinet/ip_input.c Sun Jul 1 08:32:48 2012 (r237909) +++ stable/9/sys/netinet/ip_input.c Sun Jul 1 08:47:15 2012 (r237910) @@ -1684,6 +1684,12 @@ makedummy: if (*mp) mp = &(*mp)->m_next; } + if (inp->inp_flags & INP_RECVTOS) { + *mp = sbcreatecontrol((caddr_t) &ip->ip_tos, + sizeof(u_char), IP_RECVTOS, IPPROTO_IP); + if (*mp) + mp = &(*mp)->m_next; + } } /* Modified: stable/9/sys/netinet/ip_output.c ============================================================================== --- stable/9/sys/netinet/ip_output.c Sun Jul 1 08:32:48 2012 (r237909) +++ stable/9/sys/netinet/ip_output.c Sun Jul 1 08:47:15 2012 (r237910) @@ -984,6 +984,7 @@ ip_ctloutput(struct socket *so, struct s case IP_FAITH: case IP_ONESBCAST: case IP_DONTFRAG: + case IP_RECVTOS: error = sooptcopyin(sopt, &optval, sizeof optval, sizeof optval); if (error) @@ -1047,6 +1048,9 @@ ip_ctloutput(struct socket *so, struct s case IP_BINDANY: OPTSET(INP_BINDANY); break; + case IP_RECVTOS: + OPTSET(INP_RECVTOS); + break; } break; #undef OPTSET @@ -1156,6 +1160,7 @@ ip_ctloutput(struct socket *so, struct s case IP_ONESBCAST: case IP_DONTFRAG: case IP_BINDANY: + case IP_RECVTOS: switch (sopt->sopt_name) { case IP_TOS: @@ -1214,6 +1219,9 @@ ip_ctloutput(struct socket *so, struct s case IP_BINDANY: optval = OPTBIT(INP_BINDANY); break; + case IP_RECVTOS: + optval = OPTBIT(INP_RECVTOS); + break; } error = sooptcopyout(sopt, &optval, sizeof optval); break; From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 08:53:56 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2D13E106564A; Sun, 1 Jul 2012 08:53:56 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 16EDF8FC14; Sun, 1 Jul 2012 08:53:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q618rtKG078564; Sun, 1 Jul 2012 08:53:55 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q618rtdT078562; Sun, 1 Jul 2012 08:53:55 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201207010853.q618rtdT078562@svn.freebsd.org> From: Michael Tuexen Date: Sun, 1 Jul 2012 08:53:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237911 - stable/9/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 08:53:56 -0000 Author: tuexen Date: Sun Jul 1 08:53:55 2012 New Revision: 237911 URL: http://svn.freebsd.org/changeset/base/237911 Log: MFC r236961: Add a cmsg of type IP_TOS for UDP/IPv4 sockets to specify the TOS byte. Modified: stable/9/sys/netinet/udp_usrreq.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/udp_usrreq.c ============================================================================== --- stable/9/sys/netinet/udp_usrreq.c Sun Jul 1 08:47:15 2012 (r237910) +++ stable/9/sys/netinet/udp_usrreq.c Sun Jul 1 08:53:55 2012 (r237911) @@ -956,6 +956,7 @@ udp_output(struct inpcb *inp, struct mbu int ipflags; u_short fport, lport; int unlock_udbinfo; + u_char tos; /* * udp_output() may need to temporarily bind or connect the current @@ -971,6 +972,7 @@ udp_output(struct inpcb *inp, struct mbu } src.sin_family = 0; + tos = inp->inp_ip_tos; if (control != NULL) { /* * XXX: Currently, we assume all the optional information is @@ -1008,6 +1010,14 @@ udp_output(struct inpcb *inp, struct mbu *(struct in_addr *)CMSG_DATA(cm); break; + case IP_TOS: + if (cm->cmsg_len != CMSG_LEN(sizeof(u_char))) { + error = EINVAL; + break; + } + tos = *(u_char *)CMSG_DATA(cm); + break; + default: error = ENOPROTOOPT; break; @@ -1223,7 +1233,7 @@ udp_output(struct inpcb *inp, struct mbu ui->ui_sum = 0; ((struct ip *)ui)->ip_len = sizeof (struct udpiphdr) + len; ((struct ip *)ui)->ip_ttl = inp->inp_ip_ttl; /* XXX */ - ((struct ip *)ui)->ip_tos = inp->inp_ip_tos; /* XXX */ + ((struct ip *)ui)->ip_tos = tos; /* XXX */ UDPSTAT_INC(udps_opackets); if (unlock_udbinfo == UH_WLOCKED) From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 08:57:29 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2D4931065672; Sun, 1 Jul 2012 08:57:29 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0F0F58FC14; Sun, 1 Jul 2012 08:57:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q618vS9n078779; Sun, 1 Jul 2012 08:57:28 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q618vSvn078777; Sun, 1 Jul 2012 08:57:28 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201207010857.q618vSvn078777@svn.freebsd.org> From: Michael Tuexen Date: Sun, 1 Jul 2012 08:57:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237912 - stable/9/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 08:57:29 -0000 Author: tuexen Date: Sun Jul 1 08:57:28 2012 New Revision: 237912 URL: http://svn.freebsd.org/changeset/base/237912 Log: MFC r237229: Cleanup the UDP decapsulation code. Modified: stable/9/sys/netinet/sctputil.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctputil.c ============================================================================== --- stable/9/sys/netinet/sctputil.c Sun Jul 1 08:53:55 2012 (r237911) +++ stable/9/sys/netinet/sctputil.c Sun Jul 1 08:57:28 2012 (r237912) @@ -6827,83 +6827,61 @@ sctp_recv_udp_tunneled_packet(struct mbu struct ip *iph; struct mbuf *sp, *last; struct udphdr *uhdr; - uint16_t port = 0; - int header_size = sizeof(struct udphdr) + sizeof(struct sctphdr); + uint16_t port; - /* - * Split out the mbuf chain. Leave the IP header in m, place the - * rest in the sp. - */ if ((m->m_flags & M_PKTHDR) == 0) { /* Can't handle one that is not a pkt hdr */ goto out; } - /* pull the src port */ + /* Pull the src port */ iph = mtod(m, struct ip *); uhdr = (struct udphdr *)((caddr_t)iph + off); - port = uhdr->uh_sport; + /* + * Split out the mbuf chain. Leave the IP header in m, place the + * rest in the sp. + */ sp = m_split(m, off, M_DONTWAIT); if (sp == NULL) { /* Gak, drop packet, we can't do a split */ goto out; } - if (sp->m_pkthdr.len < header_size) { - /* Gak, packet can't have an SCTP header in it - to small */ + if (sp->m_pkthdr.len < sizeof(struct udphdr) + sizeof(struct sctphdr)) { + /* Gak, packet can't have an SCTP header in it - too small */ m_freem(sp); goto out; } - /* ok now pull up the UDP header and SCTP header together */ - sp = m_pullup(sp, header_size); + /* Now pull up the UDP header and SCTP header together */ + sp = m_pullup(sp, sizeof(struct udphdr) + sizeof(struct sctphdr)); if (sp == NULL) { /* Gak pullup failed */ goto out; } - /* trim out the UDP header */ + /* Trim out the UDP header */ m_adj(sp, sizeof(struct udphdr)); /* Now reconstruct the mbuf chain */ - /* 1) find last one */ - last = m; - while (last->m_next != NULL) { - last = last->m_next; - } + for (last = m; last->m_next; last = last->m_next); last->m_next = sp; m->m_pkthdr.len += sp->m_pkthdr.len; - last = m; - while (last != NULL) { - last = last->m_next; - } - /* Now its ready for sctp_input or sctp6_input */ iph = mtod(m, struct ip *); switch (iph->ip_v) { #ifdef INET case IPVERSION: - { - uint16_t len; - - /* its IPv4 */ - len = SCTP_GET_IPV4_LENGTH(iph); - len -= sizeof(struct udphdr); - SCTP_GET_IPV4_LENGTH(iph) = len; - sctp_input_with_port(m, off, port); - break; - } + iph->ip_len -= sizeof(struct udphdr); + sctp_input_with_port(m, off, port); + break; #endif #ifdef INET6 case IPV6_VERSION >> 4: - { - /* its IPv6 - NOT supported */ - goto out; - break; + /* Not yet supported. */ + goto out; + break; - } #endif default: - { - m_freem(m); - break; - } + goto out; + break; } return; out: From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 09:00:30 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9E566106566C; Sun, 1 Jul 2012 09:00:30 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6FCA48FC0A; Sun, 1 Jul 2012 09:00:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6190UU8078963; Sun, 1 Jul 2012 09:00:30 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6190UBQ078959; Sun, 1 Jul 2012 09:00:30 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201207010900.q6190UBQ078959@svn.freebsd.org> From: Michael Tuexen Date: Sun, 1 Jul 2012 09:00:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237913 - stable/9/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 09:00:30 -0000 Author: tuexen Date: Sun Jul 1 09:00:29 2012 New Revision: 237913 URL: http://svn.freebsd.org/changeset/base/237913 Log: MFC r237230: Add rate limitation for SCTP OOTB responses. Modified: stable/9/sys/netinet/icmp_var.h stable/9/sys/netinet/ip_icmp.c stable/9/sys/netinet/sctp_input.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/icmp_var.h ============================================================================== --- stable/9/sys/netinet/icmp_var.h Sun Jul 1 08:57:28 2012 (r237912) +++ stable/9/sys/netinet/icmp_var.h Sun Jul 1 09:00:29 2012 (r237913) @@ -102,7 +102,8 @@ extern int badport_bandlim(int); #define BANDLIM_RST_CLOSEDPORT 3 /* No connection, and no listeners */ #define BANDLIM_RST_OPENPORT 4 /* No connection, listener */ #define BANDLIM_ICMP6_UNREACH 5 -#define BANDLIM_MAX 5 +#define BANDLIM_SCTP_OOTB 6 +#define BANDLIM_MAX 6 #endif #endif Modified: stable/9/sys/netinet/ip_icmp.c ============================================================================== --- stable/9/sys/netinet/ip_icmp.c Sun Jul 1 08:57:28 2012 (r237912) +++ stable/9/sys/netinet/ip_icmp.c Sun Jul 1 09:00:29 2012 (r237913) @@ -965,7 +965,8 @@ badport_bandlim(int which) { "icmp tstamp response" }, { "closed port RST response" }, { "open port RST response" }, - { "icmp6 unreach response" } + { "icmp6 unreach response" }, + { "sctp ootb response" } }; /* Modified: stable/9/sys/netinet/sctp_input.c ============================================================================== --- stable/9/sys/netinet/sctp_input.c Sun Jul 1 08:57:28 2012 (r237912) +++ stable/9/sys/netinet/sctp_input.c Sun Jul 1 09:00:29 2012 (r237913) @@ -5972,15 +5972,8 @@ sctp_skip_csum_4: struct sctp_init_chunk *init_chk, chunk_buf; SCTP_STAT_INCR(sctps_noport); -#ifdef ICMP_BANDLIM - /* - * we use the bandwidth limiting to protect against sending - * too many ABORTS all at once. In this case these count the - * same as an ICMP message. - */ - if (badport_bandlim(0) < 0) + if (badport_bandlim(BANDLIM_SCTP_OOTB) < 0) goto bad; -#endif /* ICMP_BANDLIM */ SCTPDBG(SCTP_DEBUG_INPUT1, "Sending a ABORT from packet entry!\n"); if (ch->chunk_type == SCTP_INITIATION) { From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 09:03:38 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4D7F21065672; Sun, 1 Jul 2012 09:03:38 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 38EB88FC08; Sun, 1 Jul 2012 09:03:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6193cYs079137; Sun, 1 Jul 2012 09:03:38 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6193cf9079135; Sun, 1 Jul 2012 09:03:38 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201207010903.q6193cf9079135@svn.freebsd.org> From: Michael Tuexen Date: Sun, 1 Jul 2012 09:03:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237914 - stable/9/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 09:03:38 -0000 Author: tuexen Date: Sun Jul 1 09:03:37 2012 New Revision: 237914 URL: http://svn.freebsd.org/changeset/base/237914 Log: MFC r237392: Remove redundant #ifdef. Reported by gnn@. Modified: stable/9/sys/netinet/sctp_usrreq.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp_usrreq.c ============================================================================== --- stable/9/sys/netinet/sctp_usrreq.c Sun Jul 1 09:00:29 2012 (r237913) +++ stable/9/sys/netinet/sctp_usrreq.c Sun Jul 1 09:03:37 2012 (r237914) @@ -6476,7 +6476,6 @@ sctp_peeraddr(struct socket *so, struct return (0); } -#ifdef INET struct pr_usrreqs sctp_usrreqs = { .pru_abort = sctp_abort, .pru_accept = sctp_accept, @@ -6499,4 +6498,3 @@ struct pr_usrreqs sctp_usrreqs = { }; #endif -#endif From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 09:17:55 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D97B7106566B; Sun, 1 Jul 2012 09:17:55 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BA4FB8FC0A; Sun, 1 Jul 2012 09:17:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q619HtxL079822; Sun, 1 Jul 2012 09:17:55 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q619Ht5K079814; Sun, 1 Jul 2012 09:17:55 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201207010917.q619Ht5K079814@svn.freebsd.org> From: Navdeep Parhar Date: Sun, 1 Jul 2012 09:17:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237916 - in stable/9: share/man/man4 sys/dev/cxgb sys/dev/cxgbe sys/modules/cxgb/cxgb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 09:17:56 -0000 Author: np Date: Sun Jul 1 09:17:55 2012 New Revision: 237916 URL: http://svn.freebsd.org/changeset/base/237916 Log: MFC r231317, r235963 (bz@), r234831, r234833. r231317 Add IPv6 TSO (including TSO+VLAN) support to cxgb(4). r235963 (bz@) Allow LRO to work on IPv6 as well. Fix the module Makefile to at least properly inlcude opt_inet6.h and allow builds without INET or INET6. r234831 Make sure that the firmware version is available in dev.t4nex.X.firmware_version even if the driver fails to attach properly. At least it'll be easy to tell what we're dealing with. r234833: Change the default to not use packet counters to generate rx interrupts. Rely solely on the timer based mechanism. Update man page to reflect this change. Modified: stable/9/share/man/man4/cxgbe.4 stable/9/sys/dev/cxgb/cxgb_main.c stable/9/sys/dev/cxgb/cxgb_sge.c stable/9/sys/dev/cxgbe/t4_main.c stable/9/sys/dev/cxgbe/t4_sge.c stable/9/sys/modules/cxgb/cxgb/Makefile Directory Properties: stable/9/share/man/man4/ (props changed) stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/modules/ (props changed) Modified: stable/9/share/man/man4/cxgbe.4 ============================================================================== --- stable/9/share/man/man4/cxgbe.4 Sun Jul 1 09:17:17 2012 (r237915) +++ stable/9/share/man/man4/cxgbe.4 Sun Jul 1 09:17:55 2012 (r237916) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2011, Chelsio Inc +.\" Copyright (c) 2011-2012, Chelsio Inc .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -145,10 +145,9 @@ dev.cxgbe.X.holdoff_tmr_idx sysctl. The packet-count index value to use to delay interrupts. The packet-count list has the values 1, 8, 16, and 32 by default and the index selects a value from this list. -The default value is 2 for both 10Gb and 1Gb ports, which means 16 -packets (or the holdoff timer going off) before an interrupt is -generated. --1 disables packet counting. +The default value is -1 for both 10Gb and 1Gb ports, which means packet +counting is disabled and interrupts are generated based solely on the +holdoff timer value. Different cxgbe interfaces can be assigned different values via the dev.cxgbe.X.holdoff_pktc_idx sysctl. This sysctl works only when the interface has never been marked up (as done by Modified: stable/9/sys/dev/cxgb/cxgb_main.c ============================================================================== --- stable/9/sys/dev/cxgb/cxgb_main.c Sun Jul 1 09:17:17 2012 (r237915) +++ stable/9/sys/dev/cxgb/cxgb_main.c Sun Jul 1 09:17:55 2012 (r237916) @@ -982,7 +982,7 @@ cxgb_makedev(struct port_info *pi) #define CXGB_CAP (IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU | IFCAP_HWCSUM | \ IFCAP_VLAN_HWCSUM | IFCAP_TSO | IFCAP_JUMBO_MTU | IFCAP_LRO | \ IFCAP_VLAN_HWTSO | IFCAP_LINKSTATE) -#define CXGB_CAP_ENABLE (CXGB_CAP & ~IFCAP_TSO6) +#define CXGB_CAP_ENABLE CXGB_CAP static int cxgb_port_attach(device_t dev) @@ -2059,8 +2059,8 @@ fail: } if (mask & IFCAP_RXCSUM) ifp->if_capenable ^= IFCAP_RXCSUM; - if (mask & IFCAP_TSO4) { - ifp->if_capenable ^= IFCAP_TSO4; + if (mask & IFCAP_TSO) { + ifp->if_capenable ^= IFCAP_TSO; if (IFCAP_TSO & ifp->if_capenable) { if (IFCAP_TXCSUM & ifp->if_capenable) Modified: stable/9/sys/dev/cxgb/cxgb_sge.c ============================================================================== --- stable/9/sys/dev/cxgb/cxgb_sge.c Sun Jul 1 09:17:17 2012 (r237915) +++ stable/9/sys/dev/cxgb/cxgb_sge.c Sun Jul 1 09:17:55 2012 (r237916) @@ -30,6 +30,7 @@ POSSIBILITY OF SUCH DAMAGE. #include __FBSDID("$FreeBSD$"); +#include "opt_inet6.h" #include "opt_inet.h" #include @@ -62,6 +63,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -1492,10 +1494,10 @@ t3_encap(struct sge_qset *qs, struct mbu check_ring_tx_db(sc, txq, 0); return (0); } else if (tso_info) { - int eth_type; + uint16_t eth_type; struct cpl_tx_pkt_lso *hdr = (struct cpl_tx_pkt_lso *)txd; struct ether_header *eh; - struct ip *ip; + void *l3hdr; struct tcphdr *tcp; txd->flit[2] = 0; @@ -1521,18 +1523,37 @@ t3_encap(struct sge_qset *qs, struct mbu } eh = mtod(m0, struct ether_header *); - if (eh->ether_type == htons(ETHERTYPE_VLAN)) { - eth_type = CPL_ETH_II_VLAN; - ip = (struct ip *)((struct ether_vlan_header *)eh + 1); + eth_type = eh->ether_type; + if (eth_type == htons(ETHERTYPE_VLAN)) { + struct ether_vlan_header *evh = (void *)eh; + + tso_info |= V_LSO_ETH_TYPE(CPL_ETH_II_VLAN); + l3hdr = evh + 1; + eth_type = evh->evl_proto; } else { - eth_type = CPL_ETH_II; - ip = (struct ip *)(eh + 1); + tso_info |= V_LSO_ETH_TYPE(CPL_ETH_II); + l3hdr = eh + 1; } - tcp = (struct tcphdr *)(ip + 1); - tso_info |= V_LSO_ETH_TYPE(eth_type) | - V_LSO_IPHDR_WORDS(ip->ip_hl) | - V_LSO_TCPHDR_WORDS(tcp->th_off); + if (eth_type == htons(ETHERTYPE_IP)) { + struct ip *ip = l3hdr; + + tso_info |= V_LSO_IPHDR_WORDS(ip->ip_hl); + tcp = (struct tcphdr *)(ip + 1); + } else if (eth_type == htons(ETHERTYPE_IPV6)) { + struct ip6_hdr *ip6 = l3hdr; + + KASSERT(ip6->ip6_nxt == IPPROTO_TCP, + ("%s: CSUM_TSO with ip6_nxt %d", + __func__, ip6->ip6_nxt)); + + tso_info |= F_LSO_IPV6; + tso_info |= V_LSO_IPHDR_WORDS(sizeof(*ip6) >> 2); + tcp = (struct tcphdr *)(ip6 + 1); + } else + panic("%s: CSUM_TSO but neither ip nor ip6", __func__); + + tso_info |= V_LSO_TCPHDR_WORDS(tcp->th_off); hdr->lso_info = htonl(tso_info); if (__predict_false(mlen <= PIO_LEN)) { @@ -2065,7 +2086,7 @@ t3_free_qset(adapter_t *sc, struct sge_q MTX_DESTROY(&q->rspq.lock); } -#ifdef INET +#if defined(INET6) || defined(INET) tcp_lro_free(&q->lro.ctrl); #endif @@ -2648,7 +2669,7 @@ t3_sge_alloc_qset(adapter_t *sc, u_int i /* Allocate and setup the lro_ctrl structure */ q->lro.enabled = !!(pi->ifp->if_capenable & IFCAP_LRO); -#ifdef INET +#if defined(INET6) || defined(INET) ret = tcp_lro_init(&q->lro.ctrl); if (ret) { printf("error %d from tcp_lro_init\n", ret); @@ -2941,9 +2962,11 @@ process_responses(adapter_t *adap, struc struct rsp_desc *r = &rspq->desc[rspq->cidx]; int budget_left = budget; unsigned int sleeping = 0; +#if defined(INET6) || defined(INET) int lro_enabled = qs->lro.enabled; int skip_lro; struct lro_ctrl *lro_ctrl = &qs->lro.ctrl; +#endif struct mbuf *offload_mbufs[RX_BUNDLE_SIZE]; int ngathered = 0; struct t3_mbuf_hdr *mh = &rspq->rspq_mh; @@ -3062,15 +3085,16 @@ process_responses(adapter_t *adap, struc * The mbuf's rcvif was derived from the cpl header and * is accurate. Skip LRO and just use that. */ +#if defined(INET6) || defined(INET) skip_lro = __predict_false(qs->port->ifp != m->m_pkthdr.rcvif); if (lro_enabled && lro_ctrl->lro_cnt && !skip_lro -#ifdef INET && (tcp_lro_rx(lro_ctrl, m, 0) == 0) -#endif ) { /* successfully queue'd for LRO */ - } else { + } else +#endif + { /* * LRO not enabled, packet unsuitable for LRO, * or unable to queue. Pass it up right now in @@ -3089,7 +3113,7 @@ process_responses(adapter_t *adap, struc deliver_partial_bundle(&adap->tdev, rspq, offload_mbufs, ngathered); -#ifdef INET +#if defined(INET6) || defined(INET) /* Flush LRO */ while (!SLIST_EMPTY(&lro_ctrl->lro_active)) { struct lro_entry *queued = SLIST_FIRST(&lro_ctrl->lro_active); Modified: stable/9/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/9/sys/dev/cxgbe/t4_main.c Sun Jul 1 09:17:17 2012 (r237915) +++ stable/9/sys/dev/cxgbe/t4_main.c Sun Jul 1 09:17:55 2012 (r237916) @@ -174,7 +174,7 @@ TUNABLE_INT("hw.cxgbe.nofldrxq1g", &t4_n static int t4_tmr_idx_10g = TMR_IDX_10G; TUNABLE_INT("hw.cxgbe.holdoff_timer_idx_10G", &t4_tmr_idx_10g); -#define PKTC_IDX_10G 2 +#define PKTC_IDX_10G (-1) static int t4_pktc_idx_10g = PKTC_IDX_10G; TUNABLE_INT("hw.cxgbe.holdoff_pktc_idx_10G", &t4_pktc_idx_10g); @@ -182,7 +182,7 @@ TUNABLE_INT("hw.cxgbe.holdoff_pktc_idx_1 static int t4_tmr_idx_1g = TMR_IDX_1G; TUNABLE_INT("hw.cxgbe.holdoff_timer_idx_1G", &t4_tmr_idx_1g); -#define PKTC_IDX_1G 2 +#define PKTC_IDX_1G (-1) static int t4_pktc_idx_1g = PKTC_IDX_1G; TUNABLE_INT("hw.cxgbe.holdoff_pktc_idx_1G", &t4_pktc_idx_1g); @@ -1449,6 +1449,11 @@ prep_firmware(struct adapter *sc) /* Check firmware version and install a different one if necessary */ rc = t4_check_fw_version(sc); + snprintf(sc->fw_version, sizeof(sc->fw_version), "%u.%u.%u.%u", + G_FW_HDR_FW_VER_MAJOR(sc->params.fw_vers), + G_FW_HDR_FW_VER_MINOR(sc->params.fw_vers), + G_FW_HDR_FW_VER_MICRO(sc->params.fw_vers), + G_FW_HDR_FW_VER_BUILD(sc->params.fw_vers)); if (rc != 0) { uint32_t v = 0; @@ -1505,6 +1510,12 @@ prep_firmware(struct adapter *sc) } else { /* refresh */ (void) t4_check_fw_version(sc); + snprintf(sc->fw_version, + sizeof(sc->fw_version), "%u.%u.%u.%u", + G_FW_HDR_FW_VER_MAJOR(sc->params.fw_vers), + G_FW_HDR_FW_VER_MINOR(sc->params.fw_vers), + G_FW_HDR_FW_VER_MICRO(sc->params.fw_vers), + G_FW_HDR_FW_VER_BUILD(sc->params.fw_vers)); } } } @@ -1548,11 +1559,6 @@ prep_firmware(struct adapter *sc) goto done; /* error message displayed already */ } - snprintf(sc->fw_version, sizeof(sc->fw_version), "%u.%u.%u.%u", - G_FW_HDR_FW_VER_MAJOR(sc->params.fw_vers), - G_FW_HDR_FW_VER_MINOR(sc->params.fw_vers), - G_FW_HDR_FW_VER_MICRO(sc->params.fw_vers), - G_FW_HDR_FW_VER_BUILD(sc->params.fw_vers)); sc->flags |= FW_OK; done: Modified: stable/9/sys/dev/cxgbe/t4_sge.c ============================================================================== --- stable/9/sys/dev/cxgbe/t4_sge.c Sun Jul 1 09:17:17 2012 (r237915) +++ stable/9/sys/dev/cxgbe/t4_sge.c Sun Jul 1 09:17:55 2012 (r237916) @@ -1420,9 +1420,12 @@ init_iq(struct sge_iq *iq, struct adapte iq->flags = 0; iq->adapter = sc; - iq->intr_params = V_QINTR_TIMER_IDX(tmr_idx) | - V_QINTR_CNT_EN(pktc_idx >= 0); - iq->intr_pktc_idx = pktc_idx; + iq->intr_params = V_QINTR_TIMER_IDX(tmr_idx); + iq->intr_pktc_idx = SGE_NCOUNTERS - 1; + if (pktc_idx >= 0) { + iq->intr_params |= F_QINTR_CNT_EN; + iq->intr_pktc_idx = pktc_idx; + } iq->qsize = roundup(qsize, 16); /* See FW_IQ_CMD/iqsize */ iq->esize = max(esize, 16); /* See FW_IQ_CMD/iqesize */ strlcpy(iq->lockname, name, sizeof(iq->lockname)); Modified: stable/9/sys/modules/cxgb/cxgb/Makefile ============================================================================== --- stable/9/sys/modules/cxgb/cxgb/Makefile Sun Jul 1 09:17:17 2012 (r237915) +++ stable/9/sys/modules/cxgb/cxgb/Makefile Sun Jul 1 09:17:55 2012 (r237916) @@ -8,9 +8,21 @@ SRCS= cxgb_mc5.c cxgb_vsc8211.c cxgb_ael SRCS+= cxgb_xgmac.c cxgb_vsc7323.c cxgb_t3_hw.c cxgb_main.c cxgb_aq100x.c SRCS+= cxgb_sge.c cxgb_offload.c cxgb_tn1010.c SRCS+= device_if.h bus_if.h pci_if.h -SRCS+= opt_inet.h opt_zero.h opt_sched.h +SRCS+= opt_inet.h opt_inet6.h opt_zero.h opt_sched.h SRCS+= uipc_mvec.c CFLAGS+= -g -DDEFAULT_JUMBO -I${CXGB} +.if !defined(KERNBUILDDIR) +.if ${MK_INET_SUPPORT} != "no" +opt_inet.h: + @echo "#define INET 1" > ${.TARGET} +.endif + +.if ${MK_INET6_SUPPORT} != "no" +opt_inet6.h: + @echo "#define INET6 1" > ${.TARGET} +.endif +.endif + .include From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 09:30:38 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9614D1065670; Sun, 1 Jul 2012 09:30:38 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7F7FF8FC19; Sun, 1 Jul 2012 09:30:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q619Ucns080438; Sun, 1 Jul 2012 09:30:38 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q619UcKb080436; Sun, 1 Jul 2012 09:30:38 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201207010930.q619UcKb080436@svn.freebsd.org> From: Bernhard Schmidt Date: Sun, 1 Jul 2012 09:30:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237917 - stable/9/sys/dev/iwn X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 09:30:38 -0000 Author: bschmidt Date: Sun Jul 1 09:30:37 2012 New Revision: 237917 URL: http://svn.freebsd.org/changeset/base/237917 Log: MFC BA/DELBA fixes: - r234321: Use the M_AMPDU_MPDU flag to determine when to manually set the seqno and use a BA queue. - r235686: Discard frames after a DELBA which where queued during an active BA session. - r235687: remove unused vap variable - r237647: Fix a TX aggregation issue, if after the last compressed BA notification the TX queue is empty, there won't be a TX done notification, effectly resulting in an mbuf leak. The correct way to handle this is to free up mbufs on both BA and TX done notifications up to the last sent seqno. - r237649 (1): We need to defer passing the DELBA request to the firmware until the aggr queue is empty or the firmware will go nuts. PR: kern/167806 (1) Modified: stable/9/sys/dev/iwn/if_iwn.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/iwn/if_iwn.c ============================================================================== --- stable/9/sys/dev/iwn/if_iwn.c Sun Jul 1 09:17:55 2012 (r237916) +++ stable/9/sys/dev/iwn/if_iwn.c Sun Jul 1 09:30:37 2012 (r237917) @@ -2432,23 +2432,66 @@ static void iwn_rx_compressed_ba(struct iwn_softc *sc, struct iwn_rx_desc *desc, struct iwn_rx_data *data) { + struct iwn_ops *ops = &sc->ops; struct ifnet *ifp = sc->sc_ifp; struct iwn_node *wn; struct ieee80211_node *ni; struct iwn_compressed_ba *ba = (struct iwn_compressed_ba *)(desc + 1); struct iwn_tx_ring *txq; + struct iwn_tx_data *txdata; struct ieee80211_tx_ampdu *tap; + struct mbuf *m; uint64_t bitmap; + uint16_t ssn; uint8_t tid; - int ackfailcnt = 0, i, shift; + int ackfailcnt = 0, i, lastidx, qid, *res, shift; bus_dmamap_sync(sc->rxq.data_dmat, data->map, BUS_DMASYNC_POSTREAD); - txq = &sc->txq[le16toh(ba->qid)]; - tap = sc->qid2tap[le16toh(ba->qid)]; + qid = le16toh(ba->qid); + txq = &sc->txq[ba->qid]; + tap = sc->qid2tap[ba->qid]; tid = WME_AC_TO_TID(tap->txa_ac); - ni = tap->txa_ni; - wn = (void *)ni; + wn = (void *)tap->txa_ni; + + res = NULL; + ssn = 0; + if (!IEEE80211_AMPDU_RUNNING(tap)) { + res = tap->txa_private; + ssn = tap->txa_start & 0xfff; + } + + for (lastidx = le16toh(ba->ssn) & 0xff; txq->read != lastidx;) { + txdata = &txq->data[txq->read]; + + /* Unmap and free mbuf. */ + bus_dmamap_sync(txq->data_dmat, txdata->map, + BUS_DMASYNC_POSTWRITE); + bus_dmamap_unload(txq->data_dmat, txdata->map); + m = txdata->m, txdata->m = NULL; + ni = txdata->ni, txdata->ni = NULL; + + KASSERT(ni != NULL, ("no node")); + KASSERT(m != NULL, ("no mbuf")); + + if (m->m_flags & M_TXCB) + ieee80211_process_callback(ni, m, 1); + + m_freem(m); + ieee80211_free_node(ni); + + txq->queued--; + txq->read = (txq->read + 1) % IWN_TX_RING_COUNT; + } + + if (txq->queued == 0 && res != NULL) { + iwn_nic_lock(sc); + ops->ampdu_tx_stop(sc, qid, tid, ssn); + iwn_nic_unlock(sc); + sc->qid2tap[qid] = NULL; + free(res, M_DEVBUF); + return; + } if (wn->agg[tid].bitmap == 0) return; @@ -2460,6 +2503,7 @@ iwn_rx_compressed_ba(struct iwn_softc *s if (wn->agg[tid].nframes > (64 - shift)) return; + ni = tap->txa_ni; bitmap = (le64toh(ba->bitmap) >> shift) & wn->agg[tid].bitmap; for (i = 0; bitmap; i++) { if ((bitmap & 1) == 0) { @@ -2759,19 +2803,20 @@ static void iwn_ampdu_tx_done(struct iwn_softc *sc, int qid, int idx, int nframes, void *stat) { + struct iwn_ops *ops = &sc->ops; struct ifnet *ifp = sc->sc_ifp; struct iwn_tx_ring *ring = &sc->txq[qid]; struct iwn_tx_data *data; struct mbuf *m; struct iwn_node *wn; struct ieee80211_node *ni; - struct ieee80211vap *vap; struct ieee80211_tx_ampdu *tap; uint64_t bitmap; uint32_t *status = stat; uint16_t *aggstatus = stat; + uint16_t ssn; uint8_t tid; - int bit, i, lastidx, seqno, shift, start; + int bit, i, lastidx, *res, seqno, shift, start; #ifdef NOT_YET if (nframes == 1) { @@ -2804,27 +2849,32 @@ iwn_ampdu_tx_done(struct iwn_softc *sc, bitmap |= 1ULL << bit; } tap = sc->qid2tap[qid]; - if (tap != NULL) { - tid = WME_AC_TO_TID(tap->txa_ac); - wn = (void *)tap->txa_ni; - wn->agg[tid].bitmap = bitmap; - wn->agg[tid].startidx = start; - wn->agg[tid].nframes = nframes; + tid = WME_AC_TO_TID(tap->txa_ac); + wn = (void *)tap->txa_ni; + wn->agg[tid].bitmap = bitmap; + wn->agg[tid].startidx = start; + wn->agg[tid].nframes = nframes; + + res = NULL; + ssn = 0; + if (!IEEE80211_AMPDU_RUNNING(tap)) { + res = tap->txa_private; + ssn = tap->txa_start & 0xfff; } seqno = le32toh(*(status + nframes)) & 0xfff; for (lastidx = (seqno & 0xff); ring->read != lastidx;) { data = &ring->data[ring->read]; - KASSERT(data->ni != NULL, ("no node")); - /* Unmap and free mbuf. */ bus_dmamap_sync(ring->data_dmat, data->map, BUS_DMASYNC_POSTWRITE); bus_dmamap_unload(ring->data_dmat, data->map); m = data->m, data->m = NULL; ni = data->ni, data->ni = NULL; - vap = ni->ni_vap; + + KASSERT(ni != NULL, ("no node")); + KASSERT(m != NULL, ("no mbuf")); if (m->m_flags & M_TXCB) ieee80211_process_callback(ni, m, 1); @@ -2836,6 +2886,15 @@ iwn_ampdu_tx_done(struct iwn_softc *sc, ring->read = (ring->read + 1) % IWN_TX_RING_COUNT; } + if (ring->queued == 0 && res != NULL) { + iwn_nic_lock(sc); + ops->ampdu_tx_stop(sc, qid, tid, ssn); + iwn_nic_unlock(sc); + sc->qid2tap[qid] = NULL; + free(res, M_DEVBUF); + return; + } + sc->sc_tx_timer = 0; if (ring->queued < IWN_TX_RING_LOMARK) { sc->qfullmsk &= ~(1 << ring->qid); @@ -3309,18 +3368,20 @@ iwn_tx_data(struct iwn_softc *sc, struct tid = 0; } ac = M_WME_GETAC(m); - - if (IEEE80211_QOS_HAS_SEQ(wh) && - IEEE80211_AMPDU_RUNNING(&ni->ni_tx_ampdu[ac])) { + if (m->m_flags & M_AMPDU_MPDU) { struct ieee80211_tx_ampdu *tap = &ni->ni_tx_ampdu[ac]; - ring = &sc->txq[*(int *)tap->txa_private]; + if (!IEEE80211_AMPDU_RUNNING(tap)) { + m_freem(m); + return EINVAL; + } + + ac = *(int *)tap->txa_private; *(uint16_t *)wh->i_seq = htole16(ni->ni_txseqs[tid] << IEEE80211_SEQ_SEQ_SHIFT); ni->ni_txseqs[tid]++; - } else { - ring = &sc->txq[ac]; } + ring = &sc->txq[ac]; desc = &ring->desc[ring->cur]; data = &ring->data[ring->cur]; @@ -5634,6 +5695,8 @@ iwn_ampdu_tx_start(struct ieee80211com * if ((error = iwn_nic_lock(sc)) != 0) return 0; qid = *(int *)tap->txa_private; + DPRINTF(sc, IWN_DEBUG_XMIT, "%s: ra=%d tid=%d ssn=%d qid=%d\n", + __func__, wn->id, tid, tap->txa_start, qid); ops->ampdu_tx_start(sc, ni, qid, tid, tap->txa_start & 0xfff); iwn_nic_unlock(sc); @@ -5649,10 +5712,14 @@ iwn_ampdu_tx_stop(struct ieee80211_node uint8_t tid = WME_AC_TO_TID(tap->txa_ac); int qid; + sc->sc_addba_stop(ni, tap); + if (tap->txa_private == NULL) return; qid = *(int *)tap->txa_private; + if (sc->txq[qid].queued != 0) + return; if (iwn_nic_lock(sc) != 0) return; ops->ampdu_tx_stop(sc, qid, tid, tap->txa_start & 0xfff); @@ -5660,7 +5727,6 @@ iwn_ampdu_tx_stop(struct ieee80211_node sc->qid2tap[qid] = NULL; free(tap->txa_private, M_DEVBUF); tap->txa_private = NULL; - sc->sc_addba_stop(ni, tap); } static void From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 09:35:15 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D67621065672; Sun, 1 Jul 2012 09:35:15 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C1AC58FC08; Sun, 1 Jul 2012 09:35:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q619ZFRT080698; Sun, 1 Jul 2012 09:35:15 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q619ZFNL080696; Sun, 1 Jul 2012 09:35:15 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201207010935.q619ZFNL080696@svn.freebsd.org> From: Navdeep Parhar Date: Sun, 1 Jul 2012 09:35:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237918 - stable/9/sys/modules/cxgb/cxgb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 09:35:16 -0000 Author: np Date: Sun Jul 1 09:35:15 2012 New Revision: 237918 URL: http://svn.freebsd.org/changeset/base/237918 Log: Partial MFC of r236311 (uqs@): Unbreak make depend. Modified: stable/9/sys/modules/cxgb/cxgb/Makefile Modified: stable/9/sys/modules/cxgb/cxgb/Makefile ============================================================================== --- stable/9/sys/modules/cxgb/cxgb/Makefile Sun Jul 1 09:30:37 2012 (r237917) +++ stable/9/sys/modules/cxgb/cxgb/Makefile Sun Jul 1 09:35:15 2012 (r237918) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + CXGB = ${.CURDIR}/../../../dev/cxgb .PATH: ${CXGB} ${CXGB}/common ${CXGB}/sys From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 10:05:36 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 229ED106566C; Sun, 1 Jul 2012 10:05:36 +0000 (UTC) (envelope-from simon@FreeBSD.org) Received: from emx.nitro.dk (emx.nitro.dk [IPv6:2a01:4f8:120:7384::102]) by mx1.freebsd.org (Postfix) with ESMTP id A6E3C8FC08; Sun, 1 Jul 2012 10:05:35 +0000 (UTC) Received: from mailscan.leto.nitro.dk (mailscan.leto.nitro.dk [127.0.1.4]) by emx.nitro.dk (Postfix) with ESMTP id 8306B200FC5; Sun, 1 Jul 2012 10:05:34 +0000 (UTC) Received: from emx.nitro.dk ([127.0.1.2]) by mailscan.leto.nitro.dk (mailscan.leto.nitro.dk [127.0.1.4]) (amavisd-new, port 10024) with LMTP id we8oOqPAtzT4; Sun, 1 Jul 2012 10:05:32 +0000 (UTC) Received: from [192.168.4.32] (unknown [89.100.2.68]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by emx.nitro.dk (Postfix) with ESMTPSA id C7891200FC3; Sun, 1 Jul 2012 10:05:31 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1278) Content-Type: text/plain; charset=us-ascii From: "Simon L. B. Nielsen" In-Reply-To: <201207010036.q610a7wc050629@svn.freebsd.org> Date: Sun, 1 Jul 2012 11:05:32 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <6AB69681-E87A-493C-AE2C-5B4A9218D455@FreeBSD.org> References: <201207010036.q610a7wc050629@svn.freebsd.org> To: Pedro F. Giffuni X-Mailer: Apple Mail (2.1278) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r237860 - head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 10:05:36 -0000 On 1 Jul 2012, at 01:36, Pedro F. Giffuni wrote: > Author: pfg > Date: Sun Jul 1 00:36:07 2012 > New Revision: 237860 > URL: http://svn.freebsd.org/changeset/base/237860 >=20 > Log: > Import the dtrace llquantize test files from the vendor area. >=20 > Now that we have an illumos vendor area, import the llquantize > test files directly from there to make it easier to track the > code provenance. >=20 > Special thanks to Martin Matuska for populating the illumos > vendor area. >=20 > Requested by: obrien >=20 > Replaced: > head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/ > - copied from r237859, = vendor/illumos/dist/cmd/dtrace/test/tst/common/llquantize/ Don't replace files, and even worse directories, and it breaks svn2cvs. --=20 Simon L. B. Nielsen From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 11:36:36 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 50228106566B; Sun, 1 Jul 2012 11:36:36 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from smtp.fgznet.ch (mail.fgznet.ch [81.92.96.47]) by mx1.freebsd.org (Postfix) with ESMTP id 985D08FC08; Sun, 1 Jul 2012 11:36:35 +0000 (UTC) Received: from deuterium.andreas.nets (dhclient-91-190-14-19.flashcable.ch [91.190.14.19]) by smtp.fgznet.ch (8.13.8/8.13.8/Submit_SMTPAUTH) with ESMTP id q61BN2lH048995; Sun, 1 Jul 2012 13:23:03 +0200 (CEST) (envelope-from andreast@FreeBSD.org) Message-ID: <4FF03316.5050609@FreeBSD.org> Date: Sun, 01 Jul 2012 13:23:02 +0200 From: Andreas Tobler User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.5; rv:13.0) Gecko/20120601 Thunderbird/13.0 MIME-Version: 1.0 To: Konstantin Belousov References: <201206210926.q5L9Q6nR002030@svn.freebsd.org> In-Reply-To: <201206210926.q5L9Q6nR002030@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.64 on 81.92.96.47 Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r237367 - head/sys/fs/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 11:36:36 -0000 On 21.06.12 11:26, Konstantin Belousov wrote: > Author: kib > Date: Thu Jun 21 09:26:06 2012 > New Revision: 237367 > URL: http://svn.freebsd.org/changeset/base/237367 > > Log: > Enable deadlock avoidance code for NFS client. Hm, since this commit I fail with my nfs installworld/kernel. I have a builder which installs world/kernel to a nfs mounted directory. Namely used for cross builds. Now since this commit I get the following when I install kernel to the nfs directory: .. install -o root -g wheel -m 555 zfs.ko.symbols /netboot/sparc64/boot/kernel install: /netboot/sparc64/boot/kernel/zfs.ko.symbols: No such file or directory *** [_kmodinstall] Error code 71 .. The file is there, a local install of the tree works without problems. Reverting to r237366 also makes it work again. The server is a -CURRENT, r237880, The client, -CURRENT too. How can I help to track down the real issue? TIA, Andreas From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 11:44:20 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4C5861065670 for ; Sun, 1 Jul 2012 11:44:20 +0000 (UTC) (envelope-from pfg@freebsd.org) Received: from nm10.bullet.mail.sp2.yahoo.com (nm10.bullet.mail.sp2.yahoo.com [98.139.91.80]) by mx1.freebsd.org (Postfix) with SMTP id 06CFB8FC0A for ; Sun, 1 Jul 2012 11:44:20 +0000 (UTC) Received: from [98.139.91.68] by nm10.bullet.mail.sp2.yahoo.com with NNFMP; 01 Jul 2012 11:44:14 -0000 Received: from [98.139.91.25] by tm8.bullet.mail.sp2.yahoo.com with NNFMP; 01 Jul 2012 11:44:14 -0000 Received: from [127.0.0.1] by omp1025.mail.sp2.yahoo.com with NNFMP; 01 Jul 2012 11:44:14 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 56645.14649.bm@omp1025.mail.sp2.yahoo.com Received: (qmail 16778 invoked by uid 60001); 1 Jul 2012 11:44:13 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1341143053; bh=GYCdA8cZHYhFYq1XETXBK92L8mqPZQb9+ZdOB76IBMk=; h=X-YMail-OSG:Received:X-RocketYMMF:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=zi7DJXMTAg6p7avEF0m7usco5onR5iK36sCIx6NNesdVUUtZoV2OQeevdGSvt5X6PVSIAMibIPaggIG8ocATeJhWPNdO0zlQ6+E3Q4YGxXUmc7ZjLkFSUonCKbYdGgct60SYtn6q4V1ePL9DUV+G0YoVimRTGS07CkZWWOrGqEM= X-YMail-OSG: xiq0aHwVM1krAHMVBs8zmDAqiMZomQpkGNIJuBtTfDkiVUU 7VfoYOiofGYpgZ946rMnGDfi8AzHEYGthQNj4inIhC1Rb9aYklCh.9BHoNea fUlIPhDp3F9u_gebVZzUuhjBBgOghXq4HFfFrv_bBbwU8R4_GKeyWpUW6HLt XwKiaW3u1JqOU_utekDXFRnp.nxCxrPph86R2fNxrT2BM7uLoBdQEUAN_upZ ElOn7JpIELdNFAgTeATDFLZjc8IINIerzMeyfv0zkvLECi89XsxTNXN2EYQm hqUS4D.B4jih7xYUNqe4R1rth2xOK0XYzzcQzIA6ttPdQKDMle7513XDUxq9 3Ltrx4Erj4r1ZfFiSFX.4Xn25hwOPg0HxAatdnf7rUyROMfsrEg8u2SiKoDP RYVNmjS.EaE.bVAOVW4TS0YdAdls90ZcSDFHn_6tmzXx.dt9rH4IMXbKTbZu hpjIg Received: from [200.118.157.7] by web113519.mail.gq1.yahoo.com via HTTP; Sun, 01 Jul 2012 04:44:13 PDT X-RocketYMMF: giffunip X-Mailer: YahooMailClassic/15.0.8 YahooMailWebService/0.8.118.349524 Message-ID: <1341143053.16744.YahooMailClassic@web113519.mail.gq1.yahoo.com> Date: Sun, 1 Jul 2012 04:44:13 -0700 (PDT) From: Pedro Giffuni To: "Simon L. B. Nielsen" In-Reply-To: <6AB69681-E87A-493C-AE2C-5B4A9218D455@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r237860 - head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pfg@freebsd.org List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 11:44:20 -0000 --- Dom 1/7/12, Simon L. B. Nielsen ha scritto: ... > Data: Domenica 1 luglio 2012, 05:05 >=20 > On 1 Jul 2012, at 01:36, Pedro F. Giffuni wrote: >=20 > > Author: pfg > > Date: Sun Jul=A0 1 00:36:07 2012 > > New Revision: 237860 > > URL: http://svn.freebsd.org/changeset/base/237860 > >=20 > > Log: > >=A0 Import the dtrace llquantize test files from the vendor area. > >=20 > >=A0 Now that we have an illumos vendor area, import the llquantize > >=A0 test files directly from there to make it easier to track the > >=A0 code provenance. > >=20 > >=A0 Special thanks to Martin Matuska for populating the illumos > >=A0 vendor area. > >=20 > >=A0 Requested by:=A0=A0=A0 obrien > >=20 > > Replaced: > >=A0 > head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/ > >=A0 =A0=A0=A0- copied from r237859, > vendor/illumos/dist/cmd/dtrace/test/tst/common/llquantize/ >=20 >=20 > Don't replace files, and even worse directories, and it > breaks svn2cvs. >=20 > --=20 Sorry, I though SVN would do the same I did: first remove, then copy. I guess I should do it in two commits next time. Thanks for fixing! Pedro. Ps. I didnt see this mentioned in our svn primer From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 12:00:37 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 91A051065769; Sun, 1 Jul 2012 12:00:37 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 772098FC20; Sun, 1 Jul 2012 12:00:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q61C0b20000534; Sun, 1 Jul 2012 12:00:37 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q61C0bs7000527; Sun, 1 Jul 2012 12:00:37 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201207011200.q61C0bs7000527@svn.freebsd.org> From: Navdeep Parhar Date: Sun, 1 Jul 2012 12:00:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237920 - in stable/9/sys: conf dev/cxgb dev/cxgb/common dev/cxgb/sys dev/cxgb/ulp/iw_cxgb dev/cxgb/ulp/toecore dev/cxgb/ulp/tom dev/cxgbe dev/cxgbe/common dev/cxgbe/tom modules/cxgb mo... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 12:00:37 -0000 Author: np Date: Sun Jul 1 12:00:36 2012 New Revision: 237920 URL: http://svn.freebsd.org/changeset/base/237920 Log: Backport just the sys/{dev,modules}/cxgb{,e}/ parts of r237263, and then disable the TOE and iWARP modules in the Makefiles (they won't compile without the rest of r237263). This reduces diffs between the cxgb/cxgbe drivers in head and 9 and makes it easy to MFC other fixes to 9. Added: stable/9/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_ib_intfc.h - copied unchanged from r237263, head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_ib_intfc.h stable/9/sys/dev/cxgbe/tom/ - copied from r237263, head/sys/dev/cxgbe/tom/ stable/9/sys/modules/cxgbe/tom/ - copied from r237263, head/sys/modules/cxgbe/tom/ Deleted: stable/9/sys/dev/cxgb/cxgb_offload.c stable/9/sys/dev/cxgb/t3cdev.h stable/9/sys/dev/cxgb/ulp/toecore/ stable/9/sys/dev/cxgb/ulp/tom/cxgb_cpl_socket.c stable/9/sys/dev/cxgb/ulp/tom/cxgb_ddp.c stable/9/sys/dev/cxgb/ulp/tom/cxgb_defs.h stable/9/sys/dev/cxgb/ulp/tom/cxgb_t3_ddp.h stable/9/sys/dev/cxgb/ulp/tom/cxgb_tcp.h stable/9/sys/dev/cxgb/ulp/tom/cxgb_tcp_offload.c stable/9/sys/dev/cxgb/ulp/tom/cxgb_tcp_offload.h stable/9/sys/dev/cxgb/ulp/tom/cxgb_tom_sysctl.c stable/9/sys/modules/cxgb/toecore/ Modified: stable/9/sys/conf/files stable/9/sys/dev/cxgb/common/cxgb_ctl_defs.h stable/9/sys/dev/cxgb/cxgb_adapter.h stable/9/sys/dev/cxgb/cxgb_main.c stable/9/sys/dev/cxgb/cxgb_offload.h stable/9/sys/dev/cxgb/cxgb_osdep.h stable/9/sys/dev/cxgb/cxgb_sge.c stable/9/sys/dev/cxgb/sys/mvec.h stable/9/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb.c stable/9/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb.h stable/9/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cm.c stable/9/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cm.h stable/9/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cq.c stable/9/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_dbg.c stable/9/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_ev.c stable/9/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_hal.c stable/9/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_hal.h stable/9/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_mem.c stable/9/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c stable/9/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.h stable/9/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_qp.c stable/9/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_resource.c stable/9/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_user.h stable/9/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_wr.h stable/9/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c stable/9/sys/dev/cxgb/ulp/tom/cxgb_l2t.c stable/9/sys/dev/cxgb/ulp/tom/cxgb_l2t.h stable/9/sys/dev/cxgb/ulp/tom/cxgb_listen.c stable/9/sys/dev/cxgb/ulp/tom/cxgb_toepcb.h stable/9/sys/dev/cxgb/ulp/tom/cxgb_tom.c stable/9/sys/dev/cxgb/ulp/tom/cxgb_tom.h stable/9/sys/dev/cxgbe/adapter.h stable/9/sys/dev/cxgbe/common/t4_hw.c stable/9/sys/dev/cxgbe/offload.h stable/9/sys/dev/cxgbe/t4_l2t.c stable/9/sys/dev/cxgbe/t4_l2t.h stable/9/sys/dev/cxgbe/t4_main.c stable/9/sys/dev/cxgbe/t4_sge.c stable/9/sys/modules/cxgb/Makefile stable/9/sys/modules/cxgb/cxgb/Makefile stable/9/sys/modules/cxgb/iw_cxgb/Makefile stable/9/sys/modules/cxgb/tom/Makefile stable/9/sys/modules/cxgbe/Makefile Modified: stable/9/sys/conf/files ============================================================================== --- stable/9/sys/conf/files Sun Jul 1 11:52:52 2012 (r237919) +++ stable/9/sys/conf/files Sun Jul 1 12:00:36 2012 (r237920) @@ -891,8 +891,6 @@ dev/cs/if_cs_isa.c optional cs isa dev/cs/if_cs_pccard.c optional cs pccard dev/cxgb/cxgb_main.c optional cxgb pci \ compile-with "${NORMAL_C} -I$S/dev/cxgb" -dev/cxgb/cxgb_offload.c optional cxgb pci \ - compile-with "${NORMAL_C} -I$S/dev/cxgb" dev/cxgb/cxgb_sge.c optional cxgb pci \ compile-with "${NORMAL_C} -I$S/dev/cxgb" dev/cxgb/common/cxgb_mc5.c optional cxgb pci \ Modified: stable/9/sys/dev/cxgb/common/cxgb_ctl_defs.h ============================================================================== --- stable/9/sys/dev/cxgb/common/cxgb_ctl_defs.h Sun Jul 1 11:52:52 2012 (r237919) +++ stable/9/sys/dev/cxgb/common/cxgb_ctl_defs.h Sun Jul 1 12:00:36 2012 (r237920) @@ -60,14 +60,12 @@ struct mtutab { const unsigned short *mtus; /* the MTU table values */ }; -struct net_device; - /* - * Structure used to request the adapter net_device owning a given MAC address. + * Structure used to request the ifnet that owns a given MAC address. */ struct iff_mac { - struct net_device *dev; /* the net_device */ - const unsigned char *mac_addr; /* MAC address to lookup */ + struct ifnet *dev; + const unsigned char *mac_addr; u16 vlan_tag; }; @@ -85,7 +83,7 @@ struct ddp_params { struct adap_ports { unsigned int nports; /* number of ports on this adapter */ - struct net_device *lldevs[MAX_NPORTS]; + struct ifnet *lldevs[MAX_NPORTS]; }; /* Modified: stable/9/sys/dev/cxgb/cxgb_adapter.h ============================================================================== --- stable/9/sys/dev/cxgb/cxgb_adapter.h Sun Jul 1 11:52:52 2012 (r237919) +++ stable/9/sys/dev/cxgb/cxgb_adapter.h Sun Jul 1 12:00:36 2012 (r237920) @@ -56,7 +56,6 @@ $FreeBSD$ #include #include -#include #include struct adapter; @@ -129,6 +128,7 @@ enum { CXGB_OFLD_INIT = (1 << 7), TP_PARITY_INIT = (1 << 8), CXGB_BUSY = (1 << 9), + TOM_INIT_DONE = (1 << 10), /* port flags */ DOOMED = (1 << 0), @@ -178,7 +178,6 @@ struct sge_rspq { uint32_t async_notif; uint32_t cntxt_id; uint32_t offload_pkts; - uint32_t offload_bundles; uint32_t pure_rsps; uint32_t unhandled_irqs; uint32_t starved; @@ -290,6 +289,7 @@ struct sge_qset { uint32_t txq_stopped; /* which Tx queues are stopped */ uint64_t port_stats[SGE_PSTAT_MAX]; struct port_info *port; + struct adapter *adap; int idx; /* qset # */ int qs_flags; int coalescing; @@ -306,10 +306,13 @@ struct sge { struct filter_info; +typedef int (*cpl_handler_t)(struct sge_qset *, struct rsp_desc *, + struct mbuf *); + struct adapter { + SLIST_ENTRY(adapter) link; device_t dev; int flags; - TAILQ_ENTRY(adapter) adapter_entry; /* PCI register resources */ int regs_rid; @@ -375,11 +378,16 @@ struct adapter { struct port_info port[MAX_NPORTS]; device_t portdev[MAX_NPORTS]; - struct t3cdev tdev; +#ifdef TCP_OFFLOAD + void *tom_softc; + void *iwarp_softc; +#endif char fw_version[64]; char port_types[MAX_NPORTS + 1]; uint32_t open_device_map; - uint32_t registered_device_map; +#ifdef TCP_OFFLOAD + int offload_map; +#endif struct mtx lock; driver_intr_t *cxgb_intr; int msi_count; @@ -391,6 +399,11 @@ struct adapter { char elmerlockbuf[ADAPTER_LOCK_NAME_LEN]; int timestamp; + +#ifdef TCP_OFFLOAD +#define NUM_CPL_HANDLERS 0xa7 + cpl_handler_t cpl_handler[NUM_CPL_HANDLERS] __aligned(CACHE_LINE_SIZE); +#endif }; struct t3_rx_mode { @@ -501,10 +514,12 @@ void t3_os_link_changed(adapter_t *adapt int speed, int duplex, int fc, int mac_was_reset); void t3_os_phymod_changed(struct adapter *adap, int port_id); void t3_sge_err_intr_handler(adapter_t *adapter); -int t3_offload_tx(struct t3cdev *, struct mbuf *); +#ifdef TCP_OFFLOAD +int t3_offload_tx(struct adapter *, struct mbuf *); +#endif void t3_os_set_hw_addr(adapter_t *adapter, int port_idx, u8 hw_addr[]); int t3_mgmt_tx(adapter_t *adap, struct mbuf *m); - +int t3_register_cpl_handler(struct adapter *, int, cpl_handler_t); int t3_sge_alloc(struct adapter *); int t3_sge_free(struct adapter *); @@ -555,15 +570,9 @@ txq_to_qset(struct sge_txq *q, int qidx) return container_of(q, struct sge_qset, txq[qidx]); } -static __inline struct adapter * -tdev2adap(struct t3cdev *d) -{ - return container_of(d, struct adapter, tdev); -} - #undef container_of -#define OFFLOAD_DEVMAP_BIT 15 +#define OFFLOAD_DEVMAP_BIT (1 << MAX_NPORTS) static inline int offload_running(adapter_t *adapter) { return isset(&adapter->open_device_map, OFFLOAD_DEVMAP_BIT); @@ -572,4 +581,5 @@ static inline int offload_running(adapte void cxgb_tx_watchdog(void *arg); int cxgb_transmit(struct ifnet *ifp, struct mbuf *m); void cxgb_qflush(struct ifnet *ifp); +void t3_iterate(void (*)(struct adapter *, void *), void *); #endif Modified: stable/9/sys/dev/cxgb/cxgb_main.c ============================================================================== --- stable/9/sys/dev/cxgb/cxgb_main.c Sun Jul 1 11:52:52 2012 (r237919) +++ stable/9/sys/dev/cxgb/cxgb_main.c Sun Jul 1 12:00:36 2012 (r237920) @@ -30,6 +30,8 @@ POSSIBILITY OF SUCH DAMAGE. #include __FBSDID("$FreeBSD$"); +#include "opt_inet.h" + #include #include #include @@ -107,6 +109,9 @@ static inline void mk_set_tcb_field(stru unsigned int, u64, u64); static inline void set_tcb_field_ulp(struct cpl_set_tcb_field *, unsigned int, unsigned int, u64, u64); +#ifdef TCP_OFFLOAD +static int cpl_not_handled(struct sge_qset *, struct rsp_desc *, struct mbuf *); +#endif /* Attachment glue for the PCI controller end of the device. Each port of * the device is attached separately, as defined later. @@ -119,10 +124,11 @@ static __inline void reg_block_dump(stru unsigned int end); static void cxgb_get_regs(adapter_t *sc, struct ch_ifconf_regs *regs, uint8_t *buf); static int cxgb_get_regs_len(void); -static int offload_open(struct port_info *pi); static void touch_bars(device_t dev); -static int offload_close(struct t3cdev *tdev); static void cxgb_update_mac_settings(struct port_info *p); +#ifdef TCP_OFFLOAD +static int toe_capability(struct port_info *, int); +#endif static device_method_t cxgb_controller_methods[] = { DEVMETHOD(device_probe, cxgb_controller_probe), @@ -138,8 +144,11 @@ static driver_t cxgb_controller_driver = sizeof(struct adapter) }; +static int cxgbc_mod_event(module_t, int, void *); static devclass_t cxgb_controller_devclass; -DRIVER_MODULE(cxgbc, pci, cxgb_controller_driver, cxgb_controller_devclass, 0, 0); +DRIVER_MODULE(cxgbc, pci, cxgb_controller_driver, cxgb_controller_devclass, + cxgbc_mod_event, 0); +MODULE_VERSION(cxgbc, 1); /* * Attachment glue for the ports. Attachment is done directly to the @@ -177,6 +186,14 @@ static struct cdevsw cxgb_cdevsw = { static devclass_t cxgb_port_devclass; DRIVER_MODULE(cxgb, cxgbc, cxgb_port_driver, cxgb_port_devclass, 0, 0); +MODULE_VERSION(cxgb, 1); + +static struct mtx t3_list_lock; +static SLIST_HEAD(, adapter) t3_list; +#ifdef TCP_OFFLOAD +static struct mtx t3_uld_list_lock; +static SLIST_HEAD(, uld_info) t3_uld_list; +#endif /* * The driver uses the best interrupt scheme available on a platform in the @@ -195,15 +212,6 @@ SYSCTL_INT(_hw_cxgb, OID_AUTO, msi_allow "MSI-X, MSI, INTx selector"); /* - * The driver enables offload as a default. - * To disable it, use ofld_disable = 1. - */ -static int ofld_disable = 0; -TUNABLE_INT("hw.cxgb.ofld_disable", &ofld_disable); -SYSCTL_INT(_hw_cxgb, OID_AUTO, ofld_disable, CTLFLAG_RDTUN, &ofld_disable, 0, - "disable ULP offload"); - -/* * The driver uses an auto-queue algorithm by default. * To disable it and force a single queue-set per port, use multiq = 0 */ @@ -445,6 +453,25 @@ cxgb_controller_attach(device_t dev) sc->msi_count = 0; ai = cxgb_get_adapter_info(dev); + snprintf(sc->lockbuf, ADAPTER_LOCK_NAME_LEN, "cxgb controller lock %d", + device_get_unit(dev)); + ADAPTER_LOCK_INIT(sc, sc->lockbuf); + + snprintf(sc->reglockbuf, ADAPTER_LOCK_NAME_LEN, "SGE reg lock %d", + device_get_unit(dev)); + snprintf(sc->mdiolockbuf, ADAPTER_LOCK_NAME_LEN, "cxgb mdio lock %d", + device_get_unit(dev)); + snprintf(sc->elmerlockbuf, ADAPTER_LOCK_NAME_LEN, "cxgb elmer lock %d", + device_get_unit(dev)); + + MTX_INIT(&sc->sge.reg_lock, sc->reglockbuf, NULL, MTX_SPIN); + MTX_INIT(&sc->mdio_lock, sc->mdiolockbuf, NULL, MTX_DEF); + MTX_INIT(&sc->elmer_lock, sc->elmerlockbuf, NULL, MTX_DEF); + + mtx_lock(&t3_list_lock); + SLIST_INSERT_HEAD(&t3_list, sc, link); + mtx_unlock(&t3_list_lock); + /* find the PCIe link width and set max read request to 4KB*/ if (pci_find_cap(dev, PCIY_EXPRESS, ®) == 0) { uint16_t lnk; @@ -471,24 +498,10 @@ cxgb_controller_attach(device_t dev) if ((sc->regs_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &sc->regs_rid, RF_ACTIVE)) == NULL) { device_printf(dev, "Cannot allocate BAR region 0\n"); - return (ENXIO); + error = ENXIO; + goto out; } - snprintf(sc->lockbuf, ADAPTER_LOCK_NAME_LEN, "cxgb controller lock %d", - device_get_unit(dev)); - ADAPTER_LOCK_INIT(sc, sc->lockbuf); - - snprintf(sc->reglockbuf, ADAPTER_LOCK_NAME_LEN, "SGE reg lock %d", - device_get_unit(dev)); - snprintf(sc->mdiolockbuf, ADAPTER_LOCK_NAME_LEN, "cxgb mdio lock %d", - device_get_unit(dev)); - snprintf(sc->elmerlockbuf, ADAPTER_LOCK_NAME_LEN, "cxgb elmer lock %d", - device_get_unit(dev)); - - MTX_INIT(&sc->sge.reg_lock, sc->reglockbuf, NULL, MTX_SPIN); - MTX_INIT(&sc->mdio_lock, sc->mdiolockbuf, NULL, MTX_DEF); - MTX_INIT(&sc->elmer_lock, sc->elmerlockbuf, NULL, MTX_DEF); - sc->bt = rman_get_bustag(sc->regs_res); sc->bh = rman_get_bushandle(sc->regs_res); sc->mmio_len = rman_get_size(sc->regs_res); @@ -604,7 +617,7 @@ cxgb_controller_attach(device_t dev) } else { sc->flags |= TPS_UPTODATE; } - + /* * Create a child device for each MAC. The ethernet attachment * will be done in these children. @@ -636,12 +649,7 @@ cxgb_controller_attach(device_t dev) t3_sge_init_adapter(sc); t3_led_ready(sc); - - cxgb_offload_init(); - if (is_offload(sc)) { - setbit(&sc->registered_device_map, OFFLOAD_DEVMAP_BIT); - cxgb_adapter_ofld(sc); - } + error = t3_get_fw_version(sc, &vers); if (error) goto out; @@ -662,6 +670,11 @@ cxgb_controller_attach(device_t dev) device_printf(sc->dev, "Firmware Version %s\n", &sc->fw_version[0]); callout_reset(&sc->cxgb_tick_ch, hz, cxgb_tick, sc); t3_add_attach_sysctls(sc); + +#ifdef TCP_OFFLOAD + for (i = 0; i < NUM_CPL_HANDLERS; i++) + sc->cpl_handler[i] = cpl_not_handled; +#endif out: if (error) cxgb_free(sc); @@ -775,20 +788,9 @@ cxgb_free(struct adapter *sc) sc->tq = NULL; } - if (is_offload(sc)) { - clrbit(&sc->registered_device_map, OFFLOAD_DEVMAP_BIT); - cxgb_adapter_unofld(sc); - } - -#ifdef notyet - if (sc->flags & CXGB_OFLD_INIT) - cxgb_offload_deactivate(sc); -#endif free(sc->filters, M_DEVBUF); t3_sge_free(sc); - cxgb_offload_exit(); - if (sc->udbs_res != NULL) bus_release_resource(sc->dev, SYS_RES_MEMORY, sc->udbs_rid, sc->udbs_res); @@ -800,6 +802,9 @@ cxgb_free(struct adapter *sc) MTX_DESTROY(&sc->mdio_lock); MTX_DESTROY(&sc->sge.reg_lock); MTX_DESTROY(&sc->elmer_lock); + mtx_lock(&t3_list_lock); + SLIST_REMOVE(&t3_list, sc, adapter, link); + mtx_unlock(&t3_list_lock); ADAPTER_LOCK_DEINIT(sc); } @@ -1017,6 +1022,10 @@ cxgb_port_attach(device_t dev) ifp->if_qflush = cxgb_qflush; ifp->if_capabilities = CXGB_CAP; +#ifdef TCP_OFFLOAD + if (is_offload(sc)) + ifp->if_capabilities |= IFCAP_TOE4; +#endif ifp->if_capenable = CXGB_CAP_ENABLE; ifp->if_hwassist = CSUM_TCP | CSUM_UDP | CSUM_IP | CSUM_TSO; @@ -1420,65 +1429,6 @@ setup_rss(adapter_t *adap) cpus, rspq_map); } - -/* - * Sends an mbuf to an offload queue driver - * after dealing with any active network taps. - */ -static inline int -offload_tx(struct t3cdev *tdev, struct mbuf *m) -{ - int ret; - - ret = t3_offload_tx(tdev, m); - return (ret); -} - -static int -write_smt_entry(struct adapter *adapter, int idx) -{ - struct port_info *pi = &adapter->port[idx]; - struct cpl_smt_write_req *req; - struct mbuf *m; - - if ((m = m_gethdr(M_NOWAIT, MT_DATA)) == NULL) - return (ENOMEM); - - req = mtod(m, struct cpl_smt_write_req *); - m->m_pkthdr.len = m->m_len = sizeof(struct cpl_smt_write_req); - - req->wr.wrh_hi = htonl(V_WR_OP(FW_WROPCODE_FORWARD)); - OPCODE_TID(req) = htonl(MK_OPCODE_TID(CPL_SMT_WRITE_REQ, idx)); - req->mtu_idx = NMTUS - 1; /* should be 0 but there's a T3 bug */ - req->iff = idx; - memset(req->src_mac1, 0, sizeof(req->src_mac1)); - memcpy(req->src_mac0, pi->hw_addr, ETHER_ADDR_LEN); - - m_set_priority(m, 1); - - offload_tx(&adapter->tdev, m); - - return (0); -} - -static int -init_smt(struct adapter *adapter) -{ - int i; - - for_each_port(adapter, i) - write_smt_entry(adapter, i); - return 0; -} - -static void -init_port_mtus(adapter_t *adapter) -{ - unsigned int mtus = ETHERMTU | (ETHERMTU << 16); - - t3_write_reg(adapter, A_TP_MTU_PORT_TABLE, mtus); -} - static void send_pktsched_cmd(struct adapter *adap, int sched, int qidx, int lo, int hi, int port) @@ -1705,45 +1655,6 @@ cxgb_down(struct adapter *sc) t3_intr_disable(sc); } -static int -offload_open(struct port_info *pi) -{ - struct adapter *sc = pi->adapter; - struct t3cdev *tdev = &sc->tdev; - - setbit(&sc->open_device_map, OFFLOAD_DEVMAP_BIT); - - t3_tp_set_offload_mode(sc, 1); - tdev->lldev = pi->ifp; - init_port_mtus(sc); - t3_load_mtus(sc, sc->params.mtus, sc->params.a_wnd, sc->params.b_wnd, - sc->params.rev == 0 ? sc->port[0].ifp->if_mtu : 0xffff); - init_smt(sc); - cxgb_add_clients(tdev); - - return (0); -} - -static int -offload_close(struct t3cdev *tdev) -{ - struct adapter *adapter = tdev2adap(tdev); - - if (!isset(&adapter->open_device_map, OFFLOAD_DEVMAP_BIT)) - return (0); - - /* Call back all registered clients */ - cxgb_remove_clients(tdev); - - tdev->lldev = NULL; - cxgb_set_dummy_ops(tdev); - t3_tp_set_offload_mode(adapter, 0); - - clrbit(&adapter->open_device_map, OFFLOAD_DEVMAP_BIT); - - return (0); -} - /* * if_init for cxgb ports. */ @@ -1793,15 +1704,9 @@ cxgb_init_locked(struct port_info *p) ADAPTER_UNLOCK(sc); } - if (sc->open_device_map == 0) { - if ((rc = cxgb_up(sc)) != 0) + if (sc->open_device_map == 0 && ((rc = cxgb_up(sc)) != 0)) goto done; - if (is_offload(sc) && !ofld_disable && offload_open(p)) - log(LOG_WARNING, - "Could not initialize offload capabilities\n"); - } - PORT_LOCK(p); if (isset(&sc->open_device_map, p->port_id) && (ifp->if_drv_flags & IFF_DRV_RUNNING)) { @@ -1929,7 +1834,6 @@ cxgb_uninit_synchronized(struct port_inf DELAY(100 * 1000); t3_mac_disable(&pi->mac, MAC_DIRECTION_RX); - pi->phy.ops->power_down(&pi->phy, 1); PORT_UNLOCK(pi); @@ -1937,9 +1841,6 @@ cxgb_uninit_synchronized(struct port_inf pi->link_config.link_ok = 0; t3_os_link_changed(sc, pi->port_id, 0, 0, 0, 0, 0); - if ((sc->open_device_map & PORT_MASK) == 0) - offload_close(&sc->tdev); - if (sc->open_device_map == 0) cxgb_down(pi->adapter); @@ -2081,6 +1982,15 @@ fail: /* Safe to do this even if cxgb_up not called yet */ cxgb_set_lro(p, ifp->if_capenable & IFCAP_LRO); } +#ifdef TCP_OFFLOAD + if (mask & IFCAP_TOE4) { + int enable = (ifp->if_capenable ^ mask) & IFCAP_TOE4; + + error = toe_capability(p, enable); + if (error == 0) + ifp->if_capenable ^= mask; + } +#endif if (mask & IFCAP_VLAN_HWTAGGING) { ifp->if_capenable ^= IFCAP_VLAN_HWTAGGING; if (ifp->if_drv_flags & IFF_DRV_RUNNING) { @@ -3362,3 +3272,235 @@ set_tcb_field_ulp(struct cpl_set_tcb_fie txpkt->len = htonl(V_ULPTX_NFLITS(sizeof(*req) / 8)); mk_set_tcb_field(req, tid, word, mask, val); } + +void +t3_iterate(void (*func)(struct adapter *, void *), void *arg) +{ + struct adapter *sc; + + mtx_lock(&t3_list_lock); + SLIST_FOREACH(sc, &t3_list, link) { + /* + * func should not make any assumptions about what state sc is + * in - the only guarantee is that sc->sc_lock is a valid lock. + */ + func(sc, arg); + } + mtx_unlock(&t3_list_lock); +} + +#ifdef TCP_OFFLOAD +static int +toe_capability(struct port_info *pi, int enable) +{ + int rc; + struct adapter *sc = pi->adapter; + + ADAPTER_LOCK_ASSERT_OWNED(sc); + + if (!is_offload(sc)) + return (ENODEV); + + if (enable) { + if (!(sc->flags & FULL_INIT_DONE)) { + log(LOG_WARNING, + "You must enable a cxgb interface first\n"); + return (EAGAIN); + } + + if (isset(&sc->offload_map, pi->port_id)) + return (0); + + if (!(sc->flags & TOM_INIT_DONE)) { + rc = t3_activate_uld(sc, ULD_TOM); + if (rc == EAGAIN) { + log(LOG_WARNING, + "You must kldload t3_tom.ko before trying " + "to enable TOE on a cxgb interface.\n"); + } + if (rc != 0) + return (rc); + KASSERT(sc->tom_softc != NULL, + ("%s: TOM activated but softc NULL", __func__)); + KASSERT(sc->flags & TOM_INIT_DONE, + ("%s: TOM activated but flag not set", __func__)); + } + + setbit(&sc->offload_map, pi->port_id); + + /* + * XXX: Temporary code to allow iWARP to be enabled when TOE is + * enabled on any port. Need to figure out how to enable, + * disable, load, and unload iWARP cleanly. + */ + if (!isset(&sc->offload_map, MAX_NPORTS) && + t3_activate_uld(sc, ULD_IWARP) == 0) + setbit(&sc->offload_map, MAX_NPORTS); + } else { + if (!isset(&sc->offload_map, pi->port_id)) + return (0); + + KASSERT(sc->flags & TOM_INIT_DONE, + ("%s: TOM never initialized?", __func__)); + clrbit(&sc->offload_map, pi->port_id); + } + + return (0); +} + +/* + * Add an upper layer driver to the global list. + */ +int +t3_register_uld(struct uld_info *ui) +{ + int rc = 0; + struct uld_info *u; + + mtx_lock(&t3_uld_list_lock); + SLIST_FOREACH(u, &t3_uld_list, link) { + if (u->uld_id == ui->uld_id) { + rc = EEXIST; + goto done; + } + } + + SLIST_INSERT_HEAD(&t3_uld_list, ui, link); + ui->refcount = 0; +done: + mtx_unlock(&t3_uld_list_lock); + return (rc); +} + +int +t3_unregister_uld(struct uld_info *ui) +{ + int rc = EINVAL; + struct uld_info *u; + + mtx_lock(&t3_uld_list_lock); + + SLIST_FOREACH(u, &t3_uld_list, link) { + if (u == ui) { + if (ui->refcount > 0) { + rc = EBUSY; + goto done; + } + + SLIST_REMOVE(&t3_uld_list, ui, uld_info, link); + rc = 0; + goto done; + } + } +done: + mtx_unlock(&t3_uld_list_lock); + return (rc); +} + +int +t3_activate_uld(struct adapter *sc, int id) +{ + int rc = EAGAIN; + struct uld_info *ui; + + mtx_lock(&t3_uld_list_lock); + + SLIST_FOREACH(ui, &t3_uld_list, link) { + if (ui->uld_id == id) { + rc = ui->activate(sc); + if (rc == 0) + ui->refcount++; + goto done; + } + } +done: + mtx_unlock(&t3_uld_list_lock); + + return (rc); +} + +int +t3_deactivate_uld(struct adapter *sc, int id) +{ + int rc = EINVAL; + struct uld_info *ui; + + mtx_lock(&t3_uld_list_lock); + + SLIST_FOREACH(ui, &t3_uld_list, link) { + if (ui->uld_id == id) { + rc = ui->deactivate(sc); + if (rc == 0) + ui->refcount--; + goto done; + } + } +done: + mtx_unlock(&t3_uld_list_lock); + + return (rc); +} + +static int +cpl_not_handled(struct sge_qset *qs __unused, struct rsp_desc *r __unused, + struct mbuf *m) +{ + m_freem(m); + return (EDOOFUS); +} + +int +t3_register_cpl_handler(struct adapter *sc, int opcode, cpl_handler_t h) +{ + uintptr_t *loc, new; + + if (opcode >= NUM_CPL_HANDLERS) + return (EINVAL); + + new = h ? (uintptr_t)h : (uintptr_t)cpl_not_handled; + loc = (uintptr_t *) &sc->cpl_handler[opcode]; + atomic_store_rel_ptr(loc, new); + + return (0); +} +#endif + +static int +cxgbc_mod_event(module_t mod, int cmd, void *arg) +{ + int rc = 0; + + switch (cmd) { + case MOD_LOAD: + mtx_init(&t3_list_lock, "T3 adapters", 0, MTX_DEF); + SLIST_INIT(&t3_list); +#ifdef TCP_OFFLOAD + mtx_init(&t3_uld_list_lock, "T3 ULDs", 0, MTX_DEF); + SLIST_INIT(&t3_uld_list); +#endif + break; + + case MOD_UNLOAD: +#ifdef TCP_OFFLOAD + mtx_lock(&t3_uld_list_lock); + if (!SLIST_EMPTY(&t3_uld_list)) { + rc = EBUSY; + mtx_unlock(&t3_uld_list_lock); + break; + } + mtx_unlock(&t3_uld_list_lock); + mtx_destroy(&t3_uld_list_lock); +#endif + mtx_lock(&t3_list_lock); + if (!SLIST_EMPTY(&t3_list)) { + rc = EBUSY; + mtx_unlock(&t3_list_lock); + break; + } + mtx_unlock(&t3_list_lock); + mtx_destroy(&t3_list_lock); + break; + } + + return (rc); +} Modified: stable/9/sys/dev/cxgb/cxgb_offload.h ============================================================================== --- stable/9/sys/dev/cxgb/cxgb_offload.h Sun Jul 1 11:52:52 2012 (r237919) +++ stable/9/sys/dev/cxgb/cxgb_offload.h Sun Jul 1 12:00:36 2012 (r237920) @@ -1,4 +1,3 @@ - /************************************************************************** Copyright (c) 2007-2008, Chelsio Inc. @@ -33,221 +32,93 @@ $FreeBSD$ #ifndef _CXGB_OFFLOAD_H #define _CXGB_OFFLOAD_H -#include -#include - -MALLOC_DECLARE(M_CXGB); +#ifdef TCP_OFFLOAD +enum { + ULD_TOM = 1, + ULD_IWARP = 2, +}; struct adapter; -struct cxgb_client; - -void cxgb_offload_init(void); -void cxgb_offload_exit(void); - -void cxgb_adapter_ofld(struct adapter *adapter); -void cxgb_adapter_unofld(struct adapter *adapter); -int cxgb_offload_activate(struct adapter *adapter); -void cxgb_offload_deactivate(struct adapter *adapter); -int cxgb_ofld_recv(struct t3cdev *dev, struct mbuf **m, int n); - -void cxgb_set_dummy_ops(struct t3cdev *dev); - - -/* - * Client registration. Users of T3 driver must register themselves. - * The T3 driver will call the add function of every client for each T3 - * adapter activated, passing up the t3cdev ptr. Each client fills out an - * array of callback functions to process CPL messages. - */ - -void cxgb_register_client(struct cxgb_client *client); -void cxgb_unregister_client(struct cxgb_client *client); -void cxgb_add_clients(struct t3cdev *tdev); -void cxgb_remove_clients(struct t3cdev *tdev); - -typedef int (*cxgb_cpl_handler_func)(struct t3cdev *dev, - struct mbuf *m, void *ctx); - -struct l2t_entry; -struct cxgb_client { - char *name; - void (*add) (struct t3cdev *); - void (*remove) (struct t3cdev *); - cxgb_cpl_handler_func *handlers; - int (*redirect)(void *ctx, struct rtentry *old, - struct rtentry *new, - struct l2t_entry *l2t); - TAILQ_ENTRY(cxgb_client) client_entry; +struct uld_info { + SLIST_ENTRY(uld_info) link; + int refcount; + int uld_id; + int (*activate)(struct adapter *); + int (*deactivate)(struct adapter *); }; -/* - * TID allocation services. - */ -int cxgb_alloc_atid(struct t3cdev *dev, struct cxgb_client *client, - void *ctx); -int cxgb_alloc_stid(struct t3cdev *dev, struct cxgb_client *client, - void *ctx); -void *cxgb_free_atid(struct t3cdev *dev, int atid); -void cxgb_free_stid(struct t3cdev *dev, int stid); -void *cxgb_get_lctx(struct t3cdev *tdev, int stid); -void cxgb_insert_tid(struct t3cdev *dev, struct cxgb_client *client, - void *ctx, - unsigned int tid); -void cxgb_queue_tid_release(struct t3cdev *dev, unsigned int tid); -void cxgb_remove_tid(struct t3cdev *dev, void *ctx, unsigned int tid); - -struct toe_tid_entry { - struct cxgb_client *client; - void *ctx; +struct tom_tunables { + int sndbuf; + int ddp; + int indsz; + int ddp_thres; }; /* CPL message priority levels */ enum { CPL_PRIORITY_DATA = 0, /* data messages */ - CPL_PRIORITY_SETUP = 1, /* connection setup messages */ - CPL_PRIORITY_TEARDOWN = 0, /* connection teardown messages */ - CPL_PRIORITY_LISTEN = 1, /* listen start/stop messages */ - CPL_PRIORITY_ACK = 1, /* RX ACK messages */ CPL_PRIORITY_CONTROL = 1 /* offload control messages */ }; -/* Flags for return value of CPL message handlers */ -enum { - CPL_RET_BUF_DONE = 1, // buffer processing done, buffer may be freed - CPL_RET_BAD_MSG = 2, // bad CPL message (e.g., unknown opcode) - CPL_RET_UNKNOWN_TID = 4 // unexpected unknown TID -}; +#define S_HDR_NDESC 0 +#define M_HDR_NDESC 0xf +#define V_HDR_NDESC(x) ((x) << S_HDR_NDESC) +#define G_HDR_NDESC(x) (((x) >> S_HDR_NDESC) & M_HDR_NDESC) -typedef int (*cpl_handler_func)(struct t3cdev *dev, struct mbuf *m); +#define S_HDR_QSET 4 +#define M_HDR_QSET 0xf +#define V_HDR_QSET(x) ((x) << S_HDR_QSET) +#define G_HDR_QSET(x) (((x) >> S_HDR_QSET) & M_HDR_QSET) -/* - * Returns a pointer to the first byte of the CPL header in an sk_buff that - * contains a CPL message. - */ -static inline void *cplhdr(struct mbuf *m) -{ - return mtod(m, uint8_t *); -} - -void t3_register_cpl_handler(unsigned int opcode, cpl_handler_func h); - -union listen_entry { - struct toe_tid_entry toe_tid; - union listen_entry *next; -}; +#define S_HDR_CTRL 8 +#define V_HDR_CTRL(x) ((x) << S_HDR_CTRL) +#define F_HDR_CTRL V_HDR_CTRL(1U) -union active_open_entry { - struct toe_tid_entry toe_tid; - union active_open_entry *next; -}; +#define S_HDR_DF 9 +#define V_HDR_DF(x) ((x) << S_HDR_DF) +#define F_HDR_DF V_HDR_DF(1U) -/* - * Holds the size, base address, free list start, etc of the TID, server TID, - * and active-open TID tables for a offload device. - * The tables themselves are allocated dynamically. - */ -struct tid_info { - struct toe_tid_entry *tid_tab; - unsigned int ntids; - volatile unsigned int tids_in_use; - - union listen_entry *stid_tab; - unsigned int nstids; - unsigned int stid_base; - - union active_open_entry *atid_tab; - unsigned int natids; - unsigned int atid_base; - - /* - * The following members are accessed R/W so we put them in their own - * cache lines. - * - * XXX We could combine the atid fields above with the lock here since - * atids are use once (unlike other tids). OTOH the above fields are - * usually in cache due to tid_tab. - */ - struct mtx atid_lock /* ____cacheline_aligned_in_smp */; - union active_open_entry *afree; - unsigned int atids_in_use; - - struct mtx stid_lock /*____cacheline_aligned */; - union listen_entry *sfree; - unsigned int stids_in_use; -}; +#define S_HDR_SGL 10 +#define V_HDR_SGL(x) ((x) << S_HDR_SGL) +#define F_HDR_SGL V_HDR_SGL(1U) -struct t3c_data { - struct t3cdev *dev; - unsigned int tx_max_chunk; /* max payload for TX_DATA */ - unsigned int max_wrs; /* max in-flight WRs per connection */ - unsigned int nmtus; - const unsigned short *mtus; - struct tid_info tid_maps; - - struct toe_tid_entry *tid_release_list; - struct mtx tid_release_lock; - struct task tid_release_task; +struct ofld_hdr +{ + void *sgl; /* SGL, if F_HDR_SGL set in flags */ + int plen; /* amount of payload (in bytes) */ + int flags; }; /* - * t3cdev -> toe_data accessor - */ -#define T3C_DATA(dev) (*(struct t3c_data **)&(dev)->l4opt) - -/* - * Map an ATID or STID to their entries in the corresponding TID tables. + * Convenience function for fixed size CPLs that fit in 1 desc. */ -static inline union active_open_entry *atid2entry(const struct tid_info *t, - unsigned int atid) +#define M_GETHDR_OFLD(qset, ctrl, cpl) \ + m_gethdr_ofld(qset, ctrl, sizeof(*cpl), (void **)&cpl) +static inline struct mbuf * +m_gethdr_ofld(int qset, int ctrl, int cpllen, void **cpl) { - return &t->atid_tab[atid - t->atid_base]; -} + struct mbuf *m; + struct ofld_hdr *oh; + m = m_gethdr(M_NOWAIT, MT_DATA); + if (m == NULL) + return (NULL); -static inline union listen_entry *stid2entry(const struct tid_info *t, - unsigned int stid) -{ - return &t->stid_tab[stid - t->stid_base]; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 12:04:22 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 57AE41065675; Sun, 1 Jul 2012 12:04:22 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id BF3498FC16; Sun, 1 Jul 2012 12:04:21 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q61C4Kxk054412; Sun, 1 Jul 2012 15:04:20 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q61C48Jj041208; Sun, 1 Jul 2012 15:04:08 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q61C48aH041207; Sun, 1 Jul 2012 15:04:08 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 1 Jul 2012 15:04:08 +0300 From: Konstantin Belousov To: Andreas Tobler Message-ID: <20120701120408.GM2337@deviant.kiev.zoral.com.ua> References: <201206210926.q5L9Q6nR002030@svn.freebsd.org> <4FF03316.5050609@FreeBSD.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="bsvZi3KOaWj8kGde" Content-Disposition: inline In-Reply-To: <4FF03316.5050609@FreeBSD.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r237367 - head/sys/fs/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 12:04:22 -0000 --bsvZi3KOaWj8kGde Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jul 01, 2012 at 01:23:02PM +0200, Andreas Tobler wrote: > On 21.06.12 11:26, Konstantin Belousov wrote: > >Author: kib > >Date: Thu Jun 21 09:26:06 2012 > >New Revision: 237367 > >URL: http://svn.freebsd.org/changeset/base/237367 > > > >Log: > > Enable deadlock avoidance code for NFS client. >=20 >=20 > Hm, since this commit I fail with my nfs installworld/kernel. >=20 > I have a builder which installs world/kernel to a nfs mounted directory. > Namely used for cross builds. >=20 > Now since this commit I get the following when I install kernel to the=20 > nfs directory: >=20 > .. > install -o root -g wheel -m 555 zfs.ko.symbols=20 > /netboot/sparc64/boot/kernel > install: /netboot/sparc64/boot/kernel/zfs.ko.symbols: No such file or=20 > directory > *** [_kmodinstall] Error code 71 > .. >=20 > The file is there, a local install of the tree works without problems. > Reverting to r237366 also makes it work again. >=20 > The server is a -CURRENT, r237880, The client, -CURRENT too. >=20 > How can I help to track down the real issue? Is it always the same file in the install procedure which causes the failure ? Even more, is the failure pattern always the same ? Might be, start with ktrace-ing the whole make invocation, including the children processes. I used buildworld on the NFS-mounted obj/ as the test for the changes. --bsvZi3KOaWj8kGde Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAk/wPLcACgkQC3+MBN1Mb4gGFQCeOzAaEwPpwmV8/W60rXd4QWwr eDAAnR9Rui/9/eFOs9vxAPAAZwAaQAbi =0hgv -----END PGP SIGNATURE----- --bsvZi3KOaWj8kGde-- From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 12:34:21 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9A2A31065670; Sun, 1 Jul 2012 12:34:20 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 85B458FC0A; Sun, 1 Jul 2012 12:34:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q61CYKaN001966; Sun, 1 Jul 2012 12:34:20 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q61CYK6T001964; Sun, 1 Jul 2012 12:34:20 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201207011234.q61CYK6T001964@svn.freebsd.org> From: Christian Brueffer Date: Sun, 1 Jul 2012 12:34:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237921 - head/etc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 12:34:21 -0000 Author: brueffer Date: Sun Jul 1 12:34:19 2012 New Revision: 237921 URL: http://svn.freebsd.org/changeset/base/237921 Log: Similar to all.log, mention that /var/log/console.log has to be created and chmod'ed to make logging work. PR: 168889 Submitted by: Robert Simmons MFC after: 1 week Modified: head/etc/syslog.conf Modified: head/etc/syslog.conf ============================================================================== --- head/etc/syslog.conf Sun Jul 1 12:00:36 2012 (r237920) +++ head/etc/syslog.conf Sun Jul 1 12:34:19 2012 (r237921) @@ -16,6 +16,7 @@ cron.* /var/log/cron *.=debug /var/log/debug.log *.emerg * # uncomment this to log all writes to /dev/console to /var/log/console.log +# touch /var/log/console.log and chmod it to mode 600 before it will work #console.info /var/log/console.log # uncomment this to enable logging of all log messages to /var/log/all.log # touch /var/log/all.log and chmod it to mode 600 before it will work From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 12:59:01 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 08988106566C; Sun, 1 Jul 2012 12:59:01 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E87C98FC0A; Sun, 1 Jul 2012 12:59:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q61Cx0sZ003287; Sun, 1 Jul 2012 12:59:00 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q61Cx0LR003284; Sun, 1 Jul 2012 12:59:00 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201207011259.q61Cx0LR003284@svn.freebsd.org> From: Christian Brueffer Date: Sun, 1 Jul 2012 12:59:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237924 - head/sys/i386/i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 12:59:01 -0000 Author: brueffer Date: Sun Jul 1 12:59:00 2012 New Revision: 237924 URL: http://svn.freebsd.org/changeset/base/237924 Log: Replace an unreachable panic() in vm86_getptr (been there for 13 years) with a KASSERT() behind the functions's only consumer. Suggested by: kib Reviewed by: kib CID: 4494 Found with: Coverity Prevent(tm) MFC after: 2 weeks Modified: head/sys/i386/i386/machdep.c head/sys/i386/i386/vm86.c Modified: head/sys/i386/i386/machdep.c ============================================================================== --- head/sys/i386/i386/machdep.c Sun Jul 1 12:48:56 2012 (r237923) +++ head/sys/i386/i386/machdep.c Sun Jul 1 12:59:00 2012 (r237924) @@ -2176,7 +2176,7 @@ basemem_setup(void) static void getmemsize(int first) { - int has_smap, off, physmap_idx, pa_indx, da_indx; + int has_smap, off, physmap_idx, pa_indx, da_indx, res; u_long physmem_tunable, memtest; vm_paddr_t physmap[PHYSMAP_SIZE]; pt_entry_t *pte; @@ -2267,7 +2267,8 @@ getmemsize(int first) pmap_kenter(KERNBASE + (1 << PAGE_SHIFT), 1 << PAGE_SHIFT); vmc.npages = 0; smap = (void *)vm86_addpage(&vmc, 1, KERNBASE + (1 << PAGE_SHIFT)); - vm86_getptr(&vmc, (vm_offset_t)smap, &vmf.vmf_es, &vmf.vmf_di); + res = vm86_getptr(&vmc, (vm_offset_t)smap, &vmf.vmf_es, &vmf.vmf_di); + KASSERT(res != 0, ("vm86_getptr() failed: address not found")); vmf.vmf_ebx = 0; do { Modified: head/sys/i386/i386/vm86.c ============================================================================== --- head/sys/i386/i386/vm86.c Sun Jul 1 12:48:56 2012 (r237923) +++ head/sys/i386/i386/vm86.c Sun Jul 1 12:59:00 2012 (r237924) @@ -650,7 +650,6 @@ vm86_getptr(vmc, kva, sel, off) return (1); } return (0); - panic("vm86_getptr: address not found"); } int From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 13:37:22 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A96181065672; Sun, 1 Jul 2012 13:37:22 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from smtp.fgznet.ch (mail.fgznet.ch [81.92.96.47]) by mx1.freebsd.org (Postfix) with ESMTP id 1C12C8FC18; Sun, 1 Jul 2012 13:37:21 +0000 (UTC) Received: from deuterium.andreas.nets (dhclient-91-190-14-19.flashcable.ch [91.190.14.19]) by smtp.fgznet.ch (8.13.8/8.13.8/Submit_SMTPAUTH) with ESMTP id q61DbJLA061284; Sun, 1 Jul 2012 15:37:19 +0200 (CEST) (envelope-from andreast@FreeBSD.org) Message-ID: <4FF0528E.50002@FreeBSD.org> Date: Sun, 01 Jul 2012 15:37:18 +0200 From: Andreas Tobler User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.5; rv:13.0) Gecko/20120601 Thunderbird/13.0 MIME-Version: 1.0 To: Konstantin Belousov References: <201206210926.q5L9Q6nR002030@svn.freebsd.org> <4FF03316.5050609@FreeBSD.org> <20120701120408.GM2337@deviant.kiev.zoral.com.ua> In-Reply-To: <20120701120408.GM2337@deviant.kiev.zoral.com.ua> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.64 on 81.92.96.47 Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r237367 - head/sys/fs/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 13:37:22 -0000 On 01.07.12 14:04, Konstantin Belousov wrote: > On Sun, Jul 01, 2012 at 01:23:02PM +0200, Andreas Tobler wrote: >> On 21.06.12 11:26, Konstantin Belousov wrote: >>> Author: kib >>> Date: Thu Jun 21 09:26:06 2012 >>> New Revision: 237367 >>> URL: http://svn.freebsd.org/changeset/base/237367 >>> >>> Log: >>> Enable deadlock avoidance code for NFS client. >> >> >> Hm, since this commit I fail with my nfs installworld/kernel. >> >> I have a builder which installs world/kernel to a nfs mounted directory. >> Namely used for cross builds. >> >> Now since this commit I get the following when I install kernel to the >> nfs directory: >> >> .. >> install -o root -g wheel -m 555 zfs.ko.symbols >> /netboot/sparc64/boot/kernel >> install: /netboot/sparc64/boot/kernel/zfs.ko.symbols: No such file or >> directory >> *** [_kmodinstall] Error code 71 >> .. >> >> The file is there, a local install of the tree works without problems. >> Reverting to r237366 also makes it work again. >> >> The server is a -CURRENT, r237880, The client, -CURRENT too. >> >> How can I help to track down the real issue? > > Is it always the same file in the install procedure which causes the > failure ? Even more, is the failure pattern always the same ? I'd say so yes. When installing a kernel onto a nfs mounted fs then always (in my cases) the zfs.ko.symbols was the failing pattern. I tried ppc64 and sparc64 as target. With both it was the above file. When doing a installworld, it was, also in both cases, ppc64/sparc64, the cc1 in libexec which failed. > Might be, start with ktrace-ing the whole make invocation, including > the children processes. Some recipes how to start? > I used buildworld on the NFS-mounted obj/ as the test for the changes. Here the obj is local, only the src and the destination is on the nfs/netboot server. Thanks, Andreas From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 13:41:36 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 942A8106564A; Sun, 1 Jul 2012 13:41:36 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 2D8E28FC08; Sun, 1 Jul 2012 13:41:35 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q61Dfj6O060358; Sun, 1 Jul 2012 16:41:45 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q61DfWJq041741; Sun, 1 Jul 2012 16:41:32 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q61DfWS3041740; Sun, 1 Jul 2012 16:41:32 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 1 Jul 2012 16:41:32 +0300 From: Konstantin Belousov To: Andreas Tobler Message-ID: <20120701134132.GO2337@deviant.kiev.zoral.com.ua> References: <201206210926.q5L9Q6nR002030@svn.freebsd.org> <4FF03316.5050609@FreeBSD.org> <20120701120408.GM2337@deviant.kiev.zoral.com.ua> <4FF0528E.50002@FreeBSD.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="+F7KmZy3b6vGqMLF" Content-Disposition: inline In-Reply-To: <4FF0528E.50002@FreeBSD.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r237367 - head/sys/fs/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 13:41:36 -0000 --+F7KmZy3b6vGqMLF Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jul 01, 2012 at 03:37:18PM +0200, Andreas Tobler wrote: > On 01.07.12 14:04, Konstantin Belousov wrote: > >On Sun, Jul 01, 2012 at 01:23:02PM +0200, Andreas Tobler wrote: > >>On 21.06.12 11:26, Konstantin Belousov wrote: > >>>Author: kib > >>>Date: Thu Jun 21 09:26:06 2012 > >>>New Revision: 237367 > >>>URL: http://svn.freebsd.org/changeset/base/237367 > >>> > >>>Log: > >>> Enable deadlock avoidance code for NFS client. > >> > >> > >>Hm, since this commit I fail with my nfs installworld/kernel. > >> > >>I have a builder which installs world/kernel to a nfs mounted directory. > >>Namely used for cross builds. > >> > >>Now since this commit I get the following when I install kernel to the > >>nfs directory: > >> > >>.. > >>install -o root -g wheel -m 555 zfs.ko.symbols > >>/netboot/sparc64/boot/kernel > >>install: /netboot/sparc64/boot/kernel/zfs.ko.symbols: No such file or > >>directory > >>*** [_kmodinstall] Error code 71 > >>.. > >> > >>The file is there, a local install of the tree works without problems. > >>Reverting to r237366 also makes it work again. > >> > >>The server is a -CURRENT, r237880, The client, -CURRENT too. > >> > >>How can I help to track down the real issue? > > > >Is it always the same file in the install procedure which causes the > >failure ? Even more, is the failure pattern always the same ? >=20 > I'd say so yes. When installing a kernel onto a nfs mounted fs then=20 > always (in my cases) the zfs.ko.symbols was the failing pattern. > I tried ppc64 and sparc64 as target. With both it was the above file. >=20 > When doing a installworld, it was, also in both cases, ppc64/sparc64,=20 > the cc1 in libexec which failed. >=20 > >Might be, start with ktrace-ing the whole make invocation, including > >the children processes. >=20 > Some recipes how to start? ktrace -o -i make installkernel Then kdump and cut the lines around relevant failure. >=20 > >I used buildworld on the NFS-mounted obj/ as the test for the changes. >=20 > Here the obj is local, only the src and the destination is on the=20 > nfs/netboot server. I just finished build on NFS obj/ and did several rounds of installs for world and kernel into nfs-mounted destdir. It seems I cannot reproduce this locally. --+F7KmZy3b6vGqMLF Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAk/wU4sACgkQC3+MBN1Mb4i3zQCeILWD4lZ8UAw/yY8F6dc/rQ7W 8c0AoMCRA+RZbRgLb1YC6RZGu+9ffq5L =Mt7W -----END PGP SIGNATURE----- --+F7KmZy3b6vGqMLF-- From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 13:43:31 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8C176106566B; Sun, 1 Jul 2012 13:43:31 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 758608FC0A; Sun, 1 Jul 2012 13:43:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q61DhVYQ005175; Sun, 1 Jul 2012 13:43:31 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q61DhVuI005167; Sun, 1 Jul 2012 13:43:31 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201207011343.q61DhVuI005167@svn.freebsd.org> From: Navdeep Parhar Date: Sun, 1 Jul 2012 13:43:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237925 - in stable/9/sys: dev/cxgb dev/cxgbe dev/cxgbe/common dev/cxgbe/firmware dev/cxgbe/tom modules/cxgbe/if_cxgbe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 13:43:31 -0000 Author: np Date: Sun Jul 1 13:43:30 2012 New Revision: 237925 URL: http://svn.freebsd.org/changeset/base/237925 Log: MFC r237832, r237436, r237439, r237463, r237512, r237587, r237799, r237819, r237831. r237832: cxgb(4): IPv6 rx/tx hw checksum, IPv6 TSO and LRO too. r237436: cxgbe(4): update to firmware interface 1.5.2.0; updates to shared code. r237439: Do not read registers with read side effects while performing a register dump for cxgbetool. r237463: Do not allocate extra vectors when adapter is not TOE capable (or toecaps have been disallowed by the user). r237512: Better way to determine the status page length and rx pad boundary. r237587: Allow cxgbe(4) running within a VM to attach to its devices that have been exported via PCI passthrough. r237799: cxgbe(4): support for IPv6 hardware checksumming (rx and tx). r237819: cxgbe(4): support for IPv6 TSO and LRO. r237831: - Assign (don't OR) the CSUM_XXX bits to csum_flags in the rx checksum code. - Fix TSO/TSO4 mixup. - Add IFCAP_LINKSTATE to the available/enabled capabilities. Modified: stable/9/sys/dev/cxgb/cxgb_adapter.h stable/9/sys/dev/cxgb/cxgb_main.c stable/9/sys/dev/cxgb/cxgb_sge.c stable/9/sys/dev/cxgbe/adapter.h stable/9/sys/dev/cxgbe/common/common.h stable/9/sys/dev/cxgbe/common/t4_hw.c stable/9/sys/dev/cxgbe/common/t4_msg.h stable/9/sys/dev/cxgbe/firmware/t4fw_cfg.txt stable/9/sys/dev/cxgbe/firmware/t4fw_cfg_uwire.txt stable/9/sys/dev/cxgbe/firmware/t4fw_interface.h stable/9/sys/dev/cxgbe/osdep.h stable/9/sys/dev/cxgbe/t4_l2t.c stable/9/sys/dev/cxgbe/t4_main.c stable/9/sys/dev/cxgbe/t4_sge.c stable/9/sys/dev/cxgbe/tom/t4_cpl_io.c stable/9/sys/modules/cxgbe/if_cxgbe/Makefile Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/modules/ (props changed) Modified: stable/9/sys/dev/cxgb/cxgb_adapter.h ============================================================================== --- stable/9/sys/dev/cxgb/cxgb_adapter.h Sun Jul 1 12:59:00 2012 (r237924) +++ stable/9/sys/dev/cxgb/cxgb_adapter.h Sun Jul 1 13:43:30 2012 (r237925) @@ -80,6 +80,15 @@ extern int cxgb_debug; #define MTX_DESTROY mtx_destroy #endif +#ifndef IFCAP_HWCSUM_IPV6 +#define IFCAP_HWCSUM_IPV6 0 +#define CSUM_TCP_IPV6 0 +#define CSUM_UDP_IPV6 0 +#define IFCAP_TXCSUM_IPV6 0 +#define IFCAP_RXCSUM_IPV6 0 +#define CSUM_DATA_VALID_IPV6 0 +#endif + enum { LF_NO = 0, LF_MAYBE, @@ -264,15 +273,6 @@ struct sge_txq { struct sg_ent txq_sgl[TX_MAX_SEGS / 2 + 1]; }; - -enum { - SGE_PSTAT_TSO, /* # of TSO requests */ - SGE_PSTAT_RX_CSUM_GOOD, /* # of successful RX csum offloads */ - SGE_PSTAT_TX_CSUM, /* # of TX checksum offloads */ - SGE_PSTAT_VLANEX, /* # of VLAN tag extractions */ - SGE_PSTAT_VLANINS, /* # of VLAN tag insertions */ -}; - #define SGE_PSTAT_MAX (SGE_PSTAT_VLANINS+1) #define QS_EXITING 0x1 @@ -287,7 +287,6 @@ struct sge_qset { struct lro_state lro; struct sge_txq txq[SGE_TXQ_PER_SET]; uint32_t txq_stopped; /* which Tx queues are stopped */ - uint64_t port_stats[SGE_PSTAT_MAX]; struct port_info *port; struct adapter *adap; int idx; /* qset # */ @@ -537,7 +536,7 @@ int t3_sge_reset_adapter(adapter_t *); int t3_sge_init_port(struct port_info *); void t3_free_tx_desc(struct sge_qset *qs, int n, int qid); -void t3_rx_eth(struct adapter *adap, struct sge_rspq *rq, struct mbuf *m, int ethpad); +void t3_rx_eth(struct adapter *adap, struct mbuf *m, int ethpad); void t3_add_attach_sysctls(adapter_t *sc); void t3_add_configured_sysctls(adapter_t *sc); Modified: stable/9/sys/dev/cxgb/cxgb_main.c ============================================================================== --- stable/9/sys/dev/cxgb/cxgb_main.c Sun Jul 1 12:59:00 2012 (r237924) +++ stable/9/sys/dev/cxgb/cxgb_main.c Sun Jul 1 13:43:30 2012 (r237925) @@ -986,7 +986,7 @@ cxgb_makedev(struct port_info *pi) #define CXGB_CAP (IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU | IFCAP_HWCSUM | \ IFCAP_VLAN_HWCSUM | IFCAP_TSO | IFCAP_JUMBO_MTU | IFCAP_LRO | \ - IFCAP_VLAN_HWTSO | IFCAP_LINKSTATE) + IFCAP_VLAN_HWTSO | IFCAP_LINKSTATE | IFCAP_HWCSUM_IPV6) #define CXGB_CAP_ENABLE CXGB_CAP static int @@ -1027,7 +1027,8 @@ cxgb_port_attach(device_t dev) ifp->if_capabilities |= IFCAP_TOE4; #endif ifp->if_capenable = CXGB_CAP_ENABLE; - ifp->if_hwassist = CSUM_TCP | CSUM_UDP | CSUM_IP | CSUM_TSO; + ifp->if_hwassist = CSUM_TCP | CSUM_UDP | CSUM_IP | CSUM_TSO | + CSUM_UDP_IPV6 | CSUM_TCP_IPV6; /* * Disable TSO on 4-port - it isn't supported by the firmware. @@ -1950,31 +1951,52 @@ fail: ifp->if_capenable ^= IFCAP_TXCSUM; ifp->if_hwassist ^= (CSUM_TCP | CSUM_UDP | CSUM_IP); - if (IFCAP_TSO & ifp->if_capenable && + if (IFCAP_TSO4 & ifp->if_capenable && !(IFCAP_TXCSUM & ifp->if_capenable)) { - ifp->if_capenable &= ~IFCAP_TSO; - ifp->if_hwassist &= ~CSUM_TSO; + ifp->if_capenable &= ~IFCAP_TSO4; if_printf(ifp, - "tso disabled due to -txcsum.\n"); + "tso4 disabled due to -txcsum.\n"); + } + } + if (mask & IFCAP_TXCSUM_IPV6) { + ifp->if_capenable ^= IFCAP_TXCSUM_IPV6; + ifp->if_hwassist ^= (CSUM_UDP_IPV6 | CSUM_TCP_IPV6); + + if (IFCAP_TSO6 & ifp->if_capenable && + !(IFCAP_TXCSUM_IPV6 & ifp->if_capenable)) { + ifp->if_capenable &= ~IFCAP_TSO6; + if_printf(ifp, + "tso6 disabled due to -txcsum6.\n"); } } if (mask & IFCAP_RXCSUM) ifp->if_capenable ^= IFCAP_RXCSUM; - if (mask & IFCAP_TSO) { - ifp->if_capenable ^= IFCAP_TSO; + if (mask & IFCAP_RXCSUM_IPV6) + ifp->if_capenable ^= IFCAP_RXCSUM_IPV6; - if (IFCAP_TSO & ifp->if_capenable) { - if (IFCAP_TXCSUM & ifp->if_capenable) - ifp->if_hwassist |= CSUM_TSO; - else { - ifp->if_capenable &= ~IFCAP_TSO; - ifp->if_hwassist &= ~CSUM_TSO; - if_printf(ifp, - "enable txcsum first.\n"); - error = EAGAIN; - } - } else - ifp->if_hwassist &= ~CSUM_TSO; + /* + * Note that we leave CSUM_TSO alone (it is always set). The + * kernel takes both IFCAP_TSOx and CSUM_TSO into account before + * sending a TSO request our way, so it's sufficient to toggle + * IFCAP_TSOx only. + */ + if (mask & IFCAP_TSO4) { + if (!(IFCAP_TSO4 & ifp->if_capenable) && + !(IFCAP_TXCSUM & ifp->if_capenable)) { + if_printf(ifp, "enable txcsum first.\n"); + error = EAGAIN; + goto fail; + } + ifp->if_capenable ^= IFCAP_TSO4; + } + if (mask & IFCAP_TSO6) { + if (!(IFCAP_TSO6 & ifp->if_capenable) && + !(IFCAP_TXCSUM_IPV6 & ifp->if_capenable)) { + if_printf(ifp, "enable txcsum6 first.\n"); + error = EAGAIN; + goto fail; + } + ifp->if_capenable ^= IFCAP_TSO6; } if (mask & IFCAP_LRO) { ifp->if_capenable ^= IFCAP_LRO; Modified: stable/9/sys/dev/cxgb/cxgb_sge.c ============================================================================== --- stable/9/sys/dev/cxgb/cxgb_sge.c Sun Jul 1 12:59:00 2012 (r237924) +++ stable/9/sys/dev/cxgb/cxgb_sge.c Sun Jul 1 13:43:30 2012 (r237925) @@ -1432,7 +1432,8 @@ t3_encap(struct sge_qset *qs, struct mbu cntrl |= V_TXPKT_OPCODE(CPL_TX_PKT); if (__predict_false(!(cflags & CSUM_IP))) cntrl |= F_TXPKT_IPCSUM_DIS; - if (__predict_false(!(cflags & (CSUM_TCP | CSUM_UDP)))) + if (__predict_false(!(cflags & (CSUM_TCP | CSUM_UDP | + CSUM_UDP_IPV6 | CSUM_TCP_IPV6)))) cntrl |= F_TXPKT_L4CSUM_DIS; hflit[0] = htonl(cntrl); @@ -1547,7 +1548,8 @@ t3_encap(struct sge_qset *qs, struct mbu cntrl |= V_TXPKT_OPCODE(CPL_TX_PKT); if (__predict_false(!(m0->m_pkthdr.csum_flags & CSUM_IP))) cntrl |= F_TXPKT_IPCSUM_DIS; - if (__predict_false(!(m0->m_pkthdr.csum_flags & (CSUM_TCP | CSUM_UDP)))) + if (__predict_false(!(m0->m_pkthdr.csum_flags & (CSUM_TCP | + CSUM_UDP | CSUM_UDP_IPV6 | CSUM_TCP_IPV6)))) cntrl |= F_TXPKT_L4CSUM_DIS; cpl->cntrl = htonl(cntrl); cpl->len = htonl(mlen | 0x80000000); @@ -2620,20 +2622,12 @@ err: * will also be taken into account here. */ void -t3_rx_eth(struct adapter *adap, struct sge_rspq *rq, struct mbuf *m, int ethpad) +t3_rx_eth(struct adapter *adap, struct mbuf *m, int ethpad) { struct cpl_rx_pkt *cpl = (struct cpl_rx_pkt *)(mtod(m, uint8_t *) + ethpad); struct port_info *pi = &adap->port[adap->rxpkt_map[cpl->iff]]; struct ifnet *ifp = pi->ifp; - if ((ifp->if_capenable & IFCAP_RXCSUM) && !cpl->fragment && - cpl->csum_valid && cpl->csum == 0xffff) { - m->m_pkthdr.csum_flags = (CSUM_IP_CHECKED|CSUM_IP_VALID); - rspq_to_qset(rq)->port_stats[SGE_PSTAT_RX_CSUM_GOOD]++; - m->m_pkthdr.csum_flags = (CSUM_IP_CHECKED|CSUM_IP_VALID|CSUM_DATA_VALID|CSUM_PSEUDO_HDR); - m->m_pkthdr.csum_data = 0xffff; - } - if (cpl->vlan_valid) { m->m_pkthdr.ether_vtag = ntohs(cpl->vlan); m->m_flags |= M_VLANTAG; @@ -2647,6 +2641,30 @@ t3_rx_eth(struct adapter *adap, struct s m->m_pkthdr.len -= (sizeof(*cpl) + ethpad); m->m_len -= (sizeof(*cpl) + ethpad); m->m_data += (sizeof(*cpl) + ethpad); + + if (!cpl->fragment && cpl->csum_valid && cpl->csum == 0xffff) { + struct ether_header *eh = mtod(m, void *); + uint16_t eh_type; + + if (eh->ether_type == htons(ETHERTYPE_VLAN)) { + struct ether_vlan_header *evh = mtod(m, void *); + + eh_type = evh->evl_proto; + } else + eh_type = eh->ether_type; + + if (ifp->if_capenable & IFCAP_RXCSUM && + eh_type == htons(ETHERTYPE_IP)) { + m->m_pkthdr.csum_flags = (CSUM_IP_CHECKED | + CSUM_IP_VALID | CSUM_DATA_VALID | CSUM_PSEUDO_HDR); + m->m_pkthdr.csum_data = 0xffff; + } else if (ifp->if_capenable & IFCAP_RXCSUM_IPV6 && + eh_type == htons(ETHERTYPE_IPV6)) { + m->m_pkthdr.csum_flags = (CSUM_DATA_VALID_IPV6 | + CSUM_PSEUDO_HDR); + m->m_pkthdr.csum_data = 0xffff; + } + } } /** @@ -2913,7 +2931,7 @@ process_responses(adapter_t *adap, struc } else if (eth && eop) { struct mbuf *m = mh->mh_head; - t3_rx_eth(adap, rspq, m, ethpad); + t3_rx_eth(adap, m, ethpad); /* * The T304 sends incoming packets on any qset. If LRO Modified: stable/9/sys/dev/cxgbe/adapter.h ============================================================================== --- stable/9/sys/dev/cxgbe/adapter.h Sun Jul 1 12:59:00 2012 (r237924) +++ stable/9/sys/dev/cxgbe/adapter.h Sun Jul 1 13:43:30 2012 (r237925) @@ -56,6 +56,15 @@ MALLOC_DECLARE(M_CXGBE); #define CXGBE_UNIMPLEMENTED(s) \ panic("%s (%s, line %d) not implemented yet.", s, __FILE__, __LINE__) +#ifndef IFCAP_HWCSUM_IPV6 +#define IFCAP_HWCSUM_IPV6 0 +#define CSUM_TCP_IPV6 0 +#define CSUM_UDP_IPV6 0 +#define IFCAP_TXCSUM_IPV6 0 +#define IFCAP_RXCSUM_IPV6 0 +#define CSUM_DATA_VALID_IPV6 0 +#endif + #if defined(__i386__) || defined(__amd64__) static __inline void prefetch(void *x) @@ -391,7 +400,7 @@ struct sge_txq { /* stats for common events first */ uint64_t txcsum; /* # of times hardware assisted with checksum */ - uint64_t tso_wrs; /* # of IPv4 TSO work requests */ + uint64_t tso_wrs; /* # of TSO work requests */ uint64_t vlan_insertion;/* # of times VLAN tag was inserted */ uint64_t imm_wrs; /* # of work requests with immediate data */ uint64_t sgl_wrs; /* # of work requests with direct SGL */ @@ -411,7 +420,7 @@ struct sge_rxq { struct sge_fl fl; /* MUST follow iq */ struct ifnet *ifp; /* the interface this rxq belongs to */ -#ifdef INET +#if defined(INET) || defined(INET6) struct lro_ctrl lro; /* LRO state */ #endif Modified: stable/9/sys/dev/cxgbe/common/common.h ============================================================================== --- stable/9/sys/dev/cxgbe/common/common.h Sun Jul 1 12:59:00 2012 (r237924) +++ stable/9/sys/dev/cxgbe/common/common.h Sun Jul 1 13:43:30 2012 (r237925) @@ -38,6 +38,8 @@ enum { SERNUM_LEN = 24, /* Serial # length */ EC_LEN = 16, /* E/C length */ ID_LEN = 16, /* ID length */ + PN_LEN = 16, /* Part Number length */ + MACADDR_LEN = 12, /* MAC Address length */ }; enum { MEM_EDC0, MEM_EDC1, MEM_MC }; @@ -62,8 +64,8 @@ enum { }; #define FW_VERSION_MAJOR 1 -#define FW_VERSION_MINOR 4 -#define FW_VERSION_MICRO 16 +#define FW_VERSION_MINOR 5 +#define FW_VERSION_MICRO 2 struct port_stats { u64 tx_octets; /* total # of octets in good frames */ @@ -219,6 +221,8 @@ struct vpd_params { u8 ec[EC_LEN + 1]; u8 sn[SERNUM_LEN + 1]; u8 id[ID_LEN + 1]; + u8 pn[PN_LEN + 1]; + u8 na[MACADDR_LEN + 1]; }; struct pci_params { @@ -356,6 +360,8 @@ void t4_write_indirect(struct adapter *a unsigned int data_reg, const u32 *vals, unsigned int nregs, unsigned int start_idx); +u32 t4_hw_pci_read_cfg4(adapter_t *adapter, int reg); + struct fw_filter_wr; void t4_intr_enable(struct adapter *adapter); @@ -374,7 +380,7 @@ int t4_seeprom_wp(struct adapter *adapte int t4_read_flash(struct adapter *adapter, unsigned int addr, unsigned int nwords, u32 *data, int byte_oriented); int t4_load_fw(struct adapter *adapter, const u8 *fw_data, unsigned int size); -int t4_load_boot(struct adapter *adap, const u8 *boot_data, +int t4_load_boot(struct adapter *adap, u8 *boot_data, unsigned int boot_addr, unsigned int size); unsigned int t4_flash_cfg_addr(struct adapter *adapter); int t4_load_cfg(struct adapter *adapter, const u8 *cfg_data, unsigned int size); @@ -431,6 +437,9 @@ int t4_mem_read(struct adapter *adap, in __be32 *data); void t4_get_port_stats(struct adapter *adap, int idx, struct port_stats *p); +void t4_get_port_stats_offset(struct adapter *adap, int idx, + struct port_stats *stats, + struct port_stats *offset); void t4_get_lb_stats(struct adapter *adap, int idx, struct lb_port_stats *p); void t4_clr_port_stats(struct adapter *adap, int idx); @@ -472,6 +481,10 @@ int t4_fw_hello(struct adapter *adap, un enum dev_master master, enum dev_state *state); int t4_fw_bye(struct adapter *adap, unsigned int mbox); int t4_fw_reset(struct adapter *adap, unsigned int mbox, int reset); +int t4_fw_halt(struct adapter *adap, unsigned int mbox, int force); +int t4_fw_restart(struct adapter *adap, unsigned int mbox, int reset); +int t4_fw_upgrade(struct adapter *adap, unsigned int mbox, + const u8 *fw_data, unsigned int size, int force); int t4_fw_initialize(struct adapter *adap, unsigned int mbox); int t4_query_params(struct adapter *adap, unsigned int mbox, unsigned int pf, unsigned int vf, unsigned int nparams, const u32 *params, @@ -484,6 +497,10 @@ int t4_cfg_pfvf(struct adapter *adap, un unsigned int rxqi, unsigned int rxq, unsigned int tc, unsigned int vi, unsigned int cmask, unsigned int pmask, unsigned int exactf, unsigned int rcaps, unsigned int wxcaps); +int t4_alloc_vi_func(struct adapter *adap, unsigned int mbox, + unsigned int port, unsigned int pf, unsigned int vf, + unsigned int nmac, u8 *mac, unsigned int *rss_size, + unsigned int portfunc, unsigned int idstype); int t4_alloc_vi(struct adapter *adap, unsigned int mbox, unsigned int port, unsigned int pf, unsigned int vf, unsigned int nmac, u8 *mac, unsigned int *rss_size); @@ -524,5 +541,10 @@ int t4_sge_ctxt_rd(struct adapter *adap, enum ctxt_type ctype, u32 *data); int t4_sge_ctxt_rd_bd(struct adapter *adap, unsigned int cid, enum ctxt_type ctype, u32 *data); +int t4_sge_ctxt_flush(struct adapter *adap, unsigned int mbox); int t4_handle_fw_rpl(struct adapter *adap, const __be64 *rpl); +int t4_fwaddrspace_write(struct adapter *adap, unsigned int mbox, u32 addr, u32 val); +int t4_config_scheduler(struct adapter *adapter, int mode, int level, int pktsize, + int sched_class, int port, int rate, int unit, + int weight, int minrate, int maxrate); #endif /* __CHELSIO_COMMON_H */ Modified: stable/9/sys/dev/cxgbe/common/t4_hw.c ============================================================================== --- stable/9/sys/dev/cxgbe/common/t4_hw.c Sun Jul 1 12:59:00 2012 (r237924) +++ stable/9/sys/dev/cxgbe/common/t4_hw.c Sun Jul 1 13:43:30 2012 (r237925) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2011 Chelsio Communications, Inc. + * Copyright (c) 2012 Chelsio Communications, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -135,6 +135,20 @@ void t4_write_indirect(struct adapter *a } /* + * Read a 32-bit PCI Configuration Space register via the PCI-E backdoor + * mechanism. This guarantees that we get the real value even if we're + * operating within a Virtual Machine and the Hypervisor is trapping our + * Configuration Space accesses. + */ +u32 t4_hw_pci_read_cfg4(adapter_t *adap, int reg) +{ + t4_write_reg(adap, A_PCIE_CFG_SPACE_REQ, + F_ENABLE | F_LOCALCFG | V_FUNCTION(adap->pf) | + V_REGISTER(reg)); + return t4_read_reg(adap, A_PCIE_CFG_SPACE_DATA); +} + +/* * Get the reply to a mailbox command and store it in @rpl in big-endian order. */ static void get_mbox_rpl(struct adapter *adap, __be64 *rpl, int nflit, @@ -196,7 +210,6 @@ int t4_wr_mbox_meat(struct adapter *adap u64 res; int i, ms, delay_idx; const __be64 *p = cmd; - u32 data_reg = PF_REG(mbox, A_CIM_PF_MAILBOX_DATA); u32 ctl_reg = PF_REG(mbox, A_CIM_PF_MAILBOX_CTRL); @@ -283,7 +296,7 @@ int t4_mc_read(struct adapter *adap, u32 #define MC_DATA(i) MC_BIST_STATUS_REG(A_MC_BIST_STATUS_RDATA, i) for (i = 15; i >= 0; i--) - *data++ = htonl(t4_read_reg(adap, MC_DATA(i))); + *data++ = ntohl(t4_read_reg(adap, MC_DATA(i))); if (ecc) *ecc = t4_read_reg64(adap, MC_DATA(16)); #undef MC_DATA @@ -321,7 +334,7 @@ int t4_edc_read(struct adapter *adap, in #define EDC_DATA(i) (EDC_BIST_STATUS_REG(A_EDC_BIST_STATUS_RDATA, i) + idx) for (i = 15; i >= 0; i--) - *data++ = htonl(t4_read_reg(adap, EDC_DATA(i))); + *data++ = ntohl(t4_read_reg(adap, EDC_DATA(i))); if (ecc) *ecc = t4_read_reg64(adap, EDC_DATA(16)); #undef EDC_DATA @@ -566,7 +579,7 @@ static int get_vpd_keyword_val(const str static int get_vpd_params(struct adapter *adapter, struct vpd_params *p) { int i, ret, addr; - int ec, sn; + int ec, sn, pn, na; u8 vpd[VPD_LEN], csum; const struct t4_vpd_hdr *v; @@ -602,6 +615,8 @@ static int get_vpd_params(struct adapter } FIND_VPD_KW(ec, "EC"); FIND_VPD_KW(sn, "SN"); + FIND_VPD_KW(pn, "PN"); + FIND_VPD_KW(na, "NA"); #undef FIND_VPD_KW memcpy(p->id, v->id_data, ID_LEN); @@ -611,6 +626,10 @@ static int get_vpd_params(struct adapter i = vpd[sn - VPD_INFO_FLD_HDR_SIZE + 2]; memcpy(p->sn, vpd + sn, min(i, SERNUM_LEN)); strstrip(p->sn); + memcpy(p->pn, vpd + pn, min(i, PN_LEN)); + strstrip((char *)p->pn); + memcpy(p->na, vpd + na, min(i, MACADDR_LEN)); + strstrip((char *)p->na); return 0; } @@ -954,7 +973,7 @@ int t4_load_cfg(struct adapter *adap, co if (ret || size == 0) goto out; - /* this will write to the flash up to SF_PAGE_SIZE at a time */ + /* this will write to the flash up to SF_PAGE_SIZE at a time */ for (i = 0; i< size; i+= SF_PAGE_SIZE) { if ( (size - i) < SF_PAGE_SIZE) n = size - i; @@ -1056,42 +1075,209 @@ out: return ret; } -/* BIOS boot header */ -typedef struct boot_header_s { - u8 signature[2]; /* signature */ - u8 length; /* image length (include header) */ - u8 offset[4]; /* initialization vector */ - u8 reserved[19]; /* reserved */ - u8 exheader[2]; /* offset to expansion header */ -} boot_header_t; +/* BIOS boot headers */ +typedef struct pci_expansion_rom_header { + u8 signature[2]; /* ROM Signature. Should be 0xaa55 */ + u8 reserved[22]; /* Reserved per processor Architecture data */ + u8 pcir_offset[2]; /* Offset to PCI Data Structure */ +} pci_exp_rom_header_t; /* PCI_EXPANSION_ROM_HEADER */ + +/* Legacy PCI Expansion ROM Header */ +typedef struct legacy_pci_expansion_rom_header { + u8 signature[2]; /* ROM Signature. Should be 0xaa55 */ + u8 size512; /* Current Image Size in units of 512 bytes */ + u8 initentry_point[4]; + u8 cksum; /* Checksum computed on the entire Image */ + u8 reserved[16]; /* Reserved */ + u8 pcir_offset[2]; /* Offset to PCI Data Struture */ +} legacy_pci_exp_rom_header_t; /* LEGACY_PCI_EXPANSION_ROM_HEADER */ + +/* EFI PCI Expansion ROM Header */ +typedef struct efi_pci_expansion_rom_header { + u8 signature[2]; // ROM signature. The value 0xaa55 + u8 initialization_size[2]; /* Units 512. Includes this header */ + u8 efi_signature[4]; /* Signature from EFI image header. 0x0EF1 */ + u8 efi_subsystem[2]; /* Subsystem value for EFI image header */ + u8 efi_machine_type[2]; /* Machine type from EFI image header */ + u8 compression_type[2]; /* Compression type. */ + /* + * Compression type definition + * 0x0: uncompressed + * 0x1: Compressed + * 0x2-0xFFFF: Reserved + */ + u8 reserved[8]; /* Reserved */ + u8 efi_image_header_offset[2]; /* Offset to EFI Image */ + u8 pcir_offset[2]; /* Offset to PCI Data Structure */ +} efi_pci_exp_rom_header_t; /* EFI PCI Expansion ROM Header */ + +/* PCI Data Structure Format */ +typedef struct pcir_data_structure { /* PCI Data Structure */ + u8 signature[4]; /* Signature. The string "PCIR" */ + u8 vendor_id[2]; /* Vendor Identification */ + u8 device_id[2]; /* Device Identification */ + u8 vital_product[2]; /* Pointer to Vital Product Data */ + u8 length[2]; /* PCIR Data Structure Length */ + u8 revision; /* PCIR Data Structure Revision */ + u8 class_code[3]; /* Class Code */ + u8 image_length[2]; /* Image Length. Multiple of 512B */ + u8 code_revision[2]; /* Revision Level of Code/Data */ + u8 code_type; /* Code Type. */ + /* + * PCI Expansion ROM Code Types + * 0x00: Intel IA-32, PC-AT compatible. Legacy + * 0x01: Open Firmware standard for PCI. FCODE + * 0x02: Hewlett-Packard PA RISC. HP reserved + * 0x03: EFI Image. EFI + * 0x04-0xFF: Reserved. + */ + u8 indicator; /* Indicator. Identifies the last image in the ROM */ + u8 reserved[2]; /* Reserved */ +} pcir_data_t; /* PCI__DATA_STRUCTURE */ +/* BOOT constants */ enum { BOOT_FLASH_BOOT_ADDR = 0x0,/* start address of boot image in flash */ BOOT_SIGNATURE = 0xaa55, /* signature of BIOS boot ROM */ BOOT_SIZE_INC = 512, /* image size measured in 512B chunks */ - BOOT_MIN_SIZE = sizeof(boot_header_t), /* at least basic header */ - BOOT_MAX_SIZE = 1024*BOOT_SIZE_INC /* 1 byte * length increment */ + BOOT_MIN_SIZE = sizeof(pci_exp_rom_header_t), /* basic header */ + BOOT_MAX_SIZE = 1024*BOOT_SIZE_INC, /* 1 byte * length increment */ + VENDOR_ID = 0x1425, /* Vendor ID */ + PCIR_SIGNATURE = 0x52494350 /* PCIR signature */ }; /* + * modify_device_id - Modifies the device ID of the Boot BIOS image + * @adatper: the device ID to write. + * @boot_data: the boot image to modify. + * + * Write the supplied device ID to the boot BIOS image. + */ +static void modify_device_id(int device_id, u8 *boot_data) +{ + legacy_pci_exp_rom_header_t *header; + pcir_data_t *pcir_header; + u32 cur_header = 0; + + /* + * Loop through all chained images and change the device ID's + */ + while (1) { + header = (legacy_pci_exp_rom_header_t *) &boot_data[cur_header]; + pcir_header = (pcir_data_t *) &boot_data[cur_header + + le16_to_cpu(*(u16*)header->pcir_offset)]; + + /* + * Only modify the Device ID if code type is Legacy or HP. + * 0x00: Okay to modify + * 0x01: FCODE. Do not be modify + * 0x03: Okay to modify + * 0x04-0xFF: Do not modify + */ + if (pcir_header->code_type == 0x00) { + u8 csum = 0; + int i; + + /* + * Modify Device ID to match current adatper + */ + *(u16*) pcir_header->device_id = device_id; + + /* + * Set checksum temporarily to 0. + * We will recalculate it later. + */ + header->cksum = 0x0; + + /* + * Calculate and update checksum + */ + for (i = 0; i < (header->size512 * 512); i++) + csum += (u8)boot_data[cur_header + i]; + + /* + * Invert summed value to create the checksum + * Writing new checksum value directly to the boot data + */ + boot_data[cur_header + 7] = -csum; + + } else if (pcir_header->code_type == 0x03) { + + /* + * Modify Device ID to match current adatper + */ + *(u16*) pcir_header->device_id = device_id; + + } + + + /* + * Check indicator element to identify if this is the last + * image in the ROM. + */ + if (pcir_header->indicator & 0x80) + break; + + /* + * Move header pointer up to the next image in the ROM. + */ + cur_header += header->size512 * 512; + } +} + +/* * t4_load_boot - download boot flash * @adapter: the adapter * @boot_data: the boot image to write + * @boot_addr: offset in flash to write boot_data * @size: image size * * Write the supplied boot image to the card's serial flash. * The boot image has the following sections: a 28-byte header and the * boot image. */ -int t4_load_boot(struct adapter *adap, const u8 *boot_data, +int t4_load_boot(struct adapter *adap, u8 *boot_data, unsigned int boot_addr, unsigned int size) { + pci_exp_rom_header_t *header; + int pcir_offset ; + pcir_data_t *pcir_header; int ret, addr; + uint16_t device_id; unsigned int i; unsigned int boot_sector = boot_addr * 1024; unsigned int sf_sec_size = adap->params.sf_size / adap->params.sf_nsec; /* + * Make sure the boot image does not encroach on the firmware region + */ + if ((boot_sector + size) >> 16 > FLASH_FW_START_SEC) { + CH_ERR(adap, "boot image encroaching on firmware region\n"); + return -EFBIG; + } + + /* + * Number of sectors spanned + */ + i = DIV_ROUND_UP(size ? size : FLASH_BOOTCFG_MAX_SIZE, + sf_sec_size); + ret = t4_flash_erase_sectors(adap, boot_sector >> 16, + (boot_sector >> 16) + i - 1); + + /* + * If size == 0 then we're simply erasing the FLASH sectors associated + * with the on-adapter option ROM file + */ + if (ret || (size == 0)) + goto out; + + /* Get boot header */ + header = (pci_exp_rom_header_t *)boot_data; + pcir_offset = le16_to_cpu(*(u16 *)header->pcir_offset); + /* PCIR Data Structure */ + pcir_header = (pcir_data_t *) &boot_data[pcir_offset]; + + /* * Perform some primitive sanity testing to avoid accidentally * writing garbage over the boot sectors. We ought to check for * more but it's not worth it for now ... @@ -1102,18 +1288,46 @@ int t4_load_boot(struct adapter *adap, c } /* - * Make sure the boot image does not encroach on the firmware region + * Check BOOT ROM header signature */ - if ((boot_sector + size) >> 16 > FLASH_FW_START_SEC) { - CH_ERR(adap, "boot image encroaching on firmware region\n"); - return -EFBIG; + if (le16_to_cpu(*(u16*)header->signature) != BOOT_SIGNATURE ) { + CH_ERR(adap, "Boot image missing signature\n"); + return -EINVAL; } - i = DIV_ROUND_UP(size, sf_sec_size); /* # of sectors spanned */ - ret = t4_flash_erase_sectors(adap, boot_sector >> 16, - (boot_sector >> 16) + i - 1); - if (ret) - goto out; + /* + * Check PCI header signature + */ + if (le32_to_cpu(*(u32*)pcir_header->signature) != PCIR_SIGNATURE) { + CH_ERR(adap, "PCI header missing signature\n"); + return -EINVAL; + } + + /* + * Check Vendor ID matches Chelsio ID + */ + if (le16_to_cpu(*(u16*)pcir_header->vendor_id) != VENDOR_ID) { + CH_ERR(adap, "Vendor ID missing signature\n"); + return -EINVAL; + } + + /* + * Retrieve adapter's device ID + */ + t4_os_pci_read_cfg2(adap, PCI_DEVICE_ID, &device_id); + /* Want to deal with PF 0 so I strip off PF 4 indicator */ + device_id = (device_id & 0xff) | 0x4000; + + /* + * Check PCIE Device ID + */ + if (le16_to_cpu(*(u16*)pcir_header->device_id) != device_id) { + /* + * Change the device ID in the Boot BIOS image to match + * the Device ID of the current adapter. + */ + modify_device_id(device_id, boot_data); + } /* * Skip over the first SF_PAGE_SIZE worth of data and write it after @@ -3206,7 +3420,11 @@ void t4_get_chan_txrate(struct adapter * * @enable: whether to enable or disable the filter * * Configures one of the tracing filters available in HW. If @enable is - * %0 @tp is not examined and may be %NULL. + * %0 @tp is not examined and may be %NULL. The user is responsible to + * set the single/multiple trace mode by writing to A_MPS_TRC_CFG register + * by using "cxgbtool iface reg reg_addr=val" command. See t4_sniffer/ + * docs/readme.txt for a complete description of how to setup traceing on + * T4. */ int t4_set_trace_filter(struct adapter *adap, const struct trace_params *tp, int idx, int enable) @@ -3217,45 +3435,45 @@ int t4_set_trace_filter(struct adapter * if (!enable) { t4_write_reg(adap, A_MPS_TRC_FILTER_MATCH_CTL_A + ofst, 0); - goto out; + return 0; } - if (tp->port > 11 || tp->invert > 1 || tp->skip_len > M_TFLENGTH || - tp->skip_ofst > M_TFOFFSET || tp->min_len > M_TFMINPKTSIZE || - tp->snap_len > 9600 || (idx && tp->snap_len > 256)) - return -EINVAL; - - if (tp->snap_len > 256) { /* must be tracer 0 */ - if ((t4_read_reg(adap, A_MPS_TRC_FILTER_MATCH_CTL_A + 4) | - t4_read_reg(adap, A_MPS_TRC_FILTER_MATCH_CTL_A + 8) | - t4_read_reg(adap, A_MPS_TRC_FILTER_MATCH_CTL_A + 12)) & - F_TFEN) - return -EINVAL; /* other tracers are enabled */ + /* + * TODO - After T4 data book is updated, specify the exact + * section below. + * + * See T4 data book - MPS section for a complete description + * of the below if..else handling of A_MPS_TRC_CFG register + * value. + */ + cfg = t4_read_reg(adap, A_MPS_TRC_CFG); + if (cfg & F_TRCMULTIFILTER) { + /* + * If multiple tracers are enabled, then maximum + * capture size is 2.5KB (FIFO size of a single channel) + * minus 2 flits for CPL_TRACE_PKT header. + */ + if (tp->snap_len > ((10 * 1024 / 4) - (2 * 8))) + return -EINVAL; + } + else { + /* + * If multiple tracers are disabled, to avoid deadlocks + * maximum packet capture size of 9600 bytes is recommended. + * Also in this mode, only trace0 can be enabled and running. + */ multitrc = 0; - } else if (idx) { - i = t4_read_reg(adap, A_MPS_TRC_FILTER_MATCH_CTL_B); - if (G_TFCAPTUREMAX(i) > 256 && - (t4_read_reg(adap, A_MPS_TRC_FILTER_MATCH_CTL_A) & F_TFEN)) + if (tp->snap_len > 9600 || idx) return -EINVAL; } + if (tp->port > 11 || tp->invert > 1 || tp->skip_len > M_TFLENGTH || + tp->skip_ofst > M_TFOFFSET || tp->min_len > M_TFMINPKTSIZE) + return -EINVAL; + /* stop the tracer we'll be changing */ t4_write_reg(adap, A_MPS_TRC_FILTER_MATCH_CTL_A + ofst, 0); - /* disable tracing globally if running in the wrong single/multi mode */ - cfg = t4_read_reg(adap, A_MPS_TRC_CFG); - if ((cfg & F_TRCEN) && multitrc != (cfg & F_TRCMULTIFILTER)) { - t4_write_reg(adap, A_MPS_TRC_CFG, cfg ^ F_TRCEN); - t4_read_reg(adap, A_MPS_TRC_CFG); /* flush */ - msleep(1); - if (!(t4_read_reg(adap, A_MPS_TRC_CFG) & F_TRCFIFOEMPTY)) - return -ETIMEDOUT; - } - /* - * At this point either the tracing is enabled and in the right mode or - * disabled. - */ - idx *= (A_MPS_TRC_FILTER1_MATCH - A_MPS_TRC_FILTER0_MATCH); data_reg = A_MPS_TRC_FILTER0_MATCH + idx; mask_reg = A_MPS_TRC_FILTER0_DONT_CARE + idx; @@ -3271,9 +3489,6 @@ int t4_set_trace_filter(struct adapter * V_TFOFFSET(tp->skip_ofst) | V_TFLENGTH(tp->skip_len) | V_TFPORT(tp->port) | F_TFEN | V_TFINVERTMATCH(tp->invert)); - cfg &= ~F_TRCMULTIFILTER; - t4_write_reg(adap, A_MPS_TRC_CFG, cfg | F_TRCEN | multitrc); -out: t4_read_reg(adap, A_MPS_TRC_CFG); /* flush */ return 0; } @@ -3373,6 +3588,28 @@ static unsigned int get_mps_bg_map(struc } /** + * t4_get_port_stats_offset - collect port stats relative to a previous + * snapshot + * @adap: The adapter + * @idx: The port + * @stats: Current stats to fill + * @offset: Previous stats snapshot + */ +void t4_get_port_stats_offset(struct adapter *adap, int idx, + struct port_stats *stats, + struct port_stats *offset) +{ + u64 *s, *o; + int i; + + t4_get_port_stats(adap, idx, stats); + for (i = 0, s = (u64 *)stats, o = (u64 *)offset ; + i < (sizeof(struct port_stats)/sizeof(u64)) ; + i++, s++, o++) + *s -= *o; +} + +/** * t4_get_port_stats - collect port statistics * @adap: the adapter * @idx: the port index @@ -3633,6 +3870,20 @@ void t4_mk_filtdelwr(unsigned int ftid, (var).retval_len16 = htonl(FW_LEN16(var)); \ } while (0) +int t4_fwaddrspace_write(struct adapter *adap, unsigned int mbox, u32 addr, u32 val) +{ + struct fw_ldst_cmd c; + + memset(&c, 0, sizeof(c)); + c.op_to_addrspace = htonl(V_FW_CMD_OP(FW_LDST_CMD) | F_FW_CMD_REQUEST | + F_FW_CMD_WRITE | V_FW_LDST_CMD_ADDRSPACE(FW_LDST_ADDRSPC_FIRMWARE)); + c.cycles_to_len16 = htonl(FW_LEN16(c)); + c.u.addrval.addr = htonl(addr); + c.u.addrval.val = htonl(val); + + return t4_wr_mbox(adap, mbox, &c, sizeof(c), NULL); +} + /** * t4_mdio_rd - read a PHY register through MDIO * @adap: the adapter @@ -3693,6 +3944,30 @@ int t4_mdio_wr(struct adapter *adap, uns } /** + * t4_sge_ctxt_flush - flush the SGE context cache + * @adap: the adapter + * @mbox: mailbox to use for the FW command + * + * Issues a FW command through the given mailbox to flush the + * SGE context cache. + */ +int t4_sge_ctxt_flush(struct adapter *adap, unsigned int mbox) +{ + int ret; + struct fw_ldst_cmd c; + + memset(&c, 0, sizeof(c)); + c.op_to_addrspace = htonl(V_FW_CMD_OP(FW_LDST_CMD) | F_FW_CMD_REQUEST | + F_FW_CMD_READ | + V_FW_LDST_CMD_ADDRSPACE(FW_LDST_ADDRSPC_SGE_EGRC)); + c.cycles_to_len16 = htonl(FW_LEN16(c)); + c.u.idctxt.msg_ctxtflush = htonl(F_FW_LDST_CMD_CTXTFLUSH); + + ret = t4_wr_mbox(adap, mbox, &c, sizeof(c), &c); + return ret; +} + +/** * t4_sge_ctxt_rd - read an SGE context through FW * @adap: the adapter * @mbox: mailbox to use for the FW command @@ -3764,9 +4039,10 @@ int t4_sge_ctxt_rd_bd(struct adapter *ad * @mbox: mailbox to use for the FW command * @evt_mbox: mailbox to receive async FW events * @master: specifies the caller's willingness to be the device master - * @state: returns the current device state + * @state: returns the current device state (if non-NULL) * - * Issues a command to establish communication with FW. + * Issues a command to establish communication with FW. Returns either + * an error (negative integer) or the mailbox of the Master PF. */ int t4_fw_hello(struct adapter *adap, unsigned int mbox, unsigned int evt_mbox, enum dev_master master, enum dev_state *state) @@ -3918,6 +4194,175 @@ int t4_fw_reset(struct adapter *adap, un } /** + * t4_fw_halt - issue a reset/halt to FW and put uP into RESET + * @adap: the adapter + * @mbox: mailbox to use for the FW RESET command (if desired) + * @force: force uP into RESET even if FW RESET command fails + * + * Issues a RESET command to firmware (if desired) with a HALT indication + * and then puts the microprocessor into RESET state. The RESET command + * will only be issued if a legitimate mailbox is provided (mbox <= + * M_PCIE_FW_MASTER). + * + * This is generally used in order for the host to safely manipulate the + * adapter without fear of conflicting with whatever the firmware might + * be doing. The only way out of this state is to RESTART the firmware + * ... + */ +int t4_fw_halt(struct adapter *adap, unsigned int mbox, int force) +{ + int ret = 0; + + /* + * If a legitimate mailbox is provided, issue a RESET command + * with a HALT indication. + */ + if (mbox <= M_PCIE_FW_MASTER) { + struct fw_reset_cmd c; + + memset(&c, 0, sizeof(c)); + INIT_CMD(c, RESET, WRITE); + c.val = htonl(F_PIORST | F_PIORSTMODE); + c.halt_pkd = htonl(F_FW_RESET_CMD_HALT); + ret = t4_wr_mbox(adap, mbox, &c, sizeof(c), NULL); + } + + /* + * Normally we won't complete the operation if the firmware RESET + * command fails but if our caller insists we'll go ahead and put the + * uP into RESET. This can be useful if the firmware is hung or even + * missing ... We'll have to take the risk of putting the uP into + * RESET without the cooperation of firmware in that case. + * + * We also force the firmware's HALT flag to be on in case we bypassed + * the firmware RESET command above or we're dealing with old firmware + * which doesn't have the HALT capability. This will serve as a flag + * for the incoming firmware to know that it's coming out of a HALT + * rather than a RESET ... if it's new enough to understand that ... + */ + if (ret == 0 || force) { + t4_set_reg_field(adap, A_CIM_BOOT_CFG, F_UPCRST, F_UPCRST); + t4_set_reg_field(adap, A_PCIE_FW, F_PCIE_FW_HALT, F_PCIE_FW_HALT); + } + + /* + * And we always return the result of the firmware RESET command + * even when we force the uP into RESET ... + */ + return ret; +} + +/** + * t4_fw_restart - restart the firmware by taking the uP out of RESET + * @adap: the adapter + * @reset: if we want to do a RESET to restart things + * + * Restart firmware previously halted by t4_fw_halt(). On successful + * return the previous PF Master remains as the new PF Master and there + * is no need to issue a new HELLO command, etc. + * + * We do this in two ways: + * + * 1. If we're dealing with newer firmware we'll simply want to take + * the chip's microprocessor out of RESET. This will cause the + * firmware to start up from its start vector. And then we'll loop + * until the firmware indicates it's started again (PCIE_FW.HALT + * reset to 0) or we timeout. + * + * 2. If we're dealing with older firmware then we'll need to RESET + * the chip since older firmware won't recognize the PCIE_FW.HALT *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 13:56:55 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B4D051065673; Sun, 1 Jul 2012 13:56:55 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from smtp.fgznet.ch (mail.fgznet.ch [81.92.96.47]) by mx1.freebsd.org (Postfix) with ESMTP id 2990A8FC19; Sun, 1 Jul 2012 13:56:54 +0000 (UTC) Received: from deuterium.andreas.nets (dhclient-91-190-14-19.flashcable.ch [91.190.14.19]) by smtp.fgznet.ch (8.13.8/8.13.8/Submit_SMTPAUTH) with ESMTP id q61Duq9D092064; Sun, 1 Jul 2012 15:56:53 +0200 (CEST) (envelope-from andreast@FreeBSD.org) Message-ID: <4FF05724.3050904@FreeBSD.org> Date: Sun, 01 Jul 2012 15:56:52 +0200 From: Andreas Tobler User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.5; rv:13.0) Gecko/20120601 Thunderbird/13.0 MIME-Version: 1.0 To: Konstantin Belousov References: <201206210926.q5L9Q6nR002030@svn.freebsd.org> <4FF03316.5050609@FreeBSD.org> <20120701120408.GM2337@deviant.kiev.zoral.com.ua> <4FF0528E.50002@FreeBSD.org> <20120701134132.GO2337@deviant.kiev.zoral.com.ua> In-Reply-To: <20120701134132.GO2337@deviant.kiev.zoral.com.ua> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.64 on 81.92.96.47 Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r237367 - head/sys/fs/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 13:56:55 -0000 On 01.07.12 15:41, Konstantin Belousov wrote: > On Sun, Jul 01, 2012 at 03:37:18PM +0200, Andreas Tobler wrote: >> On 01.07.12 14:04, Konstantin Belousov wrote: >>> On Sun, Jul 01, 2012 at 01:23:02PM +0200, Andreas Tobler wrote: >>>> On 21.06.12 11:26, Konstantin Belousov wrote: >>>>> Author: kib >>>>> Date: Thu Jun 21 09:26:06 2012 >>>>> New Revision: 237367 >>>>> URL: http://svn.freebsd.org/changeset/base/237367 >>>>> >>>>> Log: >>>>> Enable deadlock avoidance code for NFS client. >>>> >>>> >>>> Hm, since this commit I fail with my nfs installworld/kernel. >>>> >>>> I have a builder which installs world/kernel to a nfs mounted directory. >>>> Namely used for cross builds. >>>> >>>> Now since this commit I get the following when I install kernel to the >>>> nfs directory: >>>> >>>> .. >>>> install -o root -g wheel -m 555 zfs.ko.symbols >>>> /netboot/sparc64/boot/kernel >>>> install: /netboot/sparc64/boot/kernel/zfs.ko.symbols: No such file or >>>> directory >>>> *** [_kmodinstall] Error code 71 >>>> .. >>>> >>>> The file is there, a local install of the tree works without problems. >>>> Reverting to r237366 also makes it work again. >>>> >>>> The server is a -CURRENT, r237880, The client, -CURRENT too. >>>> >>>> How can I help to track down the real issue? >>> >>> Is it always the same file in the install procedure which causes the >>> failure ? Even more, is the failure pattern always the same ? >> >> I'd say so yes. When installing a kernel onto a nfs mounted fs then >> always (in my cases) the zfs.ko.symbols was the failing pattern. >> I tried ppc64 and sparc64 as target. With both it was the above file. >> >> When doing a installworld, it was, also in both cases, ppc64/sparc64, >> the cc1 in libexec which failed. >> >>> Might be, start with ktrace-ing the whole make invocation, including >>> the children processes. >> >> Some recipes how to start? > ktrace -o -i make installkernel > Then kdump and cut the lines around relevant failure. ktrace -f, right? I placed the whole kdump here: http://people.freebsd.org/~andreast/dumped_installkernel.log It is not clear to me where the failure starts :) > >> >>> I used buildworld on the NFS-mounted obj/ as the test for the changes. >> >> Here the obj is local, only the src and the destination is on the >> nfs/netboot server. > > I just finished build on NFS obj/ and did several rounds of installs > for world and kernel into nfs-mounted destdir. It seems I cannot reproduce > this locally. Ok. I try with an nfs obj too. Thanks. Andreas From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 14:54:55 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 95445106564A; Sun, 1 Jul 2012 14:54:55 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 676568FC0A; Sun, 1 Jul 2012 14:54:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q61EstDN008145; Sun, 1 Jul 2012 14:54:55 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q61Est19008143; Sun, 1 Jul 2012 14:54:55 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201207011454.q61Est19008143@svn.freebsd.org> From: Martin Matuska Date: Sun, 1 Jul 2012 14:54:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237926 - svnadmin/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 14:54:55 -0000 Author: mm Date: Sun Jul 1 14:54:54 2012 New Revision: 237926 URL: http://svn.freebsd.org/changeset/base/237926 Log: Add myself for illumos vendor import (kernel part) Modified: svnadmin/conf/sizelimit.conf Modified: svnadmin/conf/sizelimit.conf ============================================================================== --- svnadmin/conf/sizelimit.conf Sun Jul 1 13:43:30 2012 (r237925) +++ svnadmin/conf/sizelimit.conf Sun Jul 1 14:54:54 2012 (r237926) @@ -29,6 +29,7 @@ jb jeff kmacy lstewart +mm obrien rpaulo rwatson From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 14:55:36 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9F034106566C; Sun, 1 Jul 2012 14:55:36 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8616E8FC08; Sun, 1 Jul 2012 14:55:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q61EtaOb008224; Sun, 1 Jul 2012 14:55:36 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q61EtapK008220; Sun, 1 Jul 2012 14:55:36 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201207011455.q61EtapK008220@svn.freebsd.org> From: Martin Matuska Date: Sun, 1 Jul 2012 14:55:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237927 - in vendor/illumos/dist: common/acl common/atomic common/atomic/amd64 common/atomic/i386 common/atomic/sparc common/nvpair common/unicode common/zfs uts uts/common uts/common/c... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 14:55:36 -0000 Author: mm Date: Sun Jul 1 14:55:35 2012 New Revision: 237927 URL: http://svn.freebsd.org/changeset/base/237927 Log: Add kernel part (uts) with ZFS to vendor/illumos illumos-gate revision 13742:b6bbdd77139c Added: vendor/illumos/dist/common/acl/ vendor/illumos/dist/common/acl/acl_common.c vendor/illumos/dist/common/acl/acl_common.h vendor/illumos/dist/common/atomic/ vendor/illumos/dist/common/atomic/amd64/ vendor/illumos/dist/common/atomic/amd64/atomic.s vendor/illumos/dist/common/atomic/i386/ vendor/illumos/dist/common/atomic/i386/atomic.s vendor/illumos/dist/common/atomic/sparc/ vendor/illumos/dist/common/atomic/sparc/atomic.s vendor/illumos/dist/common/nvpair/ vendor/illumos/dist/common/nvpair/fnvpair.c vendor/illumos/dist/common/nvpair/nvpair.c vendor/illumos/dist/common/nvpair/nvpair_alloc_fixed.c vendor/illumos/dist/common/unicode/ vendor/illumos/dist/common/unicode/u8_textprep.c vendor/illumos/dist/common/zfs/ vendor/illumos/dist/common/zfs/zfeature_common.c vendor/illumos/dist/common/zfs/zfeature_common.h vendor/illumos/dist/common/zfs/zfs_comutil.c vendor/illumos/dist/common/zfs/zfs_comutil.h vendor/illumos/dist/common/zfs/zfs_deleg.c vendor/illumos/dist/common/zfs/zfs_deleg.h vendor/illumos/dist/common/zfs/zfs_fletcher.c vendor/illumos/dist/common/zfs/zfs_fletcher.h vendor/illumos/dist/common/zfs/zfs_namecheck.c vendor/illumos/dist/common/zfs/zfs_namecheck.h vendor/illumos/dist/common/zfs/zfs_prop.c vendor/illumos/dist/common/zfs/zfs_prop.h vendor/illumos/dist/common/zfs/zpool_prop.c vendor/illumos/dist/common/zfs/zprop_common.c vendor/illumos/dist/uts/ vendor/illumos/dist/uts/common/ vendor/illumos/dist/uts/common/Makefile.files vendor/illumos/dist/uts/common/ctf/ vendor/illumos/dist/uts/common/ctf/ctf_mod.c vendor/illumos/dist/uts/common/ctf/ctf_subr.c vendor/illumos/dist/uts/common/dtrace/ vendor/illumos/dist/uts/common/dtrace/dcpc.c vendor/illumos/dist/uts/common/dtrace/dtrace.c vendor/illumos/dist/uts/common/dtrace/fasttrap.c vendor/illumos/dist/uts/common/dtrace/lockstat.c vendor/illumos/dist/uts/common/dtrace/profile.c vendor/illumos/dist/uts/common/dtrace/sdt_subr.c vendor/illumos/dist/uts/common/dtrace/systrace.c vendor/illumos/dist/uts/common/fs/ vendor/illumos/dist/uts/common/fs/gfs.c vendor/illumos/dist/uts/common/fs/vnode.c vendor/illumos/dist/uts/common/fs/zfs/ vendor/illumos/dist/uts/common/fs/zfs/arc.c vendor/illumos/dist/uts/common/fs/zfs/bplist.c vendor/illumos/dist/uts/common/fs/zfs/bpobj.c vendor/illumos/dist/uts/common/fs/zfs/bptree.c vendor/illumos/dist/uts/common/fs/zfs/dbuf.c vendor/illumos/dist/uts/common/fs/zfs/ddt.c vendor/illumos/dist/uts/common/fs/zfs/ddt_zap.c vendor/illumos/dist/uts/common/fs/zfs/dmu.c vendor/illumos/dist/uts/common/fs/zfs/dmu_diff.c vendor/illumos/dist/uts/common/fs/zfs/dmu_object.c vendor/illumos/dist/uts/common/fs/zfs/dmu_objset.c vendor/illumos/dist/uts/common/fs/zfs/dmu_send.c vendor/illumos/dist/uts/common/fs/zfs/dmu_traverse.c vendor/illumos/dist/uts/common/fs/zfs/dmu_tx.c vendor/illumos/dist/uts/common/fs/zfs/dmu_zfetch.c vendor/illumos/dist/uts/common/fs/zfs/dnode.c vendor/illumos/dist/uts/common/fs/zfs/dnode_sync.c vendor/illumos/dist/uts/common/fs/zfs/dsl_dataset.c vendor/illumos/dist/uts/common/fs/zfs/dsl_deadlist.c vendor/illumos/dist/uts/common/fs/zfs/dsl_deleg.c vendor/illumos/dist/uts/common/fs/zfs/dsl_dir.c vendor/illumos/dist/uts/common/fs/zfs/dsl_pool.c vendor/illumos/dist/uts/common/fs/zfs/dsl_prop.c vendor/illumos/dist/uts/common/fs/zfs/dsl_scan.c vendor/illumos/dist/uts/common/fs/zfs/dsl_synctask.c vendor/illumos/dist/uts/common/fs/zfs/gzip.c vendor/illumos/dist/uts/common/fs/zfs/lzjb.c vendor/illumos/dist/uts/common/fs/zfs/metaslab.c vendor/illumos/dist/uts/common/fs/zfs/refcount.c vendor/illumos/dist/uts/common/fs/zfs/rrwlock.c vendor/illumos/dist/uts/common/fs/zfs/sa.c vendor/illumos/dist/uts/common/fs/zfs/sha256.c vendor/illumos/dist/uts/common/fs/zfs/spa.c vendor/illumos/dist/uts/common/fs/zfs/spa_config.c vendor/illumos/dist/uts/common/fs/zfs/spa_errlog.c vendor/illumos/dist/uts/common/fs/zfs/spa_history.c vendor/illumos/dist/uts/common/fs/zfs/spa_misc.c vendor/illumos/dist/uts/common/fs/zfs/space_map.c vendor/illumos/dist/uts/common/fs/zfs/sys/ vendor/illumos/dist/uts/common/fs/zfs/sys/arc.h vendor/illumos/dist/uts/common/fs/zfs/sys/bplist.h vendor/illumos/dist/uts/common/fs/zfs/sys/bpobj.h vendor/illumos/dist/uts/common/fs/zfs/sys/bptree.h vendor/illumos/dist/uts/common/fs/zfs/sys/dbuf.h vendor/illumos/dist/uts/common/fs/zfs/sys/ddt.h vendor/illumos/dist/uts/common/fs/zfs/sys/dmu.h vendor/illumos/dist/uts/common/fs/zfs/sys/dmu_impl.h vendor/illumos/dist/uts/common/fs/zfs/sys/dmu_objset.h vendor/illumos/dist/uts/common/fs/zfs/sys/dmu_traverse.h vendor/illumos/dist/uts/common/fs/zfs/sys/dmu_tx.h vendor/illumos/dist/uts/common/fs/zfs/sys/dmu_zfetch.h vendor/illumos/dist/uts/common/fs/zfs/sys/dnode.h vendor/illumos/dist/uts/common/fs/zfs/sys/dsl_dataset.h vendor/illumos/dist/uts/common/fs/zfs/sys/dsl_deadlist.h vendor/illumos/dist/uts/common/fs/zfs/sys/dsl_deleg.h vendor/illumos/dist/uts/common/fs/zfs/sys/dsl_dir.h vendor/illumos/dist/uts/common/fs/zfs/sys/dsl_pool.h vendor/illumos/dist/uts/common/fs/zfs/sys/dsl_prop.h vendor/illumos/dist/uts/common/fs/zfs/sys/dsl_scan.h vendor/illumos/dist/uts/common/fs/zfs/sys/dsl_synctask.h vendor/illumos/dist/uts/common/fs/zfs/sys/metaslab.h vendor/illumos/dist/uts/common/fs/zfs/sys/metaslab_impl.h vendor/illumos/dist/uts/common/fs/zfs/sys/refcount.h vendor/illumos/dist/uts/common/fs/zfs/sys/rrwlock.h vendor/illumos/dist/uts/common/fs/zfs/sys/sa.h vendor/illumos/dist/uts/common/fs/zfs/sys/sa_impl.h vendor/illumos/dist/uts/common/fs/zfs/sys/spa.h vendor/illumos/dist/uts/common/fs/zfs/sys/spa_boot.h vendor/illumos/dist/uts/common/fs/zfs/sys/spa_impl.h vendor/illumos/dist/uts/common/fs/zfs/sys/space_map.h vendor/illumos/dist/uts/common/fs/zfs/sys/txg.h vendor/illumos/dist/uts/common/fs/zfs/sys/txg_impl.h vendor/illumos/dist/uts/common/fs/zfs/sys/uberblock.h vendor/illumos/dist/uts/common/fs/zfs/sys/uberblock_impl.h vendor/illumos/dist/uts/common/fs/zfs/sys/unique.h vendor/illumos/dist/uts/common/fs/zfs/sys/vdev.h vendor/illumos/dist/uts/common/fs/zfs/sys/vdev_disk.h vendor/illumos/dist/uts/common/fs/zfs/sys/vdev_file.h vendor/illumos/dist/uts/common/fs/zfs/sys/vdev_impl.h vendor/illumos/dist/uts/common/fs/zfs/sys/zap.h vendor/illumos/dist/uts/common/fs/zfs/sys/zap_impl.h vendor/illumos/dist/uts/common/fs/zfs/sys/zap_leaf.h vendor/illumos/dist/uts/common/fs/zfs/sys/zfeature.h vendor/illumos/dist/uts/common/fs/zfs/sys/zfs_acl.h vendor/illumos/dist/uts/common/fs/zfs/sys/zfs_context.h vendor/illumos/dist/uts/common/fs/zfs/sys/zfs_ctldir.h vendor/illumos/dist/uts/common/fs/zfs/sys/zfs_debug.h vendor/illumos/dist/uts/common/fs/zfs/sys/zfs_dir.h vendor/illumos/dist/uts/common/fs/zfs/sys/zfs_fuid.h vendor/illumos/dist/uts/common/fs/zfs/sys/zfs_ioctl.h vendor/illumos/dist/uts/common/fs/zfs/sys/zfs_onexit.h vendor/illumos/dist/uts/common/fs/zfs/sys/zfs_rlock.h vendor/illumos/dist/uts/common/fs/zfs/sys/zfs_sa.h vendor/illumos/dist/uts/common/fs/zfs/sys/zfs_stat.h vendor/illumos/dist/uts/common/fs/zfs/sys/zfs_vfsops.h vendor/illumos/dist/uts/common/fs/zfs/sys/zfs_znode.h vendor/illumos/dist/uts/common/fs/zfs/sys/zil.h vendor/illumos/dist/uts/common/fs/zfs/sys/zil_impl.h vendor/illumos/dist/uts/common/fs/zfs/sys/zio.h vendor/illumos/dist/uts/common/fs/zfs/sys/zio_checksum.h vendor/illumos/dist/uts/common/fs/zfs/sys/zio_compress.h vendor/illumos/dist/uts/common/fs/zfs/sys/zio_impl.h vendor/illumos/dist/uts/common/fs/zfs/sys/zrlock.h vendor/illumos/dist/uts/common/fs/zfs/sys/zvol.h vendor/illumos/dist/uts/common/fs/zfs/txg.c vendor/illumos/dist/uts/common/fs/zfs/uberblock.c vendor/illumos/dist/uts/common/fs/zfs/unique.c vendor/illumos/dist/uts/common/fs/zfs/vdev.c vendor/illumos/dist/uts/common/fs/zfs/vdev_cache.c vendor/illumos/dist/uts/common/fs/zfs/vdev_disk.c vendor/illumos/dist/uts/common/fs/zfs/vdev_file.c vendor/illumos/dist/uts/common/fs/zfs/vdev_label.c vendor/illumos/dist/uts/common/fs/zfs/vdev_mirror.c vendor/illumos/dist/uts/common/fs/zfs/vdev_missing.c vendor/illumos/dist/uts/common/fs/zfs/vdev_queue.c vendor/illumos/dist/uts/common/fs/zfs/vdev_raidz.c vendor/illumos/dist/uts/common/fs/zfs/vdev_root.c vendor/illumos/dist/uts/common/fs/zfs/zap.c vendor/illumos/dist/uts/common/fs/zfs/zap_leaf.c vendor/illumos/dist/uts/common/fs/zfs/zap_micro.c vendor/illumos/dist/uts/common/fs/zfs/zfeature.c vendor/illumos/dist/uts/common/fs/zfs/zfs.conf vendor/illumos/dist/uts/common/fs/zfs/zfs_acl.c vendor/illumos/dist/uts/common/fs/zfs/zfs_byteswap.c vendor/illumos/dist/uts/common/fs/zfs/zfs_ctldir.c vendor/illumos/dist/uts/common/fs/zfs/zfs_debug.c vendor/illumos/dist/uts/common/fs/zfs/zfs_dir.c vendor/illumos/dist/uts/common/fs/zfs/zfs_fm.c vendor/illumos/dist/uts/common/fs/zfs/zfs_fuid.c vendor/illumos/dist/uts/common/fs/zfs/zfs_ioctl.c vendor/illumos/dist/uts/common/fs/zfs/zfs_log.c vendor/illumos/dist/uts/common/fs/zfs/zfs_onexit.c vendor/illumos/dist/uts/common/fs/zfs/zfs_replay.c vendor/illumos/dist/uts/common/fs/zfs/zfs_rlock.c vendor/illumos/dist/uts/common/fs/zfs/zfs_sa.c vendor/illumos/dist/uts/common/fs/zfs/zfs_vfsops.c vendor/illumos/dist/uts/common/fs/zfs/zfs_vnops.c vendor/illumos/dist/uts/common/fs/zfs/zfs_znode.c vendor/illumos/dist/uts/common/fs/zfs/zil.c vendor/illumos/dist/uts/common/fs/zfs/zio.c vendor/illumos/dist/uts/common/fs/zfs/zio_checksum.c vendor/illumos/dist/uts/common/fs/zfs/zio_compress.c vendor/illumos/dist/uts/common/fs/zfs/zio_inject.c vendor/illumos/dist/uts/common/fs/zfs/zle.c vendor/illumos/dist/uts/common/fs/zfs/zrlock.c vendor/illumos/dist/uts/common/fs/zfs/zvol.c vendor/illumos/dist/uts/common/os/ vendor/illumos/dist/uts/common/os/callb.c vendor/illumos/dist/uts/common/os/fm.c vendor/illumos/dist/uts/common/os/nvpair_alloc_system.c vendor/illumos/dist/uts/common/sys/ vendor/illumos/dist/uts/common/sys/acl.h vendor/illumos/dist/uts/common/sys/acl_impl.h vendor/illumos/dist/uts/common/sys/avl.h vendor/illumos/dist/uts/common/sys/avl_impl.h vendor/illumos/dist/uts/common/sys/bitmap.h vendor/illumos/dist/uts/common/sys/callb.h vendor/illumos/dist/uts/common/sys/ccompile.h vendor/illumos/dist/uts/common/sys/cmn_err.h vendor/illumos/dist/uts/common/sys/compress.h vendor/illumos/dist/uts/common/sys/cpupart.h vendor/illumos/dist/uts/common/sys/cpuvar.h vendor/illumos/dist/uts/common/sys/cred.h vendor/illumos/dist/uts/common/sys/ctf.h vendor/illumos/dist/uts/common/sys/ctf_api.h vendor/illumos/dist/uts/common/sys/debug.h vendor/illumos/dist/uts/common/sys/dtrace.h vendor/illumos/dist/uts/common/sys/dtrace_impl.h vendor/illumos/dist/uts/common/sys/errorq.h vendor/illumos/dist/uts/common/sys/extdirent.h vendor/illumos/dist/uts/common/sys/fasttrap.h vendor/illumos/dist/uts/common/sys/fasttrap_impl.h vendor/illumos/dist/uts/common/sys/feature_tests.h vendor/illumos/dist/uts/common/sys/fm/ vendor/illumos/dist/uts/common/sys/fm/fs/ vendor/illumos/dist/uts/common/sys/fm/fs/zfs.h vendor/illumos/dist/uts/common/sys/fm/protocol.h vendor/illumos/dist/uts/common/sys/fm/util.h vendor/illumos/dist/uts/common/sys/fs/ vendor/illumos/dist/uts/common/sys/fs/zfs.h vendor/illumos/dist/uts/common/sys/fs/zut.h vendor/illumos/dist/uts/common/sys/gfs.h vendor/illumos/dist/uts/common/sys/idmap.h vendor/illumos/dist/uts/common/sys/isa_defs.h vendor/illumos/dist/uts/common/sys/list.h vendor/illumos/dist/uts/common/sys/list_impl.h vendor/illumos/dist/uts/common/sys/note.h vendor/illumos/dist/uts/common/sys/nvpair.h vendor/illumos/dist/uts/common/sys/nvpair_impl.h vendor/illumos/dist/uts/common/sys/processor.h vendor/illumos/dist/uts/common/sys/procset.h vendor/illumos/dist/uts/common/sys/synch.h vendor/illumos/dist/uts/common/sys/sysevent/ vendor/illumos/dist/uts/common/sys/sysevent.h vendor/illumos/dist/uts/common/sys/sysevent/dev.h vendor/illumos/dist/uts/common/sys/sysevent/eventdefs.h vendor/illumos/dist/uts/common/sys/sysmacros.h vendor/illumos/dist/uts/common/sys/taskq.h vendor/illumos/dist/uts/common/sys/u8_textprep.h vendor/illumos/dist/uts/common/sys/u8_textprep_data.h vendor/illumos/dist/uts/common/sys/vnode.h vendor/illumos/dist/uts/common/sys/zmod.h vendor/illumos/dist/uts/common/zmod/ vendor/illumos/dist/uts/common/zmod/adler32.c vendor/illumos/dist/uts/common/zmod/crc32.h vendor/illumos/dist/uts/common/zmod/deflate.c vendor/illumos/dist/uts/common/zmod/deflate.h vendor/illumos/dist/uts/common/zmod/inffast.c vendor/illumos/dist/uts/common/zmod/inffast.h vendor/illumos/dist/uts/common/zmod/inffixed.h vendor/illumos/dist/uts/common/zmod/inflate.c vendor/illumos/dist/uts/common/zmod/inflate.h vendor/illumos/dist/uts/common/zmod/inftrees.c vendor/illumos/dist/uts/common/zmod/inftrees.h vendor/illumos/dist/uts/common/zmod/trees.c vendor/illumos/dist/uts/common/zmod/zconf.h vendor/illumos/dist/uts/common/zmod/zlib.h vendor/illumos/dist/uts/common/zmod/zmod.c vendor/illumos/dist/uts/common/zmod/zmod_subr.c vendor/illumos/dist/uts/common/zmod/zutil.c vendor/illumos/dist/uts/common/zmod/zutil.h vendor/illumos/dist/uts/intel/ vendor/illumos/dist/uts/intel/dtrace/ vendor/illumos/dist/uts/intel/dtrace/fasttrap_isa.c vendor/illumos/dist/uts/intel/sys/ vendor/illumos/dist/uts/intel/sys/fasttrap_isa.h vendor/illumos/dist/uts/sparc/ vendor/illumos/dist/uts/sparc/dtrace/ vendor/illumos/dist/uts/sparc/dtrace/fasttrap_isa.c vendor/illumos/dist/uts/sparc/sys/ vendor/illumos/dist/uts/sparc/sys/fasttrap_isa.h Added: vendor/illumos/dist/common/acl/acl_common.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/illumos/dist/common/acl/acl_common.c Sun Jul 1 14:55:35 2012 (r237927) @@ -0,0 +1,1760 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright 2011 Nexenta Systems, Inc. All rights reserved. + */ + +#include +#include +#include +#if defined(_KERNEL) +#include +#include +#include +#else +#include +#include +#include +#include +#include +#include +#include +#include +#include +#define ASSERT assert +#endif + +#define ACE_POSIX_SUPPORTED_BITS (ACE_READ_DATA | \ + ACE_WRITE_DATA | ACE_APPEND_DATA | ACE_EXECUTE | \ + ACE_READ_ATTRIBUTES | ACE_READ_ACL | ACE_WRITE_ACL) + + +#define ACL_SYNCHRONIZE_SET_DENY 0x0000001 +#define ACL_SYNCHRONIZE_SET_ALLOW 0x0000002 +#define ACL_SYNCHRONIZE_ERR_DENY 0x0000004 +#define ACL_SYNCHRONIZE_ERR_ALLOW 0x0000008 + +#define ACL_WRITE_OWNER_SET_DENY 0x0000010 +#define ACL_WRITE_OWNER_SET_ALLOW 0x0000020 +#define ACL_WRITE_OWNER_ERR_DENY 0x0000040 +#define ACL_WRITE_OWNER_ERR_ALLOW 0x0000080 + +#define ACL_DELETE_SET_DENY 0x0000100 +#define ACL_DELETE_SET_ALLOW 0x0000200 +#define ACL_DELETE_ERR_DENY 0x0000400 +#define ACL_DELETE_ERR_ALLOW 0x0000800 + +#define ACL_WRITE_ATTRS_OWNER_SET_DENY 0x0001000 +#define ACL_WRITE_ATTRS_OWNER_SET_ALLOW 0x0002000 +#define ACL_WRITE_ATTRS_OWNER_ERR_DENY 0x0004000 +#define ACL_WRITE_ATTRS_OWNER_ERR_ALLOW 0x0008000 + +#define ACL_WRITE_ATTRS_WRITER_SET_DENY 0x0010000 +#define ACL_WRITE_ATTRS_WRITER_SET_ALLOW 0x0020000 +#define ACL_WRITE_ATTRS_WRITER_ERR_DENY 0x0040000 +#define ACL_WRITE_ATTRS_WRITER_ERR_ALLOW 0x0080000 + +#define ACL_WRITE_NAMED_WRITER_SET_DENY 0x0100000 +#define ACL_WRITE_NAMED_WRITER_SET_ALLOW 0x0200000 +#define ACL_WRITE_NAMED_WRITER_ERR_DENY 0x0400000 +#define ACL_WRITE_NAMED_WRITER_ERR_ALLOW 0x0800000 + +#define ACL_READ_NAMED_READER_SET_DENY 0x1000000 +#define ACL_READ_NAMED_READER_SET_ALLOW 0x2000000 +#define ACL_READ_NAMED_READER_ERR_DENY 0x4000000 +#define ACL_READ_NAMED_READER_ERR_ALLOW 0x8000000 + + +#define ACE_VALID_MASK_BITS (\ + ACE_READ_DATA | \ + ACE_LIST_DIRECTORY | \ + ACE_WRITE_DATA | \ + ACE_ADD_FILE | \ + ACE_APPEND_DATA | \ + ACE_ADD_SUBDIRECTORY | \ + ACE_READ_NAMED_ATTRS | \ + ACE_WRITE_NAMED_ATTRS | \ + ACE_EXECUTE | \ + ACE_DELETE_CHILD | \ + ACE_READ_ATTRIBUTES | \ + ACE_WRITE_ATTRIBUTES | \ + ACE_DELETE | \ + ACE_READ_ACL | \ + ACE_WRITE_ACL | \ + ACE_WRITE_OWNER | \ + ACE_SYNCHRONIZE) + +#define ACE_MASK_UNDEFINED 0x80000000 + +#define ACE_VALID_FLAG_BITS (ACE_FILE_INHERIT_ACE | \ + ACE_DIRECTORY_INHERIT_ACE | \ + ACE_NO_PROPAGATE_INHERIT_ACE | ACE_INHERIT_ONLY_ACE | \ + ACE_SUCCESSFUL_ACCESS_ACE_FLAG | ACE_FAILED_ACCESS_ACE_FLAG | \ + ACE_IDENTIFIER_GROUP | ACE_OWNER | ACE_GROUP | ACE_EVERYONE) + +/* + * ACL conversion helpers + */ + +typedef enum { + ace_unused, + ace_user_obj, + ace_user, + ace_group, /* includes GROUP and GROUP_OBJ */ + ace_other_obj +} ace_to_aent_state_t; + +typedef struct acevals { + uid_t key; + avl_node_t avl; + uint32_t mask; + uint32_t allowed; + uint32_t denied; + int aent_type; +} acevals_t; + +typedef struct ace_list { + acevals_t user_obj; + avl_tree_t user; + int numusers; + acevals_t group_obj; + avl_tree_t group; + int numgroups; + acevals_t other_obj; + uint32_t acl_mask; + int hasmask; + int dfacl_flag; + ace_to_aent_state_t state; + int seen; /* bitmask of all aclent_t a_type values seen */ +} ace_list_t; + +/* + * Generic shellsort, from K&R (1st ed, p 58.), somewhat modified. + * v = Ptr to array/vector of objs + * n = # objs in the array + * s = size of each obj (must be multiples of a word size) + * f = ptr to function to compare two objs + * returns (-1 = less than, 0 = equal, 1 = greater than + */ +void +ksort(caddr_t v, int n, int s, int (*f)()) +{ + int g, i, j, ii; + unsigned int *p1, *p2; + unsigned int tmp; + + /* No work to do */ + if (v == NULL || n <= 1) + return; + + /* Sanity check on arguments */ + ASSERT(((uintptr_t)v & 0x3) == 0 && (s & 0x3) == 0); + ASSERT(s > 0); + for (g = n / 2; g > 0; g /= 2) { + for (i = g; i < n; i++) { + for (j = i - g; j >= 0 && + (*f)(v + j * s, v + (j + g) * s) == 1; + j -= g) { + p1 = (void *)(v + j * s); + p2 = (void *)(v + (j + g) * s); + for (ii = 0; ii < s / 4; ii++) { + tmp = *p1; + *p1++ = *p2; + *p2++ = tmp; + } + } + } + } +} + +/* + * Compare two acls, all fields. Returns: + * -1 (less than) + * 0 (equal) + * +1 (greater than) + */ +int +cmp2acls(void *a, void *b) +{ + aclent_t *x = (aclent_t *)a; + aclent_t *y = (aclent_t *)b; + + /* Compare types */ + if (x->a_type < y->a_type) + return (-1); + if (x->a_type > y->a_type) + return (1); + /* Equal types; compare id's */ + if (x->a_id < y->a_id) + return (-1); + if (x->a_id > y->a_id) + return (1); + /* Equal ids; compare perms */ + if (x->a_perm < y->a_perm) + return (-1); + if (x->a_perm > y->a_perm) + return (1); + /* Totally equal */ + return (0); +} + +/*ARGSUSED*/ +static void * +cacl_realloc(void *ptr, size_t size, size_t new_size) +{ +#if defined(_KERNEL) + void *tmp; + + tmp = kmem_alloc(new_size, KM_SLEEP); + (void) memcpy(tmp, ptr, (size < new_size) ? size : new_size); + kmem_free(ptr, size); + return (tmp); +#else + return (realloc(ptr, new_size)); +#endif +} + +static int +cacl_malloc(void **ptr, size_t size) +{ +#if defined(_KERNEL) + *ptr = kmem_zalloc(size, KM_SLEEP); + return (0); +#else + *ptr = calloc(1, size); + if (*ptr == NULL) + return (errno); + + return (0); +#endif +} + +/*ARGSUSED*/ +static void +cacl_free(void *ptr, size_t size) +{ +#if defined(_KERNEL) + kmem_free(ptr, size); +#else + free(ptr); +#endif +} + +acl_t * +acl_alloc(enum acl_type type) +{ + acl_t *aclp; + + if (cacl_malloc((void **)&aclp, sizeof (acl_t)) != 0) + return (NULL); + + aclp->acl_aclp = NULL; + aclp->acl_cnt = 0; + + switch (type) { + case ACE_T: + aclp->acl_type = ACE_T; + aclp->acl_entry_size = sizeof (ace_t); + break; + case ACLENT_T: + aclp->acl_type = ACLENT_T; + aclp->acl_entry_size = sizeof (aclent_t); + break; + default: + acl_free(aclp); + aclp = NULL; + } + return (aclp); +} + +/* + * Free acl_t structure + */ +void +acl_free(acl_t *aclp) +{ + int acl_size; + + if (aclp == NULL) + return; + + if (aclp->acl_aclp) { + acl_size = aclp->acl_cnt * aclp->acl_entry_size; + cacl_free(aclp->acl_aclp, acl_size); + } + + cacl_free(aclp, sizeof (acl_t)); +} + +static uint32_t +access_mask_set(int haswriteperm, int hasreadperm, int isowner, int isallow) +{ + uint32_t access_mask = 0; + int acl_produce; + int synchronize_set = 0, write_owner_set = 0; + int delete_set = 0, write_attrs_set = 0; + int read_named_set = 0, write_named_set = 0; + + acl_produce = (ACL_SYNCHRONIZE_SET_ALLOW | + ACL_WRITE_ATTRS_OWNER_SET_ALLOW | + ACL_WRITE_ATTRS_WRITER_SET_DENY); + + if (isallow) { + synchronize_set = ACL_SYNCHRONIZE_SET_ALLOW; + write_owner_set = ACL_WRITE_OWNER_SET_ALLOW; + delete_set = ACL_DELETE_SET_ALLOW; + if (hasreadperm) + read_named_set = ACL_READ_NAMED_READER_SET_ALLOW; + if (haswriteperm) + write_named_set = ACL_WRITE_NAMED_WRITER_SET_ALLOW; + if (isowner) + write_attrs_set = ACL_WRITE_ATTRS_OWNER_SET_ALLOW; + else if (haswriteperm) + write_attrs_set = ACL_WRITE_ATTRS_WRITER_SET_ALLOW; + } else { + + synchronize_set = ACL_SYNCHRONIZE_SET_DENY; + write_owner_set = ACL_WRITE_OWNER_SET_DENY; + delete_set = ACL_DELETE_SET_DENY; + if (hasreadperm) + read_named_set = ACL_READ_NAMED_READER_SET_DENY; + if (haswriteperm) + write_named_set = ACL_WRITE_NAMED_WRITER_SET_DENY; + if (isowner) + write_attrs_set = ACL_WRITE_ATTRS_OWNER_SET_DENY; + else if (haswriteperm) + write_attrs_set = ACL_WRITE_ATTRS_WRITER_SET_DENY; + else + /* + * If the entity is not the owner and does not + * have write permissions ACE_WRITE_ATTRIBUTES will + * always go in the DENY ACE. + */ + access_mask |= ACE_WRITE_ATTRIBUTES; + } + + if (acl_produce & synchronize_set) + access_mask |= ACE_SYNCHRONIZE; + if (acl_produce & write_owner_set) + access_mask |= ACE_WRITE_OWNER; + if (acl_produce & delete_set) + access_mask |= ACE_DELETE; + if (acl_produce & write_attrs_set) + access_mask |= ACE_WRITE_ATTRIBUTES; + if (acl_produce & read_named_set) + access_mask |= ACE_READ_NAMED_ATTRS; + if (acl_produce & write_named_set) + access_mask |= ACE_WRITE_NAMED_ATTRS; + + return (access_mask); +} + +/* + * Given an mode_t, convert it into an access_mask as used + * by nfsace, assuming aclent_t -> nfsace semantics. + */ +static uint32_t +mode_to_ace_access(mode_t mode, boolean_t isdir, int isowner, int isallow) +{ + uint32_t access = 0; + int haswriteperm = 0; + int hasreadperm = 0; + + if (isallow) { + haswriteperm = (mode & S_IWOTH); + hasreadperm = (mode & S_IROTH); + } else { + haswriteperm = !(mode & S_IWOTH); + hasreadperm = !(mode & S_IROTH); + } + + /* + * The following call takes care of correctly setting the following + * mask bits in the access_mask: + * ACE_SYNCHRONIZE, ACE_WRITE_OWNER, ACE_DELETE, + * ACE_WRITE_ATTRIBUTES, ACE_WRITE_NAMED_ATTRS, ACE_READ_NAMED_ATTRS + */ + access = access_mask_set(haswriteperm, hasreadperm, isowner, isallow); + + if (isallow) { + access |= ACE_READ_ACL | ACE_READ_ATTRIBUTES; + if (isowner) + access |= ACE_WRITE_ACL; + } else { + if (! isowner) + access |= ACE_WRITE_ACL; + } + + /* read */ + if (mode & S_IROTH) { + access |= ACE_READ_DATA; + } + /* write */ + if (mode & S_IWOTH) { + access |= ACE_WRITE_DATA | + ACE_APPEND_DATA; + if (isdir) + access |= ACE_DELETE_CHILD; + } + /* exec */ + if (mode & S_IXOTH) { + access |= ACE_EXECUTE; + } + + return (access); +} + +/* + * Given an nfsace (presumably an ALLOW entry), make a + * corresponding DENY entry at the address given. + */ +static void +ace_make_deny(ace_t *allow, ace_t *deny, int isdir, int isowner) +{ + (void) memcpy(deny, allow, sizeof (ace_t)); + + deny->a_who = allow->a_who; + + deny->a_type = ACE_ACCESS_DENIED_ACE_TYPE; + deny->a_access_mask ^= ACE_POSIX_SUPPORTED_BITS; + if (isdir) + deny->a_access_mask ^= ACE_DELETE_CHILD; + + deny->a_access_mask &= ~(ACE_SYNCHRONIZE | ACE_WRITE_OWNER | + ACE_DELETE | ACE_WRITE_ATTRIBUTES | ACE_READ_NAMED_ATTRS | + ACE_WRITE_NAMED_ATTRS); + deny->a_access_mask |= access_mask_set((allow->a_access_mask & + ACE_WRITE_DATA), (allow->a_access_mask & ACE_READ_DATA), isowner, + B_FALSE); +} +/* + * Make an initial pass over an array of aclent_t's. Gather + * information such as an ACL_MASK (if any), number of users, + * number of groups, and whether the array needs to be sorted. + */ +static int +ln_aent_preprocess(aclent_t *aclent, int n, + int *hasmask, mode_t *mask, + int *numuser, int *numgroup, int *needsort) +{ + int error = 0; + int i; + int curtype = 0; + + *hasmask = 0; + *mask = 07; + *needsort = 0; + *numuser = 0; + *numgroup = 0; + + for (i = 0; i < n; i++) { + if (aclent[i].a_type < curtype) + *needsort = 1; + else if (aclent[i].a_type > curtype) + curtype = aclent[i].a_type; + if (aclent[i].a_type & USER) + (*numuser)++; + if (aclent[i].a_type & (GROUP | GROUP_OBJ)) + (*numgroup)++; + if (aclent[i].a_type & CLASS_OBJ) { + if (*hasmask) { + error = EINVAL; + goto out; + } else { + *hasmask = 1; + *mask = aclent[i].a_perm; + } + } + } + + if ((! *hasmask) && (*numuser + *numgroup > 1)) { + error = EINVAL; + goto out; + } + +out: + return (error); +} + +/* + * Convert an array of aclent_t into an array of nfsace entries, + * following POSIX draft -> nfsv4 conversion semantics as outlined in + * the IETF draft. + */ +static int +ln_aent_to_ace(aclent_t *aclent, int n, ace_t **acepp, int *rescount, int isdir) +{ + int error = 0; + mode_t mask; + int numuser, numgroup, needsort; + int resultsize = 0; + int i, groupi = 0, skip; + ace_t *acep, *result = NULL; + int hasmask; + + error = ln_aent_preprocess(aclent, n, &hasmask, &mask, + &numuser, &numgroup, &needsort); + if (error != 0) + goto out; + + /* allow + deny for each aclent */ + resultsize = n * 2; + if (hasmask) { + /* + * stick extra deny on the group_obj and on each + * user|group for the mask (the group_obj was added + * into the count for numgroup) + */ + resultsize += numuser + numgroup; + /* ... and don't count the mask itself */ + resultsize -= 2; + } + + /* sort the source if necessary */ + if (needsort) + ksort((caddr_t)aclent, n, sizeof (aclent_t), cmp2acls); + + if (cacl_malloc((void **)&result, resultsize * sizeof (ace_t)) != 0) + goto out; + + acep = result; + + for (i = 0; i < n; i++) { + /* + * don't process CLASS_OBJ (mask); mask was grabbed in + * ln_aent_preprocess() + */ + if (aclent[i].a_type & CLASS_OBJ) + continue; + + /* If we need an ACL_MASK emulator, prepend it now */ + if ((hasmask) && + (aclent[i].a_type & (USER | GROUP | GROUP_OBJ))) { + acep->a_type = ACE_ACCESS_DENIED_ACE_TYPE; + acep->a_flags = 0; + if (aclent[i].a_type & GROUP_OBJ) { + acep->a_who = (uid_t)-1; + acep->a_flags |= + (ACE_IDENTIFIER_GROUP|ACE_GROUP); + } else if (aclent[i].a_type & USER) { + acep->a_who = aclent[i].a_id; + } else { + acep->a_who = aclent[i].a_id; + acep->a_flags |= ACE_IDENTIFIER_GROUP; + } + if (aclent[i].a_type & ACL_DEFAULT) { + acep->a_flags |= ACE_INHERIT_ONLY_ACE | + ACE_FILE_INHERIT_ACE | + ACE_DIRECTORY_INHERIT_ACE; + } + /* + * Set the access mask for the prepended deny + * ace. To do this, we invert the mask (found + * in ln_aent_preprocess()) then convert it to an + * DENY ace access_mask. + */ + acep->a_access_mask = mode_to_ace_access((mask ^ 07), + isdir, 0, 0); + acep += 1; + } + + /* handle a_perm -> access_mask */ + acep->a_access_mask = mode_to_ace_access(aclent[i].a_perm, + isdir, aclent[i].a_type & USER_OBJ, 1); + + /* emulate a default aclent */ + if (aclent[i].a_type & ACL_DEFAULT) { + acep->a_flags |= ACE_INHERIT_ONLY_ACE | + ACE_FILE_INHERIT_ACE | + ACE_DIRECTORY_INHERIT_ACE; + } + + /* + * handle a_perm and a_id + * + * this must be done last, since it involves the + * corresponding deny aces, which are handled + * differently for each different a_type. + */ + if (aclent[i].a_type & USER_OBJ) { + acep->a_who = (uid_t)-1; + acep->a_flags |= ACE_OWNER; + ace_make_deny(acep, acep + 1, isdir, B_TRUE); + acep += 2; + } else if (aclent[i].a_type & USER) { + acep->a_who = aclent[i].a_id; + ace_make_deny(acep, acep + 1, isdir, B_FALSE); + acep += 2; + } else if (aclent[i].a_type & (GROUP_OBJ | GROUP)) { + if (aclent[i].a_type & GROUP_OBJ) { + acep->a_who = (uid_t)-1; + acep->a_flags |= ACE_GROUP; + } else { + acep->a_who = aclent[i].a_id; + } + acep->a_flags |= ACE_IDENTIFIER_GROUP; + /* + * Set the corresponding deny for the group ace. + * + * The deny aces go after all of the groups, unlike + * everything else, where they immediately follow + * the allow ace. + * + * We calculate "skip", the number of slots to + * skip ahead for the deny ace, here. + * + * The pattern is: + * MD1 A1 MD2 A2 MD3 A3 D1 D2 D3 + * thus, skip is + * (2 * numgroup) - 1 - groupi + * (2 * numgroup) to account for MD + A + * - 1 to account for the fact that we're on the + * access (A), not the mask (MD) + * - groupi to account for the fact that we have + * passed up groupi number of MD's. + */ + skip = (2 * numgroup) - 1 - groupi; + ace_make_deny(acep, acep + skip, isdir, B_FALSE); + /* + * If we just did the last group, skip acep past + * all of the denies; else, just move ahead one. + */ + if (++groupi >= numgroup) + acep += numgroup + 1; + else + acep += 1; + } else if (aclent[i].a_type & OTHER_OBJ) { + acep->a_who = (uid_t)-1; + acep->a_flags |= ACE_EVERYONE; + ace_make_deny(acep, acep + 1, isdir, B_FALSE); + acep += 2; + } else { + error = EINVAL; + goto out; + } + } + + *acepp = result; + *rescount = resultsize; + +out: + if (error != 0) { + if ((result != NULL) && (resultsize > 0)) { + cacl_free(result, resultsize * sizeof (ace_t)); + } + } + + return (error); +} + +static int +convert_aent_to_ace(aclent_t *aclentp, int aclcnt, boolean_t isdir, + ace_t **retacep, int *retacecnt) +{ + ace_t *acep; + ace_t *dfacep; + int acecnt = 0; + int dfacecnt = 0; + int dfaclstart = 0; + int dfaclcnt = 0; + aclent_t *aclp; + int i; + int error; + int acesz, dfacesz; + + ksort((caddr_t)aclentp, aclcnt, sizeof (aclent_t), cmp2acls); + + for (i = 0, aclp = aclentp; i < aclcnt; aclp++, i++) { + if (aclp->a_type & ACL_DEFAULT) + break; + } + + if (i < aclcnt) { + dfaclstart = i; + dfaclcnt = aclcnt - i; + } + + if (dfaclcnt && !isdir) { + return (EINVAL); + } + + error = ln_aent_to_ace(aclentp, i, &acep, &acecnt, isdir); + if (error) + return (error); + + if (dfaclcnt) { + error = ln_aent_to_ace(&aclentp[dfaclstart], dfaclcnt, + &dfacep, &dfacecnt, isdir); + if (error) { + if (acep) { + cacl_free(acep, acecnt * sizeof (ace_t)); + } + return (error); + } + } + + if (dfacecnt != 0) { + acesz = sizeof (ace_t) * acecnt; + dfacesz = sizeof (ace_t) * dfacecnt; + acep = cacl_realloc(acep, acesz, acesz + dfacesz); + if (acep == NULL) + return (ENOMEM); + if (dfaclcnt) { + (void) memcpy(acep + acecnt, dfacep, dfacesz); + } + } + if (dfaclcnt) + cacl_free(dfacep, dfacecnt * sizeof (ace_t)); + + *retacecnt = acecnt + dfacecnt; + *retacep = acep; + return (0); +} + +static int +ace_mask_to_mode(uint32_t mask, o_mode_t *modep, boolean_t isdir) +{ + int error = 0; + o_mode_t mode = 0; + uint32_t bits, wantbits; + + /* read */ + if (mask & ACE_READ_DATA) + mode |= S_IROTH; + + /* write */ + wantbits = (ACE_WRITE_DATA | ACE_APPEND_DATA); + if (isdir) + wantbits |= ACE_DELETE_CHILD; + bits = mask & wantbits; + if (bits != 0) { + if (bits != wantbits) { + error = ENOTSUP; + goto out; + } + mode |= S_IWOTH; + } + + /* exec */ + if (mask & ACE_EXECUTE) { + mode |= S_IXOTH; + } + + *modep = mode; + +out: + return (error); +} + +static void +acevals_init(acevals_t *vals, uid_t key) +{ + bzero(vals, sizeof (*vals)); + vals->allowed = ACE_MASK_UNDEFINED; + vals->denied = ACE_MASK_UNDEFINED; + vals->mask = ACE_MASK_UNDEFINED; + vals->key = key; +} + +static void +ace_list_init(ace_list_t *al, int dfacl_flag) +{ + acevals_init(&al->user_obj, NULL); + acevals_init(&al->group_obj, NULL); + acevals_init(&al->other_obj, NULL); + al->numusers = 0; + al->numgroups = 0; + al->acl_mask = 0; + al->hasmask = 0; + al->state = ace_unused; + al->seen = 0; + al->dfacl_flag = dfacl_flag; +} + +/* + * Find or create an acevals holder for a given id and avl tree. + * + * Note that only one thread will ever touch these avl trees, so + * there is no need for locking. + */ +static acevals_t * +acevals_find(ace_t *ace, avl_tree_t *avl, int *num) +{ + acevals_t key, *rc; + avl_index_t where; + + key.key = ace->a_who; + rc = avl_find(avl, &key, &where); + if (rc != NULL) + return (rc); + + /* this memory is freed by ln_ace_to_aent()->ace_list_free() */ + if (cacl_malloc((void **)&rc, sizeof (acevals_t)) != 0) + return (NULL); + + acevals_init(rc, ace->a_who); + avl_insert(avl, rc, where); + (*num)++; + + return (rc); +} + +static int +access_mask_check(ace_t *acep, int mask_bit, int isowner) +{ + int set_deny, err_deny; + int set_allow, err_allow; + int acl_consume; + int haswriteperm, hasreadperm; + + if (acep->a_type == ACE_ACCESS_DENIED_ACE_TYPE) { + haswriteperm = (acep->a_access_mask & ACE_WRITE_DATA) ? 0 : 1; + hasreadperm = (acep->a_access_mask & ACE_READ_DATA) ? 0 : 1; + } else { + haswriteperm = (acep->a_access_mask & ACE_WRITE_DATA) ? 1 : 0; + hasreadperm = (acep->a_access_mask & ACE_READ_DATA) ? 1 : 0; + } + + acl_consume = (ACL_SYNCHRONIZE_ERR_DENY | + ACL_DELETE_ERR_DENY | + ACL_WRITE_OWNER_ERR_DENY | + ACL_WRITE_OWNER_ERR_ALLOW | + ACL_WRITE_ATTRS_OWNER_SET_ALLOW | + ACL_WRITE_ATTRS_OWNER_ERR_DENY | + ACL_WRITE_ATTRS_WRITER_SET_DENY | + ACL_WRITE_ATTRS_WRITER_ERR_ALLOW | + ACL_WRITE_NAMED_WRITER_ERR_DENY | + ACL_READ_NAMED_READER_ERR_DENY); + + if (mask_bit == ACE_SYNCHRONIZE) { + set_deny = ACL_SYNCHRONIZE_SET_DENY; + err_deny = ACL_SYNCHRONIZE_ERR_DENY; + set_allow = ACL_SYNCHRONIZE_SET_ALLOW; + err_allow = ACL_SYNCHRONIZE_ERR_ALLOW; + } else if (mask_bit == ACE_WRITE_OWNER) { + set_deny = ACL_WRITE_OWNER_SET_DENY; + err_deny = ACL_WRITE_OWNER_ERR_DENY; + set_allow = ACL_WRITE_OWNER_SET_ALLOW; + err_allow = ACL_WRITE_OWNER_ERR_ALLOW; + } else if (mask_bit == ACE_DELETE) { + set_deny = ACL_DELETE_SET_DENY; + err_deny = ACL_DELETE_ERR_DENY; + set_allow = ACL_DELETE_SET_ALLOW; + err_allow = ACL_DELETE_ERR_ALLOW; + } else if (mask_bit == ACE_WRITE_ATTRIBUTES) { + if (isowner) { + set_deny = ACL_WRITE_ATTRS_OWNER_SET_DENY; + err_deny = ACL_WRITE_ATTRS_OWNER_ERR_DENY; + set_allow = ACL_WRITE_ATTRS_OWNER_SET_ALLOW; + err_allow = ACL_WRITE_ATTRS_OWNER_ERR_ALLOW; + } else if (haswriteperm) { + set_deny = ACL_WRITE_ATTRS_WRITER_SET_DENY; + err_deny = ACL_WRITE_ATTRS_WRITER_ERR_DENY; + set_allow = ACL_WRITE_ATTRS_WRITER_SET_ALLOW; + err_allow = ACL_WRITE_ATTRS_WRITER_ERR_ALLOW; + } else { + if ((acep->a_access_mask & mask_bit) && + (acep->a_type & ACE_ACCESS_ALLOWED_ACE_TYPE)) { + return (ENOTSUP); + } + return (0); + } + } else if (mask_bit == ACE_READ_NAMED_ATTRS) { + if (!hasreadperm) + return (0); + + set_deny = ACL_READ_NAMED_READER_SET_DENY; + err_deny = ACL_READ_NAMED_READER_ERR_DENY; + set_allow = ACL_READ_NAMED_READER_SET_ALLOW; + err_allow = ACL_READ_NAMED_READER_ERR_ALLOW; + } else if (mask_bit == ACE_WRITE_NAMED_ATTRS) { + if (!haswriteperm) + return (0); + + set_deny = ACL_WRITE_NAMED_WRITER_SET_DENY; + err_deny = ACL_WRITE_NAMED_WRITER_ERR_DENY; + set_allow = ACL_WRITE_NAMED_WRITER_SET_ALLOW; + err_allow = ACL_WRITE_NAMED_WRITER_ERR_ALLOW; + } else { + return (EINVAL); + } + + if (acep->a_type == ACE_ACCESS_DENIED_ACE_TYPE) { + if (acl_consume & set_deny) { + if (!(acep->a_access_mask & mask_bit)) { + return (ENOTSUP); + } + } else if (acl_consume & err_deny) { + if (acep->a_access_mask & mask_bit) { + return (ENOTSUP); + } + } + } else { + /* ACE_ACCESS_ALLOWED_ACE_TYPE */ + if (acl_consume & set_allow) { + if (!(acep->a_access_mask & mask_bit)) { + return (ENOTSUP); + } + } else if (acl_consume & err_allow) { + if (acep->a_access_mask & mask_bit) { + return (ENOTSUP); + } + } + } + return (0); +} + +static int +ace_to_aent_legal(ace_t *acep) +{ + int error = 0; + int isowner; + + /* only ALLOW or DENY */ + if ((acep->a_type != ACE_ACCESS_ALLOWED_ACE_TYPE) && + (acep->a_type != ACE_ACCESS_DENIED_ACE_TYPE)) { + error = ENOTSUP; + goto out; + } + + /* check for invalid flags */ + if (acep->a_flags & ~(ACE_VALID_FLAG_BITS)) { + error = EINVAL; + goto out; + } + + /* some flags are illegal */ + if (acep->a_flags & (ACE_SUCCESSFUL_ACCESS_ACE_FLAG | + ACE_FAILED_ACCESS_ACE_FLAG | + ACE_NO_PROPAGATE_INHERIT_ACE)) { + error = ENOTSUP; + goto out; + } + + /* check for invalid masks */ + if (acep->a_access_mask & ~(ACE_VALID_MASK_BITS)) { + error = EINVAL; + goto out; + } + + if ((acep->a_flags & ACE_OWNER)) { + isowner = 1; + } else { + isowner = 0; + } + + error = access_mask_check(acep, ACE_SYNCHRONIZE, isowner); + if (error) + goto out; + + error = access_mask_check(acep, ACE_WRITE_OWNER, isowner); + if (error) + goto out; + + error = access_mask_check(acep, ACE_DELETE, isowner); + if (error) + goto out; + + error = access_mask_check(acep, ACE_WRITE_ATTRIBUTES, isowner); + if (error) + goto out; + + error = access_mask_check(acep, ACE_READ_NAMED_ATTRS, isowner); + if (error) + goto out; + + error = access_mask_check(acep, ACE_WRITE_NAMED_ATTRS, isowner); + if (error) + goto out; + + /* more detailed checking of masks */ + if (acep->a_type == ACE_ACCESS_ALLOWED_ACE_TYPE) { + if (! (acep->a_access_mask & ACE_READ_ATTRIBUTES)) { + error = ENOTSUP; + goto out; + } + if ((acep->a_access_mask & ACE_WRITE_DATA) && + (! (acep->a_access_mask & ACE_APPEND_DATA))) { + error = ENOTSUP; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 14:56:52 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8F2F4106566B; Sun, 1 Jul 2012 14:56:52 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 625848FC12; Sun, 1 Jul 2012 14:56:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q61EuqK4008313; Sun, 1 Jul 2012 14:56:52 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q61Euq3E008310; Sun, 1 Jul 2012 14:56:52 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201207011456.q61Euq3E008310@svn.freebsd.org> From: Martin Matuska Date: Sun, 1 Jul 2012 14:56:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237928 - svnadmin/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 14:56:52 -0000 Author: mm Date: Sun Jul 1 14:56:51 2012 New Revision: 237928 URL: http://svn.freebsd.org/changeset/base/237928 Log: Remove myself after illumos vendor import (kernel part) Modified: svnadmin/conf/sizelimit.conf Modified: svnadmin/conf/sizelimit.conf ============================================================================== --- svnadmin/conf/sizelimit.conf Sun Jul 1 14:55:35 2012 (r237927) +++ svnadmin/conf/sizelimit.conf Sun Jul 1 14:56:51 2012 (r237928) @@ -29,7 +29,6 @@ jb jeff kmacy lstewart -mm obrien rpaulo rwatson From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 15:27:17 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 72BD7106564A; Sun, 1 Jul 2012 15:27:17 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from mail.xcllnt.net (mail.xcllnt.net [70.36.220.4]) by mx1.freebsd.org (Postfix) with ESMTP id 4E1F48FC15; Sun, 1 Jul 2012 15:27:17 +0000 (UTC) Received: from [192.168.2.58] (wifi.xcllnt.net [70.36.220.6] (may be forged)) (authenticated bits=0) by mail.xcllnt.net (8.14.5/8.14.5) with ESMTP id q61FR5bI084048 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Sun, 1 Jul 2012 08:27:11 -0700 (PDT) (envelope-from marcel@xcllnt.net) Mime-Version: 1.0 (Apple Message framework v1278) Content-Type: text/plain; charset=us-ascii From: Marcel Moolenaar In-Reply-To: <201207010656.q616ufcY071880@svn.freebsd.org> Date: Sun, 1 Jul 2012 08:27:05 -0700 Content-Transfer-Encoding: 7bit Message-Id: References: <201207010656.q616ufcY071880@svn.freebsd.org> To: Warner Losh X-Mailer: Apple Mail (2.1278) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r237883 - in head/sys/arm: at91 conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 15:27:17 -0000 On Jun 30, 2012, at 11:56 PM, Warner Losh wrote: > Author: imp > Date: Sun Jul 1 06:56:41 2012 > New Revision: 237883 > URL: http://svn.freebsd.org/changeset/base/237883 > > Log: > Create a pseudo-lint kernel for all at91 SoCs. This kernel will not > currently boot, but will serve as a good linting. make universe could > now be altered to skip building all the other at91 kernels... BTW: I've implemented the LINT kernel for ARM. It combines all SoCs. It does have a lot of duplicate definitions, but by not having the linker fail on that, you get a successful build of something we already understand does not boot. It's good coverage with a single kernel and can help to bring the "make universe" time down by only building LINT for ARM. I can port that to FreeBSD. Shall I make some patches for people to look at? -- Marcel Moolenaar marcel@xcllnt.net From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 15:30:43 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BCAF6106566B; Sun, 1 Jul 2012 15:30:43 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A73838FC12; Sun, 1 Jul 2012 15:30:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q61FUhEr009689; Sun, 1 Jul 2012 15:30:43 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q61FUhXS009687; Sun, 1 Jul 2012 15:30:43 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201207011530.q61FUhXS009687@svn.freebsd.org> From: Gleb Smirnoff Date: Sun, 1 Jul 2012 15:30:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237929 - head/sys/geom/mirror X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 15:30:43 -0000 Author: glebius Date: Sun Jul 1 15:30:43 2012 New Revision: 237929 URL: http://svn.freebsd.org/changeset/base/237929 Log: In g_mirror_regular_request() upon successful delivery treat BIO_DELETE requests same way as BIO_WRITE removing them from queue. This fixes panic with BIO_DELETE operations on geom_mirror. Reviewed by: pjd Modified: head/sys/geom/mirror/g_mirror.c Modified: head/sys/geom/mirror/g_mirror.c ============================================================================== --- head/sys/geom/mirror/g_mirror.c Sun Jul 1 14:56:51 2012 (r237928) +++ head/sys/geom/mirror/g_mirror.c Sun Jul 1 15:30:43 2012 (r237929) @@ -891,7 +891,8 @@ g_mirror_regular_request(struct bio *bp) if (pbp->bio_children == pbp->bio_inbed) { G_MIRROR_LOGREQ(3, pbp, "Request delivered."); pbp->bio_completed = pbp->bio_length; - if (pbp->bio_cmd == BIO_WRITE) { + if (pbp->bio_cmd == BIO_WRITE || + pbp->bio_cmd == BIO_DELETE) { bioq_remove(&sc->sc_inflight, pbp); /* Release delayed sync requests if possible. */ g_mirror_sync_release(sc); From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 15:43:53 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 594961065674; Sun, 1 Jul 2012 15:43:53 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 43BFD8FC0C; Sun, 1 Jul 2012 15:43:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q61FhrGG010240; Sun, 1 Jul 2012 15:43:53 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q61FhqSY010237; Sun, 1 Jul 2012 15:43:52 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201207011543.q61FhqSY010237@svn.freebsd.org> From: Gleb Smirnoff Date: Sun, 1 Jul 2012 15:43:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237930 - head/sys/geom/mirror X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 15:43:53 -0000 Author: glebius Date: Sun Jul 1 15:43:52 2012 New Revision: 237930 URL: http://svn.freebsd.org/changeset/base/237930 Log: Make geom_mirror more friendly to SSDs. To properly support TRIM, we need to pass BIO_DELETE requests down to providers that support it. Also, we need to announce our support for BIO_DELETE to upper consumer. This requires: - In g_mirror_start() return true for "GEOM::candelete" request. - In g_mirror_init_disk() probe below provider for "GEOM::candelete" attribute, and mark disk with a flag if it does support BIO_DELETE. - In g_mirror_register_request() distribute BIO_DELETE requests only to those disks, that do support it. Note that we announce "GEOM::candelete" as true unconditionally of whether we have TRIM-capable media down below or not. This is made intentionally, because upper consumer (usually UFS) requests the attribite only once at mount time. And if user ever migrates his mirror from HDDs to SSDs, then he/she would get TRIM working without remounting filesystem. Reviewed by: pjd Modified: head/sys/geom/mirror/g_mirror.c head/sys/geom/mirror/g_mirror.h Modified: head/sys/geom/mirror/g_mirror.c ============================================================================== --- head/sys/geom/mirror/g_mirror.c Sun Jul 1 15:30:43 2012 (r237929) +++ head/sys/geom/mirror/g_mirror.c Sun Jul 1 15:43:52 2012 (r237930) @@ -440,7 +440,7 @@ g_mirror_init_disk(struct g_mirror_softc struct g_mirror_metadata *md, int *errorp) { struct g_mirror_disk *disk; - int error; + int i, error; disk = malloc(sizeof(*disk), M_MIRROR, M_NOWAIT | M_ZERO); if (disk == NULL) { @@ -455,6 +455,11 @@ g_mirror_init_disk(struct g_mirror_softc disk->d_state = G_MIRROR_DISK_STATE_NONE; disk->d_priority = md->md_priority; disk->d_flags = md->md_dflags; + error = g_getattr("GEOM::candelete", disk->d_consumer, &i); + if (error != 0) + goto fail; + if (i) + disk->d_flags |= G_MIRROR_DISK_FLAG_CANDELETE; if (md->md_provider[0] != '\0') disk->d_flags |= G_MIRROR_DISK_FLAG_HARDCODED; disk->d_sync.ds_consumer = NULL; @@ -1085,7 +1090,9 @@ g_mirror_start(struct bio *bp) g_mirror_flush(sc, bp); return; case BIO_GETATTR: - if (strcmp("GEOM::kerneldump", bp->bio_attribute) == 0) { + if (g_handleattr_int(bp, "GEOM::candelete", 1)) + return; + else if (strcmp("GEOM::kerneldump", bp->bio_attribute) == 0) { g_mirror_kernel_dump(bp); return; } @@ -1632,6 +1639,9 @@ g_mirror_register_request(struct bio *bp default: continue; } + if (bp->bio_cmd == BIO_DELETE && + (disk->d_flags & G_MIRROR_DISK_FLAG_CANDELETE) == 0) + continue; cbp = g_clone_bio(bp); if (cbp == NULL) { for (cbp = bioq_first(&queue); cbp != NULL; Modified: head/sys/geom/mirror/g_mirror.h ============================================================================== --- head/sys/geom/mirror/g_mirror.h Sun Jul 1 15:30:43 2012 (r237929) +++ head/sys/geom/mirror/g_mirror.h Sun Jul 1 15:43:52 2012 (r237930) @@ -59,10 +59,12 @@ #define G_MIRROR_DISK_FLAG_INACTIVE 0x0000000000000008ULL #define G_MIRROR_DISK_FLAG_HARDCODED 0x0000000000000010ULL #define G_MIRROR_DISK_FLAG_BROKEN 0x0000000000000020ULL +#define G_MIRROR_DISK_FLAG_CANDELETE 0x0000000000000040ULL #define G_MIRROR_DISK_FLAG_MASK (G_MIRROR_DISK_FLAG_DIRTY | \ G_MIRROR_DISK_FLAG_SYNCHRONIZING | \ G_MIRROR_DISK_FLAG_FORCE_SYNC | \ - G_MIRROR_DISK_FLAG_INACTIVE) + G_MIRROR_DISK_FLAG_INACTIVE | \ + G_MIRROR_DISK_FLAG_CANDELETE) #define G_MIRROR_DEVICE_FLAG_NOAUTOSYNC 0x0000000000000001ULL #define G_MIRROR_DEVICE_FLAG_NOFAILSYNC 0x0000000000000002ULL From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 16:26:08 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 175AF106566B; Sun, 1 Jul 2012 16:26:08 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 027BB8FC18; Sun, 1 Jul 2012 16:26:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q61GQ7RH011980; Sun, 1 Jul 2012 16:26:07 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q61GQ7AQ011978; Sun, 1 Jul 2012 16:26:07 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201207011626.q61GQ7AQ011978@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Sun, 1 Jul 2012 16:26:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237931 - head/sbin/hastd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 16:26:08 -0000 Author: pjd Date: Sun Jul 1 16:26:07 2012 New Revision: 237931 URL: http://svn.freebsd.org/changeset/base/237931 Log: Check if there is cmsg at all. MFC after: 3 days Modified: head/sbin/hastd/proto_common.c Modified: head/sbin/hastd/proto_common.c ============================================================================== --- head/sbin/hastd/proto_common.c Sun Jul 1 15:43:52 2012 (r237930) +++ head/sbin/hastd/proto_common.c Sun Jul 1 16:26:07 2012 (r237931) @@ -181,7 +181,7 @@ proto_descriptor_recv(int sock, int *fdp return (errno); cmsg = CMSG_FIRSTHDR(&msg); - if (cmsg->cmsg_level != SOL_SOCKET || + if (cmsg == NULL || cmsg->cmsg_level != SOL_SOCKET || cmsg->cmsg_type != SCM_RIGHTS) { return (EINVAL); } From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 17:05:57 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 40F891065670; Sun, 1 Jul 2012 17:05:57 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id B4AE18FC08; Sun, 1 Jul 2012 17:05:56 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q61H5u54073179; Sun, 1 Jul 2012 20:05:56 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q61H5hfw042574; Sun, 1 Jul 2012 20:05:43 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q61H5huU042573; Sun, 1 Jul 2012 20:05:43 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 1 Jul 2012 20:05:43 +0300 From: Konstantin Belousov To: Andreas Tobler Message-ID: <20120701170543.GP2337@deviant.kiev.zoral.com.ua> References: <201206210926.q5L9Q6nR002030@svn.freebsd.org> <4FF03316.5050609@FreeBSD.org> <20120701120408.GM2337@deviant.kiev.zoral.com.ua> <4FF0528E.50002@FreeBSD.org> <20120701134132.GO2337@deviant.kiev.zoral.com.ua> <4FF05724.3050904@FreeBSD.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="r53EL0ep1aWhd0Bx" Content-Disposition: inline In-Reply-To: <4FF05724.3050904@FreeBSD.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r237367 - head/sys/fs/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 17:05:57 -0000 --r53EL0ep1aWhd0Bx Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jul 01, 2012 at 03:56:52PM +0200, Andreas Tobler wrote: > On 01.07.12 15:41, Konstantin Belousov wrote: > >On Sun, Jul 01, 2012 at 03:37:18PM +0200, Andreas Tobler wrote: > >>On 01.07.12 14:04, Konstantin Belousov wrote: > >>>On Sun, Jul 01, 2012 at 01:23:02PM +0200, Andreas Tobler wrote: > >>>>On 21.06.12 11:26, Konstantin Belousov wrote: > >>>>>Author: kib > >>>>>Date: Thu Jun 21 09:26:06 2012 > >>>>>New Revision: 237367 > >>>>>URL: http://svn.freebsd.org/changeset/base/237367 > >>>>> > >>>>>Log: > >>>>> Enable deadlock avoidance code for NFS client. > >>>> > >>>> > >>>>Hm, since this commit I fail with my nfs installworld/kernel. > >>>> > >>>>I have a builder which installs world/kernel to a nfs mounted directo= ry. > >>>>Namely used for cross builds. > >>>> > >>>>Now since this commit I get the following when I install kernel to the > >>>>nfs directory: > >>>> > >>>>.. > >>>>install -o root -g wheel -m 555 zfs.ko.symbols > >>>>/netboot/sparc64/boot/kernel > >>>>install: /netboot/sparc64/boot/kernel/zfs.ko.symbols: No such file or > >>>>directory > >>>>*** [_kmodinstall] Error code 71 > >>>>.. > >>>> > >>>>The file is there, a local install of the tree works without problems. > >>>>Reverting to r237366 also makes it work again. > >>>> > >>>>The server is a -CURRENT, r237880, The client, -CURRENT too. > >>>> > >>>>How can I help to track down the real issue? > >>> > >>>Is it always the same file in the install procedure which causes the > >>>failure ? Even more, is the failure pattern always the same ? > >> > >>I'd say so yes. When installing a kernel onto a nfs mounted fs then > >>always (in my cases) the zfs.ko.symbols was the failing pattern. > >>I tried ppc64 and sparc64 as target. With both it was the above file. > >> > >>When doing a installworld, it was, also in both cases, ppc64/sparc64, > >>the cc1 in libexec which failed. > >> > >>>Might be, start with ktrace-ing the whole make invocation, including > >>>the children processes. > >> > >>Some recipes how to start? > >ktrace -o -i make installkernel > >Then kdump and cut the lines around relevant failure. >=20 > ktrace -f, right? Right, but without -i it is useless. >=20 > I placed the whole kdump here: >=20 > http://people.freebsd.org/~andreast/dumped_installkernel.log >=20 > It is not clear to me where the failure starts :) Because logs do not contain tracepoints from the children. See above about -i. I asked about excerpt because I expect the proper log to have an order of magnitude bigger size. >=20 > > > >> > >>>I used buildworld on the NFS-mounted obj/ as the test for the changes. > >> > >>Here the obj is local, only the src and the destination is on the > >>nfs/netboot server. > > > >I just finished build on NFS obj/ and did several rounds of installs > >for world and kernel into nfs-mounted destdir. It seems I cannot reprodu= ce > >this locally. >=20 > Ok. I try with an nfs obj too. > Thanks. > Andreas >=20 --r53EL0ep1aWhd0Bx Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAk/wg2cACgkQC3+MBN1Mb4j7SACggffoplTXGrmcYSo1Y4wRiJMe sYkAoKr8pgaFrS1Xbvln9dqt26lTdA+b =CMW7 -----END PGP SIGNATURE----- --r53EL0ep1aWhd0Bx-- From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 17:48:32 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 593C8106566C; Sun, 1 Jul 2012 17:48:32 +0000 (UTC) (envelope-from to.my.trociny@gmail.com) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com [209.85.217.182]) by mx1.freebsd.org (Postfix) with ESMTP id EA8098FC15; Sun, 1 Jul 2012 17:48:30 +0000 (UTC) Received: by lbon10 with SMTP id n10so8263929lbo.13 for ; Sun, 01 Jul 2012 10:48:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:x-comment-to:sender:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=yqc8avKMOmQmqccdkJK2plBV3/2eK84u4tCMHIyBMp8=; b=X7kLXf+IvHYmY7mMV+s48O4lvPVhuJVAXVRMvaWiywO5uvcE+fv+mZdsWmkdVXQmbi VCiyXa0grG3e0CYdEkNTBnFZYaA6zE0XWLBdV1l1MyhmZ4Nd9AtcHQ5hvwFn1JXH1+nq /7EbnZSQLkF2mvdigMz2D/bEUdcIGCIAgYEwvWQVk8hWC/LosiN2N/HJtfuMSUhN/qSd 2K7OSC2yyFWJM01B+dNRE0dXLHsKYPeXVG2HJTvzctVqqBVuvIi6+ypxKQa+5WPQs+49 KfKhDJ09g2v/69x8iK8eD195FJ1R/hh1w4OY37o1y4uYrrJLTouWPm349ZaOQi5e2V5n SzcA== Received: by 10.152.109.166 with SMTP id ht6mr9860228lab.46.1341164908544; Sun, 01 Jul 2012 10:48:28 -0700 (PDT) Received: from localhost ([95.69.173.122]) by mx.google.com with ESMTPS id fv16sm18571292lab.9.2012.07.01.10.48.25 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 01 Jul 2012 10:48:27 -0700 (PDT) From: Mikolaj Golub To: John Baldwin References: <201112292041.pBTKfGkj071711@svn.freebsd.org> <201204020848.04775.jhb@freebsd.org> X-Comment-To: John Baldwin Sender: Mikolaj Golub Date: Sun, 01 Jul 2012 20:48:23 +0300 In-Reply-To: <201204020848.04775.jhb@freebsd.org> (John Baldwin's message of "Mon, 2 Apr 2012 08:48:04 -0400") Message-ID: <86sjdbnziw.fsf@kopusha.home.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (berkeley-unix) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Cc: svn-src-head@freebsd.org, Bjoern Zeeb , svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228969 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 17:48:32 -0000 --=-=-= On Mon, 2 Apr 2012 08:48:04 -0400 John Baldwin wrote: JB> On Sunday, April 01, 2012 8:05:00 am Mikolaj Golub wrote: >> Hi, >> >> On 12/29/11, John Baldwin wrote: >> > Author: jhb >> > Date: Thu Dec 29 20:41:16 2011 >> > New Revision: 228969 >> > URL: http://svn.freebsd.org/changeset/base/228969 >> > >> > Log: >> > Defer the work of freeing IPv4 multicast options from a socket to an >> > asychronous task. This avoids tearing down multicast state including >> > sending IGMP leave messages and reprogramming MAC filters while holding >> > the per-protocol global pcbinfo lock that is used in the receive path of >> > packet processing. >> > >> > Reviewed by: rwatson >> > MFC after: 1 month >> > >> > Modified: >> > head/sys/netinet/in_mcast.c >> > head/sys/netinet/ip_var.h >> > >> > Modified: head/sys/netinet/in_mcast.c >> > ============================================================================== >> > --- head/sys/netinet/in_mcast.c Thu Dec 29 19:01:29 2011 (r228968) >> > +++ head/sys/netinet/in_mcast.c Thu Dec 29 20:41:16 2011 (r228969) >> > @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$"); >> > #include >> > #include >> > #include >> > +#include >> > #include >> > >> > #include >> > @@ -144,6 +145,8 @@ static void inm_purge(struct in_multi *) >> > static void inm_reap(struct in_multi *); >> > static struct ip_moptions * >> > inp_findmoptions(struct inpcb *); >> > +static void inp_freemoptions_internal(struct ip_moptions *); >> > +static void inp_gcmoptions(void *, int); >> > static int inp_get_source_filters(struct inpcb *, struct sockopt *); >> > static int inp_join_group(struct inpcb *, struct sockopt *); >> > static int inp_leave_group(struct inpcb *, struct sockopt *); >> > @@ -179,6 +182,10 @@ static SYSCTL_NODE(_net_inet_ip_mcast, O >> > CTLFLAG_RD | CTLFLAG_MPSAFE, sysctl_ip_mcast_filters, >> > "Per-interface stack-wide source filters"); >> > >> > +static STAILQ_HEAD(, ip_moptions) imo_gc_list = >> > + STAILQ_HEAD_INITIALIZER(imo_gc_list); >> > +static struct task imo_gc_task = TASK_INITIALIZER(0, inp_gcmoptions, NULL); >> > + >> > /* >> > * Inline function which wraps assertions for a valid ifp. >> > * The ifnet layer will set the ifma's ifp pointer to NULL if the ifp >> > @@ -1518,17 +1525,29 @@ inp_findmoptions(struct inpcb *inp) >> > } >> > >> > /* >> > - * Discard the IP multicast options (and source filters). >> > + * Discard the IP multicast options (and source filters). To minimize >> > + * the amount of work done while holding locks such as the INP's >> > + * pcbinfo lock (which is used in the receive path), the free >> > + * operation is performed asynchronously in a separate task. >> > * >> > * SMPng: NOTE: assumes INP write lock is held. >> > */ >> > void >> > inp_freemoptions(struct ip_moptions *imo) >> > { >> > - struct in_mfilter *imf; >> > - size_t idx, nmships; >> > >> > KASSERT(imo != NULL, ("%s: ip_moptions is NULL", __func__)); >> > + IN_MULTI_LOCK(); >> > + STAILQ_INSERT_TAIL(&imo_gc_list, imo, imo_link); >> > + IN_MULTI_UNLOCK(); >> > + taskqueue_enqueue(taskqueue_thread, &imo_gc_task); >> > +} >> > + >> > +static void >> > +inp_freemoptions_internal(struct ip_moptions *imo) >> > +{ >> > + struct in_mfilter *imf; >> > + size_t idx, nmships; >> > >> > nmships = imo->imo_num_memberships; >> > for (idx = 0; idx < nmships; ++idx) { >> > @@ -1546,6 +1565,22 @@ inp_freemoptions(struct ip_moptions *imo >> > free(imo, M_IPMOPTS); >> > } >> > >> > +static void >> > +inp_gcmoptions(void *context, int pending) >> > +{ >> > + struct ip_moptions *imo; >> > + >> > + IN_MULTI_LOCK(); >> > + while (!STAILQ_EMPTY(&imo_gc_list)) { >> > + imo = STAILQ_FIRST(&imo_gc_list); >> > + STAILQ_REMOVE_HEAD(&imo_gc_list, imo_link); >> > + IN_MULTI_UNLOCK(); >> > + inp_freemoptions_internal(imo); >> > + IN_MULTI_LOCK(); >> > + } >> > + IN_MULTI_UNLOCK(); >> > +} >> > + >> > /* >> > * Atomically get source filters on a socket for an IPv4 multicast group. >> > * Called with INP lock held; returns with lock released. >> > >> > Modified: head/sys/netinet/ip_var.h >> > ============================================================================== >> > --- head/sys/netinet/ip_var.h Thu Dec 29 19:01:29 2011 (r228968) >> > +++ head/sys/netinet/ip_var.h Thu Dec 29 20:41:16 2011 (r228969) >> > @@ -93,6 +93,7 @@ struct ip_moptions { >> > u_short imo_max_memberships; /* max memberships this socket */ >> > struct in_multi **imo_membership; /* group memberships */ >> > struct in_mfilter *imo_mfilters; /* source filters */ >> > + STAILQ_ENTRY(ip_moptions) imo_link; >> > }; >> > >> > struct ipstat { >> > >> >> I have been observing panics like below after recent upgrade on VIMAGE kernel: >> >> #0 doadump (textdump=-2022567936) at pcpu.h:244 >> #1 0x8051b739 in db_fncall (dummy1=1, dummy2=0, dummy3=-2127531040, >> dummy4=0x872b2920 "") >> at /home/golub/freebsd/base/head/sys/ddb/db_command.c:573 >> #2 0x8051bb31 in db_command (last_cmdp=0x8112eefc, cmd_table=0x0, dopager=1) >> at /home/golub/freebsd/base/head/sys/ddb/db_command.c:449 >> #3 0x8051bc8a in db_command_loop () at >> /home/golub/freebsd/base/head/sys/ddb/db_command.c:502 >> #4 0x8051dc7d in db_trap (type=12, code=0) >> at /home/golub/freebsd/base/head/sys/ddb/db_main.c:229 >> #5 0x80a82566 in kdb_trap (type=12, code=0, tf=0x872b2bbc) >> at /home/golub/freebsd/base/head/sys/kern/subr_kdb.c:629 >> #6 0x80ddd26f in trap_fatal (frame=0x872b2bbc, eva=24) >> at /home/golub/freebsd/base/head/sys/i386/i386/trap.c:1014 >> #7 0x80ddd347 in trap_pfault (frame=0x872b2bbc, usermode=0, eva=24) >> at /home/golub/freebsd/base/head/sys/i386/i386/trap.c:835 >> #8 0x80dde411 in trap (frame=0x872b2bbc) >> at /home/golub/freebsd/base/head/sys/i386/i386/trap.c:547 >> #9 0x80dc7c6c in calltrap () at >> /home/golub/freebsd/base/head/sys/i386/i386/exception.s:169 >> #10 0x80b6f1fd in igmp_change_state (inm=0x8ae70480) >> at /home/golub/freebsd/base/head/sys/netinet/igmp.c:2595 >> #11 0x80b76f68 in in_leavegroup_locked (inm=0x8ae70480, imf=0x8a655a00) >> at /home/golub/freebsd/base/head/sys/netinet/in_mcast.c:1239 >> #12 0x80b76fbd in in_leavegroup (inm=0x8ae70480, imf=0x8a655a00) >> at /home/golub/freebsd/base/head/sys/netinet/in_mcast.c:1184 >> #13 0x80b770b4 in inp_gcmoptions (context=0x0, pending=1) >> at /home/golub/freebsd/base/head/sys/netinet/in_mcast.c:1554 >> #14 0x80a8ff2b in taskqueue_run_locked (queue=0x87594880) >> at /home/golub/freebsd/base/head/sys/kern/subr_taskqueue.c:308 >> #15 0x80a90987 in taskqueue_thread_loop (arg=0x81186bcc) >> at /home/golub/freebsd/base/head/sys/kern/subr_taskqueue.c:497 >> #16 0x80a1b2d8 in fork_exit (callout=0x80a90920 >> , arg=0x81186bcc, >> frame=0x872b2d28) at /home/golub/freebsd/base/head/sys/kern/kern_fork.c:992 >> #17 0x80dc7d14 in fork_trampoline () >> at /home/golub/freebsd/base/head/sys/i386/i386/exception.s:276 >> (kgdb) fr 10 >> #10 0x80b6f1fd in igmp_change_state (inm=0x8ae70480) >> at /home/golub/freebsd/base/head/sys/netinet/igmp.c:2595 >> 2595 V_state_change_timers_running = 1; >> >> (kgdb) l >> 2590 ("%s: enqueue record = >> %d", __func__, >> 2591 retval)); >> 2592 >> 2593 inm->inm_state = IGMP_LEAVING_MEMBER; >> 2594 inm->inm_sctimer = 1; >> 2595 V_state_change_timers_running = 1; >> 2596 syncstates = 0; >> 2597 } >> 2598 break; >> 2599 } >> >> VNET context is not set at that point. >> >> The attached patch fixes the issue for me. Not sure about inm->inm_ifp >> != NULL assumption but I need interface to get vnet :-). JB> I will to defer to bz@ (cc'd) on how best to fix this. Another option would JB> be to save the current vnet in the 'ip_moptions' struct (would have to add a JB> new field) when queueing this imo to be free'd via the task. You could JB> then do the curvnet set/restore at a higher level without any locks held, etc. Hi, do you have any news here? I would really appreciate to have this fixed in any way, as currently to avoid the crash I always have to remember to apply the patch when compiling VIMAGE kernels. Here is another version of the patch. It fixes it in the way suggested above (storing vnet in ip_moptions). The thing that worries me though is the case when vnet is destroyed and we still have options that refer it in the queue. I expect panic in this case. BTW, isn't the same problem with stale pointer dereferencing possible when removing interface? -- Mikolaj Golub --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=in_mcast.c.inp_gcmoptions.1.patch Index: sys/netinet/ip_var.h =================================================================== --- sys/netinet/ip_var.h (revision 237918) +++ sys/netinet/ip_var.h (working copy) @@ -93,6 +93,7 @@ struct ip_moptions { u_short imo_max_memberships; /* max memberships this socket */ struct in_multi **imo_membership; /* group memberships */ struct in_mfilter *imo_mfilters; /* source filters */ + struct vnet *imo_vnet; /* pointer to network stack instance */ STAILQ_ENTRY(ip_moptions) imo_link; }; Index: sys/netinet/in_mcast.c =================================================================== --- sys/netinet/in_mcast.c (revision 237918) +++ sys/netinet/in_mcast.c (working copy) @@ -1504,6 +1504,7 @@ inp_findmoptions(struct inpcb *inp) imo->imo_num_memberships = 0; imo->imo_max_memberships = IP_MIN_MEMBERSHIPS; imo->imo_membership = immp; + imo->imo_vnet = NULL; /* Initialize per-group source filters. */ for (idx = 0; idx < IP_MIN_MEMBERSHIPS; idx++) @@ -1535,6 +1536,7 @@ inp_freemoptions(struct ip_moptions *imo) KASSERT(imo != NULL, ("%s: ip_moptions is NULL", __func__)); IN_MULTI_LOCK(); + imo->imo_vnet = curvnet; STAILQ_INSERT_TAIL(&imo_gc_list, imo, imo_link); IN_MULTI_UNLOCK(); taskqueue_enqueue(taskqueue_thread, &imo_gc_task); @@ -1572,7 +1574,9 @@ inp_gcmoptions(void *context, int pending) imo = STAILQ_FIRST(&imo_gc_list); STAILQ_REMOVE_HEAD(&imo_gc_list, imo_link); IN_MULTI_UNLOCK(); + CURVNET_SET(imo->imo_vnet); inp_freemoptions_internal(imo); + CURVNET_RESTORE(); IN_MULTI_LOCK(); } IN_MULTI_UNLOCK(); --=-=-=-- From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 18:27:13 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E9A7C1065672; Sun, 1 Jul 2012 18:27:13 +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 BBA898FC0A; Sun, 1 Jul 2012 18:27:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q61IRD36017245; Sun, 1 Jul 2012 18:27:13 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q61IRD5k017243; Sun, 1 Jul 2012 18:27:13 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201207011827.q61IRD5k017243@svn.freebsd.org> From: Alan Cox Date: Sun, 1 Jul 2012 18:27:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237935 - stable/9/sys/amd64/amd64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 18:27:14 -0000 Author: alc Date: Sun Jul 1 18:27:13 2012 New Revision: 237935 URL: http://svn.freebsd.org/changeset/base/237935 Log: MFC r233954, r236930 Micro-optimize free_pv_entry() for the expected case. Avoid unnecessary atomic operations for clearing PGA_WRITEABLE in pmap_remove_pages(). Modified: stable/9/sys/amd64/amd64/pmap.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/amd64/amd64/pmap.c ============================================================================== --- stable/9/sys/amd64/amd64/pmap.c Sun Jul 1 17:33:07 2012 (r237934) +++ stable/9/sys/amd64/amd64/pmap.c Sun Jul 1 18:27:13 2012 (r237935) @@ -2096,7 +2096,6 @@ pmap_collect(pmap_t locked_pmap, struct } } - /* * free the pv_entry back to the free list */ @@ -2117,13 +2116,16 @@ free_pv_entry(pmap_t pmap, pv_entry_t pv field = idx / 64; bit = idx % 64; pc->pc_map[field] |= 1ul << bit; - /* move to head of list */ - TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list); if (pc->pc_map[0] != PC_FREE0 || pc->pc_map[1] != PC_FREE1 || pc->pc_map[2] != PC_FREE2) { - TAILQ_INSERT_HEAD(&pmap->pm_pvchunk, pc, pc_list); + /* 98% of the time, pc is already at the head of the list. */ + if (__predict_false(pc != TAILQ_FIRST(&pmap->pm_pvchunk))) { + TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list); + TAILQ_INSERT_HEAD(&pmap->pm_pvchunk, pc, pc_list); + } return; } + TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list); PV_STAT(pv_entry_spare -= _NPCPV); PV_STAT(pc_chunk_count--); PV_STAT(pc_chunk_frees++); @@ -4122,7 +4124,8 @@ pmap_remove_pages(pmap_t pmap) TAILQ_REMOVE(&pvh->pv_list, pv, pv_list); if (TAILQ_EMPTY(&pvh->pv_list)) { for (mt = m; mt < &m[NBPDR / PAGE_SIZE]; mt++) - if (TAILQ_EMPTY(&mt->md.pv_list)) + if ((mt->aflags & PGA_WRITEABLE) != 0 && + TAILQ_EMPTY(&mt->md.pv_list)) vm_page_aflag_clear(mt, PGA_WRITEABLE); } mpte = pmap_lookup_pt_page(pmap, pv->pv_va); @@ -4138,7 +4141,8 @@ pmap_remove_pages(pmap_t pmap) } else { pmap_resident_count_dec(pmap, 1); TAILQ_REMOVE(&m->md.pv_list, pv, pv_list); - if (TAILQ_EMPTY(&m->md.pv_list) && + if ((m->aflags & PGA_WRITEABLE) != 0 && + TAILQ_EMPTY(&m->md.pv_list) && (m->flags & PG_FICTITIOUS) == 0) { pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); if (TAILQ_EMPTY(&pvh->pv_list)) From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 18:33:12 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 94D19106566C; Sun, 1 Jul 2012 18:33:12 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from smtp.fgznet.ch (mail.fgznet.ch [81.92.96.47]) by mx1.freebsd.org (Postfix) with ESMTP id 363328FC15; Sun, 1 Jul 2012 18:33:11 +0000 (UTC) Received: from deuterium.andreas.nets (dhclient-91-190-14-19.flashcable.ch [91.190.14.19]) by smtp.fgznet.ch (8.13.8/8.13.8/Submit_SMTPAUTH) with ESMTP id q61IX9k9031474; Sun, 1 Jul 2012 20:33:10 +0200 (CEST) (envelope-from andreast@FreeBSD.org) Message-ID: <4FF097E5.8030909@FreeBSD.org> Date: Sun, 01 Jul 2012 20:33:09 +0200 From: Andreas Tobler User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.5; rv:13.0) Gecko/20120601 Thunderbird/13.0 MIME-Version: 1.0 To: Konstantin Belousov References: <201206210926.q5L9Q6nR002030@svn.freebsd.org> <4FF03316.5050609@FreeBSD.org> <20120701120408.GM2337@deviant.kiev.zoral.com.ua> <4FF0528E.50002@FreeBSD.org> <20120701134132.GO2337@deviant.kiev.zoral.com.ua> <4FF05724.3050904@FreeBSD.org> <20120701170543.GP2337@deviant.kiev.zoral.com.ua> In-Reply-To: <20120701170543.GP2337@deviant.kiev.zoral.com.ua> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.64 on 81.92.96.47 Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r237367 - head/sys/fs/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 18:33:12 -0000 On 01.07.12 19:05, Konstantin Belousov wrote: > On Sun, Jul 01, 2012 at 03:56:52PM +0200, Andreas Tobler wrote: >> On 01.07.12 15:41, Konstantin Belousov wrote: >>> On Sun, Jul 01, 2012 at 03:37:18PM +0200, Andreas Tobler wrote: >>>> On 01.07.12 14:04, Konstantin Belousov wrote: >>>>> On Sun, Jul 01, 2012 at 01:23:02PM +0200, Andreas Tobler wrote: >>>>>> On 21.06.12 11:26, Konstantin Belousov wrote: >>>>>>> Author: kib >>>>>>> Date: Thu Jun 21 09:26:06 2012 >>>>>>> New Revision: 237367 >>>>>>> URL: http://svn.freebsd.org/changeset/base/237367 >>>>>>> >>>>>>> Log: >>>>>>> Enable deadlock avoidance code for NFS client. >>>>>> >>>>>> >>>>>> Hm, since this commit I fail with my nfs installworld/kernel. >>>>>> >>>>>> I have a builder which installs world/kernel to a nfs mounted directory. >>>>>> Namely used for cross builds. >>>>>> >>>>>> Now since this commit I get the following when I install kernel to the >>>>>> nfs directory: >>>>>> >>>>>> .. >>>>>> install -o root -g wheel -m 555 zfs.ko.symbols >>>>>> /netboot/sparc64/boot/kernel >>>>>> install: /netboot/sparc64/boot/kernel/zfs.ko.symbols: No such file or >>>>>> directory >>>>>> *** [_kmodinstall] Error code 71 >>>>>> .. >>>>>> >>>>>> The file is there, a local install of the tree works without problems. >>>>>> Reverting to r237366 also makes it work again. >>>>>> >>>>>> The server is a -CURRENT, r237880, The client, -CURRENT too. >>>>>> >>>>>> How can I help to track down the real issue? >>>>> >>>>> Is it always the same file in the install procedure which causes the >>>>> failure ? Even more, is the failure pattern always the same ? >>>> >>>> I'd say so yes. When installing a kernel onto a nfs mounted fs then >>>> always (in my cases) the zfs.ko.symbols was the failing pattern. >>>> I tried ppc64 and sparc64 as target. With both it was the above file. >>>> >>>> When doing a installworld, it was, also in both cases, ppc64/sparc64, >>>> the cc1 in libexec which failed. >>>> >>>>> Might be, start with ktrace-ing the whole make invocation, including >>>>> the children processes. >>>> >>>> Some recipes how to start? >>> ktrace -o -i make installkernel >>> Then kdump and cut the lines around relevant failure. >> >> ktrace -f, right? > Right, but without -i it is useless. Ah, yes, seems clear now after reading the man page. >> I placed the whole kdump here: >> >> http://people.freebsd.org/~andreast/dumped_installkernel.log >> >> It is not clear to me where the failure starts :) > Because logs do not contain tracepoints from the children. > See above about -i. > > I asked about excerpt because I expect the proper log to have an order > of magnitude bigger size. Ok. The dump is around 100MB, I hope I extracted as much as needed: http://people.freebsd.org/~andreast/dumped_installkernel-7.log >>>>> I used buildworld on the NFS-mounted obj/ as the test for the changes. >>>> >>>> Here the obj is local, only the src and the destination is on the >>>> nfs/netboot server. >>> >>> I just finished build on NFS obj/ and did several rounds of installs >>> for world and kernel into nfs-mounted destdir. It seems I cannot reproduce >>> this locally. >> >> Ok. I try with an nfs obj too. So, I was not able to reproduce the failure with an nfs mounted obj dir. But I was able to reproduce the failure with three different machines which all have the obj local and the destination mounted via nfs. Are you able to try with a local obj too? Thanks, Andreas From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 18:37:05 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6EBC0106566B; Sun, 1 Jul 2012 18:37:05 +0000 (UTC) (envelope-from utisoft@gmail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 6F4E18FC12; Sun, 1 Jul 2012 18:37:04 +0000 (UTC) Received: by bkwj5 with SMTP id j5so2853469bkw.13 for ; Sun, 01 Jul 2012 11:37:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=+CJlCiv2fXjXwofGIDEOggf7WLS5V65F5SQjRu8D2sI=; b=ymPdT5TjpVLb19li3O3z/r20RJjrfqlN2qfQNbNYNYZgvmMtz4AmSwgTa84HT+ioJq VJ7KMS6YGIZ7L8w8Xi1bjyqrk3U49AbH7lc/cp2UGIEm5mdwAyniPBXJnA/wVZVJHFmX 7tIIcjG/QKby49Zasp3XDg60waHPAqlSclrrChC9RQHOoqdg3lM/d149++0YxtaL6EG0 nXzmFtyQLjIKLAF2eAux9VG27Lmtmg2uGWa6ODmpo6gK7DqVvdhKQ+PW+TK6JQ2fScOl LH+ZvW0+WZ/qKcR9NPR8efHfOCrY27kE5quPi6pLinnqg3KpjA/n1y+q1QjPwvm2x1jL SgiA== Received: by 10.205.134.4 with SMTP id ia4mr5588081bkc.57.1341167823522; Sun, 01 Jul 2012 11:37:03 -0700 (PDT) MIME-Version: 1.0 Sender: utisoft@gmail.com Received: by 10.204.49.87 with HTTP; Sun, 1 Jul 2012 11:36:33 -0700 (PDT) In-Reply-To: References: <201206061651.q56GpXTk026294@svn.freebsd.org> From: Chris Rees Date: Sun, 1 Jul 2012 19:36:33 +0100 X-Google-Sender-Auth: Xk_B7gHhBlUgED0EYUJzMrF7ndo Message-ID: To: "David E. O'Brien" Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r236688 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 18:37:05 -0000 On 6 June 2012 18:07, Chris Rees wrote: > On 6 June 2012 17:51, David E. O'Brien wrote: >> Author: obrien >> Date: Wed Jun 6 16:51:33 2012 >> New Revision: 236688 >> URL: http://svn.freebsd.org/changeset/base/236688 >> >> Log: >> Add to the description and spell check. >> >> Modified: >> head/share/man/man4/filemon.4 >> >> Modified: head/share/man/man4/filemon.4 >> ============================================================================== >> --- head/share/man/man4/filemon.4 Wed Jun 6 16:30:16 2012 (r236687) >> +++ head/share/man/man4/filemon.4 Wed Jun 6 16:51:33 2012 (r236688) >> @@ -10,7 +10,7 @@ >> .\" notice, this list of conditions and the following disclaimer in the >> .\" documentation and/or other materials provided with the distribution. >> .\" 3. All advertising materials mentioning features or use of this software >> -.\" must display the following acknowledgement: >> +.\" must display the following acknowledgment: >> .\" This product includes software developed by David E. O'Brien and >> .\" contributors. > > Aren't we phasing that clause out? Any chance of removing the Clause 3 from that license? http://www.freebsd.org/doc/en_US.ISO8859-1/articles/committers-guide/pref-license.html I had a look around the tree and there are several mentions of this clause-- I'll see if I can get a list of other files with it in too. Chris From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 19:07:46 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 33D08106566B; Sun, 1 Jul 2012 19:07:46 +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 1F6828FC08; Sun, 1 Jul 2012 19:07:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q61J7jgZ018883; Sun, 1 Jul 2012 19:07:45 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q61J7jKX018881; Sun, 1 Jul 2012 19:07:45 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201207011907.q61J7jKX018881@svn.freebsd.org> From: Rui Paulo Date: Sun, 1 Jul 2012 19:07:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237936 - head/sys/powerpc/powermac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 19:07:46 -0000 Author: rpaulo Date: Sun Jul 1 19:07:45 2012 New Revision: 237936 URL: http://svn.freebsd.org/changeset/base/237936 Log: Remove bogus __unused attribute from hrowpic_eoi(). Modified: head/sys/powerpc/powermac/hrowpic.c Modified: head/sys/powerpc/powermac/hrowpic.c ============================================================================== --- head/sys/powerpc/powermac/hrowpic.c Sun Jul 1 18:27:13 2012 (r237935) +++ head/sys/powerpc/powermac/hrowpic.c Sun Jul 1 19:07:45 2012 (r237936) @@ -245,7 +245,7 @@ hrowpic_enable(device_t dev, u_int irq, } static void -hrowpic_eoi(device_t dev __unused, u_int irq __unused) +hrowpic_eoi(device_t dev, u_int irq) { struct hrowpic_softc *sc; int bank; From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 19:40:52 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 41DA3106566B; Sun, 1 Jul 2012 19:40:52 +0000 (UTC) (envelope-from schweikh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2DF2D8FC08; Sun, 1 Jul 2012 19:40:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q61JeqHD020264; Sun, 1 Jul 2012 19:40:52 GMT (envelope-from schweikh@svn.freebsd.org) Received: (from schweikh@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q61Jep1S020262; Sun, 1 Jul 2012 19:40:51 GMT (envelope-from schweikh@svn.freebsd.org) Message-Id: <201207011940.q61Jep1S020262@svn.freebsd.org> From: Jens Schweikhardt Date: Sun, 1 Jul 2012 19:40:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237937 - head/share/man/man9 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 19:40:52 -0000 Author: schweikh Date: Sun Jul 1 19:40:51 2012 New Revision: 237937 URL: http://svn.freebsd.org/changeset/base/237937 Log: Correct a grammo. Modified: head/share/man/man9/cd.9 Modified: head/share/man/man9/cd.9 ============================================================================== --- head/share/man/man9/cd.9 Sun Jul 1 19:07:45 2012 (r237936) +++ head/share/man/man9/cd.9 Sun Jul 1 19:40:51 2012 (r237937) @@ -57,7 +57,7 @@ This can lead to drives requiring specia The following is a list of quirks that the driver recognize. .Bl -tag -width CD_Q_BCD_TRACKS .It Dv CD_Q_NO_TOUCH -This flag tell the driver not to probe the drive at attach time to see if +This flag tells the driver not to probe the drive at attach time to see if there is a disk in the drive and find out what size it is. This flag is currently unimplemented in the CAM .Nm From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 21:41:51 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4BB10106566B for ; Sun, 1 Jul 2012 21:41:51 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-gh0-f182.google.com (mail-gh0-f182.google.com [209.85.160.182]) by mx1.freebsd.org (Postfix) with ESMTP id F08B28FC12 for ; Sun, 1 Jul 2012 21:41:50 +0000 (UTC) Received: by ghbz22 with SMTP id z22so4430187ghb.13 for ; Sun, 01 Jul 2012 14:41:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer :x-gm-message-state; bh=cMIkLZVOxy9ZhXonrfPgDwHIUuh2Le6VrR2isPjJSyQ=; b=jNe3eFWMGDjNVTOUZWF/AqhlQDy1/FRWHMZER2ELMi2qnj0qydL3H+Ce44JLO5qWVt j3SfqZZ8xXj+ZCeF017Leab+FEOaVUxr1lZgnSXy93vFGN2t+VNwKfxI6BHTF0QuAety UyqPsNYR4oe8ep11Lqb7VTbN3IDiYe6YUlZCv+Seg8P7wQMMR3qIz4Lk5C0FeJJ5+TVB eEdL3mSj04OYgy2awHNc2A47a7MwdNV7BaPJhpJncZ4e1uG+IIfOQLe7tqEj1q3eizfG DSanqTBCc06vywwU05SbITwhGbUpiZLe8dCZVske8MFqUyWAj/nf3a1Ugd+GM2pbj/dF kcKg== Received: by 10.42.39.17 with SMTP id f17mr4909943ice.3.1341178910066; Sun, 01 Jul 2012 14:41:50 -0700 (PDT) Received: from 63.imp.bsdimp.com (50-78-194-198-static.hfc.comcastbusiness.net. [50.78.194.198]) by mx.google.com with ESMTPS id ai6sm15826856igc.0.2012.07.01.14.41.49 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 01 Jul 2012 14:41:49 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: Date: Sun, 1 Jul 2012 15:41:47 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <370956AA-D028-4C44-B808-3160F0193069@bsdimp.com> References: <201207010656.q616ufcY071880@svn.freebsd.org> To: Marcel Moolenaar X-Mailer: Apple Mail (2.1084) X-Gm-Message-State: ALoCoQm1FjISPRoBKfbpebvDNSIwzIbFny/YaaufoZa9OIU0nh4ZCQhQXay46JcKn3Sy6ewUJvau Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Warner Losh Subject: Re: svn commit: r237883 - in head/sys/arm: at91 conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 21:41:51 -0000 On Jul 1, 2012, at 9:27 AM, Marcel Moolenaar wrote: >=20 > On Jun 30, 2012, at 11:56 PM, Warner Losh wrote: >=20 >> Author: imp >> Date: Sun Jul 1 06:56:41 2012 >> New Revision: 237883 >> URL: http://svn.freebsd.org/changeset/base/237883 >>=20 >> Log: >> Create a pseudo-lint kernel for all at91 SoCs. This kernel will not >> currently boot, but will serve as a good linting. make universe = could >> now be altered to skip building all the other at91 kernels... >=20 > BTW: I've implemented the LINT kernel for ARM. It combines all > SoCs. It does have a lot of duplicate definitions, but by not > having the linker fail on that, you get a successful build of > something we already understand does not boot. It's good coverage > with a single kernel and can help to bring the "make universe" > time down by only building LINT for ARM. I was thinking of adding NOUNIVERSE tags to the kernels that we didn't = want routinely built. I'd rather have a single ARM kernel that can be = built for testing purposes. Don't like the multiple defined error being = suppressed, but short of some uglyish macros, I can't think of a better = way. I've written those 'ugly' macros for my multi-board work, and plan = on re-using them for the multi-soc work I intend to do to replace the = current "selected too late" SoC support for Atmel. I was thinking we = could expand the current set of platform/MD calls (initarm, etc), wrap = them in some macros so they could all be compiled together. Not sure if = you did this or not... > I can port that to FreeBSD. Shall I make some patches for people > to look at? Sure. I'd love to see it. I'd be happy to preview any partial work if = you want early feedbac. Warner From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 21:43:12 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6ECDB106564A; Sun, 1 Jul 2012 21:43:12 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id C05178FC1A; Sun, 1 Jul 2012 21:43:11 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q61LhE4H090676; Mon, 2 Jul 2012 00:43:14 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q61Lh1f4057241; Mon, 2 Jul 2012 00:43:01 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q61Lh1Gl057240; Mon, 2 Jul 2012 00:43:01 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 2 Jul 2012 00:43:01 +0300 From: Konstantin Belousov To: Andreas Tobler Message-ID: <20120701214301.GQ2337@deviant.kiev.zoral.com.ua> References: <201206210926.q5L9Q6nR002030@svn.freebsd.org> <4FF03316.5050609@FreeBSD.org> <20120701120408.GM2337@deviant.kiev.zoral.com.ua> <4FF0528E.50002@FreeBSD.org> <20120701134132.GO2337@deviant.kiev.zoral.com.ua> <4FF05724.3050904@FreeBSD.org> <20120701170543.GP2337@deviant.kiev.zoral.com.ua> <4FF097E5.8030909@FreeBSD.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="pZGq8xo7gUAgOQb5" Content-Disposition: inline In-Reply-To: <4FF097E5.8030909@FreeBSD.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r237367 - head/sys/fs/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 21:43:12 -0000 --pZGq8xo7gUAgOQb5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jul 01, 2012 at 08:33:09PM +0200, Andreas Tobler wrote: > On 01.07.12 19:05, Konstantin Belousov wrote: > >On Sun, Jul 01, 2012 at 03:56:52PM +0200, Andreas Tobler wrote: > >>On 01.07.12 15:41, Konstantin Belousov wrote: > >>>On Sun, Jul 01, 2012 at 03:37:18PM +0200, Andreas Tobler wrote: > >>>>On 01.07.12 14:04, Konstantin Belousov wrote: > >>>>>On Sun, Jul 01, 2012 at 01:23:02PM +0200, Andreas Tobler wrote: > >>>>>>On 21.06.12 11:26, Konstantin Belousov wrote: > >>>>>>>Author: kib > >>>>>>>Date: Thu Jun 21 09:26:06 2012 > >>>>>>>New Revision: 237367 > >>>>>>>URL: http://svn.freebsd.org/changeset/base/237367 > >>>>>>> > >>>>>>>Log: > >>>>>>> Enable deadlock avoidance code for NFS client. > >>>>>> > >>>>>> > >>>>>>Hm, since this commit I fail with my nfs installworld/kernel. > >>>>>> > >>>>>>I have a builder which installs world/kernel to a nfs mounted=20 > >>>>>>directory. > >>>>>>Namely used for cross builds. > >>>>>> > >>>>>>Now since this commit I get the following when I install kernel to = the > >>>>>>nfs directory: > >>>>>> > >>>>>>.. > >>>>>>install -o root -g wheel -m 555 zfs.ko.symbols > >>>>>>/netboot/sparc64/boot/kernel > >>>>>>install: /netboot/sparc64/boot/kernel/zfs.ko.symbols: No such file = or > >>>>>>directory > >>>>>>*** [_kmodinstall] Error code 71 > >>>>>>.. > >>>>>> > >>>>>>The file is there, a local install of the tree works without proble= ms. > >>>>>>Reverting to r237366 also makes it work again. > >>>>>> > >>>>>>The server is a -CURRENT, r237880, The client, -CURRENT too. > >>>>>> > >>>>>>How can I help to track down the real issue? > >>>>> > >>>>>Is it always the same file in the install procedure which causes the > >>>>>failure ? Even more, is the failure pattern always the same ? > >>>> > >>>>I'd say so yes. When installing a kernel onto a nfs mounted fs then > >>>>always (in my cases) the zfs.ko.symbols was the failing pattern. > >>>>I tried ppc64 and sparc64 as target. With both it was the above file. > >>>> > >>>>When doing a installworld, it was, also in both cases, ppc64/sparc64, > >>>>the cc1 in libexec which failed. > >>>> > >>>>>Might be, start with ktrace-ing the whole make invocation, including > >>>>>the children processes. > >>>> > >>>>Some recipes how to start? > >>>ktrace -o -i make installkernel > >>>Then kdump and cut the lines around relevant failure. > >> > >>ktrace -f, right? > >Right, but without -i it is useless. >=20 > Ah, yes, seems clear now after reading the man page. >=20 > >>I placed the whole kdump here: > >> > >>http://people.freebsd.org/~andreast/dumped_installkernel.log > >> > >>It is not clear to me where the failure starts :) > >Because logs do not contain tracepoints from the children. > >See above about -i. > > > >I asked about excerpt because I expect the proper log to have an order > >of magnitude bigger size. >=20 > Ok. The dump is around 100MB, I hope I extracted as much as needed: >=20 > http://people.freebsd.org/~andreast/dumped_installkernel-7.log >=20 > >>>>>I used buildworld on the NFS-mounted obj/ as the test for the change= s. > >>>> > >>>>Here the obj is local, only the src and the destination is on the > >>>>nfs/netboot server. > >>> > >>>I just finished build on NFS obj/ and did several rounds of installs > >>>for world and kernel into nfs-mounted destdir. It seems I cannot=20 > >>>reproduce > >>>this locally. > >> > >>Ok. I try with an nfs obj too. >=20 > So, I was not able to reproduce the failure with an nfs mounted obj dir. >=20 > But I was able to reproduce the failure with three different machines=20 > which all have the obj local and the destination mounted via nfs. >=20 > Are you able to try with a local obj too? Below are two patches. Please follow my instructions literally to get most of your bug report. First, please apply the usr.bin/xinstall patch only, and retry installkernel (no need to use ktrace). It should show the proper error, short write, with zero-sized result, instead of garbage ENOENT from errno. Next, please apply the sys/fs/nfsclient patch, which should fix the core cause. diff --git a/sys/fs/nfsclient/nfs_clbio.c b/sys/fs/nfsclient/nfs_clbio.c index 71286e3..f7af6fb 100644 --- a/sys/fs/nfsclient/nfs_clbio.c +++ b/sys/fs/nfsclient/nfs_clbio.c @@ -897,7 +897,7 @@ ncl_write(struct vop_write_args *ap) struct nfsmount *nmp =3D VFSTONFS(vp->v_mount); daddr_t lbn; int bcount; - int bp_cached, n, on, error =3D 0; + int bp_cached, n, on, error =3D 0, error1; size_t orig_resid, local_resid; off_t orig_size, tmp_off; =20 @@ -1259,9 +1259,12 @@ again: if ((ioflag & IO_SYNC)) { if (ioflag & IO_INVAL) bp->b_flags |=3D B_NOCACHE; - error =3D bwrite(bp); - if (error) + error1 =3D bwrite(bp); + if (error1 !=3D 0) { + if (error =3D=3D 0) + error =3D error1; break; + } } else if ((n + on) =3D=3D biosize) { bp->b_flags |=3D B_ASYNC; (void) ncl_writebp(bp, 0, NULL); diff --git a/usr.bin/xinstall/xinstall.c b/usr.bin/xinstall/xinstall.c index a920f85..3eba4f7 100644 --- a/usr.bin/xinstall/xinstall.c +++ b/usr.bin/xinstall/xinstall.c @@ -53,6 +53,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -671,11 +672,18 @@ copy(int from_fd, const char *from_name, int to_fd, c= onst char *to_name, if (size <=3D 8 * 1048576 && trymmap(from_fd) && (p =3D mmap(NULL, (size_t)size, PROT_READ, MAP_SHARED, from_fd, (off_t)0)) !=3D (char *)MAP_FAILED) { - if ((nw =3D write(to_fd, p, size)) !=3D size) { + nw =3D write(to_fd, p, size); + if (nw !=3D size) { serrno =3D errno; (void)unlink(to_name); - errno =3D nw > 0 ? EIO : serrno; - err(EX_OSERR, "%s", to_name); + if (nw >=3D 0) { + errx(EX_OSERR, + "short write to %s: %jd bytes written, %jd bytes asked to write", + to_name, (uintmax_t)nw, (uintmax_t)size); + } else { + errno =3D serrno; + err(EX_OSERR, "%s", to_name); + } } done_copy =3D 1; } @@ -684,8 +692,15 @@ copy(int from_fd, const char *from_name, int to_fd, co= nst char *to_name, if ((nw =3D write(to_fd, buf, nr)) !=3D nr) { serrno =3D errno; (void)unlink(to_name); - errno =3D nw > 0 ? EIO : serrno; - err(EX_OSERR, "%s", to_name); + if (nw >=3D 0) { + errx(EX_OSERR, + "short write to %s: %jd bytes written, %jd bytes asked to write", + to_name, (uintmax_t)nw, + (uintmax_t)size); + } else { + errno =3D serrno; + err(EX_OSERR, "%s", to_name); + } } if (nr !=3D 0) { serrno =3D errno; --pZGq8xo7gUAgOQb5 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAk/wxGUACgkQC3+MBN1Mb4jp9QCgu2hlRy+3BKQb2ADZnRCzpBPL CLYAoM7c4jnQNMKAzfkTeAtZXvWfAJbc =tF1M -----END PGP SIGNATURE----- --pZGq8xo7gUAgOQb5-- From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 21:51:58 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9FFD81065673; Sun, 1 Jul 2012 21:51:58 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 70ECE8FC08; Sun, 1 Jul 2012 21:51:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q61Lpw03025755; Sun, 1 Jul 2012 21:51:58 GMT (envelope-from theraven@svn.freebsd.org) Received: (from theraven@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q61LpwB9025752; Sun, 1 Jul 2012 21:51:58 GMT (envelope-from theraven@svn.freebsd.org) Message-Id: <201207012151.q61LpwB9025752@svn.freebsd.org> From: David Chisnall Date: Sun, 1 Jul 2012 21:51:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237938 - in stable/9: gnu/lib/libsupc++ lib/libcxxrt X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 21:51:58 -0000 Author: theraven Date: Sun Jul 1 21:51:57 2012 New Revision: 237938 URL: http://svn.freebsd.org/changeset/base/237938 Log: MFC symbol exports for libsupcc++ and libcxxrt that correctly export new and delete operators. Modified: stable/9/gnu/lib/libsupc++/Version.map stable/9/lib/libcxxrt/Version.map Directory Properties: stable/9/gnu/lib/libsupc++/ (props changed) stable/9/lib/libcxxrt/ (props changed) Modified: stable/9/gnu/lib/libsupc++/Version.map ============================================================================== --- stable/9/gnu/lib/libsupc++/Version.map Sun Jul 1 19:40:51 2012 (r237937) +++ stable/9/gnu/lib/libsupc++/Version.map Sun Jul 1 21:51:57 2012 (r237938) @@ -130,6 +130,20 @@ CXXABI_1.3 { *; }; +GLIBCXX_3.4 { + # operator new and new[] + _Znai[jm]; + _Zna[jm]RKSt9nothrow_t; + _Znw[jm]; + _Znw[jm]RKSt9nothrow_t; + + # operator delete and delete[] + _ZdaPv; + _ZdaPvRKSt9nothrow_t; + _ZdlPv; + _ZdlPvRKSt9nothrow_t; +}; + CXXABI_1.3.1 { __cxa_get_exception_ptr; Modified: stable/9/lib/libcxxrt/Version.map ============================================================================== --- stable/9/lib/libcxxrt/Version.map Sun Jul 1 19:40:51 2012 (r237937) +++ stable/9/lib/libcxxrt/Version.map Sun Jul 1 21:51:57 2012 (r237938) @@ -306,11 +306,6 @@ CXXRT_1.0 { "std::type_info::__is_pointer_p() const"; - "operator delete[](void*)"; - "operator delete(void*)"; - "operator new[](unsigned long)"; - "operator new(unsigned long)"; - "operator new(unsigned long, std::nothrow_t const&)"; }; __cxa_allocate_dependent_exception; @@ -321,3 +316,16 @@ CXXRT_1.0 { __cxa_rethrow_primary_exception; } CXXABI_1.3.1; + +GLIBCXX_3.4 { + extern "C++" { + "operator delete[](void*)"; + "operator delete(void*)"; + "operator new[](unsigned int)"; + "operator new(unsigned int)"; + "operator new(unsigned int, std::nothrow_t const&)"; + "operator new[](unsigned long)"; + "operator new(unsigned long)"; + "operator new(unsigned long, std::nothrow_t const&)"; + }; +}; From owner-svn-src-all@FreeBSD.ORG Sun Jul 1 22:18:21 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 849991065670; Sun, 1 Jul 2012 22:18:21 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 705D98FC08; Sun, 1 Jul 2012 22:18:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q61MILRW026988; Sun, 1 Jul 2012 22:18:21 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q61MILbY026986; Sun, 1 Jul 2012 22:18:21 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201207012218.q61MILbY026986@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 1 Jul 2012 22:18:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237939 - head/lib/libc/locale X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 22:18:21 -0000 Author: jilles Date: Sun Jul 1 22:18:20 2012 New Revision: 237939 URL: http://svn.freebsd.org/changeset/base/237939 Log: ctype_l(3): Note that not all these functions are specified by POSIX.1-2008. The function isascii_l() is not in POSIX even though isascii() is, probably because isascii() is marked as obsolete. The other functions, like digittoint_l() and ishexnumber_l(), are FreeBSD-specific just like their non-_l versions. Modified: head/lib/libc/locale/ctype_l.3 Modified: head/lib/libc/locale/ctype_l.3 ============================================================================== --- head/lib/libc/locale/ctype_l.3 Sun Jul 1 21:51:57 2012 (r237938) +++ head/lib/libc/locale/ctype_l.3 Sun Jul 1 22:18:20 2012 (r237939) @@ -135,4 +135,17 @@ See the specific manual pages for more i .Xr xlocale 3 .Sh STANDARDS These functions conform to -.St -p1003.1-2008 . +.St -p1003.1-2008 , +except for +.Fn digittoint_l , +.Fn isascii_l , +.Fn ishexnumber_l , +.Fn isideogram_l , +.Fn isnumber_l , +.Fn isphonogram_l , +.Fn isrune_l +and +.Fn isspecial_l +which are +.Fx +extensions. From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 02:26:53 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8D29C106566C; Mon, 2 Jul 2012 02:26:53 +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 764278FC08; Mon, 2 Jul 2012 02:26:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q622QrCs037507; Mon, 2 Jul 2012 02:26:53 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q622Qrev037504; Mon, 2 Jul 2012 02:26:53 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201207020226.q622Qrev037504@svn.freebsd.org> From: Xin LI Date: Mon, 2 Jul 2012 02:26:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237940 - stable/9/crypto/openssh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 02:26:53 -0000 Author: delphij Date: Mon Jul 2 02:26:52 2012 New Revision: 237940 URL: http://svn.freebsd.org/changeset/base/237940 Log: MFC r237568: Fetch both ECDSA and RSA keys by default in ssh-keyscan(1). Modified: stable/9/crypto/openssh/ssh-keyscan.1 stable/9/crypto/openssh/ssh-keyscan.c Directory Properties: stable/9/crypto/openssh/ (props changed) Modified: stable/9/crypto/openssh/ssh-keyscan.1 ============================================================================== --- stable/9/crypto/openssh/ssh-keyscan.1 Sun Jul 1 22:18:20 2012 (r237939) +++ stable/9/crypto/openssh/ssh-keyscan.1 Mon Jul 2 02:26:52 2012 (r237940) @@ -1,4 +1,4 @@ -.\" $OpenBSD: ssh-keyscan.1,v 1.29 2010/08/31 11:54:45 djm Exp $ +.\" $OpenBSD: ssh-keyscan.1,v 1.30 2012/04/11 13:34:17 djm Exp $ .\" $FreeBSD$ .\" .\" Copyright 1995, 1996 by David Mazieres . @@ -7,7 +7,7 @@ .\" permitted provided that due credit is given to the author and the .\" OpenBSD project by leaving this copyright notice intact. .\" -.Dd August 31, 2010 +.Dd April 11 2012 .Dt SSH-KEYSCAN 1 .Os .Sh NAME @@ -95,8 +95,11 @@ or .Dq rsa for protocol version 2. Multiple values may be specified by separating them with commas. -The default is -.Dq rsa . +The default is to fetch +.Dq rsa +and +.Dq ecdsa +keys. .It Fl v Verbose mode. Causes Modified: stable/9/crypto/openssh/ssh-keyscan.c ============================================================================== --- stable/9/crypto/openssh/ssh-keyscan.c Sun Jul 1 22:18:20 2012 (r237939) +++ stable/9/crypto/openssh/ssh-keyscan.c Mon Jul 2 02:26:52 2012 (r237940) @@ -57,7 +57,7 @@ int ssh_port = SSH_DEFAULT_PORT; #define KT_RSA 4 #define KT_ECDSA 8 -int get_keytypes = KT_RSA; /* Get only RSA keys by default */ +int get_keytypes = KT_RSA|KT_ECDSA;/* Get RSA and ECDSA keys by default */ int hash_hosts = 0; /* Hash hostname on output */ From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 02:36:06 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0E70C106566C; Mon, 2 Jul 2012 02:36:06 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E0C438FC0C; Mon, 2 Jul 2012 02:36:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q622a5G3037926; Mon, 2 Jul 2012 02:36:05 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q622a5kV037920; Mon, 2 Jul 2012 02:36:05 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <201207020236.q622a5kV037920@svn.freebsd.org> From: "Kenneth D. Merry" Date: Mon, 2 Jul 2012 02:36:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237941 - stable/9/sys/cam/ctl X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 02:36:06 -0000 Author: ken Date: Mon Jul 2 02:36:05 2012 New Revision: 237941 URL: http://svn.freebsd.org/changeset/base/237941 Log: MFC 237726: r237726 | ken | 2012-06-28 13:39:30 -0600 (Thu, 28 Jun 2012) | 5 lines Add a loader tunable, kern.cam.ctl.disable, that will disable loading CTL. This may be useful in very low memory installations. Modified: stable/9/sys/cam/ctl/ctl.c stable/9/sys/cam/ctl/ctl_backend.c stable/9/sys/cam/ctl/ctl_frontend_cam_sim.c stable/9/sys/cam/ctl/ctl_frontend_internal.c stable/9/sys/cam/ctl/scsi_ctl.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/cam/ctl/ctl.c ============================================================================== --- stable/9/sys/cam/ctl/ctl.c Mon Jul 2 02:26:52 2012 (r237940) +++ stable/9/sys/cam/ctl/ctl.c Mon Jul 2 02:36:05 2012 (r237941) @@ -308,7 +308,6 @@ static struct scsi_control_page control_ /*aen_holdoff_period*/{0, 0} }; -SYSCTL_NODE(_kern_cam, OID_AUTO, ctl, CTLFLAG_RD, 0, "CAM Target Layer"); /* * XXX KDM move these into the softc. @@ -318,7 +317,12 @@ static int persis_offset; static uint8_t ctl_pause_rtr; static int ctl_is_single; static int index_to_aps_page; +int ctl_disable = 0; +SYSCTL_NODE(_kern_cam, OID_AUTO, ctl, CTLFLAG_RD, 0, "CAM Target Layer"); +SYSCTL_INT(_kern_cam_ctl, OID_AUTO, disable, CTLFLAG_RDTUN, &ctl_disable, 0, + "Disable CTL"); +TUNABLE_INT("kern.cam.ctl.disable", &ctl_disable); /* * Serial number (0x80), device id (0x83), and supported pages (0x00) @@ -949,6 +953,10 @@ ctl_init(void) ctl_pause_rtr = 0; rcv_sync_msg = 0; + /* If we're disabled, don't initialize. */ + if (ctl_disable != 0) + return; + control_softc = malloc(sizeof(*control_softc), M_DEVBUF, M_WAITOK); softc = control_softc; Modified: stable/9/sys/cam/ctl/ctl_backend.c ============================================================================== --- stable/9/sys/cam/ctl/ctl_backend.c Mon Jul 2 02:26:52 2012 (r237940) +++ stable/9/sys/cam/ctl/ctl_backend.c Mon Jul 2 02:36:05 2012 (r237941) @@ -62,6 +62,7 @@ __FBSDID("$FreeBSD$"); #include extern struct ctl_softc *control_softc; +extern int ctl_disable; int ctl_backend_register(struct ctl_backend_driver *be) @@ -71,6 +72,10 @@ ctl_backend_register(struct ctl_backend_ ctl_softc = control_softc; + /* Don't continue if CTL is disabled */ + if (ctl_disable != 0) + return (0); + mtx_lock(&ctl_softc->ctl_lock); /* * Sanity check, make sure this isn't a duplicate registration. Modified: stable/9/sys/cam/ctl/ctl_frontend_cam_sim.c ============================================================================== --- stable/9/sys/cam/ctl/ctl_frontend_cam_sim.c Mon Jul 2 02:26:52 2012 (r237940) +++ stable/9/sys/cam/ctl/ctl_frontend_cam_sim.c Mon Jul 2 02:36:05 2012 (r237941) @@ -119,6 +119,7 @@ struct cfcs_softc cfcs_softc; * amount of SCSI sense data that we will report to CAM. */ static int cfcs_max_sense = sizeof(struct scsi_sense_data); +extern int ctl_disable; SYSINIT(cfcs_init, SI_SUB_CONFIGURE, SI_ORDER_FOURTH, cfcs_init, NULL); SYSCTL_NODE(_kern_cam, OID_AUTO, ctl2cam, CTLFLAG_RD, 0, @@ -138,6 +139,10 @@ cfcs_init(void) #endif int retval; + /* Don't continue if CTL is disabled */ + if (ctl_disable != 0) + return (0); + softc = &cfcs_softc; retval = 0; bzero(softc, sizeof(*softc)); Modified: stable/9/sys/cam/ctl/ctl_frontend_internal.c ============================================================================== --- stable/9/sys/cam/ctl/ctl_frontend_internal.c Mon Jul 2 02:26:52 2012 (r237940) +++ stable/9/sys/cam/ctl/ctl_frontend_internal.c Mon Jul 2 02:36:05 2012 (r237941) @@ -187,6 +187,7 @@ struct cfi_softc { MALLOC_DEFINE(M_CTL_CFI, "ctlcfi", "CTL CFI"); static struct cfi_softc fetd_internal_softc; +extern int ctl_disable; void cfi_init(void); void cfi_shutdown(void) __unused; @@ -231,6 +232,10 @@ cfi_init(void) retval = 0; + /* If we're disabled, don't initialize */ + if (ctl_disable != 0) + return; + if (sizeof(struct cfi_lun_io) > CTL_PORT_PRIV_SIZE) { printf("%s: size of struct cfi_lun_io %zd > " "CTL_PORT_PRIV_SIZE %d\n", __func__, Modified: stable/9/sys/cam/ctl/scsi_ctl.c ============================================================================== --- stable/9/sys/cam/ctl/scsi_ctl.c Mon Jul 2 02:26:52 2012 (r237940) +++ stable/9/sys/cam/ctl/scsi_ctl.c Mon Jul 2 02:36:05 2012 (r237941) @@ -227,12 +227,17 @@ static struct periph_driver ctlfe_driver PERIPHDRIVER_DECLARE(ctl, ctlfe_driver); extern struct ctl_softc *control_softc; +extern int ctl_disable; int ctlfeinitialize(void) { cam_status status; + /* Don't initialize if we're disabled */ + if (ctl_disable != 0) + return (0); + STAILQ_INIT(&ctlfe_softc_list); mtx_init(&ctlfe_list_mtx, ctlfe_mtx_desc, NULL, MTX_DEF); @@ -263,6 +268,10 @@ ctlfeinit(void) { cam_status status; + /* Don't initialize if we're disabled */ + if (ctl_disable != 0) + return; + STAILQ_INIT(&ctlfe_softc_list); mtx_init(&ctlfe_list_mtx, ctlfe_mtx_desc, NULL, MTX_DEF); From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 02:38:27 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DB1081065672; Mon, 2 Jul 2012 02:38:27 +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 C5D598FC14; Mon, 2 Jul 2012 02:38:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q622cR2R038054; Mon, 2 Jul 2012 02:38:27 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q622cR4q038051; Mon, 2 Jul 2012 02:38:27 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201207020238.q622cR4q038051@svn.freebsd.org> From: Xin LI Date: Mon, 2 Jul 2012 02:38:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237942 - head/sbin/ping X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 02:38:28 -0000 Author: delphij Date: Mon Jul 2 02:38:27 2012 New Revision: 237942 URL: http://svn.freebsd.org/changeset/base/237942 Log: Use timeclear() instead of home grown version. MFC after: 2 weeks Modified: head/sbin/ping/ping.c Modified: head/sbin/ping/ping.c ============================================================================== --- head/sbin/ping/ping.c Mon Jul 2 02:36:05 2012 (r237941) +++ head/sbin/ping/ping.c Mon Jul 2 02:38:27 2012 (r237942) @@ -832,7 +832,7 @@ main(int argc, char *const *argv) timeout.tv_sec++; } if (timeout.tv_sec < 0) - timeout.tv_sec = timeout.tv_usec = 0; + timerclear(&timeout); n = select(s + 1, &rfds, NULL, NULL, &timeout); if (n < 0) continue; /* Must be EINTR. */ From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 02:44:01 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0D838106564A; Mon, 2 Jul 2012 02:44:01 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E98DE8FC0A; Mon, 2 Jul 2012 02:44:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q622i0ED038357; Mon, 2 Jul 2012 02:44:00 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q622i0AQ038354; Mon, 2 Jul 2012 02:44:00 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <201207020244.q622i0AQ038354@svn.freebsd.org> From: "Kenneth D. Merry" Date: Mon, 2 Jul 2012 02:44:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237943 - in stable/9/sys: powerpc/conf sparc64/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 02:44:01 -0000 Author: ken Date: Mon Jul 2 02:44:00 2012 New Revision: 237943 URL: http://svn.freebsd.org/changeset/base/237943 Log: MFC 237730: r237730 | ken | 2012-06-28 14:48:24 -0600 (Thu, 28 Jun 2012) | 5 lines Now that the mps(4) driver is endian-safe, add it to the powerpc and sparc64 GENERIC config files. Modified: stable/9/sys/powerpc/conf/GENERIC64 stable/9/sys/sparc64/conf/GENERIC Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/powerpc/conf/GENERIC64 ============================================================================== --- stable/9/sys/powerpc/conf/GENERIC64 Mon Jul 2 02:38:27 2012 (r237942) +++ stable/9/sys/powerpc/conf/GENERIC64 Mon Jul 2 02:44:00 2012 (r237943) @@ -94,6 +94,7 @@ options AHC_REG_PRETTY_PRINT # Print re device isp # Qlogic family device ispfw # Firmware module for Qlogic host adapters device mpt # LSI-Logic MPT-Fusion +device mps # LSI-Logic MPT-Fusion 2 device sym # NCR/Symbios/LSI Logic 53C8XX/53C1010/53C1510D # ATA/SCSI peripherals Modified: stable/9/sys/sparc64/conf/GENERIC ============================================================================== --- stable/9/sys/sparc64/conf/GENERIC Mon Jul 2 02:38:27 2012 (r237942) +++ stable/9/sys/sparc64/conf/GENERIC Mon Jul 2 02:44:00 2012 (r237943) @@ -95,6 +95,7 @@ device esp # AMD Am53C974, Sun ESP and device isp # Qlogic family device ispfw # Firmware module for Qlogic host adapters device mpt # LSI-Logic MPT-Fusion +device mps # LSI-Logic MPT-Fusion 2 device sym # NCR/Symbios/LSI Logic 53C8XX/53C1010/53C1510D # ATA/SCSI peripherals From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 02:45:34 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 87C4E1065670; Mon, 2 Jul 2012 02:45:34 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 712E48FC08; Mon, 2 Jul 2012 02:45:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q622jYFO038472; Mon, 2 Jul 2012 02:45:34 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q622jYfs038470; Mon, 2 Jul 2012 02:45:34 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <201207020245.q622jYfs038470@svn.freebsd.org> From: "Kenneth D. Merry" Date: Mon, 2 Jul 2012 02:45: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: r237944 - stable/8/sys/sparc64/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 02:45:34 -0000 Author: ken Date: Mon Jul 2 02:45:33 2012 New Revision: 237944 URL: http://svn.freebsd.org/changeset/base/237944 Log: MFC 237730: This only includes the sparc64 GENERIC, since the powerpc GENERIC64 config file isn't in stable/8. r237730 | ken | 2012-06-28 14:48:24 -0600 (Thu, 28 Jun 2012) | 5 lines Now that the mps(4) driver is endian-safe, add it to the powerpc and sparc64 GENERIC config files. Modified: stable/8/sys/sparc64/conf/GENERIC Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/sparc64/conf/GENERIC ============================================================================== --- stable/8/sys/sparc64/conf/GENERIC Mon Jul 2 02:44:00 2012 (r237943) +++ stable/8/sys/sparc64/conf/GENERIC Mon Jul 2 02:45:33 2012 (r237944) @@ -110,6 +110,7 @@ device esp # AMD Am53C974, Sun ESP and device isp # Qlogic family device ispfw # Firmware module for Qlogic host adapters device mpt # LSI-Logic MPT-Fusion +device mps # LSI-Logic MPT-Fusion 2 device sym # NCR/Symbios/LSI Logic 53C8XX/53C1010/53C1510D # SCSI peripherals From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 02:50:11 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3F165106566B; Mon, 2 Jul 2012 02:50:11 +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 0EA5F8FC12; Mon, 2 Jul 2012 02:50:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q622oAcD038709; Mon, 2 Jul 2012 02:50:10 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q622oAot038707; Mon, 2 Jul 2012 02:50:10 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201207020250.q622oAot038707@svn.freebsd.org> From: Xin LI Date: Mon, 2 Jul 2012 02:50:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237945 - stable/9/sys/netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 02:50:11 -0000 Author: delphij Date: Mon Jul 2 02:50:10 2012 New Revision: 237945 URL: http://svn.freebsd.org/changeset/base/237945 Log: MFC r237571: Fix a LOR acquiring the if_afdata lock while holding an rtentry lock. Possibly do some entra work in case we would not get into the ifa0 != NULL paths later as we already do for the mltaddr before. XXX We should possibly error in case in6_setscope fails. Reference: http://lists.freebsd.org/pipermail/freebsd-net/2011-September/029829.html Submitted by: bz Modified: stable/9/sys/netinet6/in6.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet6/in6.c ============================================================================== --- stable/9/sys/netinet6/in6.c Mon Jul 2 02:45:33 2012 (r237944) +++ stable/9/sys/netinet6/in6.c Mon Jul 2 02:50:10 2012 (r237945) @@ -1304,6 +1304,7 @@ in6_purgeaddr_mc(struct ifnet *ifp, stru struct sockaddr_in6 mltaddr, mltmask; struct in6_multi_mship *imm; struct rtentry *rt; + struct sockaddr_in6 sin6; int error; /* @@ -1330,6 +1331,19 @@ in6_purgeaddr_mc(struct ifnet *ifp, stru if ((error = in6_setscope(&mltaddr.sin6_addr, ifp, NULL)) != 0) return (error); + /* + * As for the mltaddr above, proactively prepare the sin6 to avoid + * rtentry un- and re-locking. + */ + if (ifa0 != NULL) { + bzero(&sin6, sizeof(sin6)); + sin6.sin6_len = sizeof(sin6); + sin6.sin6_family = AF_INET6; + memcpy(&sin6.sin6_addr, &satosin6(ifa0->ifa_addr)->sin6_addr, + sizeof(sin6.sin6_addr)); + in6_setscope(&sin6.sin6_addr, ifa0->ifa_ifp, NULL); + } + rt = in6_rtalloc1((struct sockaddr *)&mltaddr, 0, 0UL, RT_DEFAULT_FIB); if (rt != NULL && rt->rt_gateway != NULL && (memcmp(&satosin6(rt->rt_gateway)->sin6_addr, @@ -1356,15 +1370,7 @@ in6_purgeaddr_mc(struct ifnet *ifp, stru /* * Replace the gateway of the route. */ - struct sockaddr_in6 sa; - - bzero(&sa, sizeof(sa)); - sa.sin6_len = sizeof(struct sockaddr_in6); - sa.sin6_family = AF_INET6; - memcpy(&sa.sin6_addr, &satosin6(ifa0->ifa_addr)->sin6_addr, - sizeof(sa.sin6_addr)); - in6_setscope(&sa.sin6_addr, ifa0->ifa_ifp, NULL); - memcpy(rt->rt_gateway, &sa, sizeof(sa)); + memcpy(rt->rt_gateway, &sin6, sizeof(sin6)); RTFREE_LOCKED(rt); } } else { @@ -1406,15 +1412,7 @@ in6_purgeaddr_mc(struct ifnet *ifp, stru /* * Replace the gateway of the route. */ - struct sockaddr_in6 sa; - - bzero(&sa, sizeof(sa)); - sa.sin6_len = sizeof(struct sockaddr_in6); - sa.sin6_family = AF_INET6; - memcpy(&sa.sin6_addr, &satosin6(ifa0->ifa_addr)->sin6_addr, - sizeof(sa.sin6_addr)); - in6_setscope(&sa.sin6_addr, ifa0->ifa_ifp, NULL); - memcpy(rt->rt_gateway, &sa, sizeof(sa)); + memcpy(rt->rt_gateway, &sin6, sizeof(sin6)); RTFREE_LOCKED(rt); } } else { From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 02:54:23 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B86441065672; Mon, 2 Jul 2012 02:54:23 +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 87DF88FC0C; Mon, 2 Jul 2012 02:54:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q622sNfg038972; Mon, 2 Jul 2012 02:54:23 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q622sN1a038970; Mon, 2 Jul 2012 02:54:23 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201207020254.q622sN1a038970@svn.freebsd.org> From: Xin LI Date: Mon, 2 Jul 2012 02:54:23 +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: r237946 - stable/8/sys/netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 02:54:23 -0000 Author: delphij Date: Mon Jul 2 02:54:22 2012 New Revision: 237946 URL: http://svn.freebsd.org/changeset/base/237946 Log: MFC r237571: Fix a LOR acquiring the if_afdata lock while holding an rtentry lock. Possibly do some entra work in case we would not get into the ifa0 != NULL paths later as we already do for the mltaddr before. XXX We should possibly error in case in6_setscope fails. Reference: http://lists.freebsd.org/pipermail/freebsd-net/2011-September/029829.html Submitted by: bz Modified: stable/8/sys/netinet6/in6.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/netinet6/in6.c ============================================================================== --- stable/8/sys/netinet6/in6.c Mon Jul 2 02:50:10 2012 (r237945) +++ stable/8/sys/netinet6/in6.c Mon Jul 2 02:54:22 2012 (r237946) @@ -1198,6 +1198,7 @@ in6_purgeaddr_mc(struct ifnet *ifp, stru struct sockaddr_in6 mltaddr, mltmask; struct in6_multi_mship *imm; struct rtentry *rt; + struct sockaddr_in6 sin6; int error; /* @@ -1224,6 +1225,19 @@ in6_purgeaddr_mc(struct ifnet *ifp, stru if ((error = in6_setscope(&mltaddr.sin6_addr, ifp, NULL)) != 0) return (error); + /* + * As for the mltaddr above, proactively prepare the sin6 to avoid + * rtentry un- and re-locking. + */ + if (ifa0 != NULL) { + bzero(&sin6, sizeof(sin6)); + sin6.sin6_len = sizeof(sin6); + sin6.sin6_family = AF_INET6; + memcpy(&sin6.sin6_addr, &satosin6(ifa0->ifa_addr)->sin6_addr, + sizeof(sin6.sin6_addr)); + in6_setscope(&sin6.sin6_addr, ifa0->ifa_ifp, NULL); + } + rt = in6_rtalloc1((struct sockaddr *)&mltaddr, 0, 0UL, RT_DEFAULT_FIB); if (rt != NULL && rt->rt_gateway != NULL && (memcmp(&satosin6(rt->rt_gateway)->sin6_addr, @@ -1250,15 +1264,7 @@ in6_purgeaddr_mc(struct ifnet *ifp, stru /* * Replace the gateway of the route. */ - struct sockaddr_in6 sa; - - bzero(&sa, sizeof(sa)); - sa.sin6_len = sizeof(struct sockaddr_in6); - sa.sin6_family = AF_INET6; - memcpy(&sa.sin6_addr, &satosin6(ifa0->ifa_addr)->sin6_addr, - sizeof(sa.sin6_addr)); - in6_setscope(&sa.sin6_addr, ifa0->ifa_ifp, NULL); - memcpy(rt->rt_gateway, &sa, sizeof(sa)); + memcpy(rt->rt_gateway, &sin6, sizeof(sin6)); RTFREE_LOCKED(rt); } } else { @@ -1300,15 +1306,7 @@ in6_purgeaddr_mc(struct ifnet *ifp, stru /* * Replace the gateway of the route. */ - struct sockaddr_in6 sa; - - bzero(&sa, sizeof(sa)); - sa.sin6_len = sizeof(struct sockaddr_in6); - sa.sin6_family = AF_INET6; - memcpy(&sa.sin6_addr, &satosin6(ifa0->ifa_addr)->sin6_addr, - sizeof(sa.sin6_addr)); - in6_setscope(&sa.sin6_addr, ifa0->ifa_ifp, NULL); - memcpy(rt->rt_gateway, &sa, sizeof(sa)); + memcpy(rt->rt_gateway, &sin6, sizeof(sin6)); RTFREE_LOCKED(rt); } } else { From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 02:56:01 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C25B1106564A; Mon, 2 Jul 2012 02:56:01 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AB7518FC15; Mon, 2 Jul 2012 02:56:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q622u1Lr039085; Mon, 2 Jul 2012 02:56:01 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q622u1Uf039083; Mon, 2 Jul 2012 02:56:01 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <201207020256.q622u1Uf039083@svn.freebsd.org> From: "Kenneth D. Merry" Date: Mon, 2 Jul 2012 02:56:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237947 - stable/9/sys/dev/mps X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 02:56:01 -0000 Author: ken Date: Mon Jul 2 02:56:01 2012 New Revision: 237947 URL: http://svn.freebsd.org/changeset/base/237947 Log: MFC 237800: r237800 | ken | 2012-06-29 11:00:52 -0600 (Fri, 29 Jun 2012) | 7 lines Change the mps(4) driver to only scan a target if that is what is needed instead of scanning the full bus every time. Submitted by: mav Discussed with: Sreekanth Reddy Modified: stable/9/sys/dev/mps/mps_sas.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/mps/mps_sas.c ============================================================================== --- stable/9/sys/dev/mps/mps_sas.c Mon Jul 2 02:54:22 2012 (r237946) +++ stable/9/sys/dev/mps/mps_sas.c Mon Jul 2 02:56:01 2012 (r237947) @@ -278,8 +278,11 @@ mpssas_rescan_target(struct mps_softc *s return; } - /* XXX Hardwired to scan the bus for now */ - ccb->ccb_h.func_code = XPT_SCAN_BUS; + if (targetid == CAM_TARGET_WILDCARD) + ccb->ccb_h.func_code = XPT_SCAN_BUS; + else + ccb->ccb_h.func_code = XPT_SCAN_TGT; + mps_dprint(sc, MPS_TRACE, "%s targetid %u\n", __func__, targetid); mpssas_rescan(sassc, ccb); } From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 02:57:53 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F0E5F106566C; Mon, 2 Jul 2012 02:57:52 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DA3B28FC17; Mon, 2 Jul 2012 02:57:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q622vqsx039213; Mon, 2 Jul 2012 02:57:52 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q622vqLn039211; Mon, 2 Jul 2012 02:57:52 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <201207020257.q622vqLn039211@svn.freebsd.org> From: "Kenneth D. Merry" Date: Mon, 2 Jul 2012 02:57: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: r237948 - stable/8/sys/dev/mps X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 02:57:53 -0000 Author: ken Date: Mon Jul 2 02:57:52 2012 New Revision: 237948 URL: http://svn.freebsd.org/changeset/base/237948 Log: MFC 237800: r237800 | ken | 2012-06-29 11:00:52 -0600 (Fri, 29 Jun 2012) | 7 lines Change the mps(4) driver to only scan a target if that is what is needed instead of scanning the full bus every time. Submitted by: mav Discussed with: Sreekanth Reddy Modified: stable/8/sys/dev/mps/mps_sas.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/dev/mps/mps_sas.c ============================================================================== --- stable/8/sys/dev/mps/mps_sas.c Mon Jul 2 02:56:01 2012 (r237947) +++ stable/8/sys/dev/mps/mps_sas.c Mon Jul 2 02:57:52 2012 (r237948) @@ -278,8 +278,11 @@ mpssas_rescan_target(struct mps_softc *s return; } - /* XXX Hardwired to scan the bus for now */ - ccb->ccb_h.func_code = XPT_SCAN_BUS; + if (targetid == CAM_TARGET_WILDCARD) + ccb->ccb_h.func_code = XPT_SCAN_BUS; + else + ccb->ccb_h.func_code = XPT_SCAN_TGT; + mps_dprint(sc, MPS_TRACE, "%s targetid %u\n", __func__, targetid); mpssas_rescan(sassc, ccb); } From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 03:32:42 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx2.freebsd.org (mx2.freebsd.org [69.147.83.53]) by hub.freebsd.org (Postfix) with ESMTP id 8D914106566C; Mon, 2 Jul 2012 03:32:42 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from opti.dougb.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id D6E3514E6AC; Mon, 2 Jul 2012 03:32:41 +0000 (UTC) Message-ID: <4FF11659.8060405@FreeBSD.org> Date: Sun, 01 Jul 2012 20:32:41 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:13.0) Gecko/20120621 Thunderbird/13.0.1 MIME-Version: 1.0 To: pfg@freebsd.org References: <1340992732.19144.YahooMailClassic@web113501.mail.gq1.yahoo.com> In-Reply-To: <1340992732.19144.YahooMailClassic@web113501.mail.gq1.yahoo.com> X-Enigmail-Version: 1.4.2 OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, George Neville-Neil , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, obrien@FreeBSD.org Subject: Re: svn commit: r237624 - in head: cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize cddl/contrib/opensolaris/lib/libdtrace/common sys/cddl/contrib/opensolaris/uts/common/dtrace sys/cddl/c... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 03:32:42 -0000 On 06/29/2012 10:58, Pedro Giffuni wrote: > Now .. David pointed out I am not respecting the code > provenance since I didn't add them to the opensolaris > vendor area, but these files are copyrighted Joyent > Inc (not even Illumos) so I cannot put them there > unless we create a new vendor for Joyent Creating a new vendor area would be the right solution, yes. Doug -- This .signature sanitized for your protection From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 03:49:53 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D1A01106566B; Mon, 2 Jul 2012 03:49:53 +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 B98DA8FC0A; Mon, 2 Jul 2012 03:49:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q623nrsg041655; Mon, 2 Jul 2012 03:49:53 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q623nrRp041647; Mon, 2 Jul 2012 03:49:53 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201207020349.q623nrRp041647@svn.freebsd.org> From: Alan Cox Date: Mon, 2 Jul 2012 03:49:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237949 - in stable/9/sys: amd64/amd64 dev/xen/balloon i386/i386 i386/xen kern vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 03:49:54 -0000 Author: alc Date: Mon Jul 2 03:49:52 2012 New Revision: 237949 URL: http://svn.freebsd.org/changeset/base/237949 Log: MFC r226843 Eliminate vestiges of page coloring in VM_ALLOC_NOOBJ calls to vm_page_alloc(). While I'm here, for the sake of consistency, always specify the allocation class, such as VM_ALLOC_NORMAL, as the first of the flags. Modified: stable/9/sys/amd64/amd64/pmap.c stable/9/sys/amd64/amd64/uma_machdep.c stable/9/sys/dev/xen/balloon/balloon.c stable/9/sys/i386/i386/pmap.c stable/9/sys/i386/xen/pmap.c stable/9/sys/kern/vfs_bio.c stable/9/sys/vm/vm_kern.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/amd64/amd64/pmap.c ============================================================================== --- stable/9/sys/amd64/amd64/pmap.c Mon Jul 2 02:57:52 2012 (r237948) +++ stable/9/sys/amd64/amd64/pmap.c Mon Jul 2 03:49:52 2012 (r237949) @@ -1590,7 +1590,6 @@ int pmap_pinit(pmap_t pmap) { vm_page_t pml4pg; - static vm_pindex_t color; int i; PMAP_LOCK_INIT(pmap); @@ -1598,8 +1597,8 @@ pmap_pinit(pmap_t pmap) /* * allocate the page directory page */ - while ((pml4pg = vm_page_alloc(NULL, color++, VM_ALLOC_NOOBJ | - VM_ALLOC_NORMAL | VM_ALLOC_WIRED | VM_ALLOC_ZERO)) == NULL) + while ((pml4pg = vm_page_alloc(NULL, 0, VM_ALLOC_NORMAL | + VM_ALLOC_NOOBJ | VM_ALLOC_WIRED | VM_ALLOC_ZERO)) == NULL) VM_WAIT; pmap->pm_pml4 = (pml4_entry_t *)PHYS_TO_DMAP(VM_PAGE_TO_PHYS(pml4pg)); @@ -2143,7 +2142,6 @@ free_pv_entry(pmap_t pmap, pv_entry_t pv static pv_entry_t get_pv_entry(pmap_t pmap, boolean_t try) { - static vm_pindex_t colour; struct vpgqueues *pq; int bit, field; pv_entry_t pv; @@ -2179,7 +2177,7 @@ retry: } } /* No free items, allocate another chunk */ - m = vm_page_alloc(NULL, colour, (pq == &vm_page_queues[PQ_ACTIVE] ? + m = vm_page_alloc(NULL, 0, (pq == &vm_page_queues[PQ_ACTIVE] ? VM_ALLOC_SYSTEM : VM_ALLOC_NORMAL) | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED); if (m == NULL) { @@ -2205,7 +2203,6 @@ retry: } PV_STAT(pc_chunk_count++); PV_STAT(pc_chunk_allocs++); - colour++; dump_add_page(m->phys_addr); pc = (void *)PHYS_TO_DMAP(m->phys_addr); pc->pc_pmap = pmap; Modified: stable/9/sys/amd64/amd64/uma_machdep.c ============================================================================== --- stable/9/sys/amd64/amd64/uma_machdep.c Mon Jul 2 02:57:52 2012 (r237948) +++ stable/9/sys/amd64/amd64/uma_machdep.c Mon Jul 2 03:49:52 2012 (r237949) @@ -42,7 +42,6 @@ __FBSDID("$FreeBSD$"); void * uma_small_alloc(uma_zone_t zone, int bytes, u_int8_t *flags, int wait) { - static vm_pindex_t colour; vm_page_t m; vm_paddr_t pa; void *va; @@ -50,13 +49,13 @@ uma_small_alloc(uma_zone_t zone, int byt *flags = UMA_SLAB_PRIV; if ((wait & (M_NOWAIT|M_USE_RESERVE)) == M_NOWAIT) - pflags = VM_ALLOC_INTERRUPT | VM_ALLOC_WIRED; + pflags = VM_ALLOC_INTERRUPT | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED; else - pflags = VM_ALLOC_SYSTEM | VM_ALLOC_WIRED; + pflags = VM_ALLOC_SYSTEM | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED; if (wait & M_ZERO) pflags |= VM_ALLOC_ZERO; for (;;) { - m = vm_page_alloc(NULL, colour++, pflags | VM_ALLOC_NOOBJ); + m = vm_page_alloc(NULL, 0, pflags); if (m == NULL) { if (wait & M_NOWAIT) return (NULL); Modified: stable/9/sys/dev/xen/balloon/balloon.c ============================================================================== --- stable/9/sys/dev/xen/balloon/balloon.c Mon Jul 2 02:57:52 2012 (r237948) +++ stable/9/sys/dev/xen/balloon/balloon.c Mon Jul 2 03:49:52 2012 (r237949) @@ -298,8 +298,7 @@ decrease_reservation(unsigned long nr_pa nr_pages = ARRAY_SIZE(frame_list); for (i = 0; i < nr_pages; i++) { - int color = 0; - if ((page = vm_page_alloc(NULL, color++, + if ((page = vm_page_alloc(NULL, 0, VM_ALLOC_NORMAL | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED | VM_ALLOC_ZERO)) == NULL) { nr_pages = i; Modified: stable/9/sys/i386/i386/pmap.c ============================================================================== --- stable/9/sys/i386/i386/pmap.c Mon Jul 2 02:57:52 2012 (r237948) +++ stable/9/sys/i386/i386/pmap.c Mon Jul 2 03:49:52 2012 (r237949) @@ -1750,7 +1750,6 @@ pmap_pinit(pmap_t pmap) { vm_page_t m, ptdpg[NPGPTD]; vm_paddr_t pa; - static int color; int i; PMAP_LOCK_INIT(pmap); @@ -1783,9 +1782,8 @@ pmap_pinit(pmap_t pmap) * allocate the page directory page(s) */ for (i = 0; i < NPGPTD;) { - m = vm_page_alloc(NULL, color++, - VM_ALLOC_NORMAL | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED | - VM_ALLOC_ZERO); + m = vm_page_alloc(NULL, 0, VM_ALLOC_NORMAL | VM_ALLOC_NOOBJ | + VM_ALLOC_WIRED | VM_ALLOC_ZERO); if (m == NULL) VM_WAIT; else { @@ -2302,7 +2300,6 @@ get_pv_entry(pmap_t pmap, int try) { static const struct timeval printinterval = { 60, 0 }; static struct timeval lastprint; - static vm_pindex_t colour; struct vpgqueues *pq; int bit, field; pv_entry_t pv; @@ -2348,7 +2345,7 @@ retry: * queues lock. If "pv_vafree" is currently non-empty, it will * remain non-empty until pmap_ptelist_alloc() completes. */ - if (pv_vafree == 0 || (m = vm_page_alloc(NULL, colour, (pq == + if (pv_vafree == 0 || (m = vm_page_alloc(NULL, 0, (pq == &vm_page_queues[PQ_ACTIVE] ? VM_ALLOC_SYSTEM : VM_ALLOC_NORMAL) | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED)) == NULL) { if (try) { @@ -2374,7 +2371,6 @@ retry: } PV_STAT(pc_chunk_count++); PV_STAT(pc_chunk_allocs++); - colour++; pc = (struct pv_chunk *)pmap_ptelist_alloc(&pv_vafree); pmap_qenter((vm_offset_t)pc, &m, 1); pc->pc_pmap = pmap; Modified: stable/9/sys/i386/xen/pmap.c ============================================================================== --- stable/9/sys/i386/xen/pmap.c Mon Jul 2 02:57:52 2012 (r237948) +++ stable/9/sys/i386/xen/pmap.c Mon Jul 2 03:49:52 2012 (r237949) @@ -1438,7 +1438,6 @@ pmap_pinit(pmap_t pmap) { vm_page_t m, ptdpg[NPGPTD + 1]; int npgptd = NPGPTD + 1; - static int color; int i; #ifdef HAMFISTED_LOCKING @@ -1470,9 +1469,8 @@ pmap_pinit(pmap_t pmap) * allocate the page directory page(s) */ for (i = 0; i < npgptd;) { - m = vm_page_alloc(NULL, color++, - VM_ALLOC_NORMAL | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED | - VM_ALLOC_ZERO); + m = vm_page_alloc(NULL, 0, VM_ALLOC_NORMAL | VM_ALLOC_NOOBJ | + VM_ALLOC_WIRED | VM_ALLOC_ZERO); if (m == NULL) VM_WAIT; else { @@ -2068,7 +2066,6 @@ get_pv_entry(pmap_t pmap, int try) { static const struct timeval printinterval = { 60, 0 }; static struct timeval lastprint; - static vm_pindex_t colour; struct vpgqueues *pq; int bit, field; pv_entry_t pv; @@ -2114,7 +2111,7 @@ retry: * queues lock. If "pv_vafree" is currently non-empty, it will * remain non-empty until pmap_ptelist_alloc() completes. */ - if (pv_vafree == 0 || (m = vm_page_alloc(NULL, colour, (pq == + if (pv_vafree == 0 || (m = vm_page_alloc(NULL, 0, (pq == &vm_page_queues[PQ_ACTIVE] ? VM_ALLOC_SYSTEM : VM_ALLOC_NORMAL) | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED)) == NULL) { if (try) { @@ -2140,7 +2137,6 @@ retry: } PV_STAT(pc_chunk_count++); PV_STAT(pc_chunk_allocs++); - colour++; pc = (struct pv_chunk *)pmap_ptelist_alloc(&pv_vafree); pmap_qenter((vm_offset_t)pc, &m, 1); if ((m->flags & PG_ZERO) == 0) Modified: stable/9/sys/kern/vfs_bio.c ============================================================================== --- stable/9/sys/kern/vfs_bio.c Mon Jul 2 02:57:52 2012 (r237948) +++ stable/9/sys/kern/vfs_bio.c Mon Jul 2 03:49:52 2012 (r237949) @@ -3779,10 +3779,9 @@ tryagain: * could interfere with paging I/O, no matter which * process we are. */ - p = vm_page_alloc(NULL, pg >> PAGE_SHIFT, VM_ALLOC_NOOBJ | - VM_ALLOC_SYSTEM | VM_ALLOC_WIRED | - VM_ALLOC_COUNT((to - pg) >> PAGE_SHIFT)); - if (!p) { + p = vm_page_alloc(NULL, 0, VM_ALLOC_SYSTEM | VM_ALLOC_NOOBJ | + VM_ALLOC_WIRED | VM_ALLOC_COUNT((to - pg) >> PAGE_SHIFT)); + if (p == NULL) { VM_WAIT; goto tryagain; } Modified: stable/9/sys/vm/vm_kern.c ============================================================================== --- stable/9/sys/vm/vm_kern.c Mon Jul 2 02:57:52 2012 (r237948) +++ stable/9/sys/vm/vm_kern.c Mon Jul 2 03:49:52 2012 (r237949) @@ -515,7 +515,7 @@ kmem_init_zero_region(void) * zeros, while not using much more physical resources. */ addr = kmem_alloc_nofault(kernel_map, ZERO_REGION_SIZE); - m = vm_page_alloc(NULL, OFF_TO_IDX(addr - VM_MIN_KERNEL_ADDRESS), + m = vm_page_alloc(NULL, 0, VM_ALLOC_NORMAL | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED | VM_ALLOC_ZERO); if ((m->flags & PG_ZERO) == 0) pmap_zero_page(m); From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 04:04:00 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [69.147.83.53]) by hub.freebsd.org (Postfix) with ESMTP id 316B1106564A; Mon, 2 Jul 2012 04:04:00 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from opti.dougb.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 22BC414DAB0; Mon, 2 Jul 2012 04:03:59 +0000 (UTC) Message-ID: <4FF11DAE.6070404@FreeBSD.org> Date: Sun, 01 Jul 2012 21:03:58 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:13.0) Gecko/20120621 Thunderbird/13.0.1 MIME-Version: 1.0 To: "Simon L. B. Nielsen" References: <201207010036.q610a7wc050629@svn.freebsd.org> <6AB69681-E87A-493C-AE2C-5B4A9218D455@FreeBSD.org> In-Reply-To: <6AB69681-E87A-493C-AE2C-5B4A9218D455@FreeBSD.org> X-Enigmail-Version: 1.4.2 OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, "Pedro F. Giffuni" , src-committers@freebsd.org Subject: Re: svn commit: r237860 - head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 04:04:00 -0000 On 07/01/2012 03:05, Simon L. B. Nielsen wrote: > Don't replace files, and even worse directories, and it breaks svn2cvs. Isn't it possible to write a pre-commit hook to avoid this issue? -- This .signature sanitized for your protection From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 04:40:31 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1D483106564A; Mon, 2 Jul 2012 04:40:31 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from smtp.fgznet.ch (mail.fgznet.ch [81.92.96.47]) by mx1.freebsd.org (Postfix) with ESMTP id B77D98FC08; Mon, 2 Jul 2012 04:40:30 +0000 (UTC) Received: from deuterium.andreas.nets (dhclient-91-190-14-19.flashcable.ch [91.190.14.19]) by smtp.fgznet.ch (8.13.8/8.13.8/Submit_SMTPAUTH) with ESMTP id q624eRoF001818; Mon, 2 Jul 2012 06:40:28 +0200 (CEST) (envelope-from andreast@FreeBSD.org) Message-ID: <4FF1263B.20704@FreeBSD.org> Date: Mon, 02 Jul 2012 06:40:27 +0200 From: Andreas Tobler User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.5; rv:13.0) Gecko/20120601 Thunderbird/13.0 MIME-Version: 1.0 To: Konstantin Belousov References: <201206210926.q5L9Q6nR002030@svn.freebsd.org> <4FF03316.5050609@FreeBSD.org> <20120701120408.GM2337@deviant.kiev.zoral.com.ua> <4FF0528E.50002@FreeBSD.org> <20120701134132.GO2337@deviant.kiev.zoral.com.ua> <4FF05724.3050904@FreeBSD.org> <20120701170543.GP2337@deviant.kiev.zoral.com.ua> <4FF097E5.8030909@FreeBSD.org> <20120701214301.GQ2337@deviant.kiev.zoral.com.ua> In-Reply-To: <20120701214301.GQ2337@deviant.kiev.zoral.com.ua> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.64 on 81.92.96.47 Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r237367 - head/sys/fs/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 04:40:31 -0000 On 01.07.12 23:43, Konstantin Belousov wrote: > On Sun, Jul 01, 2012 at 08:33:09PM +0200, Andreas Tobler wrote: >> On 01.07.12 19:05, Konstantin Belousov wrote: >>> On Sun, Jul 01, 2012 at 03:56:52PM +0200, Andreas Tobler wrote: >>>> On 01.07.12 15:41, Konstantin Belousov wrote: >>>>> On Sun, Jul 01, 2012 at 03:37:18PM +0200, Andreas Tobler wrote: >>>>>> On 01.07.12 14:04, Konstantin Belousov wrote: >>>>>>> On Sun, Jul 01, 2012 at 01:23:02PM +0200, Andreas Tobler wrote: >>>>>>>> On 21.06.12 11:26, Konstantin Belousov wrote: >>>>>>>>> Author: kib >>>>>>>>> Date: Thu Jun 21 09:26:06 2012 >>>>>>>>> New Revision: 237367 >>>>>>>>> URL: http://svn.freebsd.org/changeset/base/237367 >>>>>>>>> >>>>>>>>> Log: >>>>>>>>> Enable deadlock avoidance code for NFS client. >>>>>>>> >>>>>>>> >>>>>>>> Hm, since this commit I fail with my nfs installworld/kernel. >>>>>>>> >>>>>>>> I have a builder which installs world/kernel to a nfs mounted >>>>>>>> directory. >>>>>>>> Namely used for cross builds. >>>>>>>> >>>>>>>> Now since this commit I get the following when I install kernel to the >>>>>>>> nfs directory: >>>>>>>> >>>>>>>> .. >>>>>>>> install -o root -g wheel -m 555 zfs.ko.symbols >>>>>>>> /netboot/sparc64/boot/kernel >>>>>>>> install: /netboot/sparc64/boot/kernel/zfs.ko.symbols: No such file or >>>>>>>> directory >>>>>>>> *** [_kmodinstall] Error code 71 >>>>>>>> .. >>>>>>>> >>>>>>>> The file is there, a local install of the tree works without problems. >>>>>>>> Reverting to r237366 also makes it work again. >>>>>>>> >>>>>>>> The server is a -CURRENT, r237880, The client, -CURRENT too. >>>>>>>> >>>>>>>> How can I help to track down the real issue? >>>>>>> >>>>>>> Is it always the same file in the install procedure which causes the >>>>>>> failure ? Even more, is the failure pattern always the same ? >>>>>> >>>>>> I'd say so yes. When installing a kernel onto a nfs mounted fs then >>>>>> always (in my cases) the zfs.ko.symbols was the failing pattern. >>>>>> I tried ppc64 and sparc64 as target. With both it was the above file. >>>>>> >>>>>> When doing a installworld, it was, also in both cases, ppc64/sparc64, >>>>>> the cc1 in libexec which failed. >>>>>> >>>>>>> Might be, start with ktrace-ing the whole make invocation, including >>>>>>> the children processes. >>>>>> >>>>>> Some recipes how to start? >>>>> ktrace -o -i make installkernel >>>>> Then kdump and cut the lines around relevant failure. >>>> >>>> ktrace -f, right? >>> Right, but without -i it is useless. >> >> Ah, yes, seems clear now after reading the man page. >> >>>> I placed the whole kdump here: >>>> >>>> http://people.freebsd.org/~andreast/dumped_installkernel.log >>>> >>>> It is not clear to me where the failure starts :) >>> Because logs do not contain tracepoints from the children. >>> See above about -i. >>> >>> I asked about excerpt because I expect the proper log to have an order >>> of magnitude bigger size. >> >> Ok. The dump is around 100MB, I hope I extracted as much as needed: >> >> http://people.freebsd.org/~andreast/dumped_installkernel-7.log >> >>>>>>> I used buildworld on the NFS-mounted obj/ as the test for the changes. >>>>>> >>>>>> Here the obj is local, only the src and the destination is on the >>>>>> nfs/netboot server. >>>>> >>>>> I just finished build on NFS obj/ and did several rounds of installs >>>>> for world and kernel into nfs-mounted destdir. It seems I cannot >>>>> reproduce >>>>> this locally. >>>> >>>> Ok. I try with an nfs obj too. >> >> So, I was not able to reproduce the failure with an nfs mounted obj dir. >> >> But I was able to reproduce the failure with three different machines >> which all have the obj local and the destination mounted via nfs. >> >> Are you able to try with a local obj too? > Below are two patches. Please follow my instructions literally to get > most of your bug report. > > First, please apply the usr.bin/xinstall patch only, and retry installkernel > (no need to use ktrace). It should show the proper error, short write, with > zero-sized result, instead of garbage ENOENT from errno. Done. No expected output. Iow, no message containing this: short write to %s: %jd bytes written, %jd bytes asked to write > Next, please apply the sys/fs/nfsclient patch, which should fix the core > cause. Still the same failure: ===> zfs (install) install -o root -g wheel -m 555 zfs.ko /netboot/powerpc64/boot/kernel install -o root -g wheel -m 555 zfs.ko.symbols /netboot/powerpc64/boot/kernel install: /netboot/powerpc64/boot/kernel/zfs.ko.symbols: No such file or directory *** [_kmodinstall] Error code 71 Does it matter what filesystem the local dir is on? Here the output from mount: /dev/ada0p4 on /export (ufs, NFS exported, local, journaled soft-updates) [root@tcx58] /usr/obj/> df -k . Filesystem 1024-blocks Used Avail Capacity Mounted on /dev/ada0p4 132098652 30672276 90858484 25% /export I'm off at work for the rest of the day. I'll try if I can reproduce the issue there as well. Thanks a lot! Andreas From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 05:26:54 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D2FD9106564A; Mon, 2 Jul 2012 05:26:54 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from smtp.fgznet.ch (mail.fgznet.ch [81.92.96.47]) by mx1.freebsd.org (Postfix) with ESMTP id 7CA2A8FC12; Mon, 2 Jul 2012 05:26:54 +0000 (UTC) Received: from deuterium.andreas.nets (dhclient-91-190-14-19.flashcable.ch [91.190.14.19]) by smtp.fgznet.ch (8.13.8/8.13.8/Submit_SMTPAUTH) with ESMTP id q625QpNE080706; Mon, 2 Jul 2012 07:26:52 +0200 (CEST) (envelope-from andreast@FreeBSD.org) Message-ID: <4FF1311B.1090906@FreeBSD.org> Date: Mon, 02 Jul 2012 07:26:51 +0200 From: Andreas Tobler User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.5; rv:13.0) Gecko/20120601 Thunderbird/13.0 MIME-Version: 1.0 To: Konstantin Belousov References: <201206210926.q5L9Q6nR002030@svn.freebsd.org> <4FF03316.5050609@FreeBSD.org> <20120701120408.GM2337@deviant.kiev.zoral.com.ua> <4FF0528E.50002@FreeBSD.org> <20120701134132.GO2337@deviant.kiev.zoral.com.ua> <4FF05724.3050904@FreeBSD.org> <20120701170543.GP2337@deviant.kiev.zoral.com.ua> <4FF097E5.8030909@FreeBSD.org> <20120701214301.GQ2337@deviant.kiev.zoral.com.ua> <4FF1263B.20704@FreeBSD.org> In-Reply-To: <4FF1263B.20704@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.64 on 81.92.96.47 Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r237367 - head/sys/fs/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 05:26:54 -0000 On 02.07.12 06:40, Andreas Tobler wrote: > On 01.07.12 23:43, Konstantin Belousov wrote: >> On Sun, Jul 01, 2012 at 08:33:09PM +0200, Andreas Tobler wrote: >>> On 01.07.12 19:05, Konstantin Belousov wrote: >>>> On Sun, Jul 01, 2012 at 03:56:52PM +0200, Andreas Tobler wrote: >>>>> On 01.07.12 15:41, Konstantin Belousov wrote: >>>>>> On Sun, Jul 01, 2012 at 03:37:18PM +0200, Andreas Tobler wrote: >>>>>>> On 01.07.12 14:04, Konstantin Belousov wrote: >>>>>>>> On Sun, Jul 01, 2012 at 01:23:02PM +0200, Andreas Tobler wrote: >>>>>>>>> On 21.06.12 11:26, Konstantin Belousov wrote: >>>>>>>>>> Author: kib >>>>>>>>>> Date: Thu Jun 21 09:26:06 2012 >>>>>>>>>> New Revision: 237367 >>>>>>>>>> URL: http://svn.freebsd.org/changeset/base/237367 >>>>>>>>>> >>>>>>>>>> Log: >>>>>>>>>> Enable deadlock avoidance code for NFS client. >>>>>>>>> >>>>>>>>> >>>>>>>>> Hm, since this commit I fail with my nfs installworld/kernel. >>>>>>>>> >>>>>>>>> I have a builder which installs world/kernel to a nfs mounted >>>>>>>>> directory. >>>>>>>>> Namely used for cross builds. >>>>>>>>> >>>>>>>>> Now since this commit I get the following when I install kernel to the >>>>>>>>> nfs directory: >>>>>>>>> >>>>>>>>> .. >>>>>>>>> install -o root -g wheel -m 555 zfs.ko.symbols >>>>>>>>> /netboot/sparc64/boot/kernel >>>>>>>>> install: /netboot/sparc64/boot/kernel/zfs.ko.symbols: No such file or >>>>>>>>> directory >>>>>>>>> *** [_kmodinstall] Error code 71 >>>>>>>>> .. >>>>>>>>> >>>>>>>>> The file is there, a local install of the tree works without problems. >>>>>>>>> Reverting to r237366 also makes it work again. >>>>>>>>> >>>>>>>>> The server is a -CURRENT, r237880, The client, -CURRENT too. >>>>>>>>> >>>>>>>>> How can I help to track down the real issue? >>>>>>>> >>>>>>>> Is it always the same file in the install procedure which causes the >>>>>>>> failure ? Even more, is the failure pattern always the same ? >>>>>>> >>>>>>> I'd say so yes. When installing a kernel onto a nfs mounted fs then >>>>>>> always (in my cases) the zfs.ko.symbols was the failing pattern. >>>>>>> I tried ppc64 and sparc64 as target. With both it was the above file. >>>>>>> >>>>>>> When doing a installworld, it was, also in both cases, ppc64/sparc64, >>>>>>> the cc1 in libexec which failed. >>>>>>> >>>>>>>> Might be, start with ktrace-ing the whole make invocation, including >>>>>>>> the children processes. >>>>>>> >>>>>>> Some recipes how to start? >>>>>> ktrace -o -i make installkernel >>>>>> Then kdump and cut the lines around relevant failure. >>>>> >>>>> ktrace -f, right? >>>> Right, but without -i it is useless. >>> >>> Ah, yes, seems clear now after reading the man page. >>> >>>>> I placed the whole kdump here: >>>>> >>>>> http://people.freebsd.org/~andreast/dumped_installkernel.log >>>>> >>>>> It is not clear to me where the failure starts :) >>>> Because logs do not contain tracepoints from the children. >>>> See above about -i. >>>> >>>> I asked about excerpt because I expect the proper log to have an order >>>> of magnitude bigger size. >>> >>> Ok. The dump is around 100MB, I hope I extracted as much as needed: >>> >>> http://people.freebsd.org/~andreast/dumped_installkernel-7.log >>> >>>>>>>> I used buildworld on the NFS-mounted obj/ as the test for the changes. >>>>>>> >>>>>>> Here the obj is local, only the src and the destination is on the >>>>>>> nfs/netboot server. >>>>>> >>>>>> I just finished build on NFS obj/ and did several rounds of installs >>>>>> for world and kernel into nfs-mounted destdir. It seems I cannot >>>>>> reproduce >>>>>> this locally. >>>>> >>>>> Ok. I try with an nfs obj too. >>> >>> So, I was not able to reproduce the failure with an nfs mounted obj dir. >>> >>> But I was able to reproduce the failure with three different machines >>> which all have the obj local and the destination mounted via nfs. >>> >>> Are you able to try with a local obj too? >> Below are two patches. Please follow my instructions literally to get >> most of your bug report. >> >> First, please apply the usr.bin/xinstall patch only, and retry installkernel >> (no need to use ktrace). It should show the proper error, short write, with >> zero-sized result, instead of garbage ENOENT from errno. > > Done. No expected output. Iow, no message containing this: > > short write to %s: %jd bytes written, %jd bytes asked to write Sorry for the confusion, I learned that I have to patch install from the buildworld and not only the host one: ===> zfs (install) install -o root -g wheel -m 555 zfs.ko /netboot/powerpc64/boot/kernel install -o root -g wheel -m 555 zfs.ko.symbols /netboot/powerpc64/boot/kernel install: short write to /netboot/powerpc64/boot/kernel/zfs.ko.symbols: 0 bytes written, 6959816 bytes asked to write *** [_kmodinstall] Error code 71 >> Next, please apply the sys/fs/nfsclient patch, which should fix the core >> cause. And it really helps if I install the fresh built kernel to the right place :( ===> zfs (install) install -o root -g wheel -m 555 zfs.ko /netboot/powerpc64/boot/kernel install -o root -g wheel -m 555 zfs.ko.symbols /netboot/powerpc64/boot/kernel ===> zlib (install) install -o root -g wheel -m 555 zlib.ko /netboot/powerpc64/boot/kernel install -o root -g wheel -m 555 zlib.ko.symbols /netboot/powerpc64/boot/kernel kldxref /netboot/powerpc64/boot/kernel Thank you very much for the patience and the solution! Andreas From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 05:35:56 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 40425106564A; Mon, 2 Jul 2012 05:35:56 +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 286E38FC0A; Mon, 2 Jul 2012 05:35:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q625ZuE5046715; Mon, 2 Jul 2012 05:35:56 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q625ZtXx046709; Mon, 2 Jul 2012 05:35:55 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201207020535.q625ZtXx046709@svn.freebsd.org> From: Alan Cox Date: Mon, 2 Jul 2012 05:35:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237950 - in stable/9/sys: amd64/amd64 amd64/include i386/i386 i386/include i386/xen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 05:35:56 -0000 Author: alc Date: Mon Jul 2 05:35:55 2012 New Revision: 237950 URL: http://svn.freebsd.org/changeset/base/237950 Log: MFC r233290, r235598, r235973, r236045, r236240, r236291, r236378 Change pv_entry_count to a long on amd64. Rename pmap_collect() to pmap_pv_reclaim() and rewrite it such that it no longer uses the active and inactive paging queues. Eliminate some purely stylistic differences among the amd64, i386 native, and i386 xen PV entry allocators. Eliminate code duplication in free_pv_entry() and pmap_remove_pages() by introducing free_pv_chunk(). Modified: stable/9/sys/amd64/amd64/pmap.c stable/9/sys/amd64/include/pmap.h stable/9/sys/i386/i386/pmap.c stable/9/sys/i386/include/pmap.h stable/9/sys/i386/xen/pmap.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/amd64/amd64/pmap.c ============================================================================== --- stable/9/sys/amd64/amd64/pmap.c Mon Jul 2 03:49:52 2012 (r237949) +++ stable/9/sys/amd64/amd64/pmap.c Mon Jul 2 05:35:55 2012 (r237950) @@ -201,7 +201,8 @@ static u_int64_t DMPDPphys; /* phys addr /* * Data for the pv entry allocation mechanism */ -static int pv_entry_count; +static TAILQ_HEAD(pch, pv_chunk) pv_chunks = TAILQ_HEAD_INITIALIZER(pv_chunks); +static long pv_entry_count; static struct md_page *pv_table; /* @@ -215,8 +216,9 @@ caddr_t CADDR1 = 0; */ static caddr_t crashdumpmap; +static void free_pv_chunk(struct pv_chunk *pc); static void free_pv_entry(pmap_t pmap, pv_entry_t pv); -static pv_entry_t get_pv_entry(pmap_t locked_pmap, boolean_t try); +static pv_entry_t get_pv_entry(pmap_t pmap, boolean_t try); static void pmap_pv_demote_pde(pmap_t pmap, vm_offset_t va, vm_paddr_t pa); static boolean_t pmap_pv_insert_pde(pmap_t pmap, vm_offset_t va, vm_paddr_t pa); static void pmap_pv_promote_pde(pmap_t pmap, vm_offset_t va, vm_paddr_t pa); @@ -1993,7 +1995,7 @@ static __inline struct pv_chunk * pv_to_chunk(pv_entry_t pv) { - return (struct pv_chunk *)((uintptr_t)pv & ~(uintptr_t)PAGE_MASK); + return ((struct pv_chunk *)((uintptr_t)pv & ~(uintptr_t)PAGE_MASK)); } #define PV_PMAP(pv) (pv_to_chunk(pv)->pc_pmap) @@ -2004,7 +2006,7 @@ pv_to_chunk(pv_entry_t pv) static uint64_t pc_freemask[_NPCM] = { PC_FREE0, PC_FREE1, PC_FREE2 }; -SYSCTL_INT(_vm_pmap, OID_AUTO, pv_entry_count, CTLFLAG_RD, &pv_entry_count, 0, +SYSCTL_LONG(_vm_pmap, OID_AUTO, pv_entry_count, CTLFLAG_RD, &pv_entry_count, 0, "Current number of pv entries"); #ifdef PV_STATS @@ -2028,71 +2030,136 @@ SYSCTL_LONG(_vm_pmap, OID_AUTO, pv_entry "Current number of pv entry allocs"); SYSCTL_INT(_vm_pmap, OID_AUTO, pv_entry_spare, CTLFLAG_RD, &pv_entry_spare, 0, "Current number of spare pv entries"); - -static int pmap_collect_inactive, pmap_collect_active; - -SYSCTL_INT(_vm_pmap, OID_AUTO, pmap_collect_inactive, CTLFLAG_RD, &pmap_collect_inactive, 0, - "Current number times pmap_collect called on inactive queue"); -SYSCTL_INT(_vm_pmap, OID_AUTO, pmap_collect_active, CTLFLAG_RD, &pmap_collect_active, 0, - "Current number times pmap_collect called on active queue"); #endif /* * We are in a serious low memory condition. Resort to * drastic measures to free some pages so we can allocate - * another pv entry chunk. This is normally called to - * unmap inactive pages, and if necessary, active pages. + * another pv entry chunk. * * We do not, however, unmap 2mpages because subsequent accesses will * allocate per-page pv entries until repromotion occurs, thereby * exacerbating the shortage of free pv entries. */ -static void -pmap_collect(pmap_t locked_pmap, struct vpgqueues *vpq) +static vm_page_t +pmap_pv_reclaim(pmap_t locked_pmap) { + struct pch newtail; + struct pv_chunk *pc; + struct md_page *pvh; pd_entry_t *pde; pmap_t pmap; pt_entry_t *pte, tpte; - pv_entry_t next_pv, pv; + pv_entry_t pv; vm_offset_t va; - vm_page_t m, free; - - TAILQ_FOREACH(m, &vpq->pl, pageq) { - if ((m->flags & PG_MARKER) != 0 || m->hold_count || m->busy) - continue; - TAILQ_FOREACH_SAFE(pv, &m->md.pv_list, pv_list, next_pv) { - va = pv->pv_va; - pmap = PV_PMAP(pv); + vm_page_t free, m, m_pc; + uint64_t inuse, freemask; + int bit, field, freed; + + mtx_assert(&vm_page_queue_mtx, MA_OWNED); + PMAP_LOCK_ASSERT(locked_pmap, MA_OWNED); + pmap = NULL; + free = m_pc = NULL; + TAILQ_INIT(&newtail); + while ((pc = TAILQ_FIRST(&pv_chunks)) != NULL && free == NULL) { + TAILQ_REMOVE(&pv_chunks, pc, pc_lru); + if (pmap != pc->pc_pmap) { + if (pmap != NULL) { + pmap_invalidate_all(pmap); + if (pmap != locked_pmap) + PMAP_UNLOCK(pmap); + } + pmap = pc->pc_pmap; /* Avoid deadlock and lock recursion. */ if (pmap > locked_pmap) PMAP_LOCK(pmap); - else if (pmap != locked_pmap && !PMAP_TRYLOCK(pmap)) + else if (pmap != locked_pmap && !PMAP_TRYLOCK(pmap)) { + pmap = NULL; + TAILQ_INSERT_TAIL(&newtail, pc, pc_lru); continue; - pmap_resident_count_dec(pmap, 1); - pde = pmap_pde(pmap, va); - KASSERT((*pde & PG_PS) == 0, ("pmap_collect: found" - " a 2mpage in page %p's pv list", m)); - pte = pmap_pde_to_pte(pde, va); - tpte = pte_load_clear(pte); - KASSERT((tpte & PG_W) == 0, - ("pmap_collect: wired pte %#lx", tpte)); - if (tpte & PG_A) - vm_page_aflag_set(m, PGA_REFERENCED); - if ((tpte & (PG_M | PG_RW)) == (PG_M | PG_RW)) - vm_page_dirty(m); - free = NULL; - pmap_unuse_pt(pmap, va, *pde, &free); - pmap_invalidate_page(pmap, va); - pmap_free_zero_pages(free); - TAILQ_REMOVE(&m->md.pv_list, pv, pv_list); - free_pv_entry(pmap, pv); - if (pmap != locked_pmap) - PMAP_UNLOCK(pmap); + } } - if (TAILQ_EMPTY(&m->md.pv_list) && - TAILQ_EMPTY(&pa_to_pvh(VM_PAGE_TO_PHYS(m))->pv_list)) - vm_page_aflag_clear(m, PGA_WRITEABLE); + + /* + * Destroy every non-wired, 4 KB page mapping in the chunk. + */ + freed = 0; + for (field = 0; field < _NPCM; field++) { + freemask = 0; + for (inuse = ~pc->pc_map[field] & pc_freemask[field]; + inuse != 0; inuse &= ~(1UL << bit)) { + bit = bsfq(inuse); + pv = &pc->pc_pventry[field * 64 + bit]; + va = pv->pv_va; + pde = pmap_pde(pmap, va); + if ((*pde & PG_PS) != 0) + continue; + pte = pmap_pde_to_pte(pde, va); + if ((*pte & PG_W) != 0) + continue; + tpte = pte_load_clear(pte); + if ((tpte & PG_G) != 0) + pmap_invalidate_page(pmap, va); + m = PHYS_TO_VM_PAGE(tpte & PG_FRAME); + if ((tpte & (PG_M | PG_RW)) == (PG_M | PG_RW)) + vm_page_dirty(m); + if ((tpte & PG_A) != 0) + vm_page_aflag_set(m, PGA_REFERENCED); + TAILQ_REMOVE(&m->md.pv_list, pv, pv_list); + if (TAILQ_EMPTY(&m->md.pv_list) && + (m->flags & PG_FICTITIOUS) == 0) { + pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); + if (TAILQ_EMPTY(&pvh->pv_list)) { + vm_page_aflag_clear(m, + PGA_WRITEABLE); + } + } + pmap_unuse_pt(pmap, va, *pde, &free); + freemask |= 1UL << bit; + freed++; + } + pc->pc_map[field] |= freemask; + } + if (freed == 0) { + TAILQ_INSERT_TAIL(&newtail, pc, pc_lru); + continue; + } + pmap_resident_count_dec(pmap, freed); + PV_STAT(pv_entry_frees += freed); + PV_STAT(pv_entry_spare += freed); + pv_entry_count -= freed; + TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list); + if (pc->pc_map[0] == PC_FREE0 && pc->pc_map[1] == PC_FREE1 && + pc->pc_map[2] == PC_FREE2) { + PV_STAT(pv_entry_spare -= _NPCPV); + PV_STAT(pc_chunk_count--); + PV_STAT(pc_chunk_frees++); + /* Entire chunk is free; return it. */ + m_pc = PHYS_TO_VM_PAGE(DMAP_TO_PHYS((vm_offset_t)pc)); + dump_drop_page(m_pc->phys_addr); + break; + } + TAILQ_INSERT_HEAD(&pmap->pm_pvchunk, pc, pc_list); + TAILQ_INSERT_TAIL(&newtail, pc, pc_lru); + /* One freed pv entry in locked_pmap is sufficient. */ + if (pmap == locked_pmap) + break; + } + TAILQ_CONCAT(&pv_chunks, &newtail, pc_lru); + if (pmap != NULL) { + pmap_invalidate_all(pmap); + if (pmap != locked_pmap) + PMAP_UNLOCK(pmap); + } + if (m_pc == NULL && free != NULL) { + m_pc = free; + free = m_pc->right; + /* Recycle a freed page table page. */ + m_pc->wire_count = 1; + atomic_add_int(&cnt.v_wire_count, 1); } + pmap_free_zero_pages(free); + return (m_pc); } /* @@ -2101,7 +2168,6 @@ pmap_collect(pmap_t locked_pmap, struct static void free_pv_entry(pmap_t pmap, pv_entry_t pv) { - vm_page_t m; struct pv_chunk *pc; int idx, field, bit; @@ -2125,6 +2191,15 @@ free_pv_entry(pmap_t pmap, pv_entry_t pv return; } TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list); + free_pv_chunk(pc); +} + +static void +free_pv_chunk(struct pv_chunk *pc) +{ + vm_page_t m; + + TAILQ_REMOVE(&pv_chunks, pc, pc_lru); PV_STAT(pv_entry_spare -= _NPCPV); PV_STAT(pc_chunk_count--); PV_STAT(pc_chunk_frees++); @@ -2142,7 +2217,6 @@ free_pv_entry(pmap_t pmap, pv_entry_t pv static pv_entry_t get_pv_entry(pmap_t pmap, boolean_t try) { - struct vpgqueues *pq; int bit, field; pv_entry_t pv; struct pv_chunk *pc; @@ -2151,7 +2225,6 @@ get_pv_entry(pmap_t pmap, boolean_t try) PMAP_LOCK_ASSERT(pmap, MA_OWNED); mtx_assert(&vm_page_queue_mtx, MA_OWNED); PV_STAT(pv_entry_allocs++); - pq = NULL; retry: pc = TAILQ_FIRST(&pmap->pm_pvchunk); if (pc != NULL) { @@ -2171,35 +2244,26 @@ retry: TAILQ_INSERT_TAIL(&pmap->pm_pvchunk, pc, pc_list); } + if (pc != TAILQ_LAST(&pv_chunks, pch)) { + TAILQ_REMOVE(&pv_chunks, pc, pc_lru); + TAILQ_INSERT_TAIL(&pv_chunks, pc, pc_lru); + } pv_entry_count++; PV_STAT(pv_entry_spare--); return (pv); } } /* No free items, allocate another chunk */ - m = vm_page_alloc(NULL, 0, (pq == &vm_page_queues[PQ_ACTIVE] ? - VM_ALLOC_SYSTEM : VM_ALLOC_NORMAL) | VM_ALLOC_NOOBJ | + m = vm_page_alloc(NULL, 0, VM_ALLOC_NORMAL | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED); if (m == NULL) { if (try) { PV_STAT(pc_chunk_tryfail++); return (NULL); } - /* - * Reclaim pv entries: At first, destroy mappings to inactive - * pages. After that, if a pv chunk entry is still needed, - * destroy mappings to active pages. - */ - if (pq == NULL) { - PV_STAT(pmap_collect_inactive++); - pq = &vm_page_queues[PQ_INACTIVE]; - } else if (pq == &vm_page_queues[PQ_INACTIVE]) { - PV_STAT(pmap_collect_active++); - pq = &vm_page_queues[PQ_ACTIVE]; - } else - panic("get_pv_entry: allocation failed"); - pmap_collect(pmap, pq); - goto retry; + m = pmap_pv_reclaim(pmap); + if (m == NULL) + goto retry; } PV_STAT(pc_chunk_count++); PV_STAT(pc_chunk_allocs++); @@ -2209,6 +2273,7 @@ retry: pc->pc_map[0] = PC_FREE0 & ~1ul; /* preallocated bit 0 */ pc->pc_map[1] = PC_FREE1; pc->pc_map[2] = PC_FREE2; + TAILQ_INSERT_TAIL(&pv_chunks, pc, pc_lru); pv = &pc->pc_pventry[0]; TAILQ_INSERT_HEAD(&pmap->pm_pvchunk, pc, pc_list); pv_entry_count++; @@ -4150,14 +4215,8 @@ pmap_remove_pages(pmap_t pmap) } } if (allfree) { - PV_STAT(pv_entry_spare -= _NPCPV); - PV_STAT(pc_chunk_count--); - PV_STAT(pc_chunk_frees++); TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list); - m = PHYS_TO_VM_PAGE(DMAP_TO_PHYS((vm_offset_t)pc)); - dump_drop_page(m->phys_addr); - vm_page_unwire(m, 0); - vm_page_free(m); + free_pv_chunk(pc); } } pmap_invalidate_all(pmap); Modified: stable/9/sys/amd64/include/pmap.h ============================================================================== --- stable/9/sys/amd64/include/pmap.h Mon Jul 2 03:49:52 2012 (r237949) +++ stable/9/sys/amd64/include/pmap.h Mon Jul 2 05:35:55 2012 (r237950) @@ -295,7 +295,7 @@ struct pv_chunk { pmap_t pc_pmap; TAILQ_ENTRY(pv_chunk) pc_list; uint64_t pc_map[_NPCM]; /* bitmap; 1 = free */ - uint64_t pc_spare[2]; + TAILQ_ENTRY(pv_chunk) pc_lru; struct pv_entry pc_pventry[_NPCPV]; }; Modified: stable/9/sys/i386/i386/pmap.c ============================================================================== --- stable/9/sys/i386/i386/pmap.c Mon Jul 2 03:49:52 2012 (r237949) +++ stable/9/sys/i386/i386/pmap.c Mon Jul 2 05:35:55 2012 (r237950) @@ -233,6 +233,7 @@ static int pat_index[PAT_INDEX_SIZE]; /* /* * Data for the pv entry allocation mechanism */ +static TAILQ_HEAD(pch, pv_chunk) pv_chunks = TAILQ_HEAD_INITIALIZER(pv_chunks); static int pv_entry_count = 0, pv_entry_max = 0, pv_entry_high_water = 0; static struct md_page *pv_table; static int shpgperproc = PMAP_SHPGPERPROC; @@ -283,8 +284,9 @@ SYSCTL_INT(_debug, OID_AUTO, PMAP1unchan "Number of times pmap_pte_quick didn't change PMAP1"); static struct mtx PMAP2mutex; +static void free_pv_chunk(struct pv_chunk *pc); static void free_pv_entry(pmap_t pmap, pv_entry_t pv); -static pv_entry_t get_pv_entry(pmap_t locked_pmap, int try); +static pv_entry_t get_pv_entry(pmap_t pmap, boolean_t try); static void pmap_pv_demote_pde(pmap_t pmap, vm_offset_t va, vm_paddr_t pa); static boolean_t pmap_pv_insert_pde(pmap_t pmap, vm_offset_t va, vm_paddr_t pa); static void pmap_pv_promote_pde(pmap_t pmap, vm_offset_t va, vm_paddr_t pa); @@ -2143,6 +2145,7 @@ pmap_growkernel(vm_offset_t addr) CTASSERT(sizeof(struct pv_chunk) == PAGE_SIZE); CTASSERT(_NPCM == 11); +CTASSERT(_NPCPV == 336); static __inline struct pv_chunk * pv_to_chunk(pv_entry_t pv) @@ -2156,7 +2159,7 @@ pv_to_chunk(pv_entry_t pv) #define PC_FREE0_9 0xfffffffful /* Free values for index 0 through 9 */ #define PC_FREE10 0x0000fffful /* Free values for index 10 */ -static uint32_t pc_freemask[11] = { +static uint32_t pc_freemask[_NPCM] = { PC_FREE0_9, PC_FREE0_9, PC_FREE0_9, PC_FREE0_9, PC_FREE0_9, PC_FREE0_9, PC_FREE0_9, PC_FREE0_9, PC_FREE0_9, @@ -2187,79 +2190,152 @@ SYSCTL_LONG(_vm_pmap, OID_AUTO, pv_entry "Current number of pv entry allocs"); SYSCTL_INT(_vm_pmap, OID_AUTO, pv_entry_spare, CTLFLAG_RD, &pv_entry_spare, 0, "Current number of spare pv entries"); - -static int pmap_collect_inactive, pmap_collect_active; - -SYSCTL_INT(_vm_pmap, OID_AUTO, pmap_collect_inactive, CTLFLAG_RD, &pmap_collect_inactive, 0, - "Current number times pmap_collect called on inactive queue"); -SYSCTL_INT(_vm_pmap, OID_AUTO, pmap_collect_active, CTLFLAG_RD, &pmap_collect_active, 0, - "Current number times pmap_collect called on active queue"); #endif /* * We are in a serious low memory condition. Resort to * drastic measures to free some pages so we can allocate - * another pv entry chunk. This is normally called to - * unmap inactive pages, and if necessary, active pages. + * another pv entry chunk. */ -static void -pmap_collect(pmap_t locked_pmap, struct vpgqueues *vpq) +static vm_page_t +pmap_pv_reclaim(pmap_t locked_pmap) { + struct pch newtail; + struct pv_chunk *pc; + struct md_page *pvh; pd_entry_t *pde; pmap_t pmap; pt_entry_t *pte, tpte; - pv_entry_t next_pv, pv; + pv_entry_t pv; vm_offset_t va; - vm_page_t m, free; - + vm_page_t free, m, m_pc; + uint32_t inuse, freemask; + int bit, field, freed; + + PMAP_LOCK_ASSERT(locked_pmap, MA_OWNED); + pmap = NULL; + free = m_pc = NULL; + TAILQ_INIT(&newtail); sched_pin(); - TAILQ_FOREACH(m, &vpq->pl, pageq) { - if ((m->flags & PG_MARKER) != 0 || m->hold_count || m->busy) - continue; - TAILQ_FOREACH_SAFE(pv, &m->md.pv_list, pv_list, next_pv) { - va = pv->pv_va; - pmap = PV_PMAP(pv); + while ((pc = TAILQ_FIRST(&pv_chunks)) != NULL && (pv_vafree == 0 || + free == NULL)) { + TAILQ_REMOVE(&pv_chunks, pc, pc_lru); + if (pmap != pc->pc_pmap) { + if (pmap != NULL) { + pmap_invalidate_all(pmap); + if (pmap != locked_pmap) + PMAP_UNLOCK(pmap); + } + pmap = pc->pc_pmap; /* Avoid deadlock and lock recursion. */ if (pmap > locked_pmap) PMAP_LOCK(pmap); - else if (pmap != locked_pmap && !PMAP_TRYLOCK(pmap)) + else if (pmap != locked_pmap && !PMAP_TRYLOCK(pmap)) { + pmap = NULL; + TAILQ_INSERT_TAIL(&newtail, pc, pc_lru); continue; - pmap->pm_stats.resident_count--; - pde = pmap_pde(pmap, va); - KASSERT((*pde & PG_PS) == 0, ("pmap_collect: found" - " a 4mpage in page %p's pv list", m)); - pte = pmap_pte_quick(pmap, va); - tpte = pte_load_clear(pte); - KASSERT((tpte & PG_W) == 0, - ("pmap_collect: wired pte %#jx", (uintmax_t)tpte)); - if (tpte & PG_A) - vm_page_aflag_set(m, PGA_REFERENCED); - if ((tpte & (PG_M | PG_RW)) == (PG_M | PG_RW)) - vm_page_dirty(m); - free = NULL; - pmap_unuse_pt(pmap, va, &free); - pmap_invalidate_page(pmap, va); - pmap_free_zero_pages(free); - TAILQ_REMOVE(&m->md.pv_list, pv, pv_list); - free_pv_entry(pmap, pv); - if (pmap != locked_pmap) - PMAP_UNLOCK(pmap); + } + } + + /* + * Destroy every non-wired, 4 KB page mapping in the chunk. + */ + freed = 0; + for (field = 0; field < _NPCM; field++) { + freemask = 0; + for (inuse = ~pc->pc_map[field] & pc_freemask[field]; + inuse != 0; inuse &= ~(1UL << bit)) { + bit = bsfl(inuse); + pv = &pc->pc_pventry[field * 32 + bit]; + va = pv->pv_va; + pde = pmap_pde(pmap, va); + if ((*pde & PG_PS) != 0) + continue; + pte = pmap_pte_quick(pmap, va); + if ((*pte & PG_W) != 0) + continue; + tpte = pte_load_clear(pte); + if ((tpte & PG_G) != 0) + pmap_invalidate_page(pmap, va); + m = PHYS_TO_VM_PAGE(tpte & PG_FRAME); + if ((tpte & (PG_M | PG_RW)) == (PG_M | PG_RW)) + vm_page_dirty(m); + if ((tpte & PG_A) != 0) + vm_page_aflag_set(m, PGA_REFERENCED); + TAILQ_REMOVE(&m->md.pv_list, pv, pv_list); + if (TAILQ_EMPTY(&m->md.pv_list) && + (m->flags & PG_FICTITIOUS) == 0) { + pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); + if (TAILQ_EMPTY(&pvh->pv_list)) { + vm_page_aflag_clear(m, + PGA_WRITEABLE); + } + } + pmap_unuse_pt(pmap, va, &free); + freemask |= 1UL << bit; + freed++; + } + pc->pc_map[field] |= freemask; + } + if (freed == 0) { + TAILQ_INSERT_TAIL(&newtail, pc, pc_lru); + continue; + } + pmap->pm_stats.resident_count -= freed; + PV_STAT(pv_entry_frees += freed); + PV_STAT(pv_entry_spare += freed); + pv_entry_count -= freed; + TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list); + for (field = 0; field < _NPCM; field++) + if (pc->pc_map[field] != pc_freemask[field]) { + TAILQ_INSERT_HEAD(&pmap->pm_pvchunk, pc, + pc_list); + TAILQ_INSERT_TAIL(&newtail, pc, pc_lru); + + /* + * One freed pv entry in locked_pmap is + * sufficient. + */ + if (pmap == locked_pmap) + goto out; + break; + } + if (field == _NPCM) { + PV_STAT(pv_entry_spare -= _NPCPV); + PV_STAT(pc_chunk_count--); + PV_STAT(pc_chunk_frees++); + /* Entire chunk is free; return it. */ + m_pc = PHYS_TO_VM_PAGE(pmap_kextract((vm_offset_t)pc)); + pmap_qremove((vm_offset_t)pc, 1); + pmap_ptelist_free(&pv_vafree, (vm_offset_t)pc); + break; } - if (TAILQ_EMPTY(&m->md.pv_list) && - TAILQ_EMPTY(&pa_to_pvh(VM_PAGE_TO_PHYS(m))->pv_list)) - vm_page_aflag_clear(m, PGA_WRITEABLE); } +out: sched_unpin(); + TAILQ_CONCAT(&pv_chunks, &newtail, pc_lru); + if (pmap != NULL) { + pmap_invalidate_all(pmap); + if (pmap != locked_pmap) + PMAP_UNLOCK(pmap); + } + if (m_pc == NULL && pv_vafree != 0 && free != NULL) { + m_pc = free; + free = m_pc->right; + /* Recycle a freed page table page. */ + m_pc->wire_count = 1; + atomic_add_int(&cnt.v_wire_count, 1); + } + pmap_free_zero_pages(free); + return (m_pc); } - /* * free the pv_entry back to the free list */ static void free_pv_entry(pmap_t pmap, pv_entry_t pv) { - vm_page_t m; struct pv_chunk *pc; int idx, field, bit; @@ -2280,6 +2356,15 @@ free_pv_entry(pmap_t pmap, pv_entry_t pv TAILQ_INSERT_HEAD(&pmap->pm_pvchunk, pc, pc_list); return; } + free_pv_chunk(pc); +} + +static void +free_pv_chunk(struct pv_chunk *pc) +{ + vm_page_t m; + + TAILQ_REMOVE(&pv_chunks, pc, pc_lru); PV_STAT(pv_entry_spare -= _NPCPV); PV_STAT(pc_chunk_count--); PV_STAT(pc_chunk_frees++); @@ -2296,11 +2381,10 @@ free_pv_entry(pmap_t pmap, pv_entry_t pv * when needed. */ static pv_entry_t -get_pv_entry(pmap_t pmap, int try) +get_pv_entry(pmap_t pmap, boolean_t try) { static const struct timeval printinterval = { 60, 0 }; static struct timeval lastprint; - struct vpgqueues *pq; int bit, field; pv_entry_t pv; struct pv_chunk *pc; @@ -2315,7 +2399,6 @@ get_pv_entry(pmap_t pmap, int try) printf("Approaching the limit on PV entries, consider " "increasing either the vm.pmap.shpgperproc or the " "vm.pmap.pv_entry_max tunable.\n"); - pq = NULL; retry: pc = TAILQ_FIRST(&pmap->pm_pvchunk); if (pc != NULL) { @@ -2336,6 +2419,10 @@ retry: } TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list); TAILQ_INSERT_TAIL(&pmap->pm_pvchunk, pc, pc_list); + if (pc != TAILQ_LAST(&pv_chunks, pch)) { + TAILQ_REMOVE(&pv_chunks, pc, pc_lru); + TAILQ_INSERT_TAIL(&pv_chunks, pc, pc_lru); + } PV_STAT(pv_entry_spare--); return (pv); } @@ -2345,29 +2432,16 @@ retry: * queues lock. If "pv_vafree" is currently non-empty, it will * remain non-empty until pmap_ptelist_alloc() completes. */ - if (pv_vafree == 0 || (m = vm_page_alloc(NULL, 0, (pq == - &vm_page_queues[PQ_ACTIVE] ? VM_ALLOC_SYSTEM : VM_ALLOC_NORMAL) | + if (pv_vafree == 0 || (m = vm_page_alloc(NULL, 0, VM_ALLOC_NORMAL | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED)) == NULL) { if (try) { pv_entry_count--; PV_STAT(pc_chunk_tryfail++); return (NULL); } - /* - * Reclaim pv entries: At first, destroy mappings to - * inactive pages. After that, if a pv chunk entry - * is still needed, destroy mappings to active pages. - */ - if (pq == NULL) { - PV_STAT(pmap_collect_inactive++); - pq = &vm_page_queues[PQ_INACTIVE]; - } else if (pq == &vm_page_queues[PQ_INACTIVE]) { - PV_STAT(pmap_collect_active++); - pq = &vm_page_queues[PQ_ACTIVE]; - } else - panic("get_pv_entry: increase vm.pmap.shpgperproc"); - pmap_collect(pmap, pq); - goto retry; + m = pmap_pv_reclaim(pmap); + if (m == NULL) + goto retry; } PV_STAT(pc_chunk_count++); PV_STAT(pc_chunk_allocs++); @@ -2377,6 +2451,7 @@ retry: pc->pc_map[0] = pc_freemask[0] & ~1ul; /* preallocated bit 0 */ for (field = 1; field < _NPCM; field++) pc->pc_map[field] = pc_freemask[field]; + TAILQ_INSERT_TAIL(&pv_chunks, pc, pc_lru); pv = &pc->pc_pventry[0]; TAILQ_INSERT_HEAD(&pmap->pm_pvchunk, pc, pc_list); PV_STAT(pv_entry_spare += _NPCPV - 1); @@ -4347,15 +4422,8 @@ pmap_remove_pages(pmap_t pmap) } } if (allfree) { - PV_STAT(pv_entry_spare -= _NPCPV); - PV_STAT(pc_chunk_count--); - PV_STAT(pc_chunk_frees++); TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list); - m = PHYS_TO_VM_PAGE(pmap_kextract((vm_offset_t)pc)); - pmap_qremove((vm_offset_t)pc, 1); - vm_page_unwire(m, 0); - vm_page_free(m); - pmap_ptelist_free(&pv_vafree, (vm_offset_t)pc); + free_pv_chunk(pc); } } sched_unpin(); Modified: stable/9/sys/i386/include/pmap.h ============================================================================== --- stable/9/sys/i386/include/pmap.h Mon Jul 2 03:49:52 2012 (r237949) +++ stable/9/sys/i386/include/pmap.h Mon Jul 2 05:35:55 2012 (r237950) @@ -481,7 +481,7 @@ struct pv_chunk { pmap_t pc_pmap; TAILQ_ENTRY(pv_chunk) pc_list; uint32_t pc_map[_NPCM]; /* bitmap; 1 = free */ - uint32_t pc_spare[2]; + TAILQ_ENTRY(pv_chunk) pc_lru; struct pv_entry pc_pventry[_NPCPV]; }; Modified: stable/9/sys/i386/xen/pmap.c ============================================================================== --- stable/9/sys/i386/xen/pmap.c Mon Jul 2 03:49:52 2012 (r237949) +++ stable/9/sys/i386/xen/pmap.c Mon Jul 2 05:35:55 2012 (r237950) @@ -230,6 +230,7 @@ static int pat_works; /* Is page attri /* * Data for the pv entry allocation mechanism */ +static TAILQ_HEAD(pch, pv_chunk) pv_chunks = TAILQ_HEAD_INITIALIZER(pv_chunks); static int pv_entry_count = 0, pv_entry_max = 0, pv_entry_high_water = 0; static int shpgperproc = PMAP_SHPGPERPROC; @@ -277,8 +278,9 @@ SYSCTL_INT(_debug, OID_AUTO, PMAP1unchan "Number of times pmap_pte_quick didn't change PMAP1"); static struct mtx PMAP2mutex; +static void free_pv_chunk(struct pv_chunk *pc); static void free_pv_entry(pmap_t pmap, pv_entry_t pv); -static pv_entry_t get_pv_entry(pmap_t locked_pmap, int try); +static pv_entry_t get_pv_entry(pmap_t pmap, boolean_t try); static void pmap_pvh_free(struct md_page *pvh, pmap_t pmap, vm_offset_t va); static pv_entry_t pmap_pvh_remove(struct md_page *pvh, pmap_t pmap, vm_offset_t va); @@ -1914,6 +1916,7 @@ pmap_growkernel(vm_offset_t addr) CTASSERT(sizeof(struct pv_chunk) == PAGE_SIZE); CTASSERT(_NPCM == 11); +CTASSERT(_NPCPV == 336); static __inline struct pv_chunk * pv_to_chunk(pv_entry_t pv) @@ -1927,7 +1930,7 @@ pv_to_chunk(pv_entry_t pv) #define PC_FREE0_9 0xfffffffful /* Free values for index 0 through 9 */ #define PC_FREE10 0x0000fffful /* Free values for index 10 */ -static uint32_t pc_freemask[11] = { +static uint32_t pc_freemask[_NPCM] = { PC_FREE0_9, PC_FREE0_9, PC_FREE0_9, PC_FREE0_9, PC_FREE0_9, PC_FREE0_9, PC_FREE0_9, PC_FREE0_9, PC_FREE0_9, @@ -1958,74 +1961,141 @@ SYSCTL_LONG(_vm_pmap, OID_AUTO, pv_entry "Current number of pv entry allocs"); SYSCTL_INT(_vm_pmap, OID_AUTO, pv_entry_spare, CTLFLAG_RD, &pv_entry_spare, 0, "Current number of spare pv entries"); - -static int pmap_collect_inactive, pmap_collect_active; - -SYSCTL_INT(_vm_pmap, OID_AUTO, pmap_collect_inactive, CTLFLAG_RD, &pmap_collect_inactive, 0, - "Current number times pmap_collect called on inactive queue"); -SYSCTL_INT(_vm_pmap, OID_AUTO, pmap_collect_active, CTLFLAG_RD, &pmap_collect_active, 0, - "Current number times pmap_collect called on active queue"); #endif /* * We are in a serious low memory condition. Resort to * drastic measures to free some pages so we can allocate - * another pv entry chunk. This is normally called to - * unmap inactive pages, and if necessary, active pages. + * another pv entry chunk. */ -static void -pmap_collect(pmap_t locked_pmap, struct vpgqueues *vpq) +static vm_page_t +pmap_pv_reclaim(pmap_t locked_pmap) { + struct pch newtail; + struct pv_chunk *pc; pmap_t pmap; pt_entry_t *pte, tpte; - pv_entry_t next_pv, pv; + pv_entry_t pv; vm_offset_t va; - vm_page_t m, free; - + vm_page_t free, m, m_pc; + uint32_t inuse, freemask; + int bit, field, freed; + + PMAP_LOCK_ASSERT(locked_pmap, MA_OWNED); + pmap = NULL; + free = m_pc = NULL; + TAILQ_INIT(&newtail); sched_pin(); - TAILQ_FOREACH(m, &vpq->pl, pageq) { - if ((m->flags & PG_MARKER) != 0 || m->hold_count || m->busy) - continue; - TAILQ_FOREACH_SAFE(pv, &m->md.pv_list, pv_list, next_pv) { - va = pv->pv_va; - pmap = PV_PMAP(pv); + while ((pc = TAILQ_FIRST(&pv_chunks)) != NULL && (pv_vafree == 0 || + free == NULL)) { + TAILQ_REMOVE(&pv_chunks, pc, pc_lru); + if (pmap != pc->pc_pmap) { + if (pmap != NULL) { + pmap_invalidate_all(pmap); + if (pmap != locked_pmap) + PMAP_UNLOCK(pmap); + } + pmap = pc->pc_pmap; /* Avoid deadlock and lock recursion. */ if (pmap > locked_pmap) PMAP_LOCK(pmap); - else if (pmap != locked_pmap && !PMAP_TRYLOCK(pmap)) + else if (pmap != locked_pmap && !PMAP_TRYLOCK(pmap)) { + pmap = NULL; + TAILQ_INSERT_TAIL(&newtail, pc, pc_lru); continue; - pmap->pm_stats.resident_count--; - pte = pmap_pte_quick(pmap, va); - tpte = pte_load_clear(pte); - KASSERT((tpte & PG_W) == 0, - ("pmap_collect: wired pte %#jx", (uintmax_t)tpte)); - if (tpte & PG_A) - vm_page_aflag_set(m, PGA_REFERENCED); - if ((tpte & (PG_M | PG_RW)) == (PG_M | PG_RW)) - vm_page_dirty(m); - free = NULL; - pmap_unuse_pt(pmap, va, &free); - pmap_invalidate_page(pmap, va); - pmap_free_zero_pages(free); - TAILQ_REMOVE(&m->md.pv_list, pv, pv_list); - free_pv_entry(pmap, pv); - if (pmap != locked_pmap) - PMAP_UNLOCK(pmap); + } + } + + /* + * Destroy every non-wired, 4 KB page mapping in the chunk. + */ + freed = 0; + for (field = 0; field < _NPCM; field++) { + freemask = 0; + for (inuse = ~pc->pc_map[field] & pc_freemask[field]; + inuse != 0; inuse &= ~(1UL << bit)) { + bit = bsfl(inuse); + pv = &pc->pc_pventry[field * 32 + bit]; + va = pv->pv_va; + pte = pmap_pte_quick(pmap, va); + if ((*pte & PG_W) != 0) + continue; + tpte = pte_load_clear(pte); + if ((tpte & PG_G) != 0) + pmap_invalidate_page(pmap, va); + m = PHYS_TO_VM_PAGE(tpte & PG_FRAME); + if ((tpte & (PG_M | PG_RW)) == (PG_M | PG_RW)) + vm_page_dirty(m); + if ((tpte & PG_A) != 0) + vm_page_aflag_set(m, PGA_REFERENCED); + TAILQ_REMOVE(&m->md.pv_list, pv, pv_list); + if (TAILQ_EMPTY(&m->md.pv_list)) + vm_page_aflag_clear(m, PGA_WRITEABLE); + pmap_unuse_pt(pmap, va, &free); + freemask |= 1UL << bit; + freed++; + } + pc->pc_map[field] |= freemask; + } + if (freed == 0) { + TAILQ_INSERT_TAIL(&newtail, pc, pc_lru); + continue; + } + pmap->pm_stats.resident_count -= freed; + PV_STAT(pv_entry_frees += freed); + PV_STAT(pv_entry_spare += freed); + pv_entry_count -= freed; + TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list); + for (field = 0; field < _NPCM; field++) + if (pc->pc_map[field] != pc_freemask[field]) { + TAILQ_INSERT_HEAD(&pmap->pm_pvchunk, pc, + pc_list); + TAILQ_INSERT_TAIL(&newtail, pc, pc_lru); + + /* + * One freed pv entry in locked_pmap is + * sufficient. + */ + if (pmap == locked_pmap) + goto out; + break; + } + if (field == _NPCM) { + PV_STAT(pv_entry_spare -= _NPCPV); + PV_STAT(pc_chunk_count--); + PV_STAT(pc_chunk_frees++); + /* Entire chunk is free; return it. */ + m_pc = PHYS_TO_VM_PAGE(pmap_kextract((vm_offset_t)pc)); + pmap_qremove((vm_offset_t)pc, 1); + pmap_ptelist_free(&pv_vafree, (vm_offset_t)pc); + break; } - if (TAILQ_EMPTY(&m->md.pv_list)) - vm_page_aflag_clear(m, PGA_WRITEABLE); } +out: sched_unpin(); + TAILQ_CONCAT(&pv_chunks, &newtail, pc_lru); + if (pmap != NULL) { + pmap_invalidate_all(pmap); + if (pmap != locked_pmap) + PMAP_UNLOCK(pmap); + } + if (m_pc == NULL && pv_vafree != 0 && free != NULL) { + m_pc = free; + free = m_pc->right; + /* Recycle a freed page table page. */ + m_pc->wire_count = 1; + atomic_add_int(&cnt.v_wire_count, 1); + } + pmap_free_zero_pages(free); + return (m_pc); } - /* * free the pv_entry back to the free list */ static void free_pv_entry(pmap_t pmap, pv_entry_t pv) { - vm_page_t m; struct pv_chunk *pc; int idx, field, bit; @@ -2046,6 +2116,15 @@ free_pv_entry(pmap_t pmap, pv_entry_t pv TAILQ_INSERT_HEAD(&pmap->pm_pvchunk, pc, pc_list); return; } + free_pv_chunk(pc); +} + +static void +free_pv_chunk(struct pv_chunk *pc) +{ + vm_page_t m; + + TAILQ_REMOVE(&pv_chunks, pc, pc_lru); PV_STAT(pv_entry_spare -= _NPCPV); PV_STAT(pc_chunk_count--); PV_STAT(pc_chunk_frees++); @@ -2062,11 +2141,10 @@ free_pv_entry(pmap_t pmap, pv_entry_t pv * when needed. */ static pv_entry_t -get_pv_entry(pmap_t pmap, int try) +get_pv_entry(pmap_t pmap, boolean_t try) { static const struct timeval printinterval = { 60, 0 }; static struct timeval lastprint; - struct vpgqueues *pq; int bit, field; pv_entry_t pv; struct pv_chunk *pc; @@ -2081,7 +2159,6 @@ get_pv_entry(pmap_t pmap, int try) printf("Approaching the limit on PV entries, consider " "increasing either the vm.pmap.shpgperproc or the " "vm.pmap.pv_entry_max tunable.\n"); - pq = NULL; retry: pc = TAILQ_FIRST(&pmap->pm_pvchunk); if (pc != NULL) { @@ -2102,6 +2179,10 @@ retry: } TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list); TAILQ_INSERT_TAIL(&pmap->pm_pvchunk, pc, pc_list); + if (pc != TAILQ_LAST(&pv_chunks, pch)) { + TAILQ_REMOVE(&pv_chunks, pc, pc_lru); + TAILQ_INSERT_TAIL(&pv_chunks, pc, pc_lru); + } PV_STAT(pv_entry_spare--); return (pv); } @@ -2111,29 +2192,16 @@ retry: * queues lock. If "pv_vafree" is currently non-empty, it will * remain non-empty until pmap_ptelist_alloc() completes. */ - if (pv_vafree == 0 || (m = vm_page_alloc(NULL, 0, (pq == - &vm_page_queues[PQ_ACTIVE] ? VM_ALLOC_SYSTEM : VM_ALLOC_NORMAL) | + if (pv_vafree == 0 || (m = vm_page_alloc(NULL, 0, VM_ALLOC_NORMAL | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED)) == NULL) { if (try) { pv_entry_count--; PV_STAT(pc_chunk_tryfail++); return (NULL); } - /* - * Reclaim pv entries: At first, destroy mappings to - * inactive pages. After that, if a pv chunk entry - * is still needed, destroy mappings to active pages. - */ - if (pq == NULL) { - PV_STAT(pmap_collect_inactive++); - pq = &vm_page_queues[PQ_INACTIVE]; - } else if (pq == &vm_page_queues[PQ_INACTIVE]) { - PV_STAT(pmap_collect_active++); - pq = &vm_page_queues[PQ_ACTIVE]; - } else - panic("get_pv_entry: increase vm.pmap.shpgperproc"); - pmap_collect(pmap, pq); - goto retry; + m = pmap_pv_reclaim(pmap); + if (m == NULL) + goto retry; } PV_STAT(pc_chunk_count++); PV_STAT(pc_chunk_allocs++); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 05:57:02 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 088D01065673; Mon, 2 Jul 2012 05:57:02 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AAB678FC14; Mon, 2 Jul 2012 05:57:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q625v1ch047645; Mon, 2 Jul 2012 05:57:01 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q625v1MT047643; Mon, 2 Jul 2012 05:57:01 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201207020557.q625v1MT047643@svn.freebsd.org> From: "David E. O'Brien" Date: Mon, 2 Jul 2012 05:57:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237951 - stable/9/gnu/usr.bin/cvs/lib X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 05:57:02 -0000 Author: obrien Date: Mon Jul 2 05:57:01 2012 New Revision: 237951 URL: http://svn.freebsd.org/changeset/base/237951 Log: MFC: r229809: Don't include . The purpose of not including is to avoid the compiler warning we put in . So this change will cause CVS to provide its own definition of 'struct timeb'. This is only OK because the code never calls the libc ftime(3) interface. CVS only uses 'struct timeb' as a convenience structure -- thus it doesn't matter how its supplied definition does or does not match the ftime(3) ABI. Modified: stable/9/gnu/usr.bin/cvs/lib/config.h.proto Directory Properties: stable/9/ (props changed) Modified: stable/9/gnu/usr.bin/cvs/lib/config.h.proto ============================================================================== --- stable/9/gnu/usr.bin/cvs/lib/config.h.proto Mon Jul 2 05:35:55 2012 (r237950) +++ stable/9/gnu/usr.bin/cvs/lib/config.h.proto Mon Jul 2 05:57:01 2012 (r237951) @@ -324,7 +324,7 @@ #define HAVE_SYS_STAT_H 1 /* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIMEB_H 1 +/* #undef HAVE_SYS_TIMEB_H */ /* Define to 1 if you have the header file. */ #define HAVE_SYS_TIME_H 1 From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 05:57:45 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 25BE5106564A; Mon, 2 Jul 2012 05:57:45 +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 EB9508FC15; Mon, 2 Jul 2012 05:57:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q625vi3Z047708; Mon, 2 Jul 2012 05:57:44 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q625viCY047706; Mon, 2 Jul 2012 05:57:44 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201207020557.q625viCY047706@svn.freebsd.org> From: Alan Cox Date: Mon, 2 Jul 2012 05:57:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237952 - stable/9/sys/i386/i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 05:57:45 -0000 Author: alc Date: Mon Jul 2 05:57:44 2012 New Revision: 237952 URL: http://svn.freebsd.org/changeset/base/237952 Log: MFC r235912 There is no need for pmap_protect() to acquire the page queues lock unless it is going to access the pv lists or PMAP1/PADDR1. Modified: stable/9/sys/i386/i386/pmap.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/i386/i386/pmap.c ============================================================================== --- stable/9/sys/i386/i386/pmap.c Mon Jul 2 05:57:01 2012 (r237951) +++ stable/9/sys/i386/i386/pmap.c Mon Jul 2 05:57:44 2012 (r237952) @@ -3125,7 +3125,7 @@ pmap_protect(pmap_t pmap, vm_offset_t sv vm_offset_t pdnxt; pd_entry_t ptpaddr; pt_entry_t *pte; - int anychanged; + boolean_t anychanged, pv_lists_locked; if ((prot & VM_PROT_READ) == VM_PROT_NONE) { pmap_remove(pmap, sva, eva); @@ -3141,10 +3141,16 @@ pmap_protect(pmap_t pmap, vm_offset_t sv return; #endif - anychanged = 0; + if (pmap_is_current(pmap)) + pv_lists_locked = FALSE; + else { + pv_lists_locked = TRUE; +resume: + vm_page_lock_queues(); + sched_pin(); + } + anychanged = FALSE; - vm_page_lock_queues(); - sched_pin(); PMAP_LOCK(pmap); for (; sva < eva; sva = pdnxt) { pt_entry_t obits, pbits; @@ -3179,12 +3185,27 @@ pmap_protect(pmap_t pmap, vm_offset_t sv */ if (pmap_protect_pde(pmap, &pmap->pm_pdir[pdirindex], sva, prot)) - anychanged = 1; - continue; - } else if (!pmap_demote_pde(pmap, - &pmap->pm_pdir[pdirindex], sva)) { - /* The large page mapping was destroyed. */ + anychanged = TRUE; continue; + } else { + if (!pv_lists_locked) { + pv_lists_locked = TRUE; + if (!mtx_trylock(&vm_page_queue_mtx)) { + if (anychanged) + pmap_invalidate_all( + pmap); + PMAP_UNLOCK(pmap); + goto resume; + } + } + if (!pmap_demote_pde(pmap, + &pmap->pm_pdir[pdirindex], sva)) { + /* + * The large page mapping was + * destroyed. + */ + continue; + } } } @@ -3230,14 +3251,16 @@ retry: if (obits & PG_G) pmap_invalidate_page(pmap, sva); else - anychanged = 1; + anychanged = TRUE; } } } - sched_unpin(); if (anychanged) pmap_invalidate_all(pmap); - vm_page_unlock_queues(); + if (pv_lists_locked) { + sched_unpin(); + vm_page_unlock_queues(); + } PMAP_UNLOCK(pmap); } From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 06:02:13 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 70BAF106566B; Mon, 2 Jul 2012 06:02:13 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5C33D8FC12; Mon, 2 Jul 2012 06:02:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6262DmW048067; Mon, 2 Jul 2012 06:02:13 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6262Du9048064; Mon, 2 Jul 2012 06:02:13 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201207020602.q6262Du9048064@svn.freebsd.org> From: Adrian Chadd Date: Mon, 2 Jul 2012 06:02:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237953 - in head/sys/dev/ath: . ath_hal X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 06:02:13 -0000 Author: adrian Date: Mon Jul 2 06:02:12 2012 New Revision: 237953 URL: http://svn.freebsd.org/changeset/base/237953 Log: Bring over some further HAL capabilities from the Atheros HAL, as well as an EDMA check function. For the AR9003 and later NICs, different TX/RX DMA and descriptor handling code will be conditional on the EDMA check. Obtained from: Qualcomm Atheros Modified: head/sys/dev/ath/ath_hal/ah.h head/sys/dev/ath/if_athvar.h Modified: head/sys/dev/ath/ath_hal/ah.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah.h Mon Jul 2 05:57:44 2012 (r237952) +++ head/sys/dev/ath/ath_hal/ah.h Mon Jul 2 06:02:12 2012 (r237953) @@ -110,7 +110,7 @@ typedef enum { HAL_CAP_TPC_ACK = 26, /* ack txpower with per-packet tpc */ HAL_CAP_TPC_CTS = 27, /* cts txpower with per-packet tpc */ HAL_CAP_11D = 28, /* 11d beacon support for changing cc */ - + HAL_CAP_PCIE_PS = 29, HAL_CAP_HT = 30, /* hardware can support HT */ HAL_CAP_GTXTO = 31, /* hardware supports global tx timeout */ HAL_CAP_FAST_CC = 32, /* hardware supports fast channel change */ @@ -120,6 +120,9 @@ typedef enum { HAL_CAP_CST = 38, /* hardware supports carrier sense timeout */ + HAL_CAP_RIFS_RX = 39, + HAL_CAP_RIFS_TX = 40, + HAL_CAP_FORCE_PPM = 41, HAL_CAP_RTS_AGGR_LIMIT = 42, /* aggregation limit with RTS */ HAL_CAP_4ADDR_AGGR = 43, /* hardware is capable of 4addr aggregation */ HAL_CAP_DFS_DMN = 44, /* current DFS domain */ @@ -131,8 +134,27 @@ typedef enum { HAL_CAP_MBSSID_AGGR_SUPPORT = 49, /* Support for mBSSID Aggregation */ HAL_CAP_SPLIT_4KB_TRANS = 50, /* hardware supports descriptors straddling a 4k page boundary */ HAL_CAP_REG_FLAG = 51, /* Regulatory domain flags */ + HAL_CAP_BB_RIFS_HANG = 52, + HAL_CAP_RIFS_RX_ENABLED = 53, + HAL_CAP_BB_DFS_HANG = 54, HAL_CAP_BT_COEX = 60, /* hardware is capable of bluetooth coexistence */ + HAL_CAP_DYNAMIC_SMPS = 61, /* Dynamic MIMO Power Save hardware support */ + + HAL_CAP_DS = 67, /* 2 stream */ + HAL_CAP_BB_RX_CLEAR_STUCK_HANG = 68, + HAL_CAP_MAC_HANG = 69, /* can MAC hang */ + HAL_CAP_MFP = 70, /* Manangement Frame Protection in hardware */ + + HAL_CAP_TS = 72, /* 3 stream */ + + HAL_CAP_ENHANCED_DMA_SUPPORT = 75, /* DMA FIFO support */ + + HAL_CAP_RX_BUFSIZE = 81, + HAL_CAP_NUM_MR_ENTRIES = 82, + HAL_CAP_OL_PWRCTRL = 84, /* Open loop TX power control */ + + HAL_CAP_BB_PANIC_WATCHDOG = 92, HAL_CAP_HT20_SGI = 96, /* hardware supports HT20 short GI */ @@ -144,7 +166,6 @@ typedef enum { HAL_CAP_INTMIT = 229, /* interference mitigation */ HAL_CAP_RXORN_FATAL = 230, /* HAL_INT_RXORN treated as fatal */ HAL_CAP_BB_HANG = 235, /* can baseband hang */ - HAL_CAP_MAC_HANG = 236, /* can MAC hang */ HAL_CAP_INTRMASK = 237, /* bitmask of supported interrupts */ HAL_CAP_BSSIDMATCH = 238, /* hardware has disable bssid match */ HAL_CAP_STREAMS = 239, /* how many 802.11n spatial streams are available */ Modified: head/sys/dev/ath/if_athvar.h ============================================================================== --- head/sys/dev/ath/if_athvar.h Mon Jul 2 05:57:44 2012 (r237952) +++ head/sys/dev/ath/if_athvar.h Mon Jul 2 06:02:12 2012 (r237953) @@ -942,6 +942,9 @@ void ath_intr(void *); #define ath_hal_setintmit(_ah, _v) \ ath_hal_setcapability(_ah, HAL_CAP_INTMIT, \ HAL_CAP_INTMIT_ENABLE, _v, NULL) +#define ath_hal_hasedma(_ah) \ + (ath_hal_getcapability(_ah, HAL_CAP_ENHANCED_DMA_SUPPORT, \ + 0, NULL) == HAL_OK) #define ath_hal_getchannoise(_ah, _c) \ ((*(_ah)->ah_getChanNoise)((_ah), (_c))) #define ath_hal_getrxchainmask(_ah, _prxchainmask) \ From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 06:02:57 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8258D106567C; Mon, 2 Jul 2012 06:02:57 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 561408FC17; Mon, 2 Jul 2012 06:02:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6262vq7048149; Mon, 2 Jul 2012 06:02:57 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6262vjK048148; Mon, 2 Jul 2012 06:02:57 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201207020602.q6262vjK048148@svn.freebsd.org> From: "David E. O'Brien" Date: Mon, 2 Jul 2012 06:02:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237954 - stable/9 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 06:02:57 -0000 Author: obrien Date: Mon Jul 2 06:02:56 2012 New Revision: 237954 URL: http://svn.freebsd.org/changeset/base/237954 Log: Record that r226343 r226347 r226348 r226349 r226353 r226388 was MFC'ed. Modified: Directory Properties: stable/9/ (props changed) From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 06:05:26 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8F218106566B; Mon, 2 Jul 2012 06:05:26 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7A9A38FC0C; Mon, 2 Jul 2012 06:05:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6265QSC048302; Mon, 2 Jul 2012 06:05:26 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6265Q2t048300; Mon, 2 Jul 2012 06:05:26 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201207020605.q6265Q2t048300@svn.freebsd.org> From: Adrian Chadd Date: Mon, 2 Jul 2012 06:05:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237955 - head/sys/dev/ath/ath_hal X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 06:05:26 -0000 Author: adrian Date: Mon Jul 2 06:05:25 2012 New Revision: 237955 URL: http://svn.freebsd.org/changeset/base/237955 Log: Fix typo. Modified: head/sys/dev/ath/ath_hal/ah.h Modified: head/sys/dev/ath/ath_hal/ah.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah.h Mon Jul 2 06:02:56 2012 (r237954) +++ head/sys/dev/ath/ath_hal/ah.h Mon Jul 2 06:05:25 2012 (r237955) @@ -144,7 +144,7 @@ typedef enum { HAL_CAP_DS = 67, /* 2 stream */ HAL_CAP_BB_RX_CLEAR_STUCK_HANG = 68, HAL_CAP_MAC_HANG = 69, /* can MAC hang */ - HAL_CAP_MFP = 70, /* Manangement Frame Protection in hardware */ + HAL_CAP_MFP = 70, /* Management Frame Protection in hardware */ HAL_CAP_TS = 72, /* 3 stream */ From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 06:06:27 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B30961065672; Mon, 2 Jul 2012 06:06:27 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9E6D58FC20; Mon, 2 Jul 2012 06:06:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6266RsS048385; Mon, 2 Jul 2012 06:06:27 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6266RU6048383; Mon, 2 Jul 2012 06:06:27 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201207020606.q6266RU6048383@svn.freebsd.org> From: Adrian Chadd Date: Mon, 2 Jul 2012 06:06:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237956 - head/sys/dev/ath/ath_hal X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 06:06:27 -0000 Author: adrian Date: Mon Jul 2 06:06:27 2012 New Revision: 237956 URL: http://svn.freebsd.org/changeset/base/237956 Log: Fix another typo. Modified: head/sys/dev/ath/ath_hal/ah.h Modified: head/sys/dev/ath/ath_hal/ah.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah.h Mon Jul 2 06:05:25 2012 (r237955) +++ head/sys/dev/ath/ath_hal/ah.h Mon Jul 2 06:06:27 2012 (r237956) @@ -150,7 +150,7 @@ typedef enum { HAL_CAP_ENHANCED_DMA_SUPPORT = 75, /* DMA FIFO support */ - HAL_CAP_RX_BUFSIZE = 81, + HAL_CAP_RXBUFSIZE = 81, HAL_CAP_NUM_MR_ENTRIES = 82, HAL_CAP_OL_PWRCTRL = 84, /* Open loop TX power control */ From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 06:07:46 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A7E26106564A; Mon, 2 Jul 2012 06:07:46 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 940C48FC0C; Mon, 2 Jul 2012 06:07:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6267kqq048474; Mon, 2 Jul 2012 06:07:46 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6267kGO048472; Mon, 2 Jul 2012 06:07:46 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201207020607.q6267kGO048472@svn.freebsd.org> From: Adrian Chadd Date: Mon, 2 Jul 2012 06:07:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237957 - head/sys/dev/ath/ath_hal X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 06:07:46 -0000 Author: adrian Date: Mon Jul 2 06:07:46 2012 New Revision: 237957 URL: http://svn.freebsd.org/changeset/base/237957 Log: .. And fix another typo. Grr. Modified: head/sys/dev/ath/ath_hal/ah.h Modified: head/sys/dev/ath/ath_hal/ah.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah.h Mon Jul 2 06:06:27 2012 (r237956) +++ head/sys/dev/ath/ath_hal/ah.h Mon Jul 2 06:07:46 2012 (r237957) @@ -151,7 +151,7 @@ typedef enum { HAL_CAP_ENHANCED_DMA_SUPPORT = 75, /* DMA FIFO support */ HAL_CAP_RXBUFSIZE = 81, - HAL_CAP_NUM_MR_ENTRIES = 82, + HAL_CAP_NUM_MR_RETRIES = 82, HAL_CAP_OL_PWRCTRL = 84, /* Open loop TX power control */ HAL_CAP_BB_PANIC_WATCHDOG = 92, From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 06:22:07 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BBB29106566B; Mon, 2 Jul 2012 06:22:06 +0000 (UTC) (envelope-from utisoft@gmail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 1E9088FC19; Mon, 2 Jul 2012 06:22:04 +0000 (UTC) Received: by bkwj5 with SMTP id j5so3035289bkw.13 for ; Sun, 01 Jul 2012 23:22:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=9HsvwV65argEOgAxp+TKviJ56wuaXYAarn/9KHS3x6Y=; b=BFInbzBmCuugqsJTWcHkwdIYgvUgdwfe+r0wrhdys+Qre6g/tkq0zQM6ghjkzHqZqU c9D8d9acuMCVxsu7s5PxJda4HbKmxgtGCn4VTq51J7Az1uWDl5PqD2z4AWo5BYvl14db Z55scWk8QC9kN+3kpQR5mMYfR4LxYqrB+dVoIxtewq+qk2JzYzorNJlzT4uhvqPKY3nx EkI/jUD7dPm0x6Cag9qigSVbOMxiZ6AG9KtOsdYNBx/EY3nUTSA4HzvYwaLWE/Kx4tdF GhSC0IztiqPtBWk+eyMvk9iv/iee0Ifa7ezk7IC2aaZybXxOqPqvTIjj15yROfkZtADx fd4g== MIME-Version: 1.0 Received: by 10.204.152.4 with SMTP id e4mr1005600bkw.2.1341210123866; Sun, 01 Jul 2012 23:22:03 -0700 (PDT) Received: by 10.204.49.87 with HTTP; Sun, 1 Jul 2012 23:22:03 -0700 (PDT) Received: by 10.204.49.87 with HTTP; Sun, 1 Jul 2012 23:22:03 -0700 (PDT) In-Reply-To: <4FF11DAE.6070404@FreeBSD.org> References: <201207010036.q610a7wc050629@svn.freebsd.org> <6AB69681-E87A-493C-AE2C-5B4A9218D455@FreeBSD.org> <4FF11DAE.6070404@FreeBSD.org> Date: Mon, 2 Jul 2012 07:22:03 +0100 Message-ID: From: Chris Rees To: Doug Barton , Beat Gaetzi Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, "Pedro F. Giffuni" , "Simon L. B. Nielsen" Subject: Re: svn commit: r237860 - head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 06:22:07 -0000 On Jul 2, 2012 5:05 AM, "Doug Barton" wrote: > > On 07/01/2012 03:05, Simon L. B. Nielsen wrote: > > Don't replace files, and even worse directories, and it breaks svn2cvs. > > Isn't it possible to write a pre-commit hook to avoid this issue? I'm sure beat wrote one for ports.... Chris From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 06:22:20 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C072810657FD; Mon, 2 Jul 2012 06:22:20 +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 ACA268FC0C; Mon, 2 Jul 2012 06:22:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q626MKUL049110; Mon, 2 Jul 2012 06:22:20 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q626MK19049108; Mon, 2 Jul 2012 06:22:20 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201207020622.q626MK19049108@svn.freebsd.org> From: Doug Barton Date: Mon, 2 Jul 2012 06:22:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237958 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 06:22:20 -0000 Author: dougb Date: Mon Jul 2 06:22:20 2012 New Revision: 237958 URL: http://svn.freebsd.org/changeset/base/237958 Log: For the ports modules building code, clean WRKDIR before building. This is important for those that use -DNO_CLEAN routinely, since it will prevent installing stale stuff, and even more important when the port is upgraded to a newer version. When the user doesn't use -DNO_CLEAN, this will create an infinitesimal amount of extra work, but won't hurt anything. This is necessary because the ports tree has flags that prevent the ususal 'update the build if newer source files exist' logic from doing what it would do in the base. Modified: head/sys/conf/kern.post.mk Modified: head/sys/conf/kern.post.mk ============================================================================== --- head/sys/conf/kern.post.mk Mon Jul 2 06:07:46 2012 (r237957) +++ head/sys/conf/kern.post.mk Mon Jul 2 06:22:20 2012 (r237958) @@ -64,7 +64,7 @@ PORTSMODULESENV=\ ${__target}: ports-${__target} ports-${__target}: .for __i in ${PORTS_MODULES} - cd $${PORTSDIR:-/usr/ports}/${__i}; ${PORTSMODULESENV} ${MAKE} -B ${__target:C/install/deinstall reinstall/:C/reinstall/deinstall reinstall/} + cd $${PORTSDIR:-/usr/ports}/${__i}; ${PORTSMODULESENV} ${MAKE} -B ${__target:C/all/clean all/:C/install/deinstall reinstall/:C/reinstall/deinstall reinstall/} .endfor .endfor .endif From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 06:39:06 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D92B4106566C; Mon, 2 Jul 2012 06:39:06 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C4A2A8FC08; Mon, 2 Jul 2012 06:39:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q626d6Lk049925; Mon, 2 Jul 2012 06:39:06 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q626d6Tp049923; Mon, 2 Jul 2012 06:39:06 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201207020639.q626d6Tp049923@svn.freebsd.org> From: Martin Matuska Date: Mon, 2 Jul 2012 06:39:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237959 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 06:39:07 -0000 Author: mm Date: Mon Jul 2 06:39:06 2012 New Revision: 237959 URL: http://svn.freebsd.org/changeset/base/237959 Log: MFC r236247 (pjd): Remove unused sysctl. Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Mon Jul 2 06:22:20 2012 (r237958) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Mon Jul 2 06:39:06 2012 (r237959) @@ -67,12 +67,6 @@ static vdev_ops_t *vdev_ops_table[] = { NULL }; -/* maximum scrub/resilver I/O queue per leaf vdev */ -int zfs_scrub_limit = 10; - -TUNABLE_INT("vfs.zfs.scrub_limit", &zfs_scrub_limit); -SYSCTL_INT(_vfs_zfs, OID_AUTO, scrub_limit, CTLFLAG_RDTUN, &zfs_scrub_limit, 0, - "Maximum scrub/resilver I/O queue"); /* * Given a vdev type, return the appropriate ops vector. From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 06:39:22 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8387F1065794; Mon, 2 Jul 2012 06:39:22 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6E8E18FC15; Mon, 2 Jul 2012 06:39:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q626dMJw049979; Mon, 2 Jul 2012 06:39:22 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q626dMD0049977; Mon, 2 Jul 2012 06:39:22 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201207020639.q626dMD0049977@svn.freebsd.org> From: Martin Matuska Date: Mon, 2 Jul 2012 06:39:22 +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: r237960 - stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 06:39:22 -0000 Author: mm Date: Mon Jul 2 06:39:21 2012 New Revision: 237960 URL: http://svn.freebsd.org/changeset/base/237960 Log: MFC r236247 (pjd): Remove unused sysctl. Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/cddl/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Mon Jul 2 06:39:06 2012 (r237959) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Mon Jul 2 06:39:21 2012 (r237960) @@ -67,12 +67,6 @@ static vdev_ops_t *vdev_ops_table[] = { NULL }; -/* maximum scrub/resilver I/O queue per leaf vdev */ -int zfs_scrub_limit = 10; - -TUNABLE_INT("vfs.zfs.scrub_limit", &zfs_scrub_limit); -SYSCTL_INT(_vfs_zfs, OID_AUTO, scrub_limit, CTLFLAG_RDTUN, &zfs_scrub_limit, 0, - "Maximum scrub/resilver I/O queue"); /* * Given a vdev type, return the appropriate ops vector. From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 06:40:12 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5E7C61065670; Mon, 2 Jul 2012 06:40:12 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 493D18FC15; Mon, 2 Jul 2012 06:40:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q626eCup050051; Mon, 2 Jul 2012 06:40:12 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q626eC1G050049; Mon, 2 Jul 2012 06:40:12 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201207020640.q626eC1G050049@svn.freebsd.org> From: Christian Brueffer Date: Mon, 2 Jul 2012 06:40:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237961 - stable/9/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 06:40:12 -0000 Author: brueffer Date: Mon Jul 2 06:40:11 2012 New Revision: 237961 URL: http://svn.freebsd.org/changeset/base/237961 Log: MFC: r237836 mps(4) is endian safe as of r237876. Modified: stable/9/share/man/man4/mps.4 Directory Properties: stable/9/share/man/man4/ (props changed) Modified: stable/9/share/man/man4/mps.4 ============================================================================== --- stable/9/share/man/man4/mps.4 Mon Jul 2 06:39:21 2012 (r237960) +++ stable/9/share/man/man4/mps.4 Mon Jul 2 06:40:11 2012 (r237961) @@ -34,7 +34,7 @@ .\" $Id: //depot/SpectraBSD/head/share/man/man4/mps.4#6 $ .\" $FreeBSD$ .\" -.Dd February 7, 2012 +.Dd June 30, 2012 .Dt MPS 4 .Os .Sh NAME @@ -205,9 +205,6 @@ This man page was written by This driver has a couple of known shortcomings: .Bl -bullet -compact .It -Not endian safe. -It only works on little endian machines (e.g. amd64 and i386). -.It No userland utility available (e.g. .Xr mptutil 8 ) . .It From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 06:51:50 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6C5141065672; Mon, 2 Jul 2012 06:51:50 +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 58A098FC08; Mon, 2 Jul 2012 06:51:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q626porG051020; Mon, 2 Jul 2012 06:51:50 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q626po9m051018; Mon, 2 Jul 2012 06:51:50 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201207020651.q626po9m051018@svn.freebsd.org> From: Doug Barton Date: Mon, 2 Jul 2012 06:51:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237962 - stable/9/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 06:51:50 -0000 Author: dougb Date: Mon Jul 2 06:51:49 2012 New Revision: 237962 URL: http://svn.freebsd.org/changeset/base/237962 Log: MFC r237958: For the ports modules building code, clean WRKDIR before building. This is important for those that use -DNO_CLEAN routinely, since it will prevent installing stale stuff, and even more important when the port is upgraded to a newer version. When the user doesn't use -DNO_CLEAN, this will create an infinitesimal amount of extra work, but won't hurt anything. This is necessary because the ports tree has flags that prevent the ususal 'update the build if newer source files exist' logic from doing what it would do in the base. Modified: stable/9/sys/conf/kern.post.mk Directory Properties: stable/9/sys/ (props changed) stable/9/sys/conf/ (props changed) Modified: stable/9/sys/conf/kern.post.mk ============================================================================== --- stable/9/sys/conf/kern.post.mk Mon Jul 2 06:40:11 2012 (r237961) +++ stable/9/sys/conf/kern.post.mk Mon Jul 2 06:51:49 2012 (r237962) @@ -64,7 +64,7 @@ PORTSMODULESENV=\ ${__target}: ports-${__target} ports-${__target}: .for __i in ${PORTS_MODULES} - cd $${PORTSDIR:-/usr/ports}/${__i}; ${PORTSMODULESENV} ${MAKE} -B ${__target:C/install/deinstall reinstall/:C/reinstall/deinstall reinstall/} + cd $${PORTSDIR:-/usr/ports}/${__i}; ${PORTSMODULESENV} ${MAKE} -B ${__target:C/all/clean all/:C/install/deinstall reinstall/:C/reinstall/deinstall reinstall/} .endfor .endfor .endif From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 06:52:07 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ADC5B1065694; Mon, 2 Jul 2012 06:52:07 +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 9A7B48FC15; Mon, 2 Jul 2012 06:52:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q626q78u051092; Mon, 2 Jul 2012 06:52:07 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q626q7qG051090; Mon, 2 Jul 2012 06:52:07 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201207020652.q626q7qG051090@svn.freebsd.org> From: Doug Barton Date: Mon, 2 Jul 2012 06:52: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: r237963 - stable/8/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 06:52:07 -0000 Author: dougb Date: Mon Jul 2 06:52:07 2012 New Revision: 237963 URL: http://svn.freebsd.org/changeset/base/237963 Log: MFC r237958: For the ports modules building code, clean WRKDIR before building. This is important for those that use -DNO_CLEAN routinely, since it will prevent installing stale stuff, and even more important when the port is upgraded to a newer version. When the user doesn't use -DNO_CLEAN, this will create an infinitesimal amount of extra work, but won't hurt anything. This is necessary because the ports tree has flags that prevent the ususal 'update the build if newer source files exist' logic from doing what it would do in the base. Modified: stable/8/sys/conf/kern.post.mk Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/conf/kern.post.mk ============================================================================== --- stable/8/sys/conf/kern.post.mk Mon Jul 2 06:51:49 2012 (r237962) +++ stable/8/sys/conf/kern.post.mk Mon Jul 2 06:52:07 2012 (r237963) @@ -56,7 +56,7 @@ PORTSMODULESENV=\ ${__target}: ports-${__target} ports-${__target}: .for __i in ${PORTS_MODULES} - cd $${PORTSDIR:-/usr/ports}/${__i}; ${PORTSMODULESENV} ${MAKE} -B ${__target:C/install/deinstall reinstall/:C/reinstall/deinstall reinstall/} + cd $${PORTSDIR:-/usr/ports}/${__i}; ${PORTSMODULESENV} ${MAKE} -B ${__target:C/all/clean all/:C/install/deinstall reinstall/:C/reinstall/deinstall reinstall/} .endfor .endfor .endif From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 06:52:25 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D34211065782; Mon, 2 Jul 2012 06:52:25 +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 BF2418FC16; Mon, 2 Jul 2012 06:52:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q626qPPI051175; Mon, 2 Jul 2012 06:52:25 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q626qPoq051172; Mon, 2 Jul 2012 06:52:25 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201207020652.q626qPoq051172@svn.freebsd.org> From: Doug Barton Date: Mon, 2 Jul 2012 06:52: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: r237964 - stable/7/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 06:52:26 -0000 Author: dougb Date: Mon Jul 2 06:52:25 2012 New Revision: 237964 URL: http://svn.freebsd.org/changeset/base/237964 Log: MFC r237958: For the ports modules building code, clean WRKDIR before building. This is important for those that use -DNO_CLEAN routinely, since it will prevent installing stale stuff, and even more important when the port is upgraded to a newer version. When the user doesn't use -DNO_CLEAN, this will create an infinitesimal amount of extra work, but won't hurt anything. This is necessary because the ports tree has flags that prevent the ususal 'update the build if newer source files exist' logic from doing what it would do in the base. Modified: stable/7/sys/conf/kern.post.mk Directory Properties: stable/7/sys/ (props changed) Modified: stable/7/sys/conf/kern.post.mk ============================================================================== --- stable/7/sys/conf/kern.post.mk Mon Jul 2 06:52:07 2012 (r237963) +++ stable/7/sys/conf/kern.post.mk Mon Jul 2 06:52:25 2012 (r237964) @@ -56,7 +56,7 @@ PORTSMODULESENV=\ ${__target}: ports-${__target} ports-${__target}: .for __i in ${PORTS_MODULES} - cd $${PORTSDIR:-/usr/ports}/${__i}; ${PORTSMODULESENV} ${MAKE} -B ${__target:C/install/deinstall reinstall/:C/reinstall/deinstall reinstall/} + cd $${PORTSDIR:-/usr/ports}/${__i}; ${PORTSMODULESENV} ${MAKE} -B ${__target:C/all/clean all/:C/install/deinstall reinstall/:C/reinstall/deinstall reinstall/} .endfor .endfor .endif From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 06:58:11 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 801EE106566B; Mon, 2 Jul 2012 06:58:11 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 520DC8FC0A; Mon, 2 Jul 2012 06:58:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q626wBEe051777; Mon, 2 Jul 2012 06:58:11 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q626wBXw051775; Mon, 2 Jul 2012 06:58:11 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201207020658.q626wBXw051775@svn.freebsd.org> From: Christian Brueffer Date: Mon, 2 Jul 2012 06:58: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: r237965 - stable/8/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 06:58:11 -0000 Author: brueffer Date: Mon Jul 2 06:58:10 2012 New Revision: 237965 URL: http://svn.freebsd.org/changeset/base/237965 Log: MFC: r233648 (by eadler), r237836 Remove trailing whitespace per mdoc lint warning mps(4) is endian safe as of r237877. Modified: stable/8/share/man/man4/mps.4 Directory Properties: stable/8/share/man/man4/ (props changed) Modified: stable/8/share/man/man4/mps.4 ============================================================================== --- stable/8/share/man/man4/mps.4 Mon Jul 2 06:52:25 2012 (r237964) +++ stable/8/share/man/man4/mps.4 Mon Jul 2 06:58:10 2012 (r237965) @@ -1,7 +1,7 @@ -.\" +.\" .\" Copyright (c) 2010 Spectra Logic Corporation .\" All rights reserved. -.\" +.\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: @@ -13,7 +13,7 @@ .\" ("Disclaimer") and any redistribution must be conditioned upon .\" including a substantially similar Disclaimer requirement for further .\" binary redistribution. -.\" +.\" .\" NO WARRANTY .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS .\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT @@ -26,7 +26,7 @@ .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING .\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGES. -.\" +.\" .\" mps driver man page. .\" .\" Author: Ken Merry @@ -34,7 +34,7 @@ .\" $Id: //depot/SpectraBSD/head/share/man/man4/mps.4#6 $ .\" $FreeBSD$ .\" -.Dd February 7, 2012 +.Dd June 30, 2012 .Dt MPS 4 .Os .Sh NAME @@ -117,7 +117,7 @@ dev.mps.X.disable_msix=1 .Ed .Pp To set the maximum number of DMA chains allocated for all adapters, -set the following variable in +set the following variable in .Xr loader.conf 5 : .Bd -literal -offset indent hw.mps.max_chains=NNNN @@ -205,9 +205,6 @@ This man page was written by This driver has a couple of known shortcomings: .Bl -bullet -compact .It -Not endian safe. -It only works on little endian machines (e.g. amd64 and i386). -.It No userland utility available (e.g. .Xr mptutil 8 ) . .It From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 07:01:42 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 87F74106566C; Mon, 2 Jul 2012 07:01:42 +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 71EA78FC0C; Mon, 2 Jul 2012 07:01:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6271gQ9052252; Mon, 2 Jul 2012 07:01:42 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6271g5E052249; Mon, 2 Jul 2012 07:01:42 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201207020701.q6271g5E052249@svn.freebsd.org> From: Alan Cox Date: Mon, 2 Jul 2012 07:01:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237966 - in stable/9/sys: amd64/amd64 i386/i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 07:01:42 -0000 Author: alc Date: Mon Jul 2 07:01:41 2012 New Revision: 237966 URL: http://svn.freebsd.org/changeset/base/237966 Log: MFC r235695, r236158, r236190, r236494 Replace all uses of the vm page queues lock by a r/w lock that is private to this pmap.c. Modified: stable/9/sys/amd64/amd64/pmap.c stable/9/sys/i386/i386/pmap.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/amd64/amd64/pmap.c ============================================================================== --- stable/9/sys/amd64/amd64/pmap.c Mon Jul 2 06:58:10 2012 (r237965) +++ stable/9/sys/amd64/amd64/pmap.c Mon Jul 2 07:01:41 2012 (r237966) @@ -117,6 +117,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -199,6 +200,17 @@ static u_int64_t DMPDphys; /* phys addr static u_int64_t DMPDPphys; /* phys addr of direct mapped level 3 */ /* + * Isolate the global pv list lock from data and other locks to prevent false + * sharing within the cache. + */ +static struct { + struct rwlock lock; + char padding[CACHE_LINE_SIZE - sizeof(struct rwlock)]; +} pvh_global __aligned(CACHE_LINE_SIZE); + +#define pvh_global_lock pvh_global.lock + +/* * Data for the pv entry allocation mechanism */ static TAILQ_HEAD(pch, pv_chunk) pv_chunks = TAILQ_HEAD_INITIALIZER(pv_chunks); @@ -582,6 +594,11 @@ pmap_bootstrap(vm_paddr_t *firstaddr) CPU_FILL(&kernel_pmap->pm_active); /* don't allow deactivation */ TAILQ_INIT(&kernel_pmap->pm_pvchunk); + /* + * Initialize the global pv list lock. + */ + rw_init(&pvh_global_lock, "pvh global"); + /* * Reserve some special page table entries/VA space for temporary * mapping of pages. @@ -1652,9 +1669,9 @@ _pmap_allocpte(pmap_t pmap, vm_pindex_t VM_ALLOC_WIRED | VM_ALLOC_ZERO)) == NULL) { if (flags & M_WAITOK) { PMAP_UNLOCK(pmap); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); VM_WAIT; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); PMAP_LOCK(pmap); } @@ -2056,7 +2073,7 @@ pmap_pv_reclaim(pmap_t locked_pmap) uint64_t inuse, freemask; int bit, field, freed; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); PMAP_LOCK_ASSERT(locked_pmap, MA_OWNED); pmap = NULL; free = m_pc = NULL; @@ -2171,7 +2188,7 @@ free_pv_entry(pmap_t pmap, pv_entry_t pv struct pv_chunk *pc; int idx, field, bit; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); PMAP_LOCK_ASSERT(pmap, MA_OWNED); PV_STAT(pv_entry_frees++); PV_STAT(pv_entry_spare++); @@ -2222,8 +2239,8 @@ get_pv_entry(pmap_t pmap, boolean_t try) struct pv_chunk *pc; vm_page_t m; + rw_assert(&pvh_global_lock, RA_WLOCKED); PMAP_LOCK_ASSERT(pmap, MA_OWNED); - mtx_assert(&vm_page_queue_mtx, MA_OWNED); PV_STAT(pv_entry_allocs++); retry: pc = TAILQ_FIRST(&pmap->pm_pvchunk); @@ -2292,7 +2309,7 @@ pmap_pvh_remove(struct md_page *pvh, pma { pv_entry_t pv; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); TAILQ_FOREACH(pv, &pvh->pv_list, pv_list) { if (pmap == PV_PMAP(pv) && va == pv->pv_va) { TAILQ_REMOVE(&pvh->pv_list, pv, pv_list); @@ -2315,7 +2332,7 @@ pmap_pv_demote_pde(pmap_t pmap, vm_offse vm_offset_t va_last; vm_page_t m; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); KASSERT((pa & PDRMASK) == 0, ("pmap_pv_demote_pde: pa is not 2mpage aligned")); @@ -2353,7 +2370,7 @@ pmap_pv_promote_pde(pmap_t pmap, vm_offs vm_offset_t va_last; vm_page_t m; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); KASSERT((pa & PDRMASK) == 0, ("pmap_pv_promote_pde: pa is not 2mpage aligned")); @@ -2399,7 +2416,7 @@ pmap_remove_entry(pmap_t pmap, vm_page_t { struct md_page *pvh; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); pmap_pvh_free(&m->md, pmap, va); if (TAILQ_EMPTY(&m->md.pv_list) && (m->flags & PG_FICTITIOUS) == 0) { pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); @@ -2417,8 +2434,8 @@ pmap_insert_entry(pmap_t pmap, vm_offset { pv_entry_t pv; + rw_assert(&pvh_global_lock, RA_WLOCKED); PMAP_LOCK_ASSERT(pmap, MA_OWNED); - mtx_assert(&vm_page_queue_mtx, MA_OWNED); pv = get_pv_entry(pmap, FALSE); pv->pv_va = va; TAILQ_INSERT_TAIL(&m->md.pv_list, pv, pv_list); @@ -2432,8 +2449,8 @@ pmap_try_insert_pv_entry(pmap_t pmap, vm { pv_entry_t pv; + rw_assert(&pvh_global_lock, RA_WLOCKED); PMAP_LOCK_ASSERT(pmap, MA_OWNED); - mtx_assert(&vm_page_queue_mtx, MA_OWNED); if ((pv = get_pv_entry(pmap, TRUE)) != NULL) { pv->pv_va = va; TAILQ_INSERT_TAIL(&m->md.pv_list, pv, pv_list); @@ -2451,7 +2468,7 @@ pmap_pv_insert_pde(pmap_t pmap, vm_offse struct md_page *pvh; pv_entry_t pv; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); if ((pv = get_pv_entry(pmap, TRUE)) != NULL) { pv->pv_va = va; pvh = pa_to_pvh(pa); @@ -2719,7 +2736,7 @@ pmap_remove(pmap_t pmap, vm_offset_t sva anyvalid = 0; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); PMAP_LOCK(pmap); /* @@ -2829,7 +2846,7 @@ pmap_remove(pmap_t pmap, vm_offset_t sva out: if (anyvalid) pmap_invalidate_all(pmap); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); PMAP_UNLOCK(pmap); pmap_free_zero_pages(free); } @@ -2861,7 +2878,7 @@ pmap_remove_all(vm_page_t m) KASSERT((m->oflags & VPO_UNMANAGED) == 0, ("pmap_remove_all: page %p is not managed", m)); free = NULL; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); if ((m->flags & PG_FICTITIOUS) != 0) goto small_mappings; pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); @@ -2900,7 +2917,7 @@ small_mappings: PMAP_UNLOCK(pmap); } vm_page_aflag_clear(m, PGA_WRITEABLE); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); pmap_free_zero_pages(free); } @@ -3022,12 +3039,12 @@ resume: } else { if (!pv_lists_locked) { pv_lists_locked = TRUE; - if (!mtx_trylock(&vm_page_queue_mtx)) { + if (!rw_try_wlock(&pvh_global_lock)) { if (anychanged) pmap_invalidate_all( pmap); PMAP_UNLOCK(pmap); - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); goto resume; } } @@ -3078,7 +3095,7 @@ retry: if (anychanged) pmap_invalidate_all(pmap); if (pv_lists_locked) - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); PMAP_UNLOCK(pmap); } @@ -3233,7 +3250,7 @@ pmap_enter(pmap_t pmap, vm_offset_t va, mpte = NULL; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); PMAP_LOCK(pmap); /* @@ -3389,7 +3406,7 @@ validate: vm_reserv_level_iffullpop(m) == 0) pmap_promote_pde(pmap, pde, va); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); PMAP_UNLOCK(pmap); } @@ -3405,7 +3422,7 @@ pmap_enter_pde(pmap_t pmap, vm_offset_t pd_entry_t *pde, newpde; vm_page_t free, mpde; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); PMAP_LOCK_ASSERT(pmap, MA_OWNED); if ((mpde = pmap_allocpde(pmap, va, M_NOWAIT)) == NULL) { CTR2(KTR_PMAP, "pmap_enter_pde: failure for va %#lx" @@ -3486,7 +3503,7 @@ pmap_enter_object(pmap_t pmap, vm_offset psize = atop(end - start); mpte = NULL; m = m_start; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); PMAP_LOCK(pmap); while (m != NULL && (diff = m->pindex - m_start->pindex) < psize) { va = start + ptoa(diff); @@ -3500,7 +3517,7 @@ pmap_enter_object(pmap_t pmap, vm_offset mpte); m = TAILQ_NEXT(m, listq); } - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); PMAP_UNLOCK(pmap); } @@ -3517,10 +3534,10 @@ void pmap_enter_quick(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot) { - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); PMAP_LOCK(pmap); (void)pmap_enter_quick_locked(pmap, va, m, prot, NULL); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); PMAP_UNLOCK(pmap); } @@ -3535,7 +3552,7 @@ pmap_enter_quick_locked(pmap_t pmap, vm_ KASSERT(va < kmi.clean_sva || va >= kmi.clean_eva || (m->oflags & VPO_UNMANAGED) != 0, ("pmap_enter_quick_locked: managed mapping within the clean submap")); - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); PMAP_LOCK_ASSERT(pmap, MA_OWNED); /* @@ -3754,9 +3771,9 @@ retry: if (!wired != ((*pde & PG_W) == 0)) { if (!are_queues_locked) { are_queues_locked = TRUE; - if (!mtx_trylock(&vm_page_queue_mtx)) { + if (!rw_try_wlock(&pvh_global_lock)) { PMAP_UNLOCK(pmap); - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); goto retry; } } @@ -3775,7 +3792,7 @@ retry: } out: if (are_queues_locked) - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); PMAP_UNLOCK(pmap); } @@ -3799,7 +3816,7 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pm if (dst_addr != src_addr) return; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); if (dst_pmap < src_pmap) { PMAP_LOCK(dst_pmap); PMAP_LOCK(src_pmap); @@ -3915,7 +3932,7 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pm } } out: - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); PMAP_UNLOCK(src_pmap); PMAP_UNLOCK(dst_pmap); } @@ -3996,7 +4013,7 @@ pmap_page_exists_quick(pmap_t pmap, vm_p KASSERT((m->oflags & VPO_UNMANAGED) == 0, ("pmap_page_exists_quick: page %p is not managed", m)); rv = FALSE; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { if (PV_PMAP(pv) == pmap) { rv = TRUE; @@ -4018,7 +4035,7 @@ pmap_page_exists_quick(pmap_t pmap, vm_p break; } } - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); return (rv); } @@ -4036,13 +4053,13 @@ pmap_page_wired_mappings(vm_page_t m) count = 0; if ((m->oflags & VPO_UNMANAGED) != 0) return (count); - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); count = pmap_pvh_wired_mappings(&m->md, count); if ((m->flags & PG_FICTITIOUS) == 0) { count = pmap_pvh_wired_mappings(pa_to_pvh(VM_PAGE_TO_PHYS(m)), count); } - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); return (count); } @@ -4058,7 +4075,7 @@ pmap_pvh_wired_mappings(struct md_page * pt_entry_t *pte; pv_entry_t pv; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); TAILQ_FOREACH(pv, &pvh->pv_list, pv_list) { pmap = PV_PMAP(pv); PMAP_LOCK(pmap); @@ -4081,11 +4098,11 @@ pmap_page_is_mapped(vm_page_t m) if ((m->oflags & VPO_UNMANAGED) != 0) return (FALSE); - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); rv = !TAILQ_EMPTY(&m->md.pv_list) || ((m->flags & PG_FICTITIOUS) == 0 && !TAILQ_EMPTY(&pa_to_pvh(VM_PAGE_TO_PHYS(m))->pv_list)); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); return (rv); } @@ -4116,7 +4133,7 @@ pmap_remove_pages(pmap_t pmap) printf("warning: pmap_remove_pages called with non-current pmap\n"); return; } - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); PMAP_LOCK(pmap); TAILQ_FOREACH_SAFE(pc, &pmap->pm_pvchunk, pc_list, npc) { allfree = 1; @@ -4220,7 +4237,7 @@ pmap_remove_pages(pmap_t pmap) } } pmap_invalidate_all(pmap); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); PMAP_UNLOCK(pmap); pmap_free_zero_pages(free); } @@ -4248,11 +4265,11 @@ pmap_is_modified(vm_page_t m) if ((m->oflags & VPO_BUSY) == 0 && (m->aflags & PGA_WRITEABLE) == 0) return (FALSE); - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); rv = pmap_is_modified_pvh(&m->md) || ((m->flags & PG_FICTITIOUS) == 0 && pmap_is_modified_pvh(pa_to_pvh(VM_PAGE_TO_PHYS(m)))); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); return (rv); } @@ -4269,7 +4286,7 @@ pmap_is_modified_pvh(struct md_page *pvh pmap_t pmap; boolean_t rv; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); rv = FALSE; TAILQ_FOREACH(pv, &pvh->pv_list, pv_list) { pmap = PV_PMAP(pv); @@ -4320,11 +4337,11 @@ pmap_is_referenced(vm_page_t m) KASSERT((m->oflags & VPO_UNMANAGED) == 0, ("pmap_is_referenced: page %p is not managed", m)); - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); rv = pmap_is_referenced_pvh(&m->md) || ((m->flags & PG_FICTITIOUS) == 0 && pmap_is_referenced_pvh(pa_to_pvh(VM_PAGE_TO_PHYS(m)))); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); return (rv); } @@ -4340,7 +4357,7 @@ pmap_is_referenced_pvh(struct md_page *p pmap_t pmap; boolean_t rv; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); rv = FALSE; TAILQ_FOREACH(pv, &pvh->pv_list, pv_list) { pmap = PV_PMAP(pv); @@ -4379,7 +4396,7 @@ pmap_remove_write(vm_page_t m) if ((m->oflags & VPO_BUSY) == 0 && (m->aflags & PGA_WRITEABLE) == 0) return; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); if ((m->flags & PG_FICTITIOUS) != 0) goto small_mappings; pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); @@ -4413,7 +4430,7 @@ retry: PMAP_UNLOCK(pmap); } vm_page_aflag_clear(m, PGA_WRITEABLE); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); } /* @@ -4441,7 +4458,7 @@ pmap_ts_referenced(vm_page_t m) KASSERT((m->oflags & VPO_UNMANAGED) == 0, ("pmap_ts_referenced: page %p is not managed", m)); - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); if ((m->flags & PG_FICTITIOUS) != 0) goto small_mappings; pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); @@ -4499,7 +4516,7 @@ small_mappings: } while ((pv = pvn) != NULL && pv != pvf); } out: - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); return (rtval); } @@ -4529,7 +4546,7 @@ pmap_clear_modify(vm_page_t m) */ if ((m->aflags & PGA_WRITEABLE) == 0) return; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); if ((m->flags & PG_FICTITIOUS) != 0) goto small_mappings; pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); @@ -4578,7 +4595,7 @@ small_mappings: } PMAP_UNLOCK(pmap); } - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); } /* @@ -4598,7 +4615,7 @@ pmap_clear_reference(vm_page_t m) KASSERT((m->oflags & VPO_UNMANAGED) == 0, ("pmap_clear_reference: page %p is not managed", m)); - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); if ((m->flags & PG_FICTITIOUS) != 0) goto small_mappings; pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); @@ -4638,7 +4655,7 @@ small_mappings: } PMAP_UNLOCK(pmap); } - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); } /* Modified: stable/9/sys/i386/i386/pmap.c ============================================================================== --- stable/9/sys/i386/i386/pmap.c Mon Jul 2 06:58:10 2012 (r237965) +++ stable/9/sys/i386/i386/pmap.c Mon Jul 2 07:01:41 2012 (r237966) @@ -118,6 +118,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -231,6 +232,17 @@ SYSCTL_INT(_vm_pmap, OID_AUTO, pg_ps_ena static int pat_index[PAT_INDEX_SIZE]; /* cache mode to PAT index conversion */ /* + * Isolate the global pv list lock from data and other locks to prevent false + * sharing within the cache. + */ +static struct { + struct rwlock lock; + char padding[CACHE_LINE_SIZE - sizeof(struct rwlock)]; +} pvh_global __aligned(CACHE_LINE_SIZE); + +#define pvh_global_lock pvh_global.lock + +/* * Data for the pv entry allocation mechanism */ static TAILQ_HEAD(pch, pv_chunk) pv_chunks = TAILQ_HEAD_INITIALIZER(pv_chunks); @@ -393,6 +405,12 @@ pmap_bootstrap(vm_paddr_t firstaddr) kernel_pmap->pm_root = NULL; CPU_FILL(&kernel_pmap->pm_active); /* don't allow deactivation */ TAILQ_INIT(&kernel_pmap->pm_pvchunk); + + /* + * Initialize the global pv list lock. + */ + rw_init(&pvh_global_lock, "pvh global"); + LIST_INIT(&allpmaps); /* @@ -1277,7 +1295,7 @@ invlcaddr(void *caddr) * scans are across different pmaps. It is very wasteful * to do an entire invltlb for checking a single mapping. * - * If the given pmap is not the current pmap, vm_page_queue_mtx + * If the given pmap is not the current pmap, pvh_global_lock * must be held and curthread pinned to a CPU. */ static pt_entry_t * @@ -1293,7 +1311,7 @@ pmap_pte_quick(pmap_t pmap, vm_offset_t /* are we current address space or kernel? */ if (pmap_is_current(pmap)) return (vtopte(va)); - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); KASSERT(curthread->td_pinned > 0, ("curthread not pinned")); newpf = *pde & PG_FRAME; if ((*PMAP1 & PG_FRAME) != newpf) { @@ -1842,9 +1860,9 @@ _pmap_allocpte(pmap_t pmap, u_int ptepin VM_ALLOC_WIRED | VM_ALLOC_ZERO)) == NULL) { if (flags & M_WAITOK) { PMAP_UNLOCK(pmap); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); VM_WAIT; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); PMAP_LOCK(pmap); } @@ -2339,7 +2357,7 @@ free_pv_entry(pmap_t pmap, pv_entry_t pv struct pv_chunk *pc; int idx, field, bit; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); PMAP_LOCK_ASSERT(pmap, MA_OWNED); PV_STAT(pv_entry_frees++); PV_STAT(pv_entry_spare++); @@ -2390,8 +2408,8 @@ get_pv_entry(pmap_t pmap, boolean_t try) struct pv_chunk *pc; vm_page_t m; + rw_assert(&pvh_global_lock, RA_WLOCKED); PMAP_LOCK_ASSERT(pmap, MA_OWNED); - mtx_assert(&vm_page_queue_mtx, MA_OWNED); PV_STAT(pv_entry_allocs++); pv_entry_count++; if (pv_entry_count > pv_entry_high_water) @@ -2428,8 +2446,8 @@ retry: } } /* - * Access to the ptelist "pv_vafree" is synchronized by the page - * queues lock. If "pv_vafree" is currently non-empty, it will + * Access to the ptelist "pv_vafree" is synchronized by the pvh + * global lock. If "pv_vafree" is currently non-empty, it will * remain non-empty until pmap_ptelist_alloc() completes. */ if (pv_vafree == 0 || (m = vm_page_alloc(NULL, 0, VM_ALLOC_NORMAL | @@ -2463,7 +2481,7 @@ pmap_pvh_remove(struct md_page *pvh, pma { pv_entry_t pv; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); TAILQ_FOREACH(pv, &pvh->pv_list, pv_list) { if (pmap == PV_PMAP(pv) && va == pv->pv_va) { TAILQ_REMOVE(&pvh->pv_list, pv, pv_list); @@ -2481,7 +2499,7 @@ pmap_pv_demote_pde(pmap_t pmap, vm_offse vm_offset_t va_last; vm_page_t m; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); KASSERT((pa & PDRMASK) == 0, ("pmap_pv_demote_pde: pa is not 4mpage aligned")); @@ -2514,7 +2532,7 @@ pmap_pv_promote_pde(pmap_t pmap, vm_offs vm_offset_t va_last; vm_page_t m; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); KASSERT((pa & PDRMASK) == 0, ("pmap_pv_promote_pde: pa is not 4mpage aligned")); @@ -2555,7 +2573,7 @@ pmap_remove_entry(pmap_t pmap, vm_page_t { struct md_page *pvh; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); pmap_pvh_free(&m->md, pmap, va); if (TAILQ_EMPTY(&m->md.pv_list) && (m->flags & PG_FICTITIOUS) == 0) { pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); @@ -2573,8 +2591,8 @@ pmap_insert_entry(pmap_t pmap, vm_offset { pv_entry_t pv; + rw_assert(&pvh_global_lock, RA_WLOCKED); PMAP_LOCK_ASSERT(pmap, MA_OWNED); - mtx_assert(&vm_page_queue_mtx, MA_OWNED); pv = get_pv_entry(pmap, FALSE); pv->pv_va = va; TAILQ_INSERT_TAIL(&m->md.pv_list, pv, pv_list); @@ -2588,8 +2606,8 @@ pmap_try_insert_pv_entry(pmap_t pmap, vm { pv_entry_t pv; + rw_assert(&pvh_global_lock, RA_WLOCKED); PMAP_LOCK_ASSERT(pmap, MA_OWNED); - mtx_assert(&vm_page_queue_mtx, MA_OWNED); if (pv_entry_count < pv_entry_high_water && (pv = get_pv_entry(pmap, TRUE)) != NULL) { pv->pv_va = va; @@ -2608,7 +2626,7 @@ pmap_pv_insert_pde(pmap_t pmap, vm_offse struct md_page *pvh; pv_entry_t pv; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); if (pv_entry_count < pv_entry_high_water && (pv = get_pv_entry(pmap, TRUE)) != NULL) { pv->pv_va = va; @@ -2686,7 +2704,7 @@ pmap_demote_pde(pmap_t pmap, pd_entry_t */ if (va >= KERNBASE) firstpte = &KPTmap[i386_btop(trunc_4mpage(va))]; - else if (curthread->td_pinned > 0 && mtx_owned(&vm_page_queue_mtx)) { + else if (curthread->td_pinned > 0 && rw_wowned(&pvh_global_lock)) { if ((*PMAP1 & PG_FRAME) != mptepa) { *PMAP1 = mptepa | PG_RW | PG_V | PG_A | PG_M; #ifdef SMP @@ -2845,7 +2863,7 @@ pmap_remove_pte(pmap_t pmap, pt_entry_t pt_entry_t oldpte; vm_page_t m; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); PMAP_LOCK_ASSERT(pmap, MA_OWNED); oldpte = pte_load_clear(ptq); if (oldpte & PG_W) @@ -2876,7 +2894,7 @@ pmap_remove_page(pmap_t pmap, vm_offset_ { pt_entry_t *pte; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); KASSERT(curthread->td_pinned > 0, ("curthread not pinned")); PMAP_LOCK_ASSERT(pmap, MA_OWNED); if ((pte = pmap_pte_quick(pmap, va)) == NULL || *pte == 0) @@ -2908,7 +2926,7 @@ pmap_remove(pmap_t pmap, vm_offset_t sva anyvalid = 0; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); sched_pin(); PMAP_LOCK(pmap); @@ -2997,7 +3015,7 @@ out: sched_unpin(); if (anyvalid) pmap_invalidate_all(pmap); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); PMAP_UNLOCK(pmap); pmap_free_zero_pages(free); } @@ -3029,7 +3047,7 @@ pmap_remove_all(vm_page_t m) KASSERT((m->oflags & VPO_UNMANAGED) == 0, ("pmap_remove_all: page %p is not managed", m)); free = NULL; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); sched_pin(); if ((m->flags & PG_FICTITIOUS) != 0) goto small_mappings; @@ -3070,7 +3088,7 @@ small_mappings: } vm_page_aflag_clear(m, PGA_WRITEABLE); sched_unpin(); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); pmap_free_zero_pages(free); } @@ -3146,7 +3164,7 @@ pmap_protect(pmap_t pmap, vm_offset_t sv else { pv_lists_locked = TRUE; resume: - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); sched_pin(); } anychanged = FALSE; @@ -3190,7 +3208,7 @@ resume: } else { if (!pv_lists_locked) { pv_lists_locked = TRUE; - if (!mtx_trylock(&vm_page_queue_mtx)) { + if (!rw_try_wlock(&pvh_global_lock)) { if (anychanged) pmap_invalidate_all( pmap); @@ -3259,7 +3277,7 @@ retry: pmap_invalidate_all(pmap); if (pv_lists_locked) { sched_unpin(); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); } PMAP_UNLOCK(pmap); } @@ -3430,7 +3448,7 @@ pmap_enter(pmap_t pmap, vm_offset_t va, mpte = NULL; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); PMAP_LOCK(pmap); sched_pin(); @@ -3600,7 +3618,7 @@ validate: pmap_promote_pde(pmap, pde, va); sched_unpin(); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); PMAP_UNLOCK(pmap); } @@ -3615,7 +3633,7 @@ pmap_enter_pde(pmap_t pmap, vm_offset_t { pd_entry_t *pde, newpde; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); PMAP_LOCK_ASSERT(pmap, MA_OWNED); pde = pmap_pde(pmap, va); if (*pde != 0) { @@ -3684,7 +3702,7 @@ pmap_enter_object(pmap_t pmap, vm_offset psize = atop(end - start); mpte = NULL; m = m_start; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); PMAP_LOCK(pmap); while (m != NULL && (diff = m->pindex - m_start->pindex) < psize) { va = start + ptoa(diff); @@ -3698,7 +3716,7 @@ pmap_enter_object(pmap_t pmap, vm_offset mpte); m = TAILQ_NEXT(m, listq); } - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); PMAP_UNLOCK(pmap); } @@ -3715,10 +3733,10 @@ void pmap_enter_quick(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot) { - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); PMAP_LOCK(pmap); (void)pmap_enter_quick_locked(pmap, va, m, prot, NULL); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); PMAP_UNLOCK(pmap); } @@ -3733,7 +3751,7 @@ pmap_enter_quick_locked(pmap_t pmap, vm_ KASSERT(va < kmi.clean_sva || va >= kmi.clean_eva || (m->oflags & VPO_UNMANAGED) != 0, ("pmap_enter_quick_locked: managed mapping within the clean submap")); - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); PMAP_LOCK_ASSERT(pmap, MA_OWNED); /* @@ -3939,9 +3957,9 @@ retry: if (!wired != ((*pde & PG_W) == 0)) { if (!are_queues_locked) { are_queues_locked = TRUE; - if (!mtx_trylock(&vm_page_queue_mtx)) { + if (!rw_try_wlock(&pvh_global_lock)) { PMAP_UNLOCK(pmap); - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); goto retry; } } @@ -3965,7 +3983,7 @@ retry: pmap_pte_release(pte); out: if (are_queues_locked) - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); PMAP_UNLOCK(pmap); } @@ -3994,7 +4012,7 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pm if (!pmap_is_current(src_pmap)) return; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); if (dst_pmap < src_pmap) { PMAP_LOCK(dst_pmap); PMAP_LOCK(src_pmap); @@ -4084,7 +4102,7 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pm } out: sched_unpin(); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); PMAP_UNLOCK(src_pmap); PMAP_UNLOCK(dst_pmap); } @@ -4226,7 +4244,7 @@ pmap_page_exists_quick(pmap_t pmap, vm_p KASSERT((m->oflags & VPO_UNMANAGED) == 0, ("pmap_page_exists_quick: page %p is not managed", m)); rv = FALSE; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { if (PV_PMAP(pv) == pmap) { rv = TRUE; @@ -4248,7 +4266,7 @@ pmap_page_exists_quick(pmap_t pmap, vm_p break; } } - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); return (rv); } @@ -4266,13 +4284,13 @@ pmap_page_wired_mappings(vm_page_t m) count = 0; if ((m->oflags & VPO_UNMANAGED) != 0) return (count); - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); count = pmap_pvh_wired_mappings(&m->md, count); if ((m->flags & PG_FICTITIOUS) == 0) { count = pmap_pvh_wired_mappings(pa_to_pvh(VM_PAGE_TO_PHYS(m)), count); } - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); return (count); } @@ -4288,7 +4306,7 @@ pmap_pvh_wired_mappings(struct md_page * pt_entry_t *pte; pv_entry_t pv; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); sched_pin(); TAILQ_FOREACH(pv, &pvh->pv_list, pv_list) { pmap = PV_PMAP(pv); @@ -4313,11 +4331,11 @@ pmap_page_is_mapped(vm_page_t m) if ((m->oflags & VPO_UNMANAGED) != 0) return (FALSE); - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); rv = !TAILQ_EMPTY(&m->md.pv_list) || ((m->flags & PG_FICTITIOUS) == 0 && !TAILQ_EMPTY(&pa_to_pvh(VM_PAGE_TO_PHYS(m))->pv_list)); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); return (rv); } @@ -4347,7 +4365,7 @@ pmap_remove_pages(pmap_t pmap) printf("warning: pmap_remove_pages called with non-current pmap\n"); return; } - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); PMAP_LOCK(pmap); sched_pin(); TAILQ_FOREACH_SAFE(pc, &pmap->pm_pvchunk, pc_list, npc) { @@ -4451,7 +4469,7 @@ pmap_remove_pages(pmap_t pmap) } sched_unpin(); pmap_invalidate_all(pmap); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); PMAP_UNLOCK(pmap); pmap_free_zero_pages(free); } @@ -4479,11 +4497,11 @@ pmap_is_modified(vm_page_t m) if ((m->oflags & VPO_BUSY) == 0 && (m->aflags & PGA_WRITEABLE) == 0) return (FALSE); - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); rv = pmap_is_modified_pvh(&m->md) || ((m->flags & PG_FICTITIOUS) == 0 && pmap_is_modified_pvh(pa_to_pvh(VM_PAGE_TO_PHYS(m)))); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); return (rv); } @@ -4500,7 +4518,7 @@ pmap_is_modified_pvh(struct md_page *pvh pmap_t pmap; boolean_t rv; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); rv = FALSE; sched_pin(); TAILQ_FOREACH(pv, &pvh->pv_list, pv_list) { @@ -4553,11 +4571,11 @@ pmap_is_referenced(vm_page_t m) KASSERT((m->oflags & VPO_UNMANAGED) == 0, ("pmap_is_referenced: page %p is not managed", m)); - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); rv = pmap_is_referenced_pvh(&m->md) || ((m->flags & PG_FICTITIOUS) == 0 && pmap_is_referenced_pvh(pa_to_pvh(VM_PAGE_TO_PHYS(m)))); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); return (rv); } @@ -4573,7 +4591,7 @@ pmap_is_referenced_pvh(struct md_page *p pmap_t pmap; boolean_t rv; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); rv = FALSE; sched_pin(); TAILQ_FOREACH(pv, &pvh->pv_list, pv_list) { @@ -4614,7 +4632,7 @@ pmap_remove_write(vm_page_t m) if ((m->oflags & VPO_BUSY) == 0 && (m->aflags & PGA_WRITEABLE) == 0) return; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); sched_pin(); if ((m->flags & PG_FICTITIOUS) != 0) goto small_mappings; @@ -4655,7 +4673,7 @@ retry: } vm_page_aflag_clear(m, PGA_WRITEABLE); sched_unpin(); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 07:10:34 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 89627106566B; Mon, 2 Jul 2012 07:10:34 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 74A918FC0A; Mon, 2 Jul 2012 07:10:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q627AYPL053242; Mon, 2 Jul 2012 07:10:34 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q627AY7o053240; Mon, 2 Jul 2012 07:10:34 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201207020710.q627AY7o053240@svn.freebsd.org> From: "David E. O'Brien" Date: Mon, 2 Jul 2012 07:10:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237967 - stable/9/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 07:10:34 -0000 Author: obrien Date: Mon Jul 2 07:10:33 2012 New Revision: 237967 URL: http://svn.freebsd.org/changeset/base/237967 Log: MFC: r227518: reformat comment to be more readable in standard Xterm. Modified: stable/9/sys/kern/kern_descrip.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/kern/kern_descrip.c ============================================================================== --- stable/9/sys/kern/kern_descrip.c Mon Jul 2 07:01:41 2012 (r237966) +++ stable/9/sys/kern/kern_descrip.c Mon Jul 2 07:10:33 2012 (r237967) @@ -842,12 +842,12 @@ do_dup(struct thread *td, int flags, int if (flags & DUP_FIXED) { if (new >= fdp->fd_nfiles) { /* - * The resource limits are here instead of e.g. fdalloc(), - * because the file descriptor table may be shared between - * processes, so we can't really use racct_add()/racct_sub(). - * Instead of counting the number of actually allocated - * descriptors, just put the limit on the size of the file - * descriptor table. + * The resource limits are here instead of e.g. + * fdalloc(), because the file descriptor table may be + * shared between processes, so we can't really use + * racct_add()/racct_sub(). Instead of counting the + * number of actually allocated descriptors, just put + * the limit on the size of the file descriptor table. */ #ifdef RACCT PROC_LOCK(p); @@ -1520,7 +1520,7 @@ fdalloc(struct thread *td, int minfd, in FILEDESC_XLOCK_ASSERT(fdp); if (fdp->fd_freefile > minfd) - minfd = fdp->fd_freefile; + minfd = fdp->fd_freefile; PROC_LOCK(p); maxfd = min((int)lim_cur(p, RLIMIT_NOFILE), maxfilesperproc); @@ -2252,7 +2252,7 @@ closef(struct file *fp, struct thread *t /* * Initialize the file pointer with the specified properties. - * + * * The ops are set with release semantics to be certain that the flags, type, * and data are visible when ops is. This is to prevent ops methods from being * called with bad data. @@ -3789,28 +3789,32 @@ SYSINIT(select, SI_SUB_LOCK, SI_ORDER_FI /*-------------------------------------------------------------------*/ static int -badfo_readwrite(struct file *fp, struct uio *uio, struct ucred *active_cred, int flags, struct thread *td) +badfo_readwrite(struct file *fp, struct uio *uio, struct ucred *active_cred, + int flags, struct thread *td) { return (EBADF); } static int -badfo_truncate(struct file *fp, off_t length, struct ucred *active_cred, struct thread *td) +badfo_truncate(struct file *fp, off_t length, struct ucred *active_cred, + struct thread *td) { return (EINVAL); } static int -badfo_ioctl(struct file *fp, u_long com, void *data, struct ucred *active_cred, struct thread *td) +badfo_ioctl(struct file *fp, u_long com, void *data, struct ucred *active_cred, + struct thread *td) { return (EBADF); } static int -badfo_poll(struct file *fp, int events, struct ucred *active_cred, struct thread *td) +badfo_poll(struct file *fp, int events, struct ucred *active_cred, + struct thread *td) { return (0); @@ -3824,7 +3828,8 @@ badfo_kqfilter(struct file *fp, struct k } static int -badfo_stat(struct file *fp, struct stat *sb, struct ucred *active_cred, struct thread *td) +badfo_stat(struct file *fp, struct stat *sb, struct ucred *active_cred, + struct thread *td) { return (EBADF); From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 07:11:44 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7328C1065670; Mon, 2 Jul 2012 07:11:44 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5EEE08FC14; Mon, 2 Jul 2012 07:11:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q627BiS5053412; Mon, 2 Jul 2012 07:11:44 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q627BiJv053409; Mon, 2 Jul 2012 07:11:44 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201207020711.q627BiJv053409@svn.freebsd.org> From: "David E. O'Brien" Date: Mon, 2 Jul 2012 07:11:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237968 - in stable/9: etc/mtree include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 07:11:44 -0000 Author: obrien Date: Mon Jul 2 07:11:43 2012 New Revision: 237968 URL: http://svn.freebsd.org/changeset/base/237968 Log: MFC: r237279: install filemon.h into /usr/include for userland consumption. Modified: stable/9/etc/mtree/BSD.include.dist stable/9/include/Makefile Directory Properties: stable/9/ (props changed) stable/9/etc/ (props changed) stable/9/include/ (props changed) Modified: stable/9/etc/mtree/BSD.include.dist ============================================================================== --- stable/9/etc/mtree/BSD.include.dist Mon Jul 2 07:10:33 2012 (r237967) +++ stable/9/etc/mtree/BSD.include.dist Mon Jul 2 07:11:43 2012 (r237968) @@ -102,6 +102,8 @@ .. ciss .. + filemon + .. firewire .. hwpmc Modified: stable/9/include/Makefile ============================================================================== --- stable/9/include/Makefile Mon Jul 2 07:10:33 2012 (r237967) +++ stable/9/include/Makefile Mon Jul 2 07:11:43 2012 (r237968) @@ -39,7 +39,7 @@ LDIRS= bsm cam geom net net80211 netatal sys vm LSUBDIRS= cam/ata cam/scsi \ - dev/acpica dev/an dev/bktr dev/ciss dev/firewire dev/hwpmc \ + dev/acpica dev/an dev/bktr dev/ciss dev/filemon dev/firewire dev/hwpmc \ dev/ic dev/iicbus ${_dev_ieee488} dev/io dev/lmc dev/mfi dev/ofw \ dev/pbio ${_dev_powermac_nvram} dev/ppbus dev/smbus \ dev/speaker dev/usb dev/utopia dev/vkbd dev/wi \ From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 07:14:22 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 23BB61065673; Mon, 2 Jul 2012 07:14:22 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0DE798FC15; Mon, 2 Jul 2012 07:14:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q627ELOu053740; Mon, 2 Jul 2012 07:14:21 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q627ELRs053733; Mon, 2 Jul 2012 07:14:21 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201207020714.q627ELRs053733@svn.freebsd.org> From: "David E. O'Brien" Date: Mon, 2 Jul 2012 07:14:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237969 - in stable/9/usr.sbin: pmccontrol pmcstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 07:14:22 -0000 Author: obrien Date: Mon Jul 2 07:14:21 2012 New Revision: 237969 URL: http://svn.freebsd.org/changeset/base/237969 Log: MFC: r227524: improve the grep-ability output strings. Modified: stable/9/usr.sbin/pmccontrol/pmccontrol.c stable/9/usr.sbin/pmcstat/pmcpl_calltree.c stable/9/usr.sbin/pmcstat/pmcpl_gprof.c stable/9/usr.sbin/pmcstat/pmcstat.c stable/9/usr.sbin/pmcstat/pmcstat_log.c Directory Properties: stable/9/ (props changed) stable/9/usr.sbin/ (props changed) stable/9/usr.sbin/pmccontrol/ (props changed) stable/9/usr.sbin/pmcstat/ (props changed) Modified: stable/9/usr.sbin/pmccontrol/pmccontrol.c ============================================================================== --- stable/9/usr.sbin/pmccontrol/pmccontrol.c Mon Jul 2 07:11:43 2012 (r237968) +++ stable/9/usr.sbin/pmccontrol/pmccontrol.c Mon Jul 2 07:14:21 2012 (r237969) @@ -147,8 +147,9 @@ pmcc_do_enable_disable(struct pmcc_op_li npmc = 0; for (c = 0; c < ncpu; c++) { if ((t = pmc_npmc(c)) < 0) - err(EX_OSERR, "Unable to determine the number of " - "PMCs in CPU %d", c); + err(EX_OSERR, + "Unable to determine the number of PMCs in CPU %d", + c); npmc = t > npmc ? t : npmc; } @@ -211,8 +212,8 @@ pmcc_do_enable_disable(struct pmcc_op_li if (error < 0) err(EX_OSERR, "%s of PMC %d on CPU %d failed", - b == PMCC_OP_ENABLE ? "Enable" : - "Disable", j, i); + b == PMCC_OP_ENABLE ? "Enable" : "Disable", + j, i); } return error; @@ -308,8 +309,9 @@ pmcc_do_list_events(void) printf("%s\n", pmc_name_of_class(c)); if (pmc_event_names_of_class(c, &eventnamelist, &nevents) < 0) - err(EX_OSERR, "ERROR: Cannot find information for " - "event class \"%s\"", pmc_name_of_class(c)); + err(EX_OSERR, +"ERROR: Cannot find information for event class \"%s\"", + pmc_name_of_class(c)); for (j = 0; j < nevents; j++) printf("\t%s\n", eventnamelist[j]); @@ -481,7 +483,8 @@ main(int argc, char **argv) break; case PMCC_ENABLE_DISABLE: if (STAILQ_EMPTY(&head)) - errx(EX_USAGE, "No PMCs specified to enable or disable"); + errx(EX_USAGE, + "No PMCs specified to enable or disable"); error = pmcc_do_enable_disable(&head); break; default: Modified: stable/9/usr.sbin/pmcstat/pmcpl_calltree.c ============================================================================== --- stable/9/usr.sbin/pmcstat/pmcpl_calltree.c Mon Jul 2 07:11:43 2012 (r237968) +++ stable/9/usr.sbin/pmcstat/pmcpl_calltree.c Mon Jul 2 07:14:21 2012 (r237969) @@ -587,7 +587,8 @@ pmcpl_ct_topkeypress(int c, WINDOW *w) switch (c) { case 'f': pmcstat_skiplink = !pmcstat_skiplink; - wprintw(w, "skip empty link %s", pmcstat_skiplink ? "on" : "off"); + wprintw(w, "skip empty link %s", + pmcstat_skiplink ? "on" : "off"); break; } Modified: stable/9/usr.sbin/pmcstat/pmcpl_gprof.c ============================================================================== --- stable/9/usr.sbin/pmcstat/pmcpl_gprof.c Mon Jul 2 07:11:43 2012 (r237968) +++ stable/9/usr.sbin/pmcstat/pmcpl_gprof.c Mon Jul 2 07:14:21 2012 (r237969) @@ -333,8 +333,9 @@ pmcpl_gmon_initimage(struct pmcstat_imag count = 0; do { if (++count > 999) - errx(EX_CANTCREAT, "ERROR: cannot create a " - "gmon file for \"%s\"", name); + errx(EX_CANTCREAT, + "ERROR: cannot create a gmon file for" + " \"%s\"", name); snprintf(name, sizeof(name), "%.*s~%3.3d.gmon", nlen, sn, count); if (pmcstat_string_lookup(name) == NULL) { @@ -516,8 +517,8 @@ pmcpl_gmon_shutdown(FILE *mf) pgf->pgf_pmcid), pgf->pgf_nsamples); if (pgf->pgf_overflow && args.pa_verbosity >= 1) - warnx("WARNING: profile \"%s\" " - "overflowed.", + warnx( +"WARNING: profile \"%s\" overflowed.", pmcstat_string_unintern( pgf->pgf_name)); } Modified: stable/9/usr.sbin/pmcstat/pmcstat.c ============================================================================== --- stable/9/usr.sbin/pmcstat/pmcstat.c Mon Jul 2 07:11:43 2012 (r237968) +++ stable/9/usr.sbin/pmcstat/pmcstat.c Mon Jul 2 07:14:21 2012 (r237969) @@ -156,8 +156,9 @@ pmcstat_get_cpumask(const char *cpuspec, do { cpu = strtol(s, &end, 0); if (cpu < 0 || end == s) - errx(EX_USAGE, "ERROR: Illegal CPU specification " - "\"%s\".", cpuspec); + errx(EX_USAGE, + "ERROR: Illegal CPU specification \"%s\".", + cpuspec); CPU_SET(cpu, cpumask); s = end + strspn(end, ", \t"); } while (*s); @@ -179,9 +180,9 @@ pmcstat_attach_pmcs(void) if (pmc_attach(ev->ev_pmcid, pt->pt_pid) == 0) count++; else if (errno != ESRCH) - err(EX_OSERR, "ERROR: cannot attach pmc " - "\"%s\" to process %d", ev->ev_name, - (int) pt->pt_pid); + err(EX_OSERR, +"ERROR: cannot attach pmc \"%s\" to process %d", + ev->ev_name, (int)pt->pt_pid); } if (count == 0) @@ -198,11 +199,11 @@ pmcstat_cleanup(void) STAILQ_FOREACH_SAFE(ev, &args.pa_events, ev_next, tmp) if (ev->ev_pmcid != PMC_ID_INVALID) { if (pmc_stop(ev->ev_pmcid) < 0) - err(EX_OSERR, "ERROR: cannot stop pmc 0x%x " - "\"%s\"", ev->ev_pmcid, ev->ev_name); + err(EX_OSERR, "ERROR: cannot stop pmc 0x%x \"%s\"", + ev->ev_pmcid, ev->ev_name); if (pmc_release(ev->ev_pmcid) < 0) - err(EX_OSERR, "ERROR: cannot release pmc " - "0x%x \"%s\"", ev->ev_pmcid, ev->ev_name); + err(EX_OSERR, "ERROR: cannot release pmc 0x%x \"%s\"", + ev->ev_pmcid, ev->ev_name); free(ev->ev_name); free(ev->ev_spec); STAILQ_REMOVE(&args.pa_events, ev, pmcstat_ev, ev_next); @@ -424,8 +425,8 @@ pmcstat_print_counters(void) continue; if (pmc_read(ev->ev_pmcid, &value) < 0) - err(EX_OSERR, "ERROR: Cannot read pmc " - "\"%s\"", ev->ev_name); + err(EX_OSERR, "ERROR: Cannot read pmc \"%s\"", + ev->ev_name); (void) fprintf(args.pa_printfile, "%*ju ", ev->ev_fieldwidth + extra_width, @@ -641,8 +642,9 @@ main(int argc, char **argv) err(EX_OSERR, "ERROR: Cannot stat \"%s\"", optarg); if (!S_ISDIR(sb.st_mode)) - errx(EX_USAGE, "ERROR: \"%s\" is not a " - "directory.", optarg); + errx(EX_USAGE, + "ERROR: \"%s\" is not a directory.", + optarg); args.pa_samplesdir = optarg; args.pa_flags |= FLAG_HAS_SAMPLESDIR; args.pa_required |= FLAG_DO_GPROF; @@ -801,15 +803,16 @@ main(int argc, char **argv) args.pa_printfile != stderr) (void) fclose(args.pa_printfile); if ((args.pa_printfile = fopen(optarg, "w")) == NULL) - errx(EX_OSERR, "ERROR: cannot open \"%s\" for " - "writing.", optarg); + errx(EX_OSERR, + "ERROR: cannot open \"%s\" for writing.", + optarg); args.pa_flags |= FLAG_DO_PRINT; break; case 'O': /* sampling output */ if (args.pa_outputpath) - errx(EX_USAGE, "ERROR: option -O may only be " - "specified once."); + errx(EX_USAGE, +"ERROR: option -O may only be specified once."); args.pa_outputpath = optarg; args.pa_flags |= FLAG_HAS_OUTPUT_LOGFILE; break; @@ -824,8 +827,8 @@ main(int argc, char **argv) case 'R': /* read an existing log file */ if (args.pa_inputpath != NULL) - errx(EX_USAGE, "ERROR: option -R may only be " - "specified once."); + errx(EX_USAGE, +"ERROR: option -R may only be specified once."); args.pa_inputpath = optarg; if (args.pa_printfile == stderr) args.pa_printfile = stdout; @@ -855,8 +858,9 @@ main(int argc, char **argv) case 'w': /* wait interval */ interval = strtod(optarg, &end); if (*end != '\0' || interval <= 0) - errx(EX_USAGE, "ERROR: Illegal wait interval " - "value \"%s\".", optarg); + errx(EX_USAGE, +"ERROR: Illegal wait interval value \"%s\".", + optarg); args.pa_flags |= FLAG_HAS_WAIT_INTERVAL; args.pa_interval = interval; break; @@ -870,8 +874,9 @@ main(int argc, char **argv) case 'z': graphdepth = strtod(optarg, &end); if (*end != '\0' || graphdepth <= 0) - errx(EX_USAGE, "ERROR: Illegal callchain " - "depth \"%s\".", optarg); + errx(EX_USAGE, + "ERROR: Illegal callchain depth \"%s\".", + optarg); args.pa_graphdepth = graphdepth; args.pa_required |= FLAG_DO_CALLGRAPHS; break; @@ -908,8 +913,8 @@ main(int argc, char **argv) /* disallow -O and -R together */ if (args.pa_outputpath && args.pa_inputpath) - errx(EX_USAGE, "ERROR: options -O and -R are mutually " - "exclusive."); + errx(EX_USAGE, + "ERROR: options -O and -R are mutually exclusive."); /* -m option is allowed with -R only. */ if (args.pa_flags & FLAG_DO_ANNOTATE && args.pa_inputpath == NULL) @@ -918,8 +923,8 @@ main(int argc, char **argv) /* -m option is not allowed combined with -g or -G. */ if (args.pa_flags & FLAG_DO_ANNOTATE && args.pa_flags & (FLAG_DO_GPROF | FLAG_DO_CALLGRAPHS)) - errx(EX_USAGE, "ERROR: option -m and -g | -G are mutually " - "exclusive"); + errx(EX_USAGE, + "ERROR: option -m and -g | -G are mutually exclusive"); if (args.pa_flags & FLAG_READ_LOGFILE) { errmsg = NULL; @@ -930,8 +935,9 @@ main(int argc, char **argv) else if (!STAILQ_EMPTY(&args.pa_events)) errmsg = "a PMC event specification"; if (errmsg) - errx(EX_USAGE, "ERROR: option -R may not be used with " - "%s.", errmsg); + errx(EX_USAGE, + "ERROR: option -R may not be used with %s.", + errmsg); } else if (STAILQ_EMPTY(&args.pa_events)) /* All other uses require a PMC spec. */ pmcstat_show_usage(); @@ -939,58 +945,66 @@ main(int argc, char **argv) /* check for -t pid without a process PMC spec */ if ((args.pa_required & FLAG_HAS_TARGET) && (args.pa_flags & FLAG_HAS_PROCESS_PMCS) == 0) - errx(EX_USAGE, "ERROR: option -t requires a process mode PMC " - "to be specified."); + errx(EX_USAGE, +"ERROR: option -t requires a process mode PMC to be specified." + ); /* check for process-mode options without a command or -t pid */ if ((args.pa_required & FLAG_HAS_PROCESS_PMCS) && (args.pa_flags & (FLAG_HAS_COMMANDLINE | FLAG_HAS_TARGET)) == 0) - errx(EX_USAGE, "ERROR: options -d, -E, -p, -P, and -W require " - "a command line or target process."); + errx(EX_USAGE, +"ERROR: options -d, -E, -p, -P, and -W require a command line or target process." + ); /* check for -p | -P without a target process of some sort */ if ((args.pa_required & (FLAG_HAS_COMMANDLINE | FLAG_HAS_TARGET)) && (args.pa_flags & (FLAG_HAS_COMMANDLINE | FLAG_HAS_TARGET)) == 0) - errx(EX_USAGE, "ERROR: options -P and -p require a " - "target process or a command line."); + errx(EX_USAGE, +"ERROR: options -P and -p require a target process or a command line." + ); /* check for process-mode options without a process-mode PMC */ if ((args.pa_required & FLAG_HAS_PROCESS_PMCS) && (args.pa_flags & FLAG_HAS_PROCESS_PMCS) == 0) - errx(EX_USAGE, "ERROR: options -d, -E, and -W require a " - "process mode PMC to be specified."); + errx(EX_USAGE, +"ERROR: options -d, -E, and -W require a process mode PMC to be specified." + ); /* check for -c cpu with no system mode PMCs or logfile. */ if ((args.pa_required & FLAG_HAS_SYSTEM_PMCS) && (args.pa_flags & FLAG_HAS_SYSTEM_PMCS) == 0 && (args.pa_flags & FLAG_READ_LOGFILE) == 0) - errx(EX_USAGE, "ERROR: option -c requires at least one " - "system mode PMC to be specified."); + errx(EX_USAGE, +"ERROR: option -c requires at least one system mode PMC to be specified." + ); /* check for counting mode options without a counting PMC */ if ((args.pa_required & FLAG_HAS_COUNTING_PMCS) && (args.pa_flags & FLAG_HAS_COUNTING_PMCS) == 0) - errx(EX_USAGE, "ERROR: options -C, -W and -o require at " - "least one counting mode PMC to be specified."); + errx(EX_USAGE, +"ERROR: options -C, -W and -o require at least one counting mode PMC to be specified." + ); /* check for sampling mode options without a sampling PMC spec */ if ((args.pa_required & FLAG_HAS_SAMPLING_PMCS) && (args.pa_flags & FLAG_HAS_SAMPLING_PMCS) == 0) - errx(EX_USAGE, "ERROR: options -N, -n and -O require at " - "least one sampling mode PMC to be specified."); + errx(EX_USAGE, +"ERROR: options -N, -n and -O require at least one sampling mode PMC to be specified." + ); /* check if -g/-G/-m/-T are being used correctly */ if ((args.pa_flags & FLAG_DO_ANALYSIS) && !(args.pa_flags & (FLAG_HAS_SAMPLING_PMCS|FLAG_READ_LOGFILE))) - errx(EX_USAGE, "ERROR: options -g/-G/-m/-T require sampling PMCs " - "or -R to be specified."); + errx(EX_USAGE, +"ERROR: options -g/-G/-m/-T require sampling PMCs or -R to be specified." + ); /* check if -O was spuriously specified */ if ((args.pa_flags & FLAG_HAS_OUTPUT_LOGFILE) && (args.pa_required & FLAG_HAS_OUTPUT_LOGFILE) == 0) errx(EX_USAGE, - "ERROR: option -O is used only with options " - "-E, -P, -S and -W."); +"ERROR: option -O is used only with options -E, -P, -S and -W." + ); /* -k kernel path require -g/-G/-m/-T or -R */ if ((args.pa_flags & FLAG_HAS_KERNELPATH) && @@ -1017,8 +1031,9 @@ main(int argc, char **argv) if ((args.pa_flags & FLAG_HAS_COUNTING_PMCS) && (args.pa_flags & FLAG_HAS_SAMPLING_PMCS) && ((args.pa_flags & FLAG_HAS_OUTPUT_LOGFILE) == 0)) - errx(EX_USAGE, "ERROR: option -O is required if counting and " - "sampling PMCs are specified together."); + errx(EX_USAGE, +"ERROR: option -O is required if counting and sampling PMCs are specified together." + ); /* * Check if "-k kerneldir" was specified, and if whether @@ -1044,8 +1059,9 @@ main(int argc, char **argv) err(EX_OSERR, "ERROR: Cannot stat \"%s\"", buffer); if (!S_ISDIR(sb.st_mode)) - errx(EX_USAGE, "ERROR: \"%s\" is not a " - "directory.", buffer); + errx(EX_USAGE, + "ERROR: \"%s\" is not a directory.", + buffer); } } @@ -1058,8 +1074,9 @@ main(int argc, char **argv) else { args.pa_graphfile = fopen(graphfilename, "w"); if (args.pa_graphfile == NULL) - err(EX_OSERR, "ERROR: cannot open \"%s\" " - "for writing", graphfilename); + err(EX_OSERR, + "ERROR: cannot open \"%s\" for writing", + graphfilename); } } if (args.pa_flags & FLAG_DO_ANNOTATE) { @@ -1073,11 +1090,13 @@ main(int argc, char **argv) if ((args.pa_flags & FLAG_READ_LOGFILE) == 0) { if (pmc_init() < 0) err(EX_UNAVAILABLE, - "ERROR: Initialization of the pmc(3) library failed"); + "ERROR: Initialization of the pmc(3) library failed" + ); if ((npmc = pmc_npmc(0)) < 0) /* assume all CPUs are identical */ - err(EX_OSERR, "ERROR: Cannot determine the number of PMCs " - "on CPU %d", 0); + err(EX_OSERR, +"ERROR: Cannot determine the number of PMCs on CPU %d", + 0); } /* Allocate a kqueue */ @@ -1152,17 +1171,18 @@ main(int argc, char **argv) */ STAILQ_FOREACH(ev, &args.pa_events, ev_next) { - if (pmc_allocate(ev->ev_spec, ev->ev_mode, + if (pmc_allocate(ev->ev_spec, ev->ev_mode, ev->ev_flags, ev->ev_cpu, &ev->ev_pmcid) < 0) - err(EX_OSERR, "ERROR: Cannot allocate %s-mode pmc with " - "specification \"%s\"", - PMC_IS_SYSTEM_MODE(ev->ev_mode) ? "system" : "process", - ev->ev_spec); - - if (PMC_IS_SAMPLING_MODE(ev->ev_mode) && - pmc_set(ev->ev_pmcid, ev->ev_count) < 0) - err(EX_OSERR, "ERROR: Cannot set sampling count " - "for PMC \"%s\"", ev->ev_name); + err(EX_OSERR, +"ERROR: Cannot allocate %s-mode pmc with specification \"%s\"", + PMC_IS_SYSTEM_MODE(ev->ev_mode) ? + "system" : "process", ev->ev_spec); + + if (PMC_IS_SAMPLING_MODE(ev->ev_mode) && + pmc_set(ev->ev_pmcid, ev->ev_count) < 0) + err(EX_OSERR, + "ERROR: Cannot set sampling count for PMC \"%s\"", + ev->ev_name); } /* compute printout widths */ @@ -1204,8 +1224,8 @@ main(int argc, char **argv) EV_SET(&kev, SIGWINCH, EVFILT_SIGNAL, EV_ADD, 0, 0, NULL); if (kevent(pmcstat_kq, &kev, 1, NULL, 0, NULL) < 0) - err(EX_OSERR, "ERROR: Cannot register kevent for " - "SIGWINCH"); + err(EX_OSERR, + "ERROR: Cannot register kevent for SIGWINCH"); args.pa_toptty = 1; } @@ -1248,8 +1268,8 @@ main(int argc, char **argv) args.pa_interval * 1000, NULL); if (kevent(pmcstat_kq, &kev, 1, NULL, 0, NULL) < 0) - err(EX_OSERR, "ERROR: Cannot register kevent for " - "timer"); + err(EX_OSERR, + "ERROR: Cannot register kevent for timer"); } /* attach PMCs to the target process, starting it if specified */ @@ -1262,8 +1282,8 @@ main(int argc, char **argv) /* Attach process pmcs to the target process. */ if (args.pa_flags & (FLAG_HAS_TARGET | FLAG_HAS_COMMANDLINE)) { if (SLIST_EMPTY(&args.pa_targets)) - errx(EX_DATAERR, "ERROR: No matching target " - "processes."); + errx(EX_DATAERR, + "ERROR: No matching target processes."); if (args.pa_flags & FLAG_HAS_PROCESS_PMCS) pmcstat_attach_pmcs(); @@ -1319,7 +1339,8 @@ main(int argc, char **argv) keypad(stdscr, TRUE); clear(); /* Get terminal width / height with ncurses. */ - getmaxyx(stdscr, pmcstat_displayheight, pmcstat_displaywidth); + getmaxyx(stdscr, + pmcstat_displayheight, pmcstat_displaywidth); pmcstat_displayheight--; pmcstat_displaywidth--; atexit(pmcstat_topexit); } @@ -1385,8 +1406,8 @@ main(int argc, char **argv) } else if (kev.ident == SIGWINCH) { if (ioctl(fileno(args.pa_printfile), TIOCGWINSZ, &ws) < 0) - err(EX_OSERR, "ERROR: Cannot determine " - "window size"); + err(EX_OSERR, + "ERROR: Cannot determine window size"); pmcstat_displayheight = ws.ws_row - 1; pmcstat_displaywidth = ws.ws_col - 1; } else @@ -1406,7 +1427,8 @@ main(int argc, char **argv) if (do_print && !do_read) { if ((args.pa_required & FLAG_HAS_OUTPUT_LOGFILE) == 0) { pmcstat_print_pmcs(); - if (runstate == PMCSTAT_FINISHED && /* final newline */ + if (runstate == PMCSTAT_FINISHED && + /* final newline */ (args.pa_flags & FLAG_DO_PRINT) == 0) (void) fprintf(args.pa_printfile, "\n"); } @@ -1433,19 +1455,19 @@ main(int argc, char **argv) /* check if the driver lost any samples or events */ if (check_driver_stats) { if (pmc_get_driver_stats(&ds_end) < 0) - err(EX_OSERR, "ERROR: Cannot retrieve driver " - "statistics"); + err(EX_OSERR, + "ERROR: Cannot retrieve driver statistics"); if (ds_start.pm_intr_bufferfull != ds_end.pm_intr_bufferfull && args.pa_verbosity > 0) - warnx("WARNING: some samples were dropped. Please " - "consider tuning the \"kern.hwpmc.nsamples\" " - "tunable."); + warnx("WARNING: some samples were dropped.\n" +"Please consider tuning the \"kern.hwpmc.nsamples\" tunable." + ); if (ds_start.pm_buffer_requests_failed != ds_end.pm_buffer_requests_failed && args.pa_verbosity > 0) - warnx("WARNING: some events were discarded. Please " - "consider tuning the \"kern.hwpmc.nbuffers\" " - "tunable."); + warnx("WARNING: some events were discarded.\n" +"Please consider tuning the \"kern.hwpmc.nbuffers\" tunable." + ); } exit(EX_OK); Modified: stable/9/usr.sbin/pmcstat/pmcstat_log.c ============================================================================== --- stable/9/usr.sbin/pmcstat/pmcstat_log.c Mon Jul 2 07:11:43 2012 (r237968) +++ stable/9/usr.sbin/pmcstat/pmcstat_log.c Mon Jul 2 07:14:21 2012 (r237969) @@ -421,8 +421,8 @@ pmcstat_image_get_aout_params(struct pmc assert(path != NULL); if (image->pi_iskernelmodule) - errx(EX_SOFTWARE, "ERROR: a.out kernel modules are " - "unsupported \"%s\"", path); + errx(EX_SOFTWARE, + "ERROR: a.out kernel modules are unsupported \"%s\"", path); (void) snprintf(buffer, sizeof(buffer), "%s%s", args.pa_fsroot, path); @@ -656,8 +656,9 @@ pmcstat_image_get_elf_params(struct pmcs } if (gelf_getehdr(e, &eh) != &eh) { - warnx("WARNING: Cannot retrieve the ELF Header for " - "\"%s\": %s.", buffer, elf_errmsg(-1)); + warnx( + "WARNING: Cannot retrieve the ELF Header for \"%s\": %s.", + buffer, elf_errmsg(-1)); goto done; } @@ -678,16 +679,17 @@ pmcstat_image_get_elf_params(struct pmcs */ if (eh.e_type == ET_EXEC) { if (elf_getphnum(e, &nph) == 0) { - warnx("WARNING: Could not determine the number of " - "program headers in \"%s\": %s.", buffer, + warnx( +"WARNING: Could not determine the number of program headers in \"%s\": %s.", + buffer, elf_errmsg(-1)); goto done; } for (i = 0; i < eh.e_phnum; i++) { if (gelf_getphdr(e, i, &ph) != &ph) { - warnx("WARNING: Retrieval of PHDR entry #%ju " - "in \"%s\" failed: %s.", (uintmax_t) i, - buffer, elf_errmsg(-1)); + warnx( +"WARNING: Retrieval of PHDR entry #%ju in \"%s\" failed: %s.", + (uintmax_t) i, buffer, elf_errmsg(-1)); goto done; } switch (ph.p_type) { @@ -696,8 +698,8 @@ pmcstat_image_get_elf_params(struct pmcs break; case PT_INTERP: if ((elfbase = elf_rawfile(e, NULL)) == NULL) { - warnx("WARNING: Cannot retrieve the " - "interpreter for \"%s\": %s.", + warnx( +"WARNING: Cannot retrieve the interpreter for \"%s\": %s.", buffer, elf_errmsg(-1)); goto done; } @@ -717,17 +719,18 @@ pmcstat_image_get_elf_params(struct pmcs * Get the min and max VA associated with this ELF object. */ if (elf_getshnum(e, &nsh) == 0) { - warnx("WARNING: Could not determine the number of sections " - "for \"%s\": %s.", buffer, elf_errmsg(-1)); + warnx( +"WARNING: Could not determine the number of sections for \"%s\": %s.", + buffer, elf_errmsg(-1)); goto done; } for (i = 0; i < nsh; i++) { if ((scn = elf_getscn(e, i)) == NULL || gelf_getshdr(scn, &sh) != &sh) { - warnx("WARNING: Could not retrieve section header " - "#%ju in \"%s\": %s.", (uintmax_t) i, buffer, - elf_errmsg(-1)); + warnx( +"WARNING: Could not retrieve section header #%ju in \"%s\": %s.", + (uintmax_t) i, buffer, elf_errmsg(-1)); goto done; } if (sh.sh_flags & SHF_EXECINSTR) { @@ -923,8 +926,8 @@ pmcstat_image_unmap(struct pmcstat_proce * the new one at [end]. */ if ((pcmnew = malloc(sizeof(*pcmnew))) == NULL) - err(EX_OSERR, "ERROR: Cannot split a map " - "entry"); + err(EX_OSERR, + "ERROR: Cannot split a map entry"); pcmnew->ppm_image = pcm->ppm_image; @@ -981,8 +984,9 @@ pmcstat_image_addr2line(struct pmcstat_i if (image->pi_addr2line == NULL) { if (!addr2line_warn) { addr2line_warn = 1; - warnx("WARNING: addr2line is needed" - "for source code information."); + warnx( +"WARNING: addr2line is needed for source code information." + ); } return (0); } @@ -1300,8 +1304,9 @@ pmcstat_process_exec(struct pmcstat_proc break; default: - err(EX_SOFTWARE, "ERROR: Unsupported executable type for " - "\"%s\"", pmcstat_string_unintern(path)); + err(EX_SOFTWARE, + "ERROR: Unsupported executable type for \"%s\"", + pmcstat_string_unintern(path)); } } @@ -1355,10 +1360,9 @@ pmcstat_analyze_log(void) case PMCLOG_TYPE_INITIALIZE: if ((ev.pl_u.pl_i.pl_version & 0xFF000000) != PMC_VERSION_MAJOR << 24 && args.pa_verbosity > 0) - warnx("WARNING: Log version 0x%x does not " - "match compiled version 0x%x.", - ev.pl_u.pl_i.pl_version, - PMC_VERSION_MAJOR); + warnx( +"WARNING: Log version 0x%x does not match compiled version 0x%x.", + ev.pl_u.pl_i.pl_version, PMC_VERSION_MAJOR); break; case PMCLOG_TYPE_MAP_IN: @@ -1582,8 +1586,9 @@ pmcstat_analyze_log(void) else if (ev.pl_state == PMCLOG_REQUIRE_DATA) return (PMCSTAT_RUNNING); - err(EX_DATAERR, "ERROR: event parsing failed (record %jd, " - "offset 0x%jx)", (uintmax_t) ev.pl_count + 1, ev.pl_offset); + err(EX_DATAERR, + "ERROR: event parsing failed (record %jd, offset 0x%jx)", + (uintmax_t) ev.pl_count + 1, ev.pl_offset); } /* @@ -1623,9 +1628,9 @@ pmcstat_print_log(void) pmc_name_of_cputype(ev.pl_u.pl_i.pl_arch)); if ((ev.pl_u.pl_i.pl_version & 0xFF000000) != PMC_VERSION_MAJOR << 24 && args.pa_verbosity > 0) - warnx("WARNING: Log version 0x%x != expected " - "version 0x%x.", ev.pl_u.pl_i.pl_version, - PMC_VERSION); + warnx( +"WARNING: Log version 0x%x != expected version 0x%x.", + ev.pl_u.pl_i.pl_version, PMC_VERSION); break; case PMCLOG_TYPE_MAP_IN: PMCSTAT_PRINT_ENTRY("map-in","%d %p \"%s\"", @@ -1712,8 +1717,8 @@ pmcstat_print_log(void) else if (ev.pl_state == PMCLOG_REQUIRE_DATA) return (PMCSTAT_RUNNING); - errx(EX_DATAERR, "ERROR: event parsing failed " - "(record %jd, offset 0x%jx).", + errx(EX_DATAERR, + "ERROR: event parsing failed (record %jd, offset 0x%jx).", (uintmax_t) ev.pl_count + 1, ev.pl_offset); /*NOTREACHED*/ } From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 07:18:28 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 83956106564A; Mon, 2 Jul 2012 07:18:28 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6F4248FC0C; Mon, 2 Jul 2012 07:18:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q627ISRG054195; Mon, 2 Jul 2012 07:18:28 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q627ISZs054193; Mon, 2 Jul 2012 07:18:28 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201207020718.q627ISZs054193@svn.freebsd.org> From: "David E. O'Brien" Date: Mon, 2 Jul 2012 07:18:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237970 - stable/9/usr.sbin/pmcstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 07:18:28 -0000 Author: obrien Date: Mon Jul 2 07:18:27 2012 New Revision: 237970 URL: http://svn.freebsd.org/changeset/base/237970 Log: MFC: r227526: KNF Modified: stable/9/usr.sbin/pmcstat/pmcstat_log.c Directory Properties: stable/9/ (props changed) stable/9/usr.sbin/ (props changed) stable/9/usr.sbin/pmcstat/ (props changed) Modified: stable/9/usr.sbin/pmcstat/pmcstat_log.c ============================================================================== --- stable/9/usr.sbin/pmcstat/pmcstat_log.c Mon Jul 2 07:14:21 2012 (r237969) +++ stable/9/usr.sbin/pmcstat/pmcstat_log.c Mon Jul 2 07:18:27 2012 (r237970) @@ -1235,22 +1235,23 @@ pmcstat_process_lookup(pid_t pid, int al hash = (uint32_t) pid & PMCSTAT_HASH_MASK; /* simplicity wins */ LIST_FOREACH_SAFE(pp, &pmcstat_process_hash[hash], pp_next, pptmp) - if (pp->pp_pid == pid) { - /* Found a descriptor, check and process zombies */ - if (allocate && pp->pp_isactive == 0) { - /* remove maps */ - TAILQ_FOREACH_SAFE(ppm, &pp->pp_map, ppm_next, - ppmtmp) { - TAILQ_REMOVE(&pp->pp_map, ppm, ppm_next); - free(ppm); - } - /* remove process entry */ - LIST_REMOVE(pp, pp_next); - free(pp); - break; - } - return (pp); - } + if (pp->pp_pid == pid) { + /* Found a descriptor, check and process zombies */ + if (allocate && pp->pp_isactive == 0) { + /* remove maps */ + TAILQ_FOREACH_SAFE(ppm, &pp->pp_map, ppm_next, + ppmtmp) { + TAILQ_REMOVE(&pp->pp_map, ppm, + ppm_next); + free(ppm); + } + /* remove process entry */ + LIST_REMOVE(pp, pp_next); + free(pp); + break; + } + return (pp); + } if (!allocate) return (NULL); From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 07:22:22 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B5C8C106566B; Mon, 2 Jul 2012 07:22:22 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 88FE08FC16; Mon, 2 Jul 2012 07:22:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q627MMUW054640; Mon, 2 Jul 2012 07:22:22 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q627MMHw054639; Mon, 2 Jul 2012 07:22:22 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201207020722.q627MMHw054639@svn.freebsd.org> From: "David E. O'Brien" Date: Mon, 2 Jul 2012 07:22:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237971 - stable/9 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 07:22:22 -0000 Author: obrien Date: Mon Jul 2 07:22:22 2012 New Revision: 237971 URL: http://svn.freebsd.org/changeset/base/237971 Log: Record that r228191 (ensure kldxref is run first) was MFC'ed [r231373]. Modified: Directory Properties: stable/9/ (props changed) From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 07:27:15 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A6F50106564A; Mon, 2 Jul 2012 07:27:15 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 89DAF8FC0C; Mon, 2 Jul 2012 07:27:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q627RFd9054916; Mon, 2 Jul 2012 07:27:15 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q627RFDH054913; Mon, 2 Jul 2012 07:27:15 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201207020727.q627RFDH054913@svn.freebsd.org> From: Martin Matuska Date: Mon, 2 Jul 2012 07:27:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237972 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 07:27:15 -0000 Author: mm Date: Mon Jul 2 07:27:14 2012 New Revision: 237972 URL: http://svn.freebsd.org/changeset/base/237972 Log: Expose scrub and resilver tunables. This allows the user to tune the priority trade-off between scrub/resilver and other ZFS I/O. MFC after: 2 weeks Discussed with: pjd Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Mon Jul 2 07:22:22 2012 (r237971) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Mon Jul 2 07:27:14 2012 (r237972) @@ -58,16 +58,47 @@ static scan_cb_t dsl_scan_remove_cb; static dsl_syncfunc_t dsl_scan_cancel_sync; static void dsl_scan_sync_state(dsl_scan_t *, dmu_tx_t *tx); -int zfs_top_maxinflight = 32; /* maximum I/Os per top-level */ -int zfs_resilver_delay = 2; /* number of ticks to delay resilver */ -int zfs_scrub_delay = 4; /* number of ticks to delay scrub */ -int zfs_scan_idle = 50; /* idle window in clock ticks */ - -int zfs_scan_min_time_ms = 1000; /* min millisecs to scrub per txg */ -int zfs_free_min_time_ms = 1000; /* min millisecs to free per txg */ -int zfs_resilver_min_time_ms = 3000; /* min millisecs to resilver per txg */ +unsigned int zfs_top_maxinflight = 32; /* maximum I/Os per top-level */ +unsigned int zfs_resilver_delay = 2; /* number of ticks to delay resilver */ +unsigned int zfs_scrub_delay = 4; /* number of ticks to delay scrub */ +unsigned int zfs_scan_idle = 50; /* idle window in clock ticks */ + +unsigned int zfs_scan_min_time_ms = 1000; /* min millisecs to scrub per txg */ +unsigned int zfs_free_min_time_ms = 1000; /* min millisecs to free per txg */ +unsigned int zfs_resilver_min_time_ms = 3000; /* min millisecs to resilver + per txg */ boolean_t zfs_no_scrub_io = B_FALSE; /* set to disable scrub i/o */ boolean_t zfs_no_scrub_prefetch = B_FALSE; /* set to disable srub prefetching */ + +SYSCTL_DECL(_vfs_zfs); +TUNABLE_INT("vfs.zfs.top_maxinflight", &zfs_top_maxinflight); +SYSCTL_UINT(_vfs_zfs, OID_AUTO, top_maxinflight, CTLFLAG_RW, + &zfs_top_maxinflight, 0, "Maximum I/Os per top-level vdev"); +TUNABLE_INT("vfs.zfs.resilver_delay", &zfs_resilver_delay); +SYSCTL_UINT(_vfs_zfs, OID_AUTO, resilver_delay, CTLFLAG_RW, + &zfs_resilver_delay, 0, "Number of ticks to delay resilver"); +TUNABLE_INT("vfs.zfs.scrub_delay", &zfs_scrub_delay); +SYSCTL_UINT(_vfs_zfs, OID_AUTO, scrub_delay, CTLFLAG_RW, + &zfs_scrub_delay, 0, "Number of ticks to delay scrub"); +TUNABLE_INT("vfs.zfs.scan_idle", &zfs_scan_idle); +SYSCTL_UINT(_vfs_zfs, OID_AUTO, scan_idle, CTLFLAG_RW, + &zfs_scan_idle, 0, "Idle scan window in clock ticks"); +TUNABLE_INT("vfs.zfs.scan_min_time_ms", &zfs_scan_min_time_ms); +SYSCTL_UINT(_vfs_zfs, OID_AUTO, scan_min_time_ms, CTLFLAG_RW, + &zfs_scan_min_time_ms, 0, "Min millisecs to scrub per txg"); +TUNABLE_INT("vfs.zfs.free_min_time_ms", &zfs_free_min_time_ms); +SYSCTL_UINT(_vfs_zfs, OID_AUTO, free_min_time_ms, CTLFLAG_RW, + &zfs_free_min_time_ms, 0, "Min millisecs to free per txg"); +TUNABLE_INT("vfs.zfs.resilver_min_time_ms", &zfs_resilver_min_time_ms); +SYSCTL_UINT(_vfs_zfs, OID_AUTO, resilver_min_time_ms, CTLFLAG_RW, + &zfs_resilver_min_time_ms, 0, "Min millisecs to resilver per txg"); +TUNABLE_INT("vfs.zfs.no_scrub_io", &zfs_no_scrub_io); +SYSCTL_INT(_vfs_zfs, OID_AUTO, no_scrub_io, CTLFLAG_RW, + &zfs_no_scrub_io, 0, "Disable scrub I/O"); +TUNABLE_INT("vfs.zfs.no_scrub_prefetch", &zfs_no_scrub_prefetch); +SYSCTL_INT(_vfs_zfs, OID_AUTO, no_scrub_prefetch, CTLFLAG_RW, + &zfs_no_scrub_prefetch, 0, "Disable scrub prefetching"); + enum ddt_class zfs_scrub_ddt_class_max = DDT_CLASS_DUPLICATE; #define DSL_SCAN_IS_SCRUB_RESILVER(scn) \ @@ -405,7 +436,7 @@ static boolean_t dsl_scan_check_pause(dsl_scan_t *scn, const zbookmark_t *zb) { uint64_t elapsed_nanosecs; - int mintime; + unsigned int mintime; /* we never skip user/group accounting objects */ if (zb && (int64_t)zb->zb_object < 0) @@ -1638,7 +1669,7 @@ dsl_scan_scrub_cb(dsl_pool_t *dp, boolean_t needs_io; int zio_flags = ZIO_FLAG_SCAN_THREAD | ZIO_FLAG_RAW | ZIO_FLAG_CANFAIL; int zio_priority; - int scan_delay = 0; + unsigned int scan_delay = 0; if (phys_birth <= scn->scn_phys.scn_min_txg || phys_birth >= scn->scn_phys.scn_max_txg) @@ -1695,7 +1726,8 @@ dsl_scan_scrub_cb(dsl_pool_t *dp, if (needs_io && !zfs_no_scrub_io) { vdev_t *rvd = spa->spa_root_vdev; - uint64_t maxinflight = rvd->vdev_children * zfs_top_maxinflight; + uint64_t maxinflight = rvd->vdev_children * + MAX(zfs_top_maxinflight, 1); void *data = zio_data_buf_alloc(size); mutex_enter(&spa->spa_scrub_lock); @@ -1709,7 +1741,7 @@ dsl_scan_scrub_cb(dsl_pool_t *dp, * then throttle our workload to limit the impact of a scan. */ if (ddi_get_lbolt64() - spa->spa_last_io <= zfs_scan_idle) - delay(scan_delay); + delay(MAX((int)scan_delay, 0)); zio_nowait(zio_read(NULL, spa, bp, data, size, dsl_scan_scrub_done, NULL, zio_priority, From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 07:37:06 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 96385106564A; Mon, 2 Jul 2012 07:37:06 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 82F328FC08; Mon, 2 Jul 2012 07:37:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q627b6ge055368; Mon, 2 Jul 2012 07:37:06 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q627b6pf055366; Mon, 2 Jul 2012 07:37:06 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201207020737.q627b6pf055366@svn.freebsd.org> From: "David E. O'Brien" Date: Mon, 2 Jul 2012 07:37:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237973 - stable/9/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 07:37:06 -0000 Author: obrien Date: Mon Jul 2 07:37:06 2012 New Revision: 237973 URL: http://svn.freebsd.org/changeset/base/237973 Log: MFC: r228193: tweak the r137233 fix to r136283 -- Code was making two send() attempts vs. the comment documented "If we are working with a privileged socket, then take only one attempt". Make the code match. Modified: stable/9/lib/libc/gen/syslog.c Directory Properties: stable/9/ (props changed) stable/9/lib/ (props changed) stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/gen/syslog.c ============================================================================== --- stable/9/lib/libc/gen/syslog.c Mon Jul 2 07:27:14 2012 (r237972) +++ stable/9/lib/libc/gen/syslog.c Mon Jul 2 07:37:06 2012 (r237973) @@ -265,7 +265,7 @@ vsyslog(int pri, const char *fmt, va_lis * 1) syslogd was restarted * 2) /var/run/log is out of socket buffer space, which * in most cases means local DoS. - * We attempt to reconnect to /var/run/log to take care of + * We attempt to reconnect to /var/run/log[priv] to take care of * case #1 and keep send()ing data to cover case #2 * to give syslogd a chance to empty its socket buffer. * @@ -281,13 +281,13 @@ vsyslog(int pri, const char *fmt, va_lis connectlog(); } do { + if (status == CONNPRIV) + break; _usleep(1); if (send(LogFile, tbuf, cnt, 0) >= 0) { THREAD_UNLOCK(); return; } - if (status == CONNPRIV) - break; } while (errno == ENOBUFS); } else { THREAD_UNLOCK(); From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 07:39:34 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 20884106566B; Mon, 2 Jul 2012 07:39:34 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 01E548FC08; Mon, 2 Jul 2012 07:39:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q627dXsb055525; Mon, 2 Jul 2012 07:39:33 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q627dXqR055517; Mon, 2 Jul 2012 07:39:33 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201207020739.q627dXqR055517@svn.freebsd.org> From: "David E. O'Brien" Date: Mon, 2 Jul 2012 07:39:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237974 - stable/9/lib/libc/locale X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 07:39:34 -0000 Author: obrien Date: Mon Jul 2 07:39:33 2012 New Revision: 237974 URL: http://svn.freebsd.org/changeset/base/237974 Log: MFC: r228199: Split sentences at period boundaries. Modified: stable/9/lib/libc/locale/duplocale.3 stable/9/lib/libc/locale/freelocale.3 stable/9/lib/libc/locale/localeconv.3 stable/9/lib/libc/locale/newlocale.3 stable/9/lib/libc/locale/querylocale.3 stable/9/lib/libc/locale/uselocale.3 stable/9/lib/libc/locale/xlocale.3 Directory Properties: stable/9/ (props changed) stable/9/lib/ (props changed) stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/locale/duplocale.3 ============================================================================== --- stable/9/lib/libc/locale/duplocale.3 Mon Jul 2 07:37:06 2012 (r237973) +++ stable/9/lib/libc/locale/duplocale.3 Mon Jul 2 07:39:33 2012 (r237974) @@ -36,25 +36,26 @@ .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.In xlocale.h -.Ft locale_t +.In xlocale.h +.Ft locale_t .Fn duplocale "locale_t locale" .Sh DESCRIPTION Duplicates an existing .Fa locale_t -returning a new +returning a new .Fa locale_t that refers to the same locale values but has independent internal state. Various functions, such as .Xr mblen 3 -require presistent state. These functions formerly used static variables and -calls to them from multiple threads had undefined behavior. They now use -fields in the +require presistent state. +These functions formerly used static variables and calls to them from multiple +threads had undefined behavior. +They now use fields in the .Fa locale_t associated with the current thread by .Xr uselocale 3 . These calls are therefore only thread safe on threads with a unique per-thread -locale. +locale. .Pt The locale returned by this call must be freed with .Xr freelocale 3 . @@ -63,8 +64,9 @@ Ideally, .Xr uselocale 3 should make a copy of the .Fa locale_t -implicitly to ensure thread safety, and a copy of the global locale should be -installed lazily on each thread. The FreeBSD implementation does not do this, +implicitly to ensure thread safety, +and a copy of the global locale should be installed lazily on each thread. +The FreeBSD implementation does not do this, for compatibility with Darwin. .Sh SEE ALSO .Xr freelocale 3 , Modified: stable/9/lib/libc/locale/freelocale.3 ============================================================================== --- stable/9/lib/libc/locale/freelocale.3 Mon Jul 2 07:37:06 2012 (r237973) +++ stable/9/lib/libc/locale/freelocale.3 Mon Jul 2 07:39:33 2012 (r237974) @@ -33,22 +33,22 @@ .Nm freelocale .Nd Frees a locale created with .Xr duplocale 3 -or +or .Xr newlocale 3 . .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.In xlocale.h +.In xlocale.h .Ft int .Fn freelocale "locale_t locale" .Sh DESCRIPTION Frees a .Fa locale_t . -This relinquishes any resources held exclusively by this locale. Note that -locales share reference-counted components, so a call to this function is not -guaranteed to free all of the components. +This relinquishes any resources held exclusively by this locale. +Note that locales share reference-counted components, +so a call to this function is not guaranteed to free all of the components. .Sh RETURN VALUES -Returns 0 on success or -1 on error. +Returns 0 on success or -1 on error. .Sh SEE ALSO .Xr duplocale 3 , .Xr localeconv 3 , Modified: stable/9/lib/libc/locale/localeconv.3 ============================================================================== --- stable/9/lib/libc/locale/localeconv.3 Mon Jul 2 07:37:06 2012 (r237973) +++ stable/9/lib/libc/locale/localeconv.3 Mon Jul 2 07:39:33 2012 (r237974) @@ -203,7 +203,7 @@ result similarly denotes an unavailable The .Fn localeconv_l function takes an explicit locale parameter. For more information, see -.Xr xlocale 3 . +.Xr xlocale 3 . .Sh RETURN VALUES The .Fn localeconv @@ -212,9 +212,10 @@ which may be altered by later calls to .Xr setlocale 3 or .Fn localeconv . -The return value for +The return value for .Fn localeconv_l -is stored with the locale. It will remain valid until a subsequent call to +is stored with the locale. +It will remain valid until a subsequent call to .Xr freelocale 3 . If a thread-local locale is in effect then the return value from .Fn localeconv Modified: stable/9/lib/libc/locale/newlocale.3 ============================================================================== --- stable/9/lib/libc/locale/newlocale.3 Mon Jul 2 07:37:06 2012 (r237973) +++ stable/9/lib/libc/locale/newlocale.3 Mon Jul 2 07:39:33 2012 (r237974) @@ -31,40 +31,44 @@ .Os .Sh NAME .Nm newlocale -.Nd Creates a new locale +.Nd Creates a new locale .Sh LIBRARY .Lb libc .Sh SYNOPSIS .In xlocale -.Ft +.Ft .Fn newlocale "int mask" "const char * locale" "locale_t base" .Sh DESCRIPTION -Creates a new locale, inheriting some properties from an existing locale. The -.Fa mask +Creates a new locale, inheriting some properties from an existing locale. +The +.Fa mask defines the components that the new locale will have set to the locale with the -name specified in the +name specified in the .Fa locale -parameter. Any other components will be inherited from +parameter. +Any other components will be inherited from .Fa base . .Pt The .Fa mask is either .Fa LC_ALL_MASK, -indicating all possible locale components, or the logical OR of some -combination of the following: +indicating all possible locale components, +or the logical OR of some combination of the following: .Bl -tag -width "LC_MESSAGES_MASK" -offset indent .It LC_COLLATE_MASK -The locale for string collation routines. This controls alphabetic ordering in +The locale for string collation routines. +This controls alphabetic ordering in .Xr strcoll 3 - and + and .Xr strxfrm 3 . .It LC_CTYPE_MASK The locale for the .Xr ctype 3 and .Xr multibyte 3 -functions. This controls recognition of upper and lower case, alpha- betic or +functions. +This controls recognition of upper and lower case, alphabetic or non-alphabetic characters, and so on. .It LC_MESSAGES_MASK Set a locale for message catalogs, see @@ -76,8 +80,8 @@ the .Xr localeconv 3 function. .It LC_NUMERIC_MASK -Set a locale for formatting numbers. This controls the for- -matting of decimal points in input and output of floating +Set a locale for formatting numbers. +This controls the formatting of decimal points in input and output of floating point numbers in functions such as .Xr printf 3 and @@ -95,7 +99,8 @@ This function uses the same rules for lo .Sh RETURN VALUES Returns a new, valid, .Fa locale_t -or NULL if an error occurs. You must free the returned locale with +or NULL if an error occurs. +You must free the returned locale with .Xr freelocale 3 . .Sh SEE ALSO .Xr duplocale 3 , Modified: stable/9/lib/libc/locale/querylocale.3 ============================================================================== --- stable/9/lib/libc/locale/querylocale.3 Mon Jul 2 07:37:06 2012 (r237973) +++ stable/9/lib/libc/locale/querylocale.3 Mon Jul 2 07:39:33 2012 (r237974) @@ -36,15 +36,15 @@ .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.In xlocale.h +.In xlocale.h .Ft const char * .Fn querylocale "int mask" "locale_t locale" .Sh DESCRIPTION Returns the name of the locale for the category specified by .Fa mask. This possible values for the mask are the same as those in -.Xr newlocale 3 . If more than one bit in the mask is set, the returned value -is undefined. +.Xr newlocale 3 . +If more than one bit in the mask is set, the returned value is undefined. .Sh SEE ALSO .Xr duplocale 3 , .Xr freelocale 3 , Modified: stable/9/lib/libc/locale/uselocale.3 ============================================================================== --- stable/9/lib/libc/locale/uselocale.3 Mon Jul 2 07:37:06 2012 (r237973) +++ stable/9/lib/libc/locale/uselocale.3 Mon Jul 2 07:39:33 2012 (r237974) @@ -36,17 +36,18 @@ .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.In xlocale.h +.In xlocale.h .Ft locale_t .Fn uselocale "locale_t locale" .Sh DESCRIPTION -Specifies the locale for this thread to use. Specifying +Specifies the locale for this thread to use. +Specifying .Fa LC_GLOBAL_LOCALE -disables the per-thread locale, while NULL returns the current locale without -setting a new one. +disables the per-thread locale, +while NULL returns the current locale without setting a new one. .Sh RETURN VALUES -Returns the previous locale, or LC_GLOBAL_LOCALE if this thread has no locale -associated with it. +Returns the previous locale, +or LC_GLOBAL_LOCALE if this thread has no locale associated with it. .Sh SEE ALSO .Xr duplocale 3 , .Xr freelocale 3 , @@ -55,5 +56,5 @@ associated with it. .Xr querylocale 3 , .Xr xlocale 3 .Sh STANDARDS -This function, conforms to +This function conforms to .St -p1003.1-2008 Modified: stable/9/lib/libc/locale/xlocale.3 ============================================================================== --- stable/9/lib/libc/locale/xlocale.3 Mon Jul 2 07:37:06 2012 (r237973) +++ stable/9/lib/libc/locale/xlocale.3 Mon Jul 2 07:39:33 2012 (r237974) @@ -39,39 +39,45 @@ .In xlocale.h .Sh DESCRIPTION The extended locale support includes a set of functions for setting -thread-local locales, as well convenience functions for performing locale-aware +thread-local locales, +as well convenience functions for performing locale-aware calls with a specified locale. .Pp The core of the xlocale API is the .Fa locale_t -type. This is an opaque type encapsulating a locale. Instances of this can be -either set as the locale for a specific thread or passed directly to the +type. +This is an opaque type encapsulating a locale. +Instances of this can be either set as the locale for a specific thread or +passed directly to the .Fa _l -suffixed variants of various standard C functions. Two special +suffixed variants of various standard C functions. +Two special .Fa locale_t values are available: -.Bl -bullet -offset indent +.Bl -bullet -offset indent .It -NULL refers to the current locale for the thread, or to the global locale if no -locale has been set for this thread. +NULL refers to the current locale for the thread, +or to the global locale if no locale has been set for this thread. .It LC_GLOBAL_LOCALE refers to the global locale. .El .Pp -The global locale is the locale set with the +The global locale is the locale set with the .Xr setlocale 3 function. .Sh CAVEATS -The +The .Xr setlocale 3 -function, and others in the family, refer to the global locale. Other -functions that depend on the locale, however, will take the thread-local locale -if one has been set. This means that the idiom of setting the locale using +function, and others in the family, refer to the global locale. +Other functions that depend on the locale, however, +will take the thread-local locale if one has been set. +This means that the idiom of setting the locale using .Xr setlocale 3 , -calling a locale-dependent function, and then restoring the locale will not +calling a locale-dependent function, +and then restoring the locale will not have the expected behavior if the current thread has had a locale set using .Xr uselocale 3 . -You should avoid this idiom and prefer to use the +You should avoid this idiom and prefer to use the .Fa _l suffixed versions instead. .Sh SEE ALSO @@ -84,29 +90,34 @@ suffixed versions instead. .Sh CONVENIENCE FUNCTIONS The xlocale API includes a number of .Fa _l -suffixed convenience functions. These are variants of standard C functions -that have been modified to take an explicit +suffixed convenience functions. +These are variants of standard C functions +that have been modified to take an explicit .Fa locale_t -parameter as the final argument or, in the case of variadic functions, as an -additional argument directly before the format string. Each of these functions -accepts either NULL or LC_GLOBAL_LOCALE. In these functions, NULL refers to -the C locale, rather than the thread's current locale. If you wish to use the -thread's current locale, then use the unsuffixed version of the function. +parameter as the final argument or, in the case of variadic functions, +as an additional argument directly before the format string. +Each of these functions accepts either NULL or LC_GLOBAL_LOCALE. +In these functions, NULL refers to the C locale, +rather than the thread's current locale. +If you wish to use the thread's current locale, +then use the unsuffixed version of the function. .Pp -These functions are exposed by including +These functions are exposed by including .In xlocale.h .Em after -including the relevant headers for the standard variant. For example, the +including the relevant headers for the standard variant. +For example, the .Xr strtol_l 3 -function is exposed by including +function is exposed by including .In xlocale.h -after +after .In stdlib.h , which defines .Xr strtol 3 . .Pp -For reference, a complete list of the locale-aware functions that are available -in this form, along with the headers that expose them, is provided here: +For reference, +a complete list of the locale-aware functions that are available in this form, +along with the headers that expose them, is provided here: .Pp .Bl -tag -width " " .It In wctype.h @@ -117,7 +128,7 @@ in this form, along with the headers tha .Xr iswdigit_l 3 , .Xr iswgraph_l 3 , .Xr iswlower_l 3 , -.Xr iswprint_l 3 , +.Xr iswprint_l 3 , .Xr iswpunct_l 3 , .Xr iswspace_l 3 , .Xr iswupper_l 3 , @@ -264,7 +275,7 @@ The functions conform to .St -p1003.1-2008 . .Sh HISTORY -The xlocale APIs first appeared in Darwin 8.0. This implementation was -written by David Chisnall, under sponsorship from the FreeBSD Foundation and -first appeared in +The xlocale APIs first appeared in Darwin 8.0. +This implementation was written by David Chisnall, +under sponsorship from the FreeBSD Foundation and first appeared in .Fx 9.1 . From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 07:39:56 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4EF5910657EA; Mon, 2 Jul 2012 07:39:55 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D345A8FC12; Mon, 2 Jul 2012 07:39:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q627dt6h055584; Mon, 2 Jul 2012 07:39:55 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q627dtMm055582; Mon, 2 Jul 2012 07:39:55 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201207020739.q627dtMm055582@svn.freebsd.org> From: Gleb Smirnoff Date: Mon, 2 Jul 2012 07:39:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237975 - head/sys/dev/sound/pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 07:39:56 -0000 Author: glebius Date: Mon Jul 2 07:39:55 2012 New Revision: 237975 URL: http://svn.freebsd.org/changeset/base/237975 Log: - Call bus_generic_attach() at end of hdspe_attach(). - Use own devclass_t in DRIVER_MODULE(). This fixes operation of hdspe(4) when built as loadable module. Submitted by: Ruslan Bukin
Modified: head/sys/dev/sound/pci/hdspe.c Modified: head/sys/dev/sound/pci/hdspe.c ============================================================================== --- head/sys/dev/sound/pci/hdspe.c Mon Jul 2 07:39:33 2012 (r237974) +++ head/sys/dev/sound/pci/hdspe.c Mon Jul 2 07:39:55 2012 (r237975) @@ -347,7 +347,7 @@ hdspe_attach(device_t dev) hdspe_map_dmabuf(sc); - return 0; + return (bus_generic_attach(dev)); } static void @@ -407,4 +407,6 @@ static driver_t hdspe_driver = { PCM_SOFTC_SIZE, }; -DRIVER_MODULE(snd_hdspe, pci, hdspe_driver, pcm_devclass, 0, 0); +static devclass_t hdspe_devclass; + +DRIVER_MODULE(snd_hdspe, pci, hdspe_driver, hdspe_devclass, 0, 0); From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 07:50:16 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C11F6106566B; Mon, 2 Jul 2012 07:50:16 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A9A9E8FC14; Mon, 2 Jul 2012 07:50:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q627oGoP056064; Mon, 2 Jul 2012 07:50:16 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q627oGjc056052; Mon, 2 Jul 2012 07:50:16 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201207020750.q627oGjc056052@svn.freebsd.org> From: Martin Matuska Date: Mon, 2 Jul 2012 07:50:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237976 - in vendor/illumos/dist: cmd/zdb cmd/zfs cmd/zhack cmd/zpool cmd/ztest common/zfs lib/libzfs/common lib/libzfs_core lib/libzfs_core/common lib/libzpool/common lib/libzpool/comm... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 07:50:16 -0000 Author: mm Date: Mon Jul 2 07:50:15 2012 New Revision: 237976 URL: http://svn.freebsd.org/changeset/base/237976 Log: Update vendor/illumos/dist to illumos-gate revision 13743:95aba6e49b9f Obtained from: illumos Added: vendor/illumos/dist/lib/libzfs_core/ vendor/illumos/dist/lib/libzfs_core/common/ vendor/illumos/dist/lib/libzfs_core/common/libzfs_core.c vendor/illumos/dist/lib/libzfs_core/common/libzfs_core.h Modified: vendor/illumos/dist/cmd/zdb/zdb.c vendor/illumos/dist/cmd/zfs/zfs_main.c vendor/illumos/dist/cmd/zhack/zhack.c vendor/illumos/dist/cmd/zpool/zpool_main.c vendor/illumos/dist/cmd/ztest/ztest.c vendor/illumos/dist/common/zfs/zfs_comutil.c vendor/illumos/dist/common/zfs/zfs_comutil.h vendor/illumos/dist/common/zfs/zprop_common.c vendor/illumos/dist/lib/libzfs/common/libzfs.h vendor/illumos/dist/lib/libzfs/common/libzfs_dataset.c vendor/illumos/dist/lib/libzfs/common/libzfs_impl.h vendor/illumos/dist/lib/libzfs/common/libzfs_iter.c vendor/illumos/dist/lib/libzfs/common/libzfs_pool.c vendor/illumos/dist/lib/libzfs/common/libzfs_util.c vendor/illumos/dist/lib/libzpool/common/kernel.c vendor/illumos/dist/lib/libzpool/common/sys/zfs_context.h vendor/illumos/dist/man/man1m/zfs.1m vendor/illumos/dist/uts/common/fs/zfs/dmu_objset.c vendor/illumos/dist/uts/common/fs/zfs/dmu_send.c vendor/illumos/dist/uts/common/fs/zfs/dmu_tx.c vendor/illumos/dist/uts/common/fs/zfs/dsl_dataset.c vendor/illumos/dist/uts/common/fs/zfs/dsl_deleg.c vendor/illumos/dist/uts/common/fs/zfs/dsl_dir.c vendor/illumos/dist/uts/common/fs/zfs/dsl_prop.c vendor/illumos/dist/uts/common/fs/zfs/dsl_scan.c vendor/illumos/dist/uts/common/fs/zfs/dsl_synctask.c vendor/illumos/dist/uts/common/fs/zfs/rrwlock.c vendor/illumos/dist/uts/common/fs/zfs/spa.c vendor/illumos/dist/uts/common/fs/zfs/spa_history.c vendor/illumos/dist/uts/common/fs/zfs/sys/dmu.h vendor/illumos/dist/uts/common/fs/zfs/sys/dmu_objset.h vendor/illumos/dist/uts/common/fs/zfs/sys/dsl_dataset.h vendor/illumos/dist/uts/common/fs/zfs/sys/dsl_deleg.h vendor/illumos/dist/uts/common/fs/zfs/sys/dsl_prop.h vendor/illumos/dist/uts/common/fs/zfs/sys/rrwlock.h vendor/illumos/dist/uts/common/fs/zfs/sys/spa.h vendor/illumos/dist/uts/common/fs/zfs/sys/zfs_ioctl.h vendor/illumos/dist/uts/common/fs/zfs/zfs_ctldir.c vendor/illumos/dist/uts/common/fs/zfs/zfs_ioctl.c vendor/illumos/dist/uts/common/fs/zfs/zfs_vfsops.c vendor/illumos/dist/uts/common/fs/zfs/zvol.c vendor/illumos/dist/uts/common/sys/fs/zfs.h Modified: vendor/illumos/dist/cmd/zdb/zdb.c ============================================================================== --- vendor/illumos/dist/cmd/zdb/zdb.c Mon Jul 2 07:39:55 2012 (r237975) +++ vendor/illumos/dist/cmd/zdb/zdb.c Mon Jul 2 07:50:15 2012 (r237976) @@ -57,6 +57,7 @@ #include #include #include +#include #undef ZFS_MAXNAMELEN #undef verify #include @@ -204,6 +205,27 @@ dump_packed_nvlist(objset_t *os, uint64_ nvlist_free(nv); } +/* ARGSUSED */ +static void +dump_history_offsets(objset_t *os, uint64_t object, void *data, size_t size) +{ + spa_history_phys_t *shp = data; + + if (shp == NULL) + return; + + (void) printf("\t\tpool_create_len = %llu\n", + (u_longlong_t)shp->sh_pool_create_len); + (void) printf("\t\tphys_max_off = %llu\n", + (u_longlong_t)shp->sh_phys_max_off); + (void) printf("\t\tbof = %llu\n", + (u_longlong_t)shp->sh_bof); + (void) printf("\t\teof = %llu\n", + (u_longlong_t)shp->sh_eof); + (void) printf("\t\trecords_lost = %llu\n", + (u_longlong_t)shp->sh_records_lost); +} + static void zdb_nicenum(uint64_t num, char *buf) { @@ -853,21 +875,22 @@ dump_history(spa_t *spa) for (int i = 0; i < num; i++) { uint64_t time, txg, ievent; char *cmd, *intstr; + boolean_t printed = B_FALSE; if (nvlist_lookup_uint64(events[i], ZPOOL_HIST_TIME, &time) != 0) - continue; + goto next; if (nvlist_lookup_string(events[i], ZPOOL_HIST_CMD, &cmd) != 0) { if (nvlist_lookup_uint64(events[i], ZPOOL_HIST_INT_EVENT, &ievent) != 0) - continue; + goto next; verify(nvlist_lookup_uint64(events[i], ZPOOL_HIST_TXG, &txg) == 0); verify(nvlist_lookup_string(events[i], ZPOOL_HIST_INT_STR, &intstr) == 0); - if (ievent >= LOG_END) - continue; + if (ievent >= ZFS_NUM_LEGACY_HISTORY_EVENTS) + goto next; (void) snprintf(internalstr, sizeof (internalstr), @@ -880,6 +903,14 @@ dump_history(spa_t *spa) (void) localtime_r(&tsec, &t); (void) strftime(tbuf, sizeof (tbuf), "%F.%T", &t); (void) printf("%s %s\n", tbuf, cmd); + printed = B_TRUE; + +next: + if (dump_opt['h'] > 1) { + if (!printed) + (void) printf("unrecognized record:\n"); + dump_nvlist(events[i], 2); + } } } @@ -1456,7 +1487,7 @@ static object_viewer_t *object_viewer[DM dump_zap, /* other ZAP */ dump_zap, /* persistent error log */ dump_uint8, /* SPA history */ - dump_uint64, /* SPA history offsets */ + dump_history_offsets, /* SPA history offsets */ dump_zap, /* Pool properties */ dump_zap, /* DSL permissions */ dump_acl, /* ZFS ACL */ Modified: vendor/illumos/dist/cmd/zfs/zfs_main.c ============================================================================== --- vendor/illumos/dist/cmd/zfs/zfs_main.c Mon Jul 2 07:39:55 2012 (r237975) +++ vendor/illumos/dist/cmd/zfs/zfs_main.c Mon Jul 2 07:50:15 2012 (r237976) @@ -56,6 +56,7 @@ #include #include +#include #include #include #include @@ -70,6 +71,7 @@ libzfs_handle_t *g_zfs; static FILE *mnttab_file; static char history_str[HIS_MAX_RECORD_LEN]; +static boolean_t log_history = B_TRUE; static int zfs_do_clone(int argc, char **argv); static int zfs_do_create(int argc, char **argv); @@ -259,7 +261,7 @@ get_usage(zfs_help_t idx) return (gettext("\tshare <-a | filesystem>\n")); case HELP_SNAPSHOT: return (gettext("\tsnapshot [-r] [-o property=value] ... " - "\n")); + " ...\n")); case HELP_UNMOUNT: return (gettext("\tunmount [-f] " "<-a | filesystem|mountpoint>\n")); @@ -888,9 +890,9 @@ typedef struct destroy_cbdata { nvlist_t *cb_nvl; /* first snap in contiguous run */ - zfs_handle_t *cb_firstsnap; + char *cb_firstsnap; /* previous snap in contiguous run */ - zfs_handle_t *cb_prevsnap; + char *cb_prevsnap; int64_t cb_snapused; char *cb_snapspec; } destroy_cbdata_t; @@ -1004,11 +1006,13 @@ destroy_print_cb(zfs_handle_t *zhp, void if (nvlist_exists(cb->cb_nvl, name)) { if (cb->cb_firstsnap == NULL) - cb->cb_firstsnap = zfs_handle_dup(zhp); + cb->cb_firstsnap = strdup(name); if (cb->cb_prevsnap != NULL) - zfs_close(cb->cb_prevsnap); + free(cb->cb_prevsnap); /* this snap continues the current range */ - cb->cb_prevsnap = zfs_handle_dup(zhp); + cb->cb_prevsnap = strdup(name); + if (cb->cb_firstsnap == NULL || cb->cb_prevsnap == NULL) + nomem(); if (cb->cb_verbose) { if (cb->cb_parsable) { (void) printf("destroy\t%s\n", name); @@ -1023,12 +1027,12 @@ destroy_print_cb(zfs_handle_t *zhp, void } else if (cb->cb_firstsnap != NULL) { /* end of this range */ uint64_t used = 0; - err = zfs_get_snapused_int(cb->cb_firstsnap, + err = lzc_snaprange_space(cb->cb_firstsnap, cb->cb_prevsnap, &used); cb->cb_snapused += used; - zfs_close(cb->cb_firstsnap); + free(cb->cb_firstsnap); cb->cb_firstsnap = NULL; - zfs_close(cb->cb_prevsnap); + free(cb->cb_prevsnap); cb->cb_prevsnap = NULL; } zfs_close(zhp); @@ -1045,13 +1049,13 @@ destroy_print_snapshots(zfs_handle_t *fs if (cb->cb_firstsnap != NULL) { uint64_t used = 0; if (err == 0) { - err = zfs_get_snapused_int(cb->cb_firstsnap, + err = lzc_snaprange_space(cb->cb_firstsnap, cb->cb_prevsnap, &used); } cb->cb_snapused += used; - zfs_close(cb->cb_firstsnap); + free(cb->cb_firstsnap); cb->cb_firstsnap = NULL; - zfs_close(cb->cb_prevsnap); + free(cb->cb_prevsnap); cb->cb_prevsnap = NULL; } return (err); @@ -1904,9 +1908,11 @@ upgrade_set_callback(zfs_handle_t *zhp, /* * If they did "zfs upgrade -a", then we could * be doing ioctls to different pools. We need - * to log this history once to each pool. + * to log this history once to each pool, and bypass + * the normal history logging that happens in main(). */ - verify(zpool_stage_history(g_zfs, history_str) == 0); + (void) zpool_log_history(g_zfs, history_str); + log_history = B_FALSE; } if (zfs_prop_set(zhp, "version", verstr) == 0) cb->cb_numupgraded++; @@ -3424,6 +3430,32 @@ zfs_do_set(int argc, char **argv) return (ret); } +typedef struct snap_cbdata { + nvlist_t *sd_nvl; + boolean_t sd_recursive; + const char *sd_snapname; +} snap_cbdata_t; + +static int +zfs_snapshot_cb(zfs_handle_t *zhp, void *arg) +{ + snap_cbdata_t *sd = arg; + char *name; + int rv = 0; + int error; + + error = asprintf(&name, "%s@%s", zfs_get_name(zhp), sd->sd_snapname); + if (error == -1) + nomem(); + fnvlist_add_boolean(sd->sd_nvl, name); + free(name); + + if (sd->sd_recursive) + rv = zfs_iter_filesystems(zhp, zfs_snapshot_cb, sd); + zfs_close(zhp); + return (rv); +} + /* * zfs snapshot [-r] [-o prop=value] ... * @@ -3433,13 +3465,16 @@ zfs_do_set(int argc, char **argv) static int zfs_do_snapshot(int argc, char **argv) { - boolean_t recursive = B_FALSE; int ret = 0; char c; nvlist_t *props; + snap_cbdata_t sd = { 0 }; + boolean_t multiple_snaps = B_FALSE; if (nvlist_alloc(&props, NV_UNIQUE_NAME, 0) != 0) nomem(); + if (nvlist_alloc(&sd.sd_nvl, NV_UNIQUE_NAME, 0) != 0) + nomem(); /* check options */ while ((c = getopt(argc, argv, "ro:")) != -1) { @@ -3449,7 +3484,8 @@ zfs_do_snapshot(int argc, char **argv) return (1); break; case 'r': - recursive = B_TRUE; + sd.sd_recursive = B_TRUE; + multiple_snaps = B_TRUE; break; case '?': (void) fprintf(stderr, gettext("invalid option '%c'\n"), @@ -3466,18 +3502,35 @@ zfs_do_snapshot(int argc, char **argv) (void) fprintf(stderr, gettext("missing snapshot argument\n")); goto usage; } - if (argc > 1) { - (void) fprintf(stderr, gettext("too many arguments\n")); - goto usage; + + if (argc > 1) + multiple_snaps = B_TRUE; + for (; argc > 0; argc--, argv++) { + char *atp; + zfs_handle_t *zhp; + + atp = strchr(argv[0], '@'); + if (atp == NULL) + goto usage; + *atp = '\0'; + sd.sd_snapname = atp + 1; + zhp = zfs_open(g_zfs, argv[0], + ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME); + if (zhp == NULL) + goto usage; + if (zfs_snapshot_cb(zhp, &sd) != 0) + goto usage; } - ret = zfs_snapshot(g_zfs, argv[0], recursive, props); + ret = zfs_snapshot_nvl(g_zfs, sd.sd_nvl, props); + nvlist_free(sd.sd_nvl); nvlist_free(props); - if (ret && recursive) + if (ret != 0 && multiple_snaps) (void) fprintf(stderr, gettext("no snapshots were created\n")); return (ret != 0); usage: + nvlist_free(sd.sd_nvl); nvlist_free(props); usage(B_FALSE); return (-1); @@ -6479,8 +6532,7 @@ main(int argc, char **argv) return (1); } - zpool_set_history_str("zfs", argc, argv, history_str); - verify(zpool_stage_history(g_zfs, history_str) == 0); + zfs_save_arguments(argc, argv, history_str, sizeof (history_str)); libzfs_print_on_error(g_zfs, B_TRUE); @@ -6549,6 +6601,9 @@ main(int argc, char **argv) (void) fclose(mnttab_file); + if (ret == 0 && log_history) + (void) zpool_log_history(g_zfs, history_str); + libzfs_fini(g_zfs); /* Modified: vendor/illumos/dist/cmd/zhack/zhack.c ============================================================================== --- vendor/illumos/dist/cmd/zhack/zhack.c Mon Jul 2 07:39:55 2012 (r237975) +++ vendor/illumos/dist/cmd/zhack/zhack.c Mon Jul 2 07:50:15 2012 (r237976) @@ -279,6 +279,9 @@ feature_enable_sync(void *arg1, void *ar zfeature_info_t *feature = arg2; spa_feature_enable(spa, feature, tx); + spa_history_log_internal(spa, "zhack enable feature", tx, + "name=%s can_readonly=%u", + feature->fi_guid, feature->fi_can_readonly); } static void @@ -356,6 +359,8 @@ feature_incr_sync(void *arg1, void *arg2 zfeature_info_t *feature = arg2; spa_feature_incr(spa, feature, tx); + spa_history_log_internal(spa, "zhack feature incr", tx, + "name=%s", feature->fi_guid); } static void @@ -365,6 +370,8 @@ feature_decr_sync(void *arg1, void *arg2 zfeature_info_t *feature = arg2; spa_feature_decr(spa, feature, tx); + spa_history_log_internal(spa, "zhack feature decr", tx, + "name=%s", feature->fi_guid); } static void Modified: vendor/illumos/dist/cmd/zpool/zpool_main.c ============================================================================== --- vendor/illumos/dist/cmd/zpool/zpool_main.c Mon Jul 2 07:39:55 2012 (r237975) +++ vendor/illumos/dist/cmd/zpool/zpool_main.c Mon Jul 2 07:50:15 2012 (r237976) @@ -185,9 +185,9 @@ static zpool_command_t command_table[] = #define NCOMMAND (sizeof (command_table) / sizeof (command_table[0])) -zpool_command_t *current_command; +static zpool_command_t *current_command; static char history_str[HIS_MAX_RECORD_LEN]; - +static boolean_t log_history = B_TRUE; static uint_t timestamp_fmt = NODATE; static const char * @@ -935,7 +935,10 @@ zpool_do_destroy(int argc, char **argv) return (1); } - ret = (zpool_destroy(zhp) != 0); + /* The history must be logged as part of the export */ + log_history = B_FALSE; + + ret = (zpool_destroy(zhp, history_str) != 0); zpool_close(zhp); @@ -999,10 +1002,13 @@ zpool_do_export(int argc, char **argv) continue; } + /* The history must be logged as part of the export */ + log_history = B_FALSE; + if (hardforce) { - if (zpool_export_force(zhp) != 0) + if (zpool_export_force(zhp, history_str) != 0) ret = 1; - } else if (zpool_export(zhp, force) != 0) { + } else if (zpool_export(zhp, force, history_str) != 0) { ret = 1; } @@ -4269,6 +4275,14 @@ upgrade_cb(zpool_handle_t *zhp, void *ar (void) printf(gettext("Successfully upgraded " "'%s'\n\n"), zpool_get_name(zhp)); } + /* + * If they did "zpool upgrade -a", then we could + * be doing ioctls to different pools. We need + * to log this history once to each pool, and bypass + * the normal history logging that happens in main(). + */ + (void) zpool_log_history(g_zfs, history_str); + log_history = B_FALSE; } } else if (cbp->cb_newer && !SPA_VERSION_IS_SUPPORTED(version)) { assert(!cbp->cb_all); @@ -4491,8 +4505,8 @@ zpool_do_upgrade(int argc, char **argv) typedef struct hist_cbdata { boolean_t first; - int longfmt; - int internal; + boolean_t longfmt; + boolean_t internal; } hist_cbdata_t; /* @@ -4504,21 +4518,8 @@ get_history_one(zpool_handle_t *zhp, voi nvlist_t *nvhis; nvlist_t **records; uint_t numrecords; - char *cmdstr; - char *pathstr; - uint64_t dst_time; - time_t tsec; - struct tm t; - char tbuf[30]; int ret, i; - uint64_t who; - struct passwd *pwd; - char *hostname; - char *zonename; - char internalstr[MAXPATHLEN]; hist_cbdata_t *cb = (hist_cbdata_t *)data; - uint64_t txg; - uint64_t ievent; cb->first = B_FALSE; @@ -4530,64 +4531,94 @@ get_history_one(zpool_handle_t *zhp, voi verify(nvlist_lookup_nvlist_array(nvhis, ZPOOL_HIST_RECORD, &records, &numrecords) == 0); for (i = 0; i < numrecords; i++) { - if (nvlist_lookup_uint64(records[i], ZPOOL_HIST_TIME, - &dst_time) != 0) - continue; + nvlist_t *rec = records[i]; + char tbuf[30] = ""; - /* is it an internal event or a standard event? */ - if (nvlist_lookup_string(records[i], ZPOOL_HIST_CMD, - &cmdstr) != 0) { - if (cb->internal == 0) + if (nvlist_exists(rec, ZPOOL_HIST_TIME)) { + time_t tsec; + struct tm t; + + tsec = fnvlist_lookup_uint64(records[i], + ZPOOL_HIST_TIME); + (void) localtime_r(&tsec, &t); + (void) strftime(tbuf, sizeof (tbuf), "%F.%T", &t); + } + + if (nvlist_exists(rec, ZPOOL_HIST_CMD)) { + (void) printf("%s %s", tbuf, + fnvlist_lookup_string(rec, ZPOOL_HIST_CMD)); + } else if (nvlist_exists(rec, ZPOOL_HIST_INT_EVENT)) { + int ievent = + fnvlist_lookup_uint64(rec, ZPOOL_HIST_INT_EVENT); + if (!cb->internal) continue; - - if (nvlist_lookup_uint64(records[i], - ZPOOL_HIST_INT_EVENT, &ievent) != 0) + if (ievent >= ZFS_NUM_LEGACY_HISTORY_EVENTS) { + (void) printf("%s unrecognized record:\n", + tbuf); + dump_nvlist(rec, 4); + continue; + } + (void) printf("%s [internal %s txg:%lld] %s", tbuf, + zfs_history_event_names[ievent], + fnvlist_lookup_uint64(rec, ZPOOL_HIST_TXG), + fnvlist_lookup_string(rec, ZPOOL_HIST_INT_STR)); + } else if (nvlist_exists(rec, ZPOOL_HIST_INT_NAME)) { + if (!cb->internal) continue; - verify(nvlist_lookup_uint64(records[i], - ZPOOL_HIST_TXG, &txg) == 0); - verify(nvlist_lookup_string(records[i], - ZPOOL_HIST_INT_STR, &pathstr) == 0); - if (ievent >= LOG_END) + (void) printf("%s [txg:%lld] %s", tbuf, + fnvlist_lookup_uint64(rec, ZPOOL_HIST_TXG), + fnvlist_lookup_string(rec, ZPOOL_HIST_INT_NAME)); + if (nvlist_exists(rec, ZPOOL_HIST_DSNAME)) { + (void) printf(" %s (%llu)", + fnvlist_lookup_string(rec, + ZPOOL_HIST_DSNAME), + fnvlist_lookup_uint64(rec, + ZPOOL_HIST_DSID)); + } + (void) printf(" %s", fnvlist_lookup_string(rec, + ZPOOL_HIST_INT_STR)); + } else if (nvlist_exists(rec, ZPOOL_HIST_IOCTL)) { + if (!cb->internal) continue; - (void) snprintf(internalstr, - sizeof (internalstr), - "[internal %s txg:%lld] %s", - zfs_history_event_names[ievent], txg, - pathstr); - cmdstr = internalstr; - } - tsec = dst_time; - (void) localtime_r(&tsec, &t); - (void) strftime(tbuf, sizeof (tbuf), "%F.%T", &t); - (void) printf("%s %s", tbuf, cmdstr); + (void) printf("%s ioctl %s\n", tbuf, + fnvlist_lookup_string(rec, ZPOOL_HIST_IOCTL)); + if (nvlist_exists(rec, ZPOOL_HIST_INPUT_NVL)) { + (void) printf(" input:\n"); + dump_nvlist(fnvlist_lookup_nvlist(rec, + ZPOOL_HIST_INPUT_NVL), 8); + } + if (nvlist_exists(rec, ZPOOL_HIST_OUTPUT_NVL)) { + (void) printf(" output:\n"); + dump_nvlist(fnvlist_lookup_nvlist(rec, + ZPOOL_HIST_OUTPUT_NVL), 8); + } + } else { + if (!cb->internal) + continue; + (void) printf("%s unrecognized record:\n", tbuf); + dump_nvlist(rec, 4); + } if (!cb->longfmt) { (void) printf("\n"); continue; } (void) printf(" ["); - if (nvlist_lookup_uint64(records[i], - ZPOOL_HIST_WHO, &who) == 0) { - pwd = getpwuid((uid_t)who); - if (pwd) - (void) printf("user %s on", - pwd->pw_name); - else - (void) printf("user %d on", - (int)who); - } else { - (void) printf(gettext("no info]\n")); - continue; + if (nvlist_exists(rec, ZPOOL_HIST_WHO)) { + uid_t who = fnvlist_lookup_uint64(rec, ZPOOL_HIST_WHO); + struct passwd *pwd = getpwuid(who); + (void) printf("user %d ", (int)who); + if (pwd != NULL) + (void) printf("(%s) ", pwd->pw_name); + } + if (nvlist_exists(rec, ZPOOL_HIST_HOST)) { + (void) printf("on %s", + fnvlist_lookup_string(rec, ZPOOL_HIST_HOST)); + } + if (nvlist_exists(rec, ZPOOL_HIST_ZONE)) { + (void) printf(":%s", + fnvlist_lookup_string(rec, ZPOOL_HIST_ZONE)); } - if (nvlist_lookup_string(records[i], - ZPOOL_HIST_HOST, &hostname) == 0) { - (void) printf(" %s", hostname); - } - if (nvlist_lookup_string(records[i], - ZPOOL_HIST_ZONE, &zonename) == 0) { - (void) printf(":%s", zonename); - } - (void) printf("]"); (void) printf("\n"); } @@ -4602,8 +4633,6 @@ get_history_one(zpool_handle_t *zhp, voi * * Displays the history of commands that modified pools. */ - - int zpool_do_history(int argc, char **argv) { @@ -4616,10 +4645,10 @@ zpool_do_history(int argc, char **argv) while ((c = getopt(argc, argv, "li")) != -1) { switch (c) { case 'l': - cbdata.longfmt = 1; + cbdata.longfmt = B_TRUE; break; case 'i': - cbdata.internal = 1; + cbdata.internal = B_TRUE; break; case '?': (void) fprintf(stderr, gettext("invalid option '%c'\n"), @@ -4844,8 +4873,7 @@ main(int argc, char **argv) if (strcmp(cmdname, "-?") == 0) usage(B_TRUE); - zpool_set_history_str("zpool", argc, argv, history_str); - verify(zpool_stage_history(g_zfs, history_str) == 0); + zfs_save_arguments(argc, argv, history_str, sizeof (history_str)); /* * Run the appropriate command. @@ -4872,6 +4900,9 @@ main(int argc, char **argv) usage(B_FALSE); } + if (ret == 0 && log_history) + (void) zpool_log_history(g_zfs, history_str); + libzfs_fini(g_zfs); /* Modified: vendor/illumos/dist/cmd/ztest/ztest.c ============================================================================== --- vendor/illumos/dist/cmd/ztest/ztest.c Mon Jul 2 07:39:55 2012 (r237975) +++ vendor/illumos/dist/cmd/ztest/ztest.c Mon Jul 2 07:50:15 2012 (r237976) @@ -2252,7 +2252,7 @@ ztest_spa_create_destroy(ztest_ds_t *zd, */ nvroot = make_vdev_root("/dev/bogus", NULL, 0, 0, 0, 0, 0, 1); VERIFY3U(ENOENT, ==, - spa_create("ztest_bad_file", nvroot, NULL, NULL, NULL)); + spa_create("ztest_bad_file", nvroot, NULL, NULL)); nvlist_free(nvroot); /* @@ -2260,7 +2260,7 @@ ztest_spa_create_destroy(ztest_ds_t *zd, */ nvroot = make_vdev_root("/dev/bogus", NULL, 0, 0, 0, 0, 2, 1); VERIFY3U(ENOENT, ==, - spa_create("ztest_bad_mirror", nvroot, NULL, NULL, NULL)); + spa_create("ztest_bad_mirror", nvroot, NULL, NULL)); nvlist_free(nvroot); /* @@ -2269,7 +2269,7 @@ ztest_spa_create_destroy(ztest_ds_t *zd, */ (void) rw_rdlock(&ztest_name_lock); nvroot = make_vdev_root("/dev/bogus", NULL, 0, 0, 0, 0, 0, 1); - VERIFY3U(EEXIST, ==, spa_create(zo->zo_pool, nvroot, NULL, NULL, NULL)); + VERIFY3U(EEXIST, ==, spa_create(zo->zo_pool, nvroot, NULL, NULL)); nvlist_free(nvroot); VERIFY3U(0, ==, spa_open(zo->zo_pool, &spa, FTAG)); VERIFY3U(EBUSY, ==, spa_destroy(zo->zo_pool)); @@ -3056,8 +3056,7 @@ ztest_snapshot_create(char *osname, uint (void) snprintf(snapname, MAXNAMELEN, "%s@%llu", osname, (u_longlong_t)id); - error = dmu_objset_snapshot(osname, strchr(snapname, '@') + 1, - NULL, NULL, B_FALSE, B_FALSE, -1); + error = dmu_objset_snapshot_one(osname, strchr(snapname, '@') + 1); if (error == ENOSPC) { ztest_record_enospc(FTAG); return (B_FALSE); @@ -3257,8 +3256,7 @@ ztest_dsl_dataset_promote_busy(ztest_ds_ (void) snprintf(clone2name, MAXNAMELEN, "%s/c2_%llu", osname, id); (void) snprintf(snap3name, MAXNAMELEN, "%s@s3_%llu", clone1name, id); - error = dmu_objset_snapshot(osname, strchr(snap1name, '@')+1, - NULL, NULL, B_FALSE, B_FALSE, -1); + error = dmu_objset_snapshot_one(osname, strchr(snap1name, '@') + 1); if (error && error != EEXIST) { if (error == ENOSPC) { ztest_record_enospc(FTAG); @@ -3281,8 +3279,7 @@ ztest_dsl_dataset_promote_busy(ztest_ds_ fatal(0, "dmu_objset_create(%s) = %d", clone1name, error); } - error = dmu_objset_snapshot(clone1name, strchr(snap2name, '@')+1, - NULL, NULL, B_FALSE, B_FALSE, -1); + error = dmu_objset_snapshot_one(clone1name, strchr(snap2name, '@') + 1); if (error && error != EEXIST) { if (error == ENOSPC) { ztest_record_enospc(FTAG); @@ -3291,8 +3288,7 @@ ztest_dsl_dataset_promote_busy(ztest_ds_ fatal(0, "dmu_open_snapshot(%s) = %d", snap2name, error); } - error = dmu_objset_snapshot(clone1name, strchr(snap3name, '@')+1, - NULL, NULL, B_FALSE, B_FALSE, -1); + error = dmu_objset_snapshot_one(clone1name, strchr(snap3name, '@') + 1); if (error && error != EEXIST) { if (error == ENOSPC) { ztest_record_enospc(FTAG); @@ -4480,8 +4476,7 @@ ztest_dmu_snapshot_hold(ztest_ds_t *zd, * Create snapshot, clone it, mark snap for deferred destroy, * destroy clone, verify snap was also destroyed. */ - error = dmu_objset_snapshot(osname, snapname, NULL, NULL, FALSE, - FALSE, -1); + error = dmu_objset_snapshot_one(osname, snapname); if (error) { if (error == ENOSPC) { ztest_record_enospc("dmu_objset_snapshot"); @@ -4523,8 +4518,7 @@ ztest_dmu_snapshot_hold(ztest_ds_t *zd, * destroy a held snapshot, mark for deferred destroy, * release hold, verify snapshot was destroyed. */ - error = dmu_objset_snapshot(osname, snapname, NULL, NULL, FALSE, - FALSE, -1); + error = dmu_objset_snapshot_one(osname, snapname); if (error) { if (error == ENOSPC) { ztest_record_enospc("dmu_objset_snapshot"); @@ -5612,8 +5606,7 @@ ztest_init(ztest_shared_t *zs) spa_feature_table[i].fi_uname); VERIFY3U(0, ==, nvlist_add_uint64(props, buf, 0)); } - VERIFY3U(0, ==, spa_create(ztest_opts.zo_pool, nvroot, props, - NULL, NULL)); + VERIFY3U(0, ==, spa_create(ztest_opts.zo_pool, nvroot, props, NULL)); nvlist_free(nvroot); VERIFY3U(0, ==, spa_open(ztest_opts.zo_pool, &spa, FTAG)); Modified: vendor/illumos/dist/common/zfs/zfs_comutil.c ============================================================================== --- vendor/illumos/dist/common/zfs/zfs_comutil.c Mon Jul 2 07:39:55 2012 (r237975) +++ vendor/illumos/dist/common/zfs/zfs_comutil.c Mon Jul 2 07:50:15 2012 (r237976) @@ -20,6 +20,7 @@ */ /* * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012 by Delphix. All rights reserved. */ /* @@ -157,7 +158,11 @@ zfs_spa_version_map(int zpl_version) return (version); } -const char *zfs_history_event_names[LOG_END] = { +/* + * This is the table of legacy internal event names; it should not be modified. + * The internal events are now stored in the history log as strings. + */ +const char *zfs_history_event_names[ZFS_NUM_LEGACY_HISTORY_EVENTS] = { "invalid event", "pool create", "vdev add", Modified: vendor/illumos/dist/common/zfs/zfs_comutil.h ============================================================================== --- vendor/illumos/dist/common/zfs/zfs_comutil.h Mon Jul 2 07:39:55 2012 (r237975) +++ vendor/illumos/dist/common/zfs/zfs_comutil.h Mon Jul 2 07:50:15 2012 (r237976) @@ -20,6 +20,7 @@ */ /* * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012 by Delphix. All rights reserved. */ #ifndef _ZFS_COMUTIL_H @@ -37,7 +38,8 @@ extern void zpool_get_rewind_policy(nvli extern int zfs_zpl_version_map(int spa_version); extern int zfs_spa_version_map(int zpl_version); -extern const char *zfs_history_event_names[LOG_END]; +#define ZFS_NUM_LEGACY_HISTORY_EVENTS 41 +extern const char *zfs_history_event_names[ZFS_NUM_LEGACY_HISTORY_EVENTS]; #ifdef __cplusplus } Modified: vendor/illumos/dist/common/zfs/zprop_common.c ============================================================================== --- vendor/illumos/dist/common/zfs/zprop_common.c Mon Jul 2 07:39:55 2012 (r237975) +++ vendor/illumos/dist/common/zfs/zprop_common.c Mon Jul 2 07:50:15 2012 (r237976) @@ -22,6 +22,9 @@ * Copyright 2010 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ +/* + * Copyright (c) 2012 by Delphix. All rights reserved. + */ /* * Common routines used by zfs and zpool property management. @@ -129,7 +132,8 @@ zprop_register_hidden(int prop, const ch zprop_attr_t attr, int objset_types, const char *colname) { zprop_register_impl(prop, name, type, 0, NULL, attr, - objset_types, NULL, colname, B_FALSE, B_FALSE, NULL); + objset_types, NULL, colname, + type == PROP_TYPE_NUMBER, B_FALSE, NULL); } Modified: vendor/illumos/dist/lib/libzfs/common/libzfs.h ============================================================================== --- vendor/illumos/dist/lib/libzfs/common/libzfs.h Mon Jul 2 07:39:55 2012 (r237975) +++ vendor/illumos/dist/lib/libzfs/common/libzfs.h Mon Jul 2 07:50:15 2012 (r237976) @@ -54,7 +54,8 @@ extern "C" { /* * libzfs errors */ -enum { +typedef enum zfs_error { + EZFS_SUCCESS = 0, /* no error -- success */ EZFS_NOMEM = 2000, /* out of memory */ EZFS_BADPROP, /* invalid property value */ EZFS_PROPREADONLY, /* cannot set readonly property */ @@ -126,7 +127,7 @@ enum { EZFS_DIFFDATA, /* bad zfs diff data */ EZFS_POOLREADONLY, /* pool is in read-only mode */ EZFS_UNKNOWN -}; +} zfs_error_t; /* * The following data structures are all part @@ -182,6 +183,9 @@ extern libzfs_handle_t *zfs_get_handle(z extern void libzfs_print_on_error(libzfs_handle_t *, boolean_t); +extern void zfs_save_arguments(int argc, char **, char *, int); +extern int zpool_log_history(libzfs_handle_t *, const char *); + extern int libzfs_errno(libzfs_handle_t *); extern const char *libzfs_error_action(libzfs_handle_t *); extern const char *libzfs_error_description(libzfs_handle_t *); @@ -216,7 +220,7 @@ extern int zpool_iter(libzfs_handle_t *, */ extern int zpool_create(libzfs_handle_t *, const char *, nvlist_t *, nvlist_t *, nvlist_t *); -extern int zpool_destroy(zpool_handle_t *); +extern int zpool_destroy(zpool_handle_t *, const char *); extern int zpool_add(zpool_handle_t *, nvlist_t *); typedef struct splitflags { @@ -338,8 +342,8 @@ extern int zpool_get_errlog(zpool_handle /* * Import and export functions */ -extern int zpool_export(zpool_handle_t *, boolean_t); -extern int zpool_export_force(zpool_handle_t *); +extern int zpool_export(zpool_handle_t *, boolean_t, const char *); +extern int zpool_export_force(zpool_handle_t *, const char *); extern int zpool_import(libzfs_handle_t *, nvlist_t *, const char *, char *altroot); extern int zpool_import_props(libzfs_handle_t *, nvlist_t *, const char *, @@ -373,7 +377,7 @@ extern nvlist_t *zpool_find_import_cache */ struct zfs_cmd; -extern const char *zfs_history_event_names[LOG_END]; +extern const char *zfs_history_event_names[]; extern char *zpool_vdev_name(libzfs_handle_t *, zpool_handle_t *, nvlist_t *, boolean_t verbose); @@ -381,9 +385,6 @@ extern int zpool_upgrade(zpool_handle_t extern int zpool_get_history(zpool_handle_t *, nvlist_t **); extern int zpool_history_unpack(char *, uint64_t, uint64_t *, nvlist_t ***, uint_t *); -extern void zpool_set_history_str(const char *subcommand, int argc, - char **argv, char *history_str); -extern int zpool_stage_history(libzfs_handle_t *, const char *); extern void zpool_obj_to_path(zpool_handle_t *, uint64_t, uint64_t, char *, size_t len); extern int zfs_ioctl(libzfs_handle_t *, int, struct zfs_cmd *); @@ -436,8 +437,6 @@ extern int zfs_prop_get_written(zfs_hand char *propbuf, int proplen, boolean_t literal); extern int zfs_prop_get_feature(zfs_handle_t *zhp, const char *propname, char *buf, size_t len); -extern int zfs_get_snapused_int(zfs_handle_t *firstsnap, zfs_handle_t *lastsnap, - uint64_t *usedp); extern uint64_t zfs_prop_get_int(zfs_handle_t *, zfs_prop_t); extern int zfs_prop_inherit(zfs_handle_t *, const char *, boolean_t); extern const char *zfs_prop_values(zfs_prop_t); @@ -553,6 +552,8 @@ extern int zfs_destroy_snaps(zfs_handle_ extern int zfs_destroy_snaps_nvl(zfs_handle_t *, nvlist_t *, boolean_t); extern int zfs_clone(zfs_handle_t *, const char *, nvlist_t *); extern int zfs_snapshot(libzfs_handle_t *, const char *, boolean_t, nvlist_t *); +extern int zfs_snapshot_nvl(libzfs_handle_t *hdl, nvlist_t *snaps, + nvlist_t *props); extern int zfs_rollback(zfs_handle_t *, zfs_handle_t *, boolean_t); extern int zfs_rename(zfs_handle_t *, const char *, boolean_t, boolean_t); Modified: vendor/illumos/dist/lib/libzfs/common/libzfs_dataset.c ============================================================================== --- vendor/illumos/dist/lib/libzfs/common/libzfs_dataset.c Mon Jul 2 07:39:55 2012 (r237975) +++ vendor/illumos/dist/lib/libzfs/common/libzfs_dataset.c Mon Jul 2 07:50:15 2012 (r237976) @@ -1407,8 +1407,7 @@ zfs_prop_set(zfs_handle_t *zhp, const ch libzfs_handle_t *hdl = zhp->zfs_hdl; nvlist_t *nvl = NULL, *realprops; zfs_prop_t prop; - boolean_t do_prefix; - uint64_t idx; + boolean_t do_prefix = B_TRUE; int added_resv; (void) snprintf(errbuf, sizeof (errbuf), @@ -1447,12 +1446,17 @@ zfs_prop_set(zfs_handle_t *zhp, const ch } /* - * If the dataset's canmount property is being set to noauto, - * then we want to prevent unmounting & remounting it. - */ - do_prefix = !((prop == ZFS_PROP_CANMOUNT) && - (zprop_string_to_index(prop, propval, &idx, - ZFS_TYPE_DATASET) == 0) && (idx == ZFS_CANMOUNT_NOAUTO)); + * We don't want to unmount & remount the dataset when changing + * its canmount property to 'on' or 'noauto'. We only use + * the changelist logic to unmount when setting canmount=off. + */ + if (prop == ZFS_PROP_CANMOUNT) { + uint64_t idx; + int err = zprop_string_to_index(prop, propval, &idx, + ZFS_TYPE_DATASET); + if (err == 0 && idx != ZFS_CANMOUNT_OFF) + do_prefix = B_FALSE; + } if (do_prefix && (ret = changelist_prefix(cl)) != 0) goto error; @@ -2641,25 +2645,6 @@ zfs_prop_get_written(zfs_handle_t *zhp, return (0); } -int -zfs_get_snapused_int(zfs_handle_t *firstsnap, zfs_handle_t *lastsnap, - uint64_t *usedp) -{ - int err; - zfs_cmd_t zc = { 0 }; - - (void) strlcpy(zc.zc_name, lastsnap->zfs_name, sizeof (zc.zc_name)); - (void) strlcpy(zc.zc_value, firstsnap->zfs_name, sizeof (zc.zc_value)); - - err = ioctl(lastsnap->zfs_hdl->libzfs_fd, ZFS_IOC_SPACE_SNAPS, &zc); - if (err) - return (err); - - *usedp = zc.zc_cookie; - - return (0); -} - /* * Returns the name of the given zfs handle. */ @@ -2860,7 +2845,6 @@ create_parents(libzfs_handle_t *hdl, cha */ for (cp = target + prefixlen + 1; cp = strchr(cp, '/'); *cp = '/', cp++) { - char *logstr; *cp = '\0'; @@ -2871,16 +2855,12 @@ create_parents(libzfs_handle_t *hdl, cha continue; } - logstr = hdl->libzfs_log_str; - hdl->libzfs_log_str = NULL; if (zfs_create(hdl, target, ZFS_TYPE_FILESYSTEM, NULL) != 0) { - hdl->libzfs_log_str = logstr; opname = dgettext(TEXT_DOMAIN, "create"); goto ancestorerr; } - hdl->libzfs_log_str = logstr; h = zfs_open(hdl, target, ZFS_TYPE_FILESYSTEM); if (h == NULL) { opname = dgettext(TEXT_DOMAIN, "open"); @@ -2938,12 +2918,12 @@ int zfs_create(libzfs_handle_t *hdl, const char *path, zfs_type_t type, nvlist_t *props) { - zfs_cmd_t zc = { 0 }; int ret; uint64_t size = 0; uint64_t blocksize = zfs_prop_default_numeric(ZFS_PROP_VOLBLOCKSIZE); char errbuf[1024]; uint64_t zoned; + dmu_objset_type_t ost; (void) snprintf(errbuf, sizeof (errbuf), dgettext(TEXT_DOMAIN, "cannot create '%s'"), path); @@ -2963,17 +2943,16 @@ zfs_create(libzfs_handle_t *hdl, const c * will return ENOENT, not EEXIST. To prevent this from happening, we * first try to see if the dataset exists. */ - (void) strlcpy(zc.zc_name, path, sizeof (zc.zc_name)); - if (zfs_dataset_exists(hdl, zc.zc_name, ZFS_TYPE_DATASET)) { + if (zfs_dataset_exists(hdl, path, ZFS_TYPE_DATASET)) { zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, "dataset already exists")); return (zfs_error(hdl, EZFS_EXISTS, errbuf)); } if (type == ZFS_TYPE_VOLUME) - zc.zc_objset_type = DMU_OST_ZVOL; + ost = DMU_OST_ZVOL; else - zc.zc_objset_type = DMU_OST_ZFS; + ost = DMU_OST_ZFS; if (props && (props = zfs_valid_proplist(hdl, type, props, zoned, NULL, errbuf)) == 0) @@ -3025,14 +3004,9 @@ zfs_create(libzfs_handle_t *hdl, const c } } - if (props && zcmd_write_src_nvlist(hdl, &zc, props) != 0) - return (-1); - nvlist_free(props); - *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 07:51:11 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9F1961065670; Mon, 2 Jul 2012 07:51:11 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from fallbackmx07.syd.optusnet.com.au (fallbackmx07.syd.optusnet.com.au [211.29.132.9]) by mx1.freebsd.org (Postfix) with ESMTP id 214F48FC1F; Mon, 2 Jul 2012 07:51:10 +0000 (UTC) Received: from mail01.syd.optusnet.com.au (mail01.syd.optusnet.com.au [211.29.132.182]) by fallbackmx07.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q627p3qU008989; Mon, 2 Jul 2012 17:51:03 +1000 Received: from c122-106-171-232.carlnfd1.nsw.optusnet.com.au (c122-106-171-232.carlnfd1.nsw.optusnet.com.au [122.106.171.232]) by mail01.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q627osdq031071 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 2 Jul 2012 17:50:55 +1000 Date: Mon, 2 Jul 2012 17:50:53 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Xin LI In-Reply-To: <201207020238.q622cR4q038051@svn.freebsd.org> Message-ID: <20120702171933.I807@besplex.bde.org> References: <201207020238.q622cR4q038051@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r237942 - head/sbin/ping X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 07:51:11 -0000 On Mon, 2 Jul 2012, Xin LI wrote: > Log: > Use timeclear() instead of home grown version. > > MFC after: 2 weeks timerclear() is a NetBSD/OpenBSD compatibility mistake. It should at least have been named timevalclear(). (timevalclear() is the kernel name, and is intentionally left out of sys/time.h for !_KERNEL.) ping remains fairly portable by not using NetBSD/OpenBSD APIs for any other timeval access, despite most of the others taking longer to spell out than clearing. In .c files in /usr/src/*bin, the timerclear() mistake is only used in usr.bin/talk. The more useful timeradd() is only used in netstat (once), rtsold (thrice) and bsnpd (once). The even more useful timercmp() is used in pkill (once), routed (lots, but this is really contrib code), netstat (once), rtsold (lots) and bsnpd (lots). In .c files in /usr/src/contrib, timerclear() only used in ofed and pf. So these mistakes would be easy to avoid (except in ports). Mistakes for the timevalfoo() kernel API in userland are less common. For timevaladd(): - routed uses timevaladd() and supplies its own copy of the kernel code. This is approximately correct. It is portable, and the kernel version is hard to abuse since it is an extern function. Optimizing timevaladd() as a macro would be silly and is not done by either. The uglieness in routed is that it mixes this with timerfoo(). - ktrace. Like routed, except it copies the kernel code even more directly. (In the kernel and in ktrace, timevaladd() just adds then calls timevalfix() to handle wrap around. In routed, wrap around is handled directly. timeradd() handles wrap directly using a bloated macro. Another bug in the timeradd() API is that the macro is unsafe, but its name indicates that it is safe. Using extern functions avoids this bug for some of the timeval*() APIs.) - timed: like routed. Bruce From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 07:55:10 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id EB6C7106566B; Mon, 2 Jul 2012 07:55:09 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from opti.dougb.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 02BF214D867; Mon, 2 Jul 2012 07:55:07 +0000 (UTC) Message-ID: <4FF153DB.7080904@FreeBSD.org> Date: Mon, 02 Jul 2012 00:55:07 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:13.0) Gecko/20120621 Thunderbird/13.0.1 MIME-Version: 1.0 To: Andriy Gapon References: <201206290735.q5T7ZbSk026312@svn.freebsd.org> <4FED5C51.9060603@FreeBSD.org> In-Reply-To: <4FED5C51.9060603@FreeBSD.org> X-Enigmail-Version: 1.4.2 OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r237748 - in head/sys/cddl/dev/dtrace: amd64 i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 07:55:10 -0000 On 06/29/2012 00:42, Andriy Gapon wrote: > I haven't studied at all what the newer code brings in, but it must be some > fixes and improvements, I guess :-) Seriously? -- This .signature sanitized for your protection From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 07:58:15 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [69.147.83.53]) by hub.freebsd.org (Postfix) with ESMTP id CD2A41065673; Mon, 2 Jul 2012 07:58:15 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from opti.dougb.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 3A2AD14EEEB; Mon, 2 Jul 2012 07:58:15 +0000 (UTC) Message-ID: <4FF15496.7070307@FreeBSD.org> Date: Mon, 02 Jul 2012 00:58:14 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:13.0) Gecko/20120621 Thunderbird/13.0.1 MIME-Version: 1.0 To: Marius Strobl References: <201206181911.q5IJB7NL095734@svn.freebsd.org> In-Reply-To: <201206181911.q5IJB7NL095734@svn.freebsd.org> X-Enigmail-Version: 1.4.2 OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r237234 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 07:58:15 -0000 FYI, you didn't change the substance of the text, so there is no reason to bump .Dd. Doug On 06/18/2012 12:11, Marius Strobl wrote: > Author: marius > Date: Mon Jun 18 19:11:07 2012 > New Revision: 237234 > URL: http://svn.freebsd.org/changeset/base/237234 > > Log: > Avoid hard sentence break. > > MFC after: 3 days > > Modified: > head/share/man/man4/ahci.4 > > Modified: head/share/man/man4/ahci.4 > ============================================================================== > --- head/share/man/man4/ahci.4 Mon Jun 18 18:25:57 2012 (r237233) > +++ head/share/man/man4/ahci.4 Mon Jun 18 19:11:07 2012 (r237234) > @@ -24,7 +24,7 @@ > .\" > .\" $FreeBSD$ > .\" > -.Dd December 6, 2011 > +.Dd June 18, 2012 > .Dt AHCI 4 > .Os > .Sh NAME > @@ -101,7 +101,8 @@ setting to nonzero value limits maximum > Values 1, 2 and 3 are respectively 1.5, 3 and 6Gbps. > .It Va hw.ahci.force > setting to nonzero value forces driver attach to some known AHCI-capable > -chips even if they are configured for legacy IDE emulation. Default is 1. > +chips even if they are configured for legacy IDE emulation. > +Default is 1. > .El > .Sh DESCRIPTION > This driver provides the > -- This .signature sanitized for your protection From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 08:00:18 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E7775106566B; Mon, 2 Jul 2012 08:00:17 +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 7C0F68FC14; Mon, 2 Jul 2012 08:00:16 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id LAA05779; Mon, 02 Jul 2012 11:00:07 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1SlbYE-000HDN-OI; Mon, 02 Jul 2012 11:00:06 +0300 Message-ID: <4FF15506.8080206@FreeBSD.org> Date: Mon, 02 Jul 2012 11:00:06 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:13.0) Gecko/20120620 Thunderbird/13.0.1 MIME-Version: 1.0 To: Doug Barton References: <201206290735.q5T7ZbSk026312@svn.freebsd.org> <4FED5C51.9060603@FreeBSD.org> <4FF153DB.7080904@FreeBSD.org> In-Reply-To: <4FF153DB.7080904@FreeBSD.org> X-Enigmail-Version: 1.4.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r237748 - in head/sys/cddl/dev/dtrace: amd64 i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 08:00:18 -0000 on 02/07/2012 10:55 Doug Barton said the following: > On 06/29/2012 00:42, Andriy Gapon wrote: >> I haven't studied at all what the newer code brings in, but it must be some >> fixes and improvements, I guess :-) > > Seriously? > I expected to hear from you :-) -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 08:08:30 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3ABCC106564A; Mon, 2 Jul 2012 08:08: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 0DE958FC0A; Mon, 2 Jul 2012 08:08:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6288Tna056903; Mon, 2 Jul 2012 08:08:29 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6288Trw056900; Mon, 2 Jul 2012 08:08:29 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201207020808.q6288Trw056900@svn.freebsd.org> From: Andriy Gapon Date: Mon, 2 Jul 2012 08:08:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237977 - in stable/9/sys/cddl/dev/dtrace: amd64 i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 08:08:30 -0000 Author: avg Date: Mon Jul 2 08:08:29 2012 New Revision: 237977 URL: http://svn.freebsd.org/changeset/base/237977 Log: MFC r237748: dtrace instruction decoder: add 0x0f 0x1f NOP opcode support Modified: stable/9/sys/cddl/dev/dtrace/amd64/dis_tables.c stable/9/sys/cddl/dev/dtrace/i386/dis_tables.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/cddl/dev/dtrace/amd64/dis_tables.c ============================================================================== --- stable/9/sys/cddl/dev/dtrace/amd64/dis_tables.c Mon Jul 2 07:50:15 2012 (r237976) +++ stable/9/sys/cddl/dev/dtrace/amd64/dis_tables.c Mon Jul 2 08:08:29 2012 (r237977) @@ -815,7 +815,7 @@ const instable_t dis_op0F[16][16] = { /* [10] */ TNSZ("movups",XMMO,16), TNSZ("movups",XMMOS,16),TNSZ("movlps",XMMO,8), TNSZ("movlps",XMMOS,8), /* [14] */ TNSZ("unpcklps",XMMO,16),TNSZ("unpckhps",XMMO,16),TNSZ("movhps",XMMOM,8),TNSZ("movhps",XMMOMS,8), /* [18] */ IND(dis_op0F18), INVALID, INVALID, INVALID, -/* [1C] */ INVALID, INVALID, INVALID, INVALID, +/* [1C] */ INVALID, INVALID, INVALID, TNS("nopw", M), }, { /* [20] */ TSy("mov",SREG), TSy("mov",SREG), TSy("mov",SREG), TSy("mov",SREG), /* [24] */ TSx("mov",SREG), INVALID, TSx("mov",SREG), INVALID, Modified: stable/9/sys/cddl/dev/dtrace/i386/dis_tables.c ============================================================================== --- stable/9/sys/cddl/dev/dtrace/i386/dis_tables.c Mon Jul 2 07:50:15 2012 (r237976) +++ stable/9/sys/cddl/dev/dtrace/i386/dis_tables.c Mon Jul 2 08:08:29 2012 (r237977) @@ -815,7 +815,7 @@ const instable_t dis_op0F[16][16] = { /* [10] */ TNSZ("movups",XMMO,16), TNSZ("movups",XMMOS,16),TNSZ("movlps",XMMO,8), TNSZ("movlps",XMMOS,8), /* [14] */ TNSZ("unpcklps",XMMO,16),TNSZ("unpckhps",XMMO,16),TNSZ("movhps",XMMOM,8),TNSZ("movhps",XMMOMS,8), /* [18] */ IND(dis_op0F18), INVALID, INVALID, INVALID, -/* [1C] */ INVALID, INVALID, INVALID, INVALID, +/* [1C] */ INVALID, INVALID, INVALID, TNS("nopw", M), }, { /* [20] */ TSy("mov",SREG), TSy("mov",SREG), TSy("mov",SREG), TSy("mov",SREG), /* [24] */ TSx("mov",SREG), INVALID, TSx("mov",SREG), INVALID, From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 08:09:07 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E0935106566B; Mon, 2 Jul 2012 08:09:07 +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 B31CA8FC08; Mon, 2 Jul 2012 08:09:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q62897aI056964; Mon, 2 Jul 2012 08:09:07 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q62897B5056961; Mon, 2 Jul 2012 08:09:07 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201207020809.q62897B5056961@svn.freebsd.org> From: Andriy Gapon Date: Mon, 2 Jul 2012 08:09: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: r237978 - in stable/8/sys/cddl/dev/dtrace: amd64 i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 08:09:08 -0000 Author: avg Date: Mon Jul 2 08:09:07 2012 New Revision: 237978 URL: http://svn.freebsd.org/changeset/base/237978 Log: MFC r237748: dtrace instruction decoder: add 0x0f 0x1f NOP opcode support Modified: stable/8/sys/cddl/dev/dtrace/amd64/dis_tables.c stable/8/sys/cddl/dev/dtrace/i386/dis_tables.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/cddl/ (props changed) Modified: stable/8/sys/cddl/dev/dtrace/amd64/dis_tables.c ============================================================================== --- stable/8/sys/cddl/dev/dtrace/amd64/dis_tables.c Mon Jul 2 08:08:29 2012 (r237977) +++ stable/8/sys/cddl/dev/dtrace/amd64/dis_tables.c Mon Jul 2 08:09:07 2012 (r237978) @@ -815,7 +815,7 @@ const instable_t dis_op0F[16][16] = { /* [10] */ TNSZ("movups",XMMO,16), TNSZ("movups",XMMOS,16),TNSZ("movlps",XMMO,8), TNSZ("movlps",XMMOS,8), /* [14] */ TNSZ("unpcklps",XMMO,16),TNSZ("unpckhps",XMMO,16),TNSZ("movhps",XMMOM,8),TNSZ("movhps",XMMOMS,8), /* [18] */ IND(dis_op0F18), INVALID, INVALID, INVALID, -/* [1C] */ INVALID, INVALID, INVALID, INVALID, +/* [1C] */ INVALID, INVALID, INVALID, TNS("nopw", M), }, { /* [20] */ TSy("mov",SREG), TSy("mov",SREG), TSy("mov",SREG), TSy("mov",SREG), /* [24] */ TSx("mov",SREG), INVALID, TSx("mov",SREG), INVALID, Modified: stable/8/sys/cddl/dev/dtrace/i386/dis_tables.c ============================================================================== --- stable/8/sys/cddl/dev/dtrace/i386/dis_tables.c Mon Jul 2 08:08:29 2012 (r237977) +++ stable/8/sys/cddl/dev/dtrace/i386/dis_tables.c Mon Jul 2 08:09:07 2012 (r237978) @@ -815,7 +815,7 @@ const instable_t dis_op0F[16][16] = { /* [10] */ TNSZ("movups",XMMO,16), TNSZ("movups",XMMOS,16),TNSZ("movlps",XMMO,8), TNSZ("movlps",XMMOS,8), /* [14] */ TNSZ("unpcklps",XMMO,16),TNSZ("unpckhps",XMMO,16),TNSZ("movhps",XMMOM,8),TNSZ("movhps",XMMOMS,8), /* [18] */ IND(dis_op0F18), INVALID, INVALID, INVALID, -/* [1C] */ INVALID, INVALID, INVALID, INVALID, +/* [1C] */ INVALID, INVALID, INVALID, TNS("nopw", M), }, { /* [20] */ TSy("mov",SREG), TSy("mov",SREG), TSy("mov",SREG), TSy("mov",SREG), /* [24] */ TSx("mov",SREG), INVALID, TSx("mov",SREG), INVALID, From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 08:21:16 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 38C7F106564A; Mon, 2 Jul 2012 08:21:16 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2431E8FC14; Mon, 2 Jul 2012 08:21:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q628LFYX057584; Mon, 2 Jul 2012 08:21:15 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q628LFQO057582; Mon, 2 Jul 2012 08:21:15 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201207020821.q628LFQO057582@svn.freebsd.org> From: "David E. O'Brien" Date: Mon, 2 Jul 2012 08:21:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237979 - stable/9/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 08:21:16 -0000 Author: obrien Date: Mon Jul 2 08:21:15 2012 New Revision: 237979 URL: http://svn.freebsd.org/changeset/base/237979 Log: MFC: r228475 & r228487: Disallow various debug.kdb sysctl's when securelevel is raised. PR: 161350 Modified: stable/9/sys/kern/kern_shutdown.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/kern/kern_shutdown.c ============================================================================== --- stable/9/sys/kern/kern_shutdown.c Mon Jul 2 08:09:07 2012 (r237978) +++ stable/9/sys/kern/kern_shutdown.c Mon Jul 2 08:21:15 2012 (r237979) @@ -100,8 +100,9 @@ int debugger_on_panic = 0; #else int debugger_on_panic = 1; #endif -SYSCTL_INT(_debug, OID_AUTO, debugger_on_panic, CTLFLAG_RW | CTLFLAG_TUN, - &debugger_on_panic, 0, "Run debugger on kernel panic"); +SYSCTL_INT(_debug, OID_AUTO, debugger_on_panic, + CTLFLAG_RW | CTLFLAG_SECURE | CTLFLAG_TUN, + &debugger_on_panic, 0, "Run debugger on kernel panic"); TUNABLE_INT("debug.debugger_on_panic", &debugger_on_panic); #ifdef KDB_TRACE @@ -109,8 +110,9 @@ static int trace_on_panic = 1; #else static int trace_on_panic = 0; #endif -SYSCTL_INT(_debug, OID_AUTO, trace_on_panic, CTLFLAG_RW | CTLFLAG_TUN, - &trace_on_panic, 0, "Print stack trace on kernel panic"); +SYSCTL_INT(_debug, OID_AUTO, trace_on_panic, + CTLFLAG_RW | CTLFLAG_SECURE | CTLFLAG_TUN, + &trace_on_panic, 0, "Print stack trace on kernel panic"); TUNABLE_INT("debug.trace_on_panic", &trace_on_panic); #endif /* KDB */ From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 08:28:16 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C99FA106566C; Mon, 2 Jul 2012 08:28:16 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B6E8D8FC0C; Mon, 2 Jul 2012 08:28:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q628SGiI057927; Mon, 2 Jul 2012 08:28:16 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q628SGkc057925; Mon, 2 Jul 2012 08:28:16 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201207020828.q628SGkc057925@svn.freebsd.org> From: "David E. O'Brien" Date: Mon, 2 Jul 2012 08:28:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237980 - stable/9/usr.bin/fetch X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 08:28:17 -0000 Author: obrien Date: Mon Jul 2 08:28:16 2012 New Revision: 237980 URL: http://svn.freebsd.org/changeset/base/237980 Log: MFC: r232274: Document fetch(1)'s 'URL' argument. Modified: stable/9/usr.bin/fetch/fetch.1 Directory Properties: stable/9/ (props changed) stable/9/usr.bin/ (props changed) stable/9/usr.bin/fetch/ (props changed) Modified: stable/9/usr.bin/fetch/fetch.1 ============================================================================== --- stable/9/usr.bin/fetch/fetch.1 Mon Jul 2 08:21:15 2012 (r237979) +++ stable/9/usr.bin/fetch/fetch.1 Mon Jul 2 08:28:16 2012 (r237980) @@ -1,5 +1,5 @@ .\"- -.\" Copyright (c) 2000-2011 Dag-Erling Smørgrav +.\" Copyright (c) 2000-2012 Dag-Erling Smørgrav .\" All rights reserved. .\" Portions Copyright (c) 1999 Massachusetts Institute of Technology; used .\" by permission. @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 27, 2011 +.Dd February 28, 2012 .Dt FETCH 1 .Os .Sh NAME @@ -214,6 +214,11 @@ When the flag is specified, wait this many seconds between successive retries. .El .Pp +.Ar URL +.Bd -literal + :(//((:)?@)?(:)?)?/()? +.Ed +.Pp If .Nm receives a From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 08:31:29 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B15F71065674; Mon, 2 Jul 2012 08:31:29 +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 9BACB8FC1B; Mon, 2 Jul 2012 08:31:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q628VTaG058113; Mon, 2 Jul 2012 08:31:29 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q628VTOO058104; Mon, 2 Jul 2012 08:31:29 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201207020831.q628VTOO058104@svn.freebsd.org> From: Alexander Motin Date: Mon, 2 Jul 2012 08:31:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237981 - in head: share/man/man4 sys/conf sys/dev/acpi_support sys/modules/acpi sys/modules/acpi/acpi_asus_wmi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 08:31:29 -0000 Author: mav Date: Mon Jul 2 08:31:29 2012 New Revision: 237981 URL: http://svn.freebsd.org/changeset/base/237981 Log: Add acpi_asus_wmi(4) -- driver for random extras found on WMI-compatible Asus laptops. It is alike to acpi_asus(4), but uses WMI interface instead of separate ACPI device. On Asus EeePC T101MT netbook it allows to handle hotkeys and on/off WLAN, Bluetooth, LCD backlight, camera, cardreader and touchpad. On Asus UX31A ultrabook it allows to handle hotkeys, on/off WLAN, Bluetooth, Wireless LED, control keyboard backlight brightness, monitor temperature and fan speed. LCD brightness control doesn't work now for unknown reason, possibly requiring some video card initialization. Sponsored by: iXsystems, Inc. Added: head/share/man/man4/acpi_asus_wmi.4 (contents, props changed) head/sys/dev/acpi_support/acpi_asus_wmi.c (contents, props changed) head/sys/modules/acpi/acpi_asus_wmi/ head/sys/modules/acpi/acpi_asus_wmi/Makefile (contents, props changed) Modified: head/share/man/man4/Makefile head/share/man/man4/acpi_asus.4 head/sys/conf/files head/sys/modules/acpi/Makefile Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Mon Jul 2 08:28:16 2012 (r237980) +++ head/share/man/man4/Makefile Mon Jul 2 08:31:29 2012 (r237981) @@ -4,6 +4,7 @@ MAN= aac.4 \ acpi.4 \ ${_acpi_asus.4} \ + ${_acpi_asus_wmi.4} \ ${_acpi_dock.4} \ ${_acpi_fujitsu.4} \ ${_acpi_hp.4} \ @@ -698,6 +699,7 @@ MLINKS+=zyd.4 if_zyd.4 .if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" _acpi_asus.4= acpi_asus.4 +_acpi_asus_wmi.4= acpi_asus_wmi.4 _acpi_dock.4= acpi_dock.4 _acpi_fujitsu.4=acpi_fujitsu.4 _acpi_hp.4= acpi_hp.4 Modified: head/share/man/man4/acpi_asus.4 ============================================================================== --- head/share/man/man4/acpi_asus.4 Mon Jul 2 08:28:16 2012 (r237980) +++ head/share/man/man4/acpi_asus.4 Mon Jul 2 08:31:29 2012 (r237981) @@ -157,6 +157,7 @@ Defaults for these variables can be set which is parsed at boot-time. .Sh SEE ALSO .Xr acpi 4 , +.Xr acpi_asus_wmi 4 , .Xr acpi_video 4 , .Xr sysctl.conf 5 , .Xr sysctl 8 Added: head/share/man/man4/acpi_asus_wmi.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/acpi_asus_wmi.4 Mon Jul 2 08:31:29 2012 (r237981) @@ -0,0 +1,90 @@ +.\" +.\" Copyright (c) 2012 Alexander Motin +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd July 2, 2012 +.Dt ACPI_ASUS_WMI 4 +.Os +.Sh NAME +.Nm acpi_asus_wmi +.Nd Asus Laptop WMI Extras +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following line in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device acpi_asus_wmi" +.Ed +.Pp +Alternatively, to load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +acpi_asus_wmi_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides support for the extra WMI-controlled gadgets, such as hotkeys +and leds, found on Asus laptops. +It allows one to use the +.Xr sysctl 8 +interface to manipulate the brightness of the LCD panel and keyboard backlight, +power on/off different internal components, such as WiFi, Bluetooth, camera, +cardreader, etc, read some sensors. +Hotkey events are passed to +.Xr devd 8 +for easy handling in userspace with the default configuration in +.Pa /etc/devd/asus.conf . +Some hotkey events, such as keyboard backlight and touchpad control, are +handled inside the driver. +.Sh SYSCTL VARIABLES +The following sysctls are currently implemented: +.Bl -tag -width indent +.It Va dev.acpi_asus_wmi.0.handle_keys +Specifies whether driver should handle some harwdare keys, such as keyboard +backlight, internally. +.El +.Pp +Number of other variables under the same sysctl branch are model-specific. +.Pp +Defaults for these variables can be set in +.Xr sysctl.conf 5 , +which is parsed at boot-time. +.Sh SEE ALSO +.Xr acpi 4 , +.Xr acpi_asus 4 , +.Xr acpi_video 4 , +.Xr sysctl.conf 5 , +.Xr devd 8 , +.Xr sysctl 8 +.Sh HISTORY +The +.Nm +driver first appeared in +.Fx 10.0 . +.Sh AUTHORS +.An Alexander Motib Aq mav@FreeBSD.org . Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Mon Jul 2 08:28:16 2012 (r237980) +++ head/sys/conf/files Mon Jul 2 08:31:29 2012 (r237981) @@ -576,6 +576,7 @@ dev/aac/aac_linux.c optional aac compat dev/aac/aac_pci.c optional aac pci dev/acpi_support/acpi_wmi.c optional acpi_wmi acpi dev/acpi_support/acpi_asus.c optional acpi_asus acpi +dev/acpi_support/acpi_asus_wmi.c optional acpi_asus_wmi acpi dev/acpi_support/acpi_fujitsu.c optional acpi_fujitsu acpi dev/acpi_support/acpi_hp.c optional acpi_hp acpi dev/acpi_support/acpi_ibm.c optional acpi_ibm acpi Added: head/sys/dev/acpi_support/acpi_asus_wmi.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/acpi_support/acpi_asus_wmi.c Mon Jul 2 08:31:29 2012 (r237981) @@ -0,0 +1,651 @@ +/*- + * Copyright (c) 2012 Alexander Motin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include "opt_acpi.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include "acpi_wmi_if.h" + +#define _COMPONENT ACPI_OEM +ACPI_MODULE_NAME("ASUS-WMI") + +#define ACPI_ASUS_WMI_MGMT_GUID "97845ED0-4E6D-11DE-8A39-0800200C9A66" +#define ACPI_ASUS_WMI_EVENT_GUID "0B3CBB35-E3C2-45ED-91C2-4C5A6D195D1C" +#define ACPI_EEEPC_WMI_EVENT_GUID "ABBC0F72-8EA1-11D1-00A0-C90629100000" + +/* WMI Methods */ +#define ASUS_WMI_METHODID_SPEC 0x43455053 +#define ASUS_WMI_METHODID_SFUN 0x4E554653 +#define ASUS_WMI_METHODID_DSTS 0x53544344 +#define ASUS_WMI_METHODID_DSTS2 0x53545344 +#define ASUS_WMI_METHODID_DEVS 0x53564544 +#define ASUS_WMI_METHODID_INIT 0x54494E49 +#define ASUS_WMI_METHODID_HKEY 0x59454B48 + +#define ASUS_WMI_UNSUPPORTED_METHOD 0xFFFFFFFE + +/* Wireless */ +#define ASUS_WMI_DEVID_HW_SWITCH 0x00010001 +#define ASUS_WMI_DEVID_WIRELESS_LED 0x00010002 +#define ASUS_WMI_DEVID_CWAP 0x00010003 +#define ASUS_WMI_DEVID_WLAN 0x00010011 +#define ASUS_WMI_DEVID_BLUETOOTH 0x00010013 +#define ASUS_WMI_DEVID_GPS 0x00010015 +#define ASUS_WMI_DEVID_WIMAX 0x00010017 +#define ASUS_WMI_DEVID_WWAN3G 0x00010019 +#define ASUS_WMI_DEVID_UWB 0x00010021 + +/* LEDs */ +#define ASUS_WMI_DEVID_LED1 0x00020011 +#define ASUS_WMI_DEVID_LED2 0x00020012 +#define ASUS_WMI_DEVID_LED3 0x00020013 +#define ASUS_WMI_DEVID_LED4 0x00020014 +#define ASUS_WMI_DEVID_LED5 0x00020015 +#define ASUS_WMI_DEVID_LED6 0x00020016 + +/* Backlight and Brightness */ +#define ASUS_WMI_DEVID_BACKLIGHT 0x00050011 +#define ASUS_WMI_DEVID_BRIGHTNESS 0x00050012 +#define ASUS_WMI_DEVID_KBD_BACKLIGHT 0x00050021 +#define ASUS_WMI_DEVID_LIGHT_SENSOR 0x00050022 + +/* Misc */ +#define ASUS_WMI_DEVID_CAMERA 0x00060013 +#define ASUS_WMI_DEVID_CARDREADER 0x00080013 +#define ASUS_WMI_DEVID_TOUCHPAD 0x00100011 +#define ASUS_WMI_DEVID_TOUCHPAD_LED 0x00100012 +#define ASUS_WMI_DEVID_THERMAL_CTRL 0x00110011 +#define ASUS_WMI_DEVID_FAN_CTRL 0x00110012 +#define ASUS_WMI_DEVID_PROCESSOR_STATE 0x00120012 + +/* DSTS masks */ +#define ASUS_WMI_DSTS_STATUS_BIT 0x00000001 +#define ASUS_WMI_DSTS_UNKNOWN_BIT 0x00000002 +#define ASUS_WMI_DSTS_PRESENCE_BIT 0x00010000 +#define ASUS_WMI_DSTS_USER_BIT 0x00020000 +#define ASUS_WMI_DSTS_BIOS_BIT 0x00040000 +#define ASUS_WMI_DSTS_BRIGHTNESS_MASK 0x000000FF +#define ASUS_WMI_DSTS_MAX_BRIGTH_MASK 0x0000FF00 + + +struct acpi_asus_wmi_softc { + device_t dev; + device_t wmi_dev; + const char *notify_guid; + struct sysctl_ctx_list *sysctl_ctx; + struct sysctl_oid *sysctl_tree; + int dsts_id; + int handle_keys; +}; + +static struct { + char *name; + int dev_id; + char *description; + int access; +} acpi_asus_wmi_sysctls[] = { + { + .name = "hw_switch", + .dev_id = ASUS_WMI_DEVID_HW_SWITCH, + .description = "hw_switch", + .access = CTLTYPE_INT | CTLFLAG_RW + }, + { + .name = "wireless_led", + .dev_id = ASUS_WMI_DEVID_WIRELESS_LED, + .description = "Wireless LED control", + .access = CTLTYPE_INT | CTLFLAG_RW + }, + { + .name = "cwap", + .dev_id = ASUS_WMI_DEVID_CWAP, + .description = "Alt+F2 function", + .access = CTLTYPE_INT | CTLFLAG_RW + }, + { + .name = "wlan", + .dev_id = ASUS_WMI_DEVID_WLAN, + .description = "WLAN power control", + .access = CTLTYPE_INT | CTLFLAG_RW + }, + { + .name = "bluetooth", + .dev_id = ASUS_WMI_DEVID_BLUETOOTH, + .description = "Bluetooth power control", + .access = CTLTYPE_INT | CTLFLAG_RW + }, + { + .name = "gps", + .dev_id = ASUS_WMI_DEVID_GPS, + .description = "GPS power control", + .access = CTLTYPE_INT | CTLFLAG_RW + }, + { + .name = "wimax", + .dev_id = ASUS_WMI_DEVID_WIMAX, + .description = "WiMAX power control", + .access = CTLTYPE_INT | CTLFLAG_RW + }, + { + .name = "wwan3g", + .dev_id = ASUS_WMI_DEVID_WWAN3G, + .description = "WWAN-3G power control", + .access = CTLTYPE_INT | CTLFLAG_RW + }, + { + .name = "uwb", + .dev_id = ASUS_WMI_DEVID_UWB, + .description = "UWB power control", + .access = CTLTYPE_INT | CTLFLAG_RW + }, + { + .name = "led1", + .dev_id = ASUS_WMI_DEVID_LED1, + .description = "LED1 control", + .access = CTLTYPE_INT | CTLFLAG_RW + }, + { + .name = "led2", + .dev_id = ASUS_WMI_DEVID_LED2, + .description = "LED2 control", + .access = CTLTYPE_INT | CTLFLAG_RW + }, + { + .name = "led3", + .dev_id = ASUS_WMI_DEVID_LED3, + .description = "LED3 control", + .access = CTLTYPE_INT | CTLFLAG_RW + }, + { + .name = "led4", + .dev_id = ASUS_WMI_DEVID_LED4, + .description = "LED4 control", + .access = CTLTYPE_INT | CTLFLAG_RW + }, + { + .name = "led5", + .dev_id = ASUS_WMI_DEVID_LED5, + .description = "LED5 control", + .access = CTLTYPE_INT | CTLFLAG_RW + }, + { + .name = "led6", + .dev_id = ASUS_WMI_DEVID_LED6, + .description = "LED6 control", + .access = CTLTYPE_INT | CTLFLAG_RW + }, + { + .name = "backlight", + .dev_id = ASUS_WMI_DEVID_BACKLIGHT, + .description = "LCD backlight on/off control", + .access = CTLTYPE_INT | CTLFLAG_RW + }, + { + .name = "brightness", + .dev_id = ASUS_WMI_DEVID_BRIGHTNESS, + .description = "LCD backlight brightness control", + .access = CTLTYPE_INT | CTLFLAG_RW + }, + { + .name = "kbd_backlight", + .dev_id = ASUS_WMI_DEVID_KBD_BACKLIGHT, + .description = "Keyboard backlight brightness control", + .access = CTLTYPE_INT | CTLFLAG_RW + }, + { + .name = "light_sensor", + .dev_id = ASUS_WMI_DEVID_LIGHT_SENSOR, + .description = "Ambient light sensor", + .access = CTLTYPE_INT | CTLFLAG_RW + }, + { + .name = "camera", + .dev_id = ASUS_WMI_DEVID_CAMERA, + .description = "Camera power control", + .access = CTLTYPE_INT | CTLFLAG_RW + }, + { + .name = "cardreader", + .dev_id = ASUS_WMI_DEVID_CARDREADER, + .description = "Cardreader power control", + .access = CTLTYPE_INT | CTLFLAG_RW + }, + { + .name = "touchpad", + .dev_id = ASUS_WMI_DEVID_TOUCHPAD, + .description = "Touchpad control", + .access = CTLTYPE_INT | CTLFLAG_RW + }, + { + .name = "touchpad_led", + .dev_id = ASUS_WMI_DEVID_TOUCHPAD_LED, + .description = "Touchpad LED control", + .access = CTLTYPE_INT | CTLFLAG_RW + }, + { + .name = "themperature", + .dev_id = ASUS_WMI_DEVID_THERMAL_CTRL, + .description = "Temperature (C)", + .access = CTLTYPE_INT | CTLFLAG_RD + }, + { + .name = "fan_speed", + .dev_id = ASUS_WMI_DEVID_FAN_CTRL, + .description = "Fan speed (0-3)", + .access = CTLTYPE_INT | CTLFLAG_RD + }, + { + .name = "processor_state", + .dev_id = ASUS_WMI_DEVID_PROCESSOR_STATE, + .description = "Processor state", + .access = CTLTYPE_INT | CTLFLAG_RW + }, + { NULL, 0, NULL, 0 } +}; + +ACPI_SERIAL_DECL(asus_wmi, "ASUS WMI device"); + +static void acpi_asus_wmi_identify(driver_t *driver, device_t parent); +static int acpi_asus_wmi_probe(device_t dev); +static int acpi_asus_wmi_attach(device_t dev); +static int acpi_asus_wmi_detach(device_t dev); + +static int acpi_asus_wmi_sysctl(SYSCTL_HANDLER_ARGS); +static int acpi_asus_wmi_sysctl_set(struct acpi_asus_wmi_softc *sc, int dev_id, + int arg, int oldarg); +static int acpi_asus_wmi_sysctl_get(struct acpi_asus_wmi_softc *sc, int dev_id); +static int acpi_asus_wmi_evaluate_method(device_t wmi_dev, int method, + UINT32 arg0, UINT32 arg1, UINT32 *retval); +static int acpi_wpi_asus_get_devstate(struct acpi_asus_wmi_softc *sc, + UINT32 dev_id, UINT32 *retval); +static int acpi_wpi_asus_set_devstate(struct acpi_asus_wmi_softc *sc, + UINT32 dev_id, UINT32 ctrl_param, UINT32 *retval); +static void acpi_asus_wmi_notify(ACPI_HANDLE h, UINT32 notify, void *context); + +static device_method_t acpi_asus_wmi_methods[] = { + DEVMETHOD(device_identify, acpi_asus_wmi_identify), + DEVMETHOD(device_probe, acpi_asus_wmi_probe), + DEVMETHOD(device_attach, acpi_asus_wmi_attach), + DEVMETHOD(device_detach, acpi_asus_wmi_detach), + {0, 0} +}; + +static driver_t acpi_asus_wmi_driver = { + "acpi_asus_wmi", + acpi_asus_wmi_methods, + sizeof(struct acpi_asus_wmi_softc), +}; + +static devclass_t acpi_asus_wmi_devclass; + +DRIVER_MODULE(acpi_asus_wmi, acpi_wmi, acpi_asus_wmi_driver, + acpi_asus_wmi_devclass, 0, 0); +MODULE_DEPEND(acpi_asus_wmi, acpi_wmi, 1, 1, 1); +MODULE_DEPEND(acpi_asus_wmi, acpi, 1, 1, 1); + +static void +acpi_asus_wmi_identify(driver_t *driver, device_t parent) +{ + + /* Don't do anything if driver is disabled. */ + if (acpi_disabled("asus_wmi")) + return; + + /* Add only a single device instance. */ + if (device_find_child(parent, "acpi_asus_wmi", -1) != NULL) + return; + + /* Check management GUID to see whether system is compatible. */ + if (!ACPI_WMI_PROVIDES_GUID_STRING(parent, + ACPI_ASUS_WMI_MGMT_GUID)) + return; + + if (BUS_ADD_CHILD(parent, 0, "acpi_asus_wmi", -1) == NULL) + device_printf(parent, "add acpi_asus_wmi child failed\n"); +} + +static int +acpi_asus_wmi_probe(device_t dev) +{ + + if (!ACPI_WMI_PROVIDES_GUID_STRING(device_get_parent(dev), + ACPI_ASUS_WMI_MGMT_GUID)) + return (EINVAL); + device_set_desc(dev, "ASUS WMI device"); + return (0); +} + +static int +acpi_asus_wmi_attach(device_t dev) +{ + struct acpi_asus_wmi_softc *sc; + UINT32 val; + int dev_id, i; + + ACPI_FUNCTION_TRACE((char *)(uintptr_t) __func__); + + sc = device_get_softc(dev); + sc->dev = dev; + sc->wmi_dev = device_get_parent(dev); + sc->handle_keys = 1; + + /* Check management GUID. */ + if (!ACPI_WMI_PROVIDES_GUID_STRING(sc->wmi_dev, + ACPI_ASUS_WMI_MGMT_GUID)) { + device_printf(dev, + "WMI device does not provide the ASUS management GUID\n"); + return (EINVAL); + } + + /* Find proper DSTS method. */ + sc->dsts_id = ASUS_WMI_METHODID_DSTS; +next: + for (i = 0; acpi_asus_wmi_sysctls[i].name != NULL; ++i) { + dev_id = acpi_asus_wmi_sysctls[i].dev_id; + if (acpi_wpi_asus_get_devstate(sc, dev_id, &val)) + continue; + break; + } + if (acpi_asus_wmi_sysctls[i].name == NULL) { + if (sc->dsts_id == ASUS_WMI_METHODID_DSTS) { + sc->dsts_id = ASUS_WMI_METHODID_DSTS2; + goto next; + } else { + device_printf(dev, "Can not detect DSTS method ID\n"); + return (EINVAL); + } + } + + /* Find proper and attach to notufy GUID. */ + if (ACPI_WMI_PROVIDES_GUID_STRING(sc->wmi_dev, + ACPI_ASUS_WMI_EVENT_GUID)) + sc->notify_guid = ACPI_ASUS_WMI_EVENT_GUID; + else if (ACPI_WMI_PROVIDES_GUID_STRING(sc->wmi_dev, + ACPI_EEEPC_WMI_EVENT_GUID)) + sc->notify_guid = ACPI_EEEPC_WMI_EVENT_GUID; + else + sc->notify_guid = NULL; + if (sc->notify_guid != NULL) { + if (ACPI_WMI_INSTALL_EVENT_HANDLER(sc->wmi_dev, + sc->notify_guid, acpi_asus_wmi_notify, dev)) + sc->notify_guid = NULL; + } + if (sc->notify_guid == NULL) + device_printf(dev, "Could not install event handler!\n"); + + /* Initialize. */ + if (!acpi_asus_wmi_evaluate_method(sc->wmi_dev, + ASUS_WMI_METHODID_INIT, 0, 0, &val) && bootverbose) + device_printf(dev, "Initialization: %#x\n", val); + if (!acpi_asus_wmi_evaluate_method(sc->wmi_dev, + ASUS_WMI_METHODID_SPEC, 0, 0x9, &val) && bootverbose) + device_printf(dev, "WMI BIOS version: %d.%d\n", + val >> 16, val & 0xFF); + if (!acpi_asus_wmi_evaluate_method(sc->wmi_dev, + ASUS_WMI_METHODID_SFUN, 0, 0, &val) && bootverbose) + device_printf(dev, "SFUN value: %#x\n", val); + + ACPI_SERIAL_BEGIN(asus_wmi); + + sc->sysctl_ctx = device_get_sysctl_ctx(dev); + sc->sysctl_tree = device_get_sysctl_tree(dev); + SYSCTL_ADD_INT(sc->sysctl_ctx, + SYSCTL_CHILDREN(sc->sysctl_tree), OID_AUTO, + "handle_keys", CTLFLAG_RW, &sc->handle_keys, + 0, "Handle some hardware keys inside the driver"); + for (i = 0; acpi_asus_wmi_sysctls[i].name != NULL; ++i) { + dev_id = acpi_asus_wmi_sysctls[i].dev_id; + if (acpi_wpi_asus_get_devstate(sc, dev_id, &val)) + continue; + switch (dev_id) { + case ASUS_WMI_DEVID_THERMAL_CTRL: + case ASUS_WMI_DEVID_PROCESSOR_STATE: + case ASUS_WMI_DEVID_FAN_CTRL: + case ASUS_WMI_DEVID_BRIGHTNESS: + if (val == 0) + continue; + break; + default: + if ((val & ASUS_WMI_DSTS_PRESENCE_BIT) == 0) + continue; + break; + } + + SYSCTL_ADD_PROC(sc->sysctl_ctx, + SYSCTL_CHILDREN(sc->sysctl_tree), OID_AUTO, + acpi_asus_wmi_sysctls[i].name, + acpi_asus_wmi_sysctls[i].access, + sc, i, acpi_asus_wmi_sysctl, "I", + acpi_asus_wmi_sysctls[i].description); + } + ACPI_SERIAL_END(asus_wmi); + + return (0); +} + +static int +acpi_asus_wmi_detach(device_t dev) +{ + struct acpi_asus_wmi_softc *sc = device_get_softc(dev); + + ACPI_FUNCTION_TRACE((char *)(uintptr_t) __func__); + + if (sc->notify_guid) + ACPI_WMI_REMOVE_EVENT_HANDLER(dev, sc->notify_guid); + + return (0); +} + +static int +acpi_asus_wmi_sysctl(SYSCTL_HANDLER_ARGS) +{ + struct acpi_asus_wmi_softc *sc; + int arg; + int oldarg; + int error = 0; + int function; + int dev_id; + + ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); + + sc = (struct acpi_asus_wmi_softc *)oidp->oid_arg1; + function = oidp->oid_arg2; + dev_id = acpi_asus_wmi_sysctls[function].dev_id; + + ACPI_SERIAL_BEGIN(asus_wmi); + arg = acpi_asus_wmi_sysctl_get(sc, dev_id); + oldarg = arg; + error = sysctl_handle_int(oidp, &arg, 0, req); + if (!error && req->newptr != NULL) + error = acpi_asus_wmi_sysctl_set(sc, dev_id, arg, oldarg); + ACPI_SERIAL_END(asus_wmi); + + return (error); +} + +static int +acpi_asus_wmi_sysctl_get(struct acpi_asus_wmi_softc *sc, int dev_id) +{ + UINT32 val = 0; + + ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); + ACPI_SERIAL_ASSERT(asus_wmi); + + acpi_wpi_asus_get_devstate(sc, dev_id, &val); + + switch(dev_id) { + case ASUS_WMI_DEVID_THERMAL_CTRL: + val = (val - 2732 + 5) / 10; + break; + case ASUS_WMI_DEVID_PROCESSOR_STATE: + case ASUS_WMI_DEVID_FAN_CTRL: + break; + case ASUS_WMI_DEVID_BRIGHTNESS: + val &= ASUS_WMI_DSTS_BRIGHTNESS_MASK; + break; + case ASUS_WMI_DEVID_KBD_BACKLIGHT: + val &= 0x7; + break; + default: + if (val & ASUS_WMI_DSTS_UNKNOWN_BIT) + val = -1; + else + val = !!(val & ASUS_WMI_DSTS_STATUS_BIT); + break; + } + + return (val); +} + +static int +acpi_asus_wmi_sysctl_set(struct acpi_asus_wmi_softc *sc, int dev_id, int arg, int oldarg) +{ + ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); + ACPI_SERIAL_ASSERT(asus_wmi); + + switch(dev_id) { + case ASUS_WMI_DEVID_KBD_BACKLIGHT: + arg = min(0x7, arg); + if (arg != 0) + arg |= 0x80; + break; + } + + acpi_wpi_asus_set_devstate(sc, dev_id, arg, NULL); + + return (0); +} + +static __inline void +acpi_asus_wmi_free_buffer(ACPI_BUFFER* buf) { + if (buf && buf->Pointer) { + AcpiOsFree(buf->Pointer); + } +} + +static void +acpi_asus_wmi_notify(ACPI_HANDLE h, UINT32 notify, void *context) +{ + device_t dev = context; + ACPI_FUNCTION_TRACE_U32((char *)(uintptr_t)__func__, notify); + UINT32 val; + int code = 0; + + struct acpi_asus_wmi_softc *sc = device_get_softc(dev); + ACPI_BUFFER response = { ACPI_ALLOCATE_BUFFER, NULL }; + ACPI_OBJECT *obj; + ACPI_WMI_GET_EVENT_DATA(sc->wmi_dev, notify, &response); + obj = (ACPI_OBJECT*) response.Pointer; + if (obj && obj->Type == ACPI_TYPE_INTEGER) { + code = obj->Integer.Value; + acpi_UserNotify("ASUS", ACPI_ROOT_OBJECT, + code); + } + if (code && sc->handle_keys) { + /* Keyboard backlight control. */ + if (code == 0xc4 || code == 0xc5) { + acpi_wpi_asus_get_devstate(sc, + ASUS_WMI_DEVID_KBD_BACKLIGHT, &val); + val &= 0x7; + if (code == 0xc4) { + if (val < 0x7) + val++; + } else if (val > 0) + val--; + if (val != 0) + val |= 0x80; + acpi_wpi_asus_set_devstate(sc, + ASUS_WMI_DEVID_KBD_BACKLIGHT, val, NULL); + } + /* Touchpad control. */ + if (code == 0x6b) { + acpi_wpi_asus_get_devstate(sc, + ASUS_WMI_DEVID_TOUCHPAD, &val); + val = !(val & 1); + acpi_wpi_asus_set_devstate(sc, + ASUS_WMI_DEVID_TOUCHPAD, val, NULL); + } + } + acpi_asus_wmi_free_buffer(&response); +} + +static int +acpi_asus_wmi_evaluate_method(device_t wmi_dev, int method, + UINT32 arg0, UINT32 arg1, UINT32 *retval) +{ + UINT32 params[2] = { arg0, arg1 }; + UINT32 result; + ACPI_OBJECT *obj; + ACPI_BUFFER in = { sizeof(params), ¶ms }; + ACPI_BUFFER out = { ACPI_ALLOCATE_BUFFER, NULL }; + + if (ACPI_FAILURE(ACPI_WMI_EVALUATE_CALL(wmi_dev, + ACPI_ASUS_WMI_MGMT_GUID, 1, method, &in, &out))) { + acpi_asus_wmi_free_buffer(&out); + return (-EINVAL); + } + obj = out.Pointer; + if (obj && obj->Type == ACPI_TYPE_INTEGER) + result = (UINT32) obj->Integer.Value; + else + result = 0; + acpi_asus_wmi_free_buffer(&out); + if (retval) + *retval = result; + return (result == ASUS_WMI_UNSUPPORTED_METHOD ? -ENODEV : 0); +} + +static int +acpi_wpi_asus_get_devstate(struct acpi_asus_wmi_softc *sc, + UINT32 dev_id, UINT32 *retval) +{ + + return (acpi_asus_wmi_evaluate_method(sc->wmi_dev, + sc->dsts_id, dev_id, 0, retval)); +} + +static int +acpi_wpi_asus_set_devstate(struct acpi_asus_wmi_softc *sc, + UINT32 dev_id, UINT32 ctrl_param, UINT32 *retval) +{ + + return (acpi_asus_wmi_evaluate_method(sc->wmi_dev, + ASUS_WMI_METHODID_DEVS, dev_id, ctrl_param, retval)); +} Modified: head/sys/modules/acpi/Makefile ============================================================================== --- head/sys/modules/acpi/Makefile Mon Jul 2 08:28:16 2012 (r237980) +++ head/sys/modules/acpi/Makefile Mon Jul 2 08:31:29 2012 (r237981) @@ -1,6 +1,6 @@ # $FreeBSD$ -SUBDIR= acpi_asus acpi_fujitsu acpi_hp acpi_ibm \ +SUBDIR= acpi_asus acpi_asus_wmi acpi_fujitsu acpi_hp acpi_ibm \ acpi_panasonic acpi_sony acpi_toshiba acpi_video \ acpi_dock acpi_wmi aibs Added: head/sys/modules/acpi/acpi_asus_wmi/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/acpi/acpi_asus_wmi/Makefile Mon Jul 2 08:31:29 2012 (r237981) @@ -0,0 +1,9 @@ +# $FreeBSD$ + +.PATH: ${.CURDIR}/../../../dev/acpi_support + +KMOD= acpi_asus_wmi +CFLAGS+=-I${.CURDIR}/../../../dev/acpi_support +SRCS= acpi_asus_wmi.c opt_acpi.h acpi_if.h acpi_wmi_if.h device_if.h bus_if.h + +.include From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 08:41:23 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 808BE1065677; Mon, 2 Jul 2012 08:41:23 +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 5499B8FC16; Mon, 2 Jul 2012 08:41:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q628fNx9058576; Mon, 2 Jul 2012 08:41:23 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q628fNYo058574; Mon, 2 Jul 2012 08:41:23 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201207020841.q628fNYo058574@svn.freebsd.org> From: Alexander Motin Date: Mon, 2 Jul 2012 08:41:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237982 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 08:41:23 -0000 Author: mav Date: Mon Jul 2 08:41:22 2012 New Revision: 237982 URL: http://svn.freebsd.org/changeset/base/237982 Log: Fix typo in r237981. Modified: head/share/man/man4/acpi_asus_wmi.4 Modified: head/share/man/man4/acpi_asus_wmi.4 ============================================================================== --- head/share/man/man4/acpi_asus_wmi.4 Mon Jul 2 08:31:29 2012 (r237981) +++ head/share/man/man4/acpi_asus_wmi.4 Mon Jul 2 08:41:22 2012 (r237982) @@ -87,4 +87,4 @@ The driver first appeared in .Fx 10.0 . .Sh AUTHORS -.An Alexander Motib Aq mav@FreeBSD.org . +.An Alexander Motin Aq mav@FreeBSD.org . From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 08:48:59 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3607D1065672; Mon, 2 Jul 2012 08:48:59 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 021E48FC15; Mon, 2 Jul 2012 08:48:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q628mwXk058927; Mon, 2 Jul 2012 08:48:58 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q628mwEE058912; Mon, 2 Jul 2012 08:48:58 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201207020848.q628mwEE058912@svn.freebsd.org> From: "David E. O'Brien" Date: Mon, 2 Jul 2012 08:48:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237983 - in stable/9: contrib/file contrib/file/Magdir contrib/file/tests lib/libmagic usr.bin/file X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 08:48:59 -0000 Author: obrien Date: Mon Jul 2 08:48:58 2012 New Revision: 237983 URL: http://svn.freebsd.org/changeset/base/237983 Log: MFC: r234449: update file(1) to version 5.11. Added: stable/9/contrib/file/Magdir/assembler - copied unchanged from r234449, head/contrib/file/Magdir/assembler stable/9/contrib/file/Magdir/blcr - copied unchanged from r234449, head/contrib/file/Magdir/blcr stable/9/contrib/file/Magdir/bsi - copied unchanged from r234449, head/contrib/file/Magdir/bsi stable/9/contrib/file/Magdir/cups - copied unchanged from r234449, head/contrib/file/Magdir/cups stable/9/contrib/file/Magdir/ebml - copied unchanged from r234449, head/contrib/file/Magdir/ebml stable/9/contrib/file/Magdir/fusecompress - copied unchanged from r234449, head/contrib/file/Magdir/fusecompress stable/9/contrib/file/Magdir/geo - copied unchanged from r234449, head/contrib/file/Magdir/geo stable/9/contrib/file/Magdir/guile - copied unchanged from r234449, head/contrib/file/Magdir/guile stable/9/contrib/file/Magdir/isz - copied unchanged from r234449, head/contrib/file/Magdir/isz stable/9/contrib/file/Magdir/m4 - copied unchanged from r234449, head/contrib/file/Magdir/m4 stable/9/contrib/file/Magdir/make - copied unchanged from r234449, head/contrib/file/Magdir/make stable/9/contrib/file/Magdir/marc21 - copied unchanged from r234449, head/contrib/file/Magdir/marc21 stable/9/contrib/file/Magdir/metastore - copied unchanged from r234449, head/contrib/file/Magdir/metastore stable/9/contrib/file/Magdir/msooxml - copied unchanged from r234449, head/contrib/file/Magdir/msooxml stable/9/contrib/file/Magdir/music - copied unchanged from r234449, head/contrib/file/Magdir/music stable/9/contrib/file/Magdir/oasis - copied unchanged from r234449, head/contrib/file/Magdir/oasis stable/9/contrib/file/Magdir/parrot - copied unchanged from r234449, head/contrib/file/Magdir/parrot stable/9/contrib/file/Magdir/pascal - copied unchanged from r234449, head/contrib/file/Magdir/pascal stable/9/contrib/file/Magdir/rinex - copied unchanged from r234449, head/contrib/file/Magdir/rinex stable/9/contrib/file/Magdir/selinux - copied unchanged from r234449, head/contrib/file/Magdir/selinux stable/9/contrib/file/Magdir/sisu - copied unchanged from r234449, head/contrib/file/Magdir/sisu stable/9/contrib/file/Magdir/smile - copied unchanged from r234449, head/contrib/file/Magdir/smile stable/9/contrib/file/Magdir/ssh - copied unchanged from r234449, head/contrib/file/Magdir/ssh stable/9/contrib/file/Magdir/ssl - copied unchanged from r234449, head/contrib/file/Magdir/ssl stable/9/contrib/file/Magdir/tcl - copied unchanged from r234449, head/contrib/file/Magdir/tcl stable/9/contrib/file/Magdir/virtual - copied unchanged from r234449, head/contrib/file/Magdir/virtual stable/9/contrib/file/Magdir/wsdl - copied unchanged from r234449, head/contrib/file/Magdir/wsdl stable/9/contrib/file/Magdir/zfs - copied unchanged from r234449, head/contrib/file/Magdir/zfs stable/9/contrib/file/getline.c - copied unchanged from r234449, head/contrib/file/getline.c Deleted: stable/9/contrib/file/Magdir/alpha stable/9/contrib/file/Magdir/psion stable/9/contrib/file/patchlevel.h Modified: stable/9/contrib/file/ChangeLog stable/9/contrib/file/Header stable/9/contrib/file/INSTALL stable/9/contrib/file/Magdir/acorn stable/9/contrib/file/Magdir/adi stable/9/contrib/file/Magdir/adventure stable/9/contrib/file/Magdir/allegro stable/9/contrib/file/Magdir/alliant stable/9/contrib/file/Magdir/amanda stable/9/contrib/file/Magdir/amigaos stable/9/contrib/file/Magdir/animation stable/9/contrib/file/Magdir/apl stable/9/contrib/file/Magdir/apple stable/9/contrib/file/Magdir/applix stable/9/contrib/file/Magdir/archive stable/9/contrib/file/Magdir/asterix stable/9/contrib/file/Magdir/att3b stable/9/contrib/file/Magdir/audio stable/9/contrib/file/Magdir/basis stable/9/contrib/file/Magdir/bflt stable/9/contrib/file/Magdir/blender stable/9/contrib/file/Magdir/blit stable/9/contrib/file/Magdir/bout stable/9/contrib/file/Magdir/bsdi stable/9/contrib/file/Magdir/btsnoop stable/9/contrib/file/Magdir/c-lang stable/9/contrib/file/Magdir/c64 stable/9/contrib/file/Magdir/cad stable/9/contrib/file/Magdir/cafebabe stable/9/contrib/file/Magdir/cddb stable/9/contrib/file/Magdir/chord stable/9/contrib/file/Magdir/cisco stable/9/contrib/file/Magdir/citrus stable/9/contrib/file/Magdir/clarion stable/9/contrib/file/Magdir/claris stable/9/contrib/file/Magdir/clipper stable/9/contrib/file/Magdir/commands stable/9/contrib/file/Magdir/communications stable/9/contrib/file/Magdir/compress stable/9/contrib/file/Magdir/console stable/9/contrib/file/Magdir/convex stable/9/contrib/file/Magdir/cracklib stable/9/contrib/file/Magdir/ctags stable/9/contrib/file/Magdir/dact stable/9/contrib/file/Magdir/database stable/9/contrib/file/Magdir/diamond stable/9/contrib/file/Magdir/diff stable/9/contrib/file/Magdir/digital stable/9/contrib/file/Magdir/dolby stable/9/contrib/file/Magdir/dump stable/9/contrib/file/Magdir/dyadic stable/9/contrib/file/Magdir/editors stable/9/contrib/file/Magdir/efi stable/9/contrib/file/Magdir/elf stable/9/contrib/file/Magdir/encore stable/9/contrib/file/Magdir/epoc stable/9/contrib/file/Magdir/erlang stable/9/contrib/file/Magdir/esri stable/9/contrib/file/Magdir/fcs stable/9/contrib/file/Magdir/filesystems stable/9/contrib/file/Magdir/flash stable/9/contrib/file/Magdir/fonts stable/9/contrib/file/Magdir/fortran stable/9/contrib/file/Magdir/frame stable/9/contrib/file/Magdir/freebsd stable/9/contrib/file/Magdir/fsav stable/9/contrib/file/Magdir/games stable/9/contrib/file/Magdir/gcc stable/9/contrib/file/Magdir/geos stable/9/contrib/file/Magdir/gimp stable/9/contrib/file/Magdir/gnome-keyring stable/9/contrib/file/Magdir/gnu stable/9/contrib/file/Magdir/gnumeric stable/9/contrib/file/Magdir/grace stable/9/contrib/file/Magdir/graphviz stable/9/contrib/file/Magdir/gringotts stable/9/contrib/file/Magdir/hitachi-sh stable/9/contrib/file/Magdir/hp stable/9/contrib/file/Magdir/human68k stable/9/contrib/file/Magdir/ibm370 stable/9/contrib/file/Magdir/ibm6000 stable/9/contrib/file/Magdir/iff stable/9/contrib/file/Magdir/images stable/9/contrib/file/Magdir/inform stable/9/contrib/file/Magdir/intel stable/9/contrib/file/Magdir/interleaf stable/9/contrib/file/Magdir/island stable/9/contrib/file/Magdir/ispell stable/9/contrib/file/Magdir/java stable/9/contrib/file/Magdir/jpeg stable/9/contrib/file/Magdir/karma stable/9/contrib/file/Magdir/kde stable/9/contrib/file/Magdir/kml stable/9/contrib/file/Magdir/lecter stable/9/contrib/file/Magdir/lex stable/9/contrib/file/Magdir/lif stable/9/contrib/file/Magdir/linux stable/9/contrib/file/Magdir/lisp stable/9/contrib/file/Magdir/llvm stable/9/contrib/file/Magdir/lua stable/9/contrib/file/Magdir/luks stable/9/contrib/file/Magdir/mach stable/9/contrib/file/Magdir/macintosh stable/9/contrib/file/Magdir/magic stable/9/contrib/file/Magdir/mail.news stable/9/contrib/file/Magdir/maple stable/9/contrib/file/Magdir/mathcad stable/9/contrib/file/Magdir/mathematica stable/9/contrib/file/Magdir/matroska stable/9/contrib/file/Magdir/mcrypt stable/9/contrib/file/Magdir/mercurial stable/9/contrib/file/Magdir/mime stable/9/contrib/file/Magdir/mips stable/9/contrib/file/Magdir/mirage stable/9/contrib/file/Magdir/misctools stable/9/contrib/file/Magdir/mkid stable/9/contrib/file/Magdir/mlssa stable/9/contrib/file/Magdir/mmdf stable/9/contrib/file/Magdir/modem stable/9/contrib/file/Magdir/motorola stable/9/contrib/file/Magdir/mozilla stable/9/contrib/file/Magdir/msdos stable/9/contrib/file/Magdir/msvc stable/9/contrib/file/Magdir/mup stable/9/contrib/file/Magdir/natinst stable/9/contrib/file/Magdir/ncr stable/9/contrib/file/Magdir/netbsd stable/9/contrib/file/Magdir/netscape stable/9/contrib/file/Magdir/netware stable/9/contrib/file/Magdir/news stable/9/contrib/file/Magdir/nitpicker stable/9/contrib/file/Magdir/ocaml stable/9/contrib/file/Magdir/octave stable/9/contrib/file/Magdir/ole2compounddocs stable/9/contrib/file/Magdir/olf stable/9/contrib/file/Magdir/os2 stable/9/contrib/file/Magdir/os400 stable/9/contrib/file/Magdir/os9 stable/9/contrib/file/Magdir/osf1 stable/9/contrib/file/Magdir/palm stable/9/contrib/file/Magdir/parix stable/9/contrib/file/Magdir/pbm stable/9/contrib/file/Magdir/pdf stable/9/contrib/file/Magdir/pdp stable/9/contrib/file/Magdir/perl stable/9/contrib/file/Magdir/pgp stable/9/contrib/file/Magdir/pkgadd stable/9/contrib/file/Magdir/plan9 stable/9/contrib/file/Magdir/plus5 stable/9/contrib/file/Magdir/printer stable/9/contrib/file/Magdir/project stable/9/contrib/file/Magdir/psdbms stable/9/contrib/file/Magdir/pulsar stable/9/contrib/file/Magdir/pyramid stable/9/contrib/file/Magdir/python stable/9/contrib/file/Magdir/revision stable/9/contrib/file/Magdir/riff stable/9/contrib/file/Magdir/rpm stable/9/contrib/file/Magdir/rtf stable/9/contrib/file/Magdir/ruby stable/9/contrib/file/Magdir/sc stable/9/contrib/file/Magdir/sccs stable/9/contrib/file/Magdir/scientific stable/9/contrib/file/Magdir/securitycerts stable/9/contrib/file/Magdir/sendmail stable/9/contrib/file/Magdir/sequent stable/9/contrib/file/Magdir/sgi stable/9/contrib/file/Magdir/sgml stable/9/contrib/file/Magdir/sharc stable/9/contrib/file/Magdir/sinclair stable/9/contrib/file/Magdir/sketch stable/9/contrib/file/Magdir/smalltalk stable/9/contrib/file/Magdir/sniffer stable/9/contrib/file/Magdir/softquad stable/9/contrib/file/Magdir/spec stable/9/contrib/file/Magdir/spectrum stable/9/contrib/file/Magdir/sql stable/9/contrib/file/Magdir/sun stable/9/contrib/file/Magdir/sysex stable/9/contrib/file/Magdir/teapot stable/9/contrib/file/Magdir/terminfo stable/9/contrib/file/Magdir/tex stable/9/contrib/file/Magdir/tgif stable/9/contrib/file/Magdir/ti-8x stable/9/contrib/file/Magdir/timezone stable/9/contrib/file/Magdir/troff stable/9/contrib/file/Magdir/tuxedo stable/9/contrib/file/Magdir/typeset stable/9/contrib/file/Magdir/unicode stable/9/contrib/file/Magdir/unknown stable/9/contrib/file/Magdir/uuencode stable/9/contrib/file/Magdir/varied.out stable/9/contrib/file/Magdir/varied.script stable/9/contrib/file/Magdir/vax stable/9/contrib/file/Magdir/vicar stable/9/contrib/file/Magdir/virtutech stable/9/contrib/file/Magdir/visx stable/9/contrib/file/Magdir/vms stable/9/contrib/file/Magdir/vmware stable/9/contrib/file/Magdir/vorbis stable/9/contrib/file/Magdir/vxl stable/9/contrib/file/Magdir/warc stable/9/contrib/file/Magdir/weak stable/9/contrib/file/Magdir/windows stable/9/contrib/file/Magdir/wireless stable/9/contrib/file/Magdir/wordprocessors stable/9/contrib/file/Magdir/xdelta stable/9/contrib/file/Magdir/xenix stable/9/contrib/file/Magdir/xilinx stable/9/contrib/file/Magdir/xo65 stable/9/contrib/file/Magdir/xwindows stable/9/contrib/file/Magdir/zilog stable/9/contrib/file/Magdir/zyxel stable/9/contrib/file/Makefile.am stable/9/contrib/file/Makefile.am-src stable/9/contrib/file/Makefile.in stable/9/contrib/file/README stable/9/contrib/file/TODO stable/9/contrib/file/acinclude.m4 stable/9/contrib/file/aclocal.m4 stable/9/contrib/file/apprentice.c stable/9/contrib/file/apptype.c stable/9/contrib/file/ascmagic.c stable/9/contrib/file/asprintf.c stable/9/contrib/file/cdf.c stable/9/contrib/file/cdf.h stable/9/contrib/file/cdf_time.c stable/9/contrib/file/compile stable/9/contrib/file/compress.c stable/9/contrib/file/config.h.in stable/9/contrib/file/configure stable/9/contrib/file/configure.ac stable/9/contrib/file/elfclass.h stable/9/contrib/file/encoding.c stable/9/contrib/file/file.c stable/9/contrib/file/file.h stable/9/contrib/file/file.man stable/9/contrib/file/file_opts.h stable/9/contrib/file/fsmagic.c stable/9/contrib/file/funcs.c stable/9/contrib/file/install-sh stable/9/contrib/file/is_tar.c stable/9/contrib/file/libmagic.man stable/9/contrib/file/magic.c stable/9/contrib/file/magic.h stable/9/contrib/file/magic.man stable/9/contrib/file/print.c stable/9/contrib/file/readcdf.c stable/9/contrib/file/readelf.c stable/9/contrib/file/readelf.h stable/9/contrib/file/softmagic.c stable/9/contrib/file/tar.h stable/9/contrib/file/tests/Makefile.am stable/9/contrib/file/tests/Makefile.in stable/9/contrib/file/vasprintf.c stable/9/lib/libmagic/Makefile stable/9/lib/libmagic/config.h stable/9/usr.bin/file/Makefile Directory Properties: stable/9/ (props changed) stable/9/contrib/file/ (props changed) stable/9/lib/ (props changed) stable/9/usr.bin/ (props changed) Modified: stable/9/contrib/file/ChangeLog ============================================================================== --- stable/9/contrib/file/ChangeLog Mon Jul 2 08:41:22 2012 (r237982) +++ stable/9/contrib/file/ChangeLog Mon Jul 2 08:48:58 2012 (r237983) @@ -1,3 +1,309 @@ +2012-02-20 17:33 Christos Zoulas + + * Fix CDF parsing issues found by CERT's fuzzing tool (Will Dormann) + +2011-12-15 12:17 Chris Metcalf + + * Support Tilera architectures (tile64, tilepro, tilegx). + +2011-12-16 16:33 Reuben Thomas + + * Add magic for /usr/bin/env Perl scripts + * Weaken generic script magic to avoid clashing with + language-specific magic. + +2011-12-08 13:37 Reuben Thomas + + * Simplify if (p) free(p) to free(p). + +2011-12-08 13:07 Reuben Thomas + + * Remove hardwired token finding (names.h), turning it into soft + magic. Patterns are either anchored regexs or search/8192. English + language detection and PL/1 detection have been removed as they + were too fragile. -e tokens is still accepted for backwards + compatibility. + * Move 3ds patterns (which are commented out anyway) into autodesk + (they were, oddly, in c-lang). + +2011-12-06 00:16 Reuben Thomas + + * Tweak strength of generic hash-bang detectors to be less than + specific ones. + * Make an inconsistent description of Python scripts consistent. + +2011-12-05 23:58 Reuben Thomas + + * Fix minor error in file(1). + +2011-11-05 00:00 Reuben Thomas + + * Fix issue #150 (I hope). + +2011-09-22 12:57 Christos Zoulas + + * Python3 binding fixes from Kelly Anderson + +2011-09-20 11:32 Christos Zoulas + + * If a string type magic entry is marked as text or binary + only match text files against text entries and binary + files against binary entries. + +2011-09-01 12:12 Christos Zoulas + + * Don't wait for any subprocess, just the one we forked. + +2011-08-26 16:40 Christos Zoulas + + * If the application name is not set in a cdf file, try to see + if it has a directory with the application name on it. + +2011-08-17 14:32 Christos Zoulas + + * Fix ELF lseek(2) madness. Inspired by PR/134 by Jan Kaluza + +2011-08-14 09:03 Christos Zoulas + + * Don't use variable string formats. + +2011-07-12 12:32 Reuben Thomas + + * Fix detection of Zip files (Mantis #128). + * Make some minor improvements to file(1). + * Rename MIME types for filesystem objects for consistency with + xdg-utils. Typically this means that application/x-foo becomes + inode/foo, but some names also change slightly, e.g. + application/x-character-device becomes inode/chardevice. + +2011-05-10 20:57 Christos Zoulas + + * fix mingw compilation (Abradoks) + +2011-05-10 20:57 Christos Zoulas + + * remove patchlevel.h + * Fix read past allocated memory caused by double-incrementing + a pointer in a loop (reported by Roberto Maar) + +2011-03-30 15:45 Christos Zoulas + + * Fix cdf string buffer setting (Sven Anders) + +2011-03-20 16:35 Christos Zoulas + + * Eliminate MAXPATHLEN and use dynamic allocation for + path and file buffers. + +2011-03-15 18:15 Christos Zoulas + + * binary tests on magic entries with masks could spuriously + get converted to ascii. + +2011-03-12 18:06 Reuben Thomas + + * Improve file.man (remove BUGS, present email addresses consistently). + +2011-03-07 19:38 Christos Zoulas + + * add lrzip support (from Ville Skytta) + +2011-02-10 16:36 Christos Zoulas + + * fix CDF bounds checking (Guy Helmer) + +2011-02-10 12:03 Christos Zoulas + + * add cdf_ctime() that prints a meaningful error when time cannot + be converted. + +2011-02-02 20:40 Christos Zoulas + + * help and version output to stdout. + + * When matching softmagic for ascii files, don't just print + the softmagic classification, keep going and print the + text classification too. This fixes broken troff files when + we moved them from keyword recognition to softmagic + (they stopped printing "with CRLF" etc.) + Reported by Doug McIlroy. + +2011-01-16 19:31 Reuben Thomas + + * Fix two potential buffer overruns in apprentice_list. + +2011-01-14 22:33 Reuben Thomas + + * New Python binding in pure Python. + * Update libmagic(3). + +2011-01-06 21:40 Reuben Thomas + + * Fix Python bindings (including recent Python 3 compatibility + update). + +2011-01-04 18:43 Reuben Thomas + + * magic/Makefile.am: make it easier to recover from magic build failures. + * Fix pstring length specifier parsing to avoid generating invalid + magic files. + * Add pstring length "J" (for "JPEG") to specify that the length + include itself. + * Fix JPEG comment parsing at last using pstring/HJ! + * Ignore section 5 man pages in doc/.cvsignore. + +2010-12-22 13:12 Christos Zoulas + + * Add pstring/BHhLl to specify the type of the length of pascal + strings. + +2010-11-26 18:39 Reuben Thomas + + * Fix "-e soft": it was ignored when softmagic was called + during asciimagic. + * Improve comments and use "unsigned char" in tar.h/is_tar.c. + +2010-11-05 17:26 Reuben Thomas + + * Make bug reporting addresses more visible. + +2010-11-01 18:35 Reuben Thomas + + * Add tcl magic from Gustaf Neumann + +2010-10-24 10:42 Christos Zoulas + + * Fix the whitespace comparing code (Christopher Chittleborough) + +2010-10-06 21:05 Christos Zoulas + + * allow string/t to work (Jan Kaluza) + +2010-09-20 22:11 Reuben Thomas + + * Apply some patches from Ubuntu and Fedora. + +2010-09-20 21:16 Reuben Thomas + + * Apply all patches from Debian package 5.04-6 which have not + already been applied and are not Debian-specific. + +2010-09-20 15:24 Reuben Thomas + + * Minor security fix to softmagic.c (don't use untrusted + string as printf format). + +2010-07-21 12:20 Christos Zoulas + + * MINGW32 portability from LRN + + * Don't warn about escaping magic regex chars when we are in a regex. + +2010-07-19 10:55 Christos Zoulas + + * Only try to print prpsinfo for core files. (Jan Kaluza) + +2010-04-22 12:55 Christos Zoulas + + * Try more elf offsets for Debian core files. (Arnaud Giersch) + +2010-02-20 15:18 Reuben Thomas + + * Clarify which sort of CDF we mean. + +2010-02-14 22:58 Reuben Thomas + + * Re-jig Zip file type magic so that unsupported special + Zip types (those with "mimetype" at offset 30) can be + recognized. + +2010-02-02 21:50 Reuben Thomas + + * Add support for OCF (EPUB) files (application/epub+zip) + +2010-01-28 18:25 Christos Zoulas + + * Fix core-dump from unbound loop: + https://bugzilla.redhat.com/show_bug.cgi?id=533245 + +2010-01-22 15:45 Christos Zoulas + + * print proper mime for crystal reports file + + * print the last summary information of a cdf document, not the + first so that nested documents print the right info + +2010-01-16 18:42 Charles Longeau + + * bring back some fixes from OpenBSD: + - make gcc2 builds file + - fix typos in a magic file comment + +2009-11-17 18:35 Christos Zoulas + + * ctime/asctime can return NULL on some OS's although + they should not (Toshit Antani) + +2009-09-14 13:49 Christos Zoulas + + * Centralize magic path handling routines and remove the + special-casing from file.c so that the python module for + example comes up with the same magic path (Fixes ~/.magic + handling) (from Gab) + +2009-09-11 23:38 Reuben Thomas + + * When magic argument is a directory, read the files in + strcmp-sorted order (fixes Debian bug #488562 and our own FIXME). + +2009-09-11 13:11 Reuben Thomas + + * Combine overlapping epoc and psion magic files into one (epoc). + + * Add some more EPOC MIME types. + +2009-08-19 15:55 Christos Zoulas + + * Fix 3 bugs (From Ian Darwin): + - file_showstr could move one past the end of the array + - parse_apple did not nul terminate the string in the overflow case + - parse_mime truncated the wrong string in the overflow case + +2009-08-12 12:28 Robert Byrnes + + * Include Localstuff when compiling magic. + +2009-07-15 10:05 Christos Zoulas + + * Fix logic for including mygetopts.h + + * Make cdf.c compile again with debugging + + * Add the necessary field handling for crystal reports files to work + +2009-06-23 01:34 Reuben Thomas + + * Stop "(if" identifying Lisp files, that's plain dumb! + +2009-06-09 22:13 Reuben Thomas + + * Add a couple of missing MP3 MIME types. + +2009-05-27 23:00 Reuben Thomas + + * Add full range of hash-bang tests for Python and Ruby. + + * Add MIME types for Python and Ruby scripts. + +2009-05-13 10:44 Christos Zoulas + + * off by one in parsing hw capabilities in elf + (Cheng Renquan) + +2009-05-08 13:40 Christos Zoulas + + * lint fixes and more from NetBSD + 2009-05-06 10:25 Christos Zoulas * Avoid null dereference in cdf code (Drew Yao) Modified: stable/9/contrib/file/Header ============================================================================== --- stable/9/contrib/file/Header Mon Jul 2 08:41:22 2012 (r237982) +++ stable/9/contrib/file/Header Mon Jul 2 08:48:58 2012 (r237983) @@ -1,5 +1,5 @@ -# Magic # Magic data for file(1) command. -# Machine-generated from src/cmd/file/magdir/*; edit there only! # Format is described in magic(files), where: -# files is 5 on V7 and BSD, 4 on SV, and ?? in the SVID. +# files is 5 on V7 and BSD, 4 on SV, and ?? on SVID. +# Don't edit this file, edit /etc/magic or send your magic improvements +# to the maintainers, at file@mx.gw.com Modified: stable/9/contrib/file/INSTALL ============================================================================== --- stable/9/contrib/file/INSTALL Mon Jul 2 08:41:22 2012 (r237982) +++ stable/9/contrib/file/INSTALL Mon Jul 2 08:48:58 2012 (r237983) @@ -2,18 +2,24 @@ Installation Instructions ************************* Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, -2006 Free Software Foundation, Inc. +2006, 2007, 2008, 2009 Free Software Foundation, Inc. -This file is free documentation; the Free Software Foundation gives -unlimited permission to copy, distribute and modify it. + Copying and distribution of this file, with or without modification, +are permitted in any medium without royalty provided the copyright +notice and this notice are preserved. This file is offered as-is, +without warranty of any kind. Basic Installation ================== -Briefly, the shell commands `./configure; make; make install' should + Briefly, the shell commands `./configure; make; make install' should configure, build, and install this package. The following more-detailed instructions are generic; see the `README' file for -instructions specific to this package. +instructions specific to this package. Some packages provide this +`INSTALL' file but do not implement all of the features documented +below. The lack of an optional feature in a given package is not +necessarily a bug. More recommendations for GNU packages can be found +in *note Makefile Conventions: (standards)Makefile Conventions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses @@ -42,7 +48,7 @@ may remove or edit it. you want to change it or regenerate `configure' using a newer version of `autoconf'. -The simplest way to compile this package is: + The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. @@ -53,12 +59,22 @@ The simplest way to compile this package 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with - the package. + the package, generally using the just-built uninstalled binaries. 4. Type `make install' to install the programs and any data files and - documentation. + documentation. When installing into a prefix owned by root, it is + recommended that the package be configured and built as a regular + user, and only the `make install' phase executed with root + privileges. + + 5. Optionally, type `make installcheck' to repeat any self-tests, but + this time using the binaries in their final installed location. + This target does not install anything. Running this target as a + regular user, particularly if the prior `make install' required + root privileges, verifies that the installation completed + correctly. - 5. You can remove the program binaries and object files from the + 6. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is @@ -67,12 +83,22 @@ The simplest way to compile this package all sorts of other programs in order to regenerate files that came with the distribution. + 7. Often, you can also type `make uninstall' to remove the installed + files again. In practice, not all packages have tested that + uninstallation works correctly, even though it is required by the + GNU Coding Standards. + + 8. Some packages, particularly those that use Automake, provide `make + distcheck', which can by used by developers to test that all other + targets like `make install' and `make uninstall' work correctly. + This target is generally not run by end users. + Compilers and Options ===================== -Some systems require unusual options for compilation or linking that the -`configure' script does not know about. Run `./configure --help' for -details on some of the pertinent environment variables. + Some systems require unusual options for compilation or linking that +the `configure' script does not know about. Run `./configure --help' +for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here @@ -85,25 +111,41 @@ is an example: Compiling For Multiple Architectures ==================================== -You can compile the package for more than one kind of computer at the + You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you can use GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the -source code in the directory that `configure' is in and in `..'. +source code in the directory that `configure' is in and in `..'. This +is known as a "VPATH" build. With a non-GNU `make', it is safer to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. + On MacOS X 10.5 and later systems, you can create libraries and +executables that work on multiple system types--known as "fat" or +"universal" binaries--by specifying multiple `-arch' options to the +compiler but only a single `-arch' option to the preprocessor. Like +this: + + ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ + CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ + CPP="gcc -E" CXXCPP="g++ -E" + + This is not guaranteed to produce working output in all cases, you +may have to build one architecture at a time and combine the results +using the `lipo' tool if you have problems. + Installation Names ================== -By default, `make install' installs the package's commands under + By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving -`configure' the option `--prefix=PREFIX'. +`configure' the option `--prefix=PREFIX', where PREFIX must be an +absolute file name. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you @@ -114,16 +156,47 @@ Documentation and other data files still In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories -you can set and what kinds of files go in them. +you can set and what kinds of files go in them. In general, the +default for these options is expressed in terms of `${prefix}', so that +specifying just `--prefix' will affect all of the other directory +specifications that were not explicitly provided. + + The most portable way to affect installation locations is to pass the +correct locations to `configure'; however, many packages provide one or +both of the following shortcuts of passing variable assignments to the +`make install' command line to change installation locations without +having to reconfigure or recompile. + + The first method involves providing an override variable for each +affected directory. For example, `make install +prefix=/alternate/directory' will choose an alternate location for all +directory configuration variables that were expressed in terms of +`${prefix}'. Any directories that were specified during `configure', +but not in terms of `${prefix}', must each be overridden at install +time for the entire installation to be relocated. The approach of +makefile variable overrides for each directory variable is required by +the GNU Coding Standards, and ideally causes no recompilation. +However, some platforms have known limitations with the semantics of +shared libraries that end up requiring recompilation when using this +method, particularly noticeable in packages that use GNU Libtool. + + The second method involves providing the `DESTDIR' variable. For +example, `make install DESTDIR=/alternate/directory' will prepend +`/alternate/directory' before all installation names. The approach of +`DESTDIR' overrides is not required by the GNU Coding Standards, and +does not work on platforms that have drive letters. On the other hand, +it does better at avoiding recompilation issues, and works well even +when some directory options were not specified in terms of `${prefix}' +at `configure' time. + +Optional Features +================= If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. -Optional Features -================= - -Some packages pay attention to `--enable-FEATURE' options to + Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The @@ -135,14 +208,53 @@ find the X include and library files aut you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. + Some packages offer the ability to configure how verbose the +execution of `make' will be. For these packages, running `./configure +--enable-silent-rules' sets the default to minimal output, which can be +overridden with `make V=1'; while running `./configure +--disable-silent-rules' sets the default to verbose, which can be +overridden with `make V=0'. + +Particular systems +================== + + On HP-UX, the default C compiler is not ANSI C compatible. If GNU +CC is not installed, it is recommended to use the following options in +order to use an ANSI C compiler: + + ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" + +and if that doesn't work, install pre-built binaries of GCC for HP-UX. + + On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot +parse its `' header file. The option `-nodtk' can be used as +a workaround. If GNU CC is not installed, it is therefore recommended +to try + + ./configure CC="cc" + +and if that doesn't work, try + + ./configure CC="cc -nodtk" + + On Solaris, don't put `/usr/ucb' early in your `PATH'. This +directory contains several dysfunctional programs; working variants of +these programs are available in `/usr/bin'. So, if you need `/usr/ucb' +in your `PATH', put it _after_ `/usr/bin'. + + On Haiku, software installed for all users goes in `/boot/common', +not `/usr/local'. It is recommended to use the following options: + + ./configure --prefix=/boot/common + Specifying the System Type ========================== -There may be some features `configure' cannot figure out automatically, -but needs to determine by the type of machine the package will run on. -Usually, assuming the package is built to be run on the _same_ -architectures, `configure' can figure that out, but if it prints a -message saying it cannot guess the machine type, give it the + There may be some features `configure' cannot figure out +automatically, but needs to determine by the type of machine the package +will run on. Usually, assuming the package is built to be run on the +_same_ architectures, `configure' can figure that out, but if it prints +a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: @@ -150,7 +262,8 @@ type, such as `sun4', or a canonical nam where SYSTEM can have one of these forms: - OS KERNEL-OS + OS + KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't @@ -168,9 +281,9 @@ eventually be run) with `--host=TYPE'. Sharing Defaults ================ -If you want to set default values for `configure' scripts to share, you -can create a site shell script called `config.site' that gives default -values for variables like `CC', `cache_file', and `prefix'. + If you want to set default values for `configure' scripts to share, +you can create a site shell script called `config.site' that gives +default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. @@ -179,7 +292,7 @@ A warning: not all `configure' scripts l Defining Variables ================== -Variables not defined in a site shell script can be set in the + Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set @@ -198,11 +311,19 @@ an Autoconf bug. Until the bug is fixed `configure' Invocation ====================== -`configure' recognizes the following options to control how it operates. + `configure' recognizes the following options to control how it +operates. `--help' `-h' - Print a summary of the options to `configure', and exit. + Print a summary of all of the options to `configure', and exit. + +`--help=short' +`--help=recursive' + Print a summary of the options unique to this package's + `configure', and exit. The `short' variant lists options used + only in the top level, while the `recursive' variant lists options + also present in any nested packages. `--version' `-V' @@ -229,6 +350,16 @@ an Autoconf bug. Until the bug is fixed Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. +`--prefix=DIR' + Use DIR as the installation prefix. *note Installation Names:: + for more details, including other options available for fine-tuning + the installation locations. + +`--no-create' +`-n' + Run the configure checks, but stop before creating any output + files. + `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. Modified: stable/9/contrib/file/Magdir/acorn ============================================================================== --- stable/9/contrib/file/Magdir/acorn Mon Jul 2 08:41:22 2012 (r237982) +++ stable/9/contrib/file/Magdir/acorn Mon Jul 2 08:48:58 2012 (r237983) @@ -1,4 +1,6 @@ + #------------------------------------------------------------------------------ +# $File: acorn,v 1.5 2009/09/19 16:28:07 christos Exp $ # acorn: file(1) magic for files found on Acorn systems # Modified: stable/9/contrib/file/Magdir/adi ============================================================================== --- stable/9/contrib/file/Magdir/adi Mon Jul 2 08:41:22 2012 (r237982) +++ stable/9/contrib/file/Magdir/adi Mon Jul 2 08:48:58 2012 (r237983) @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------ +# $File: adi,v 1.4 2009/09/19 16:28:07 christos Exp $ # adi: file(1) magic for ADi's objects # From Gregory McGarry # Modified: stable/9/contrib/file/Magdir/adventure ============================================================================== --- stable/9/contrib/file/Magdir/adventure Mon Jul 2 08:41:22 2012 (r237982) +++ stable/9/contrib/file/Magdir/adventure Mon Jul 2 08:48:58 2012 (r237983) @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------ +# $File: adventure,v 1.13 2010/12/31 16:32:54 christos Exp $ # adventure: file(1) magic for Adventure game files # # from Allen Garvin @@ -16,18 +17,26 @@ # Infocom (see z-machine) #------------------------------------------------------------------------------ # Z-machine: file(1) magic for Z-machine binaries. +# Updated by Adam Buchbinder # -# This will match ${TEX_BASE}/texmf/omega/ocp/char2uni/inbig5.ocp which -# appears to be a version-0 Z-machine binary. -# -# The (false match) message is to correct that behavior. Perhaps it is -# not needed. -# -16 belong&0xfe00f0f0 0x3030 Infocom game data ->0 ubyte 0 (false match) ->0 ubyte >0 (Z-machine %d, ->>2 ubeshort x Release %d / ->>18 string >\0 Serial %.6s) +#http://www.gnelson.demon.co.uk/zspec/sect11.html +#http://www.jczorkmid.net/~jpenney/ZSpec11-latest.txt +#http://en.wikipedia.org/wiki/Z-machine +# The first byte is the Z-machine revision; it is always between 1 and 8. We +# had false matches (for instance, inbig5.ocp from the Omega TeX extension as +# well as an occasional MP3 file), so we sanity-check the version number. +# +# It might be possible to sanity-check the release number as well, as it seems +# (at least in classic Infocom games) to always be a relatively small number, +# always under 150 or so, but as this isn't rigorous, we'll wait on that until +# it becomes clear that it's needed. +# +0 ubyte >0 +>0 ubyte <9 +>>16 belong&0xfe00f0f0 0x3030 Infocom game data +>>>0 ubyte x (Z-machine %d, +>>>>2 ubeshort x Release %d / +>>>>18 string >\0 Serial %.6s) #------------------------------------------------------------------------------ # Glulx: file(1) magic for Glulx binaries. @@ -45,10 +54,9 @@ # For Quetzal and blorb magic see iff -# TADS (Text Adventure Development System) +# TADS (Text Adventure Development System) version 2 # All files are machine-independent (games compile to byte-code) and are tagged -# with a version string of the form "V2..\0" (but TADS 3 is -# on the way). +# with a version string of the form "V2..\0". # Game files start with "TADS2 bin\n\r\032\0" then the compiler version. 0 string TADS2\ bin TADS >9 belong !0x0A0D1A00 game data, CORRUPTED @@ -73,6 +81,19 @@ >10 belong 0x0A0D1A00 >>14 string >\0 %s saved game data +# TADS (Text Adventure Development System) version 3 +# Game files start with "T3-image\015\012\032" +0 string T3-image\015\012\032 +>11 leshort x TADS 3 game data (format version %d) +# Saved game files start with "T3-state-v####\015\012\032" +# where #### is a format version number +0 string T3-state-v +>14 string \015\012\032 TADS 3 saved game data (format version +>>10 byte x %c +>>11 byte x \b%c +>>12 byte x \b%c +>>13 byte x \b%c) + # Danny Milosavljevic # this are adrift (adventure game standard) game files, extension .taf # depending on version magic continues with 0x93453E6139FA (V 4.0) Modified: stable/9/contrib/file/Magdir/allegro ============================================================================== --- stable/9/contrib/file/Magdir/allegro Mon Jul 2 08:41:22 2012 (r237982) +++ stable/9/contrib/file/Magdir/allegro Mon Jul 2 08:48:58 2012 (r237983) @@ -1,4 +1,6 @@ + #------------------------------------------------------------------------------ +# $File: allegro,v 1.4 2009/09/19 16:28:07 christos Exp $ # allegro: file(1) magic for Allegro datafiles # Toby Deshane # Modified: stable/9/contrib/file/Magdir/alliant ============================================================================== --- stable/9/contrib/file/Magdir/alliant Mon Jul 2 08:41:22 2012 (r237982) +++ stable/9/contrib/file/Magdir/alliant Mon Jul 2 08:48:58 2012 (r237983) @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------ +# $File: alliant,v 1.7 2009/09/19 16:28:07 christos Exp $ # alliant: file(1) magic for Alliant FX series a.out files # # If the FX series is the one that had a processor with a 68K-derived Modified: stable/9/contrib/file/Magdir/amanda ============================================================================== --- stable/9/contrib/file/Magdir/amanda Mon Jul 2 08:41:22 2012 (r237982) +++ stable/9/contrib/file/Magdir/amanda Mon Jul 2 08:48:58 2012 (r237983) @@ -1,4 +1,6 @@ + #------------------------------------------------------------------------------ +# $File: amanda,v 1.5 2009/09/19 16:28:07 christos Exp $ # amanda: file(1) magic for amanda file format # 0 string AMANDA:\ AMANDA Modified: stable/9/contrib/file/Magdir/amigaos ============================================================================== --- stable/9/contrib/file/Magdir/amigaos Mon Jul 2 08:41:22 2012 (r237982) +++ stable/9/contrib/file/Magdir/amigaos Mon Jul 2 08:48:58 2012 (r237983) @@ -1,4 +1,6 @@ + #------------------------------------------------------------------------------ +# $File: amigaos,v 1.14 2009/09/19 16:28:07 christos Exp $ # amigaos: file(1) magic for AmigaOS binary formats: # Modified: stable/9/contrib/file/Magdir/animation ============================================================================== --- stable/9/contrib/file/Magdir/animation Mon Jul 2 08:41:22 2012 (r237982) +++ stable/9/contrib/file/Magdir/animation Mon Jul 2 08:48:58 2012 (r237983) @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------ +# $File: animation,v 1.45 2011/09/06 11:00:06 christos Exp $ # animation: file(1) magic for animation/movie formats # # animation formats @@ -29,7 +30,7 @@ #!:mime image/x-quicktime 4 string pckg Apple QuickTime compressed archive !:mime application/x-quicktime-player -4 string/B jP JPEG 2000 image +4 string/W jP JPEG 2000 image !:mime image/jp2 4 string ftyp ISO Media >8 string isom \b, MPEG v4 system, version 1 @@ -41,10 +42,18 @@ !:mime video/mp4 >8 string mp7t \b, MPEG v4 system, MPEG v7 XML >8 string mp7b \b, MPEG v4 system, MPEG v7 binary XML ->8 string/B jp2 \b, JPEG 2000 +>8 string/W jp2 \b, JPEG 2000 !:mime image/jp2 +>8 string 3ge \b, MPEG v4 system, 3GPP +!:mime video/3gpp +>8 string 3gg \b, MPEG v4 system, 3GPP +!:mime video/3gpp >8 string 3gp \b, MPEG v4 system, 3GPP !:mime video/3gpp +>8 string 3gs \b, MPEG v4 system, 3GPP +!:mime video/3gpp +>8 string 3g2 \b, MPEG v4 system, 3GPP2 +!:mime video/3gpp2 >>11 byte 4 \b v4 (H.263/AMR GSM 6.10) >>11 byte 5 \b v5 (H.263/AMR GSM 6.10) >>11 byte 6 \b v6 (ITU H.264/AMR GSM 6.10) @@ -52,13 +61,13 @@ !:mime video/mp4 >8 string avc1 \b, MPEG v4 system, 3GPP JVT AVC !:mime video/3gpp ->8 string/B M4A \b, MPEG v4 system, iTunes AAC-LC +>8 string/W M4A \b, MPEG v4 system, iTunes AAC-LC !:mime audio/mp4 ->8 string/B M4V \b, MPEG v4 system, iTunes AVC-LC +>8 string/W M4V \b, MPEG v4 system, iTunes AVC-LC !:mime video/mp4 ->8 string/B M4P \b, MPEG v4 system, iTunes AES encrypted ->8 string/B M4B \b, MPEG v4 system, iTunes bookmarked ->8 string/B qt \b, Apple QuickTime movie +>8 string/W M4P \b, MPEG v4 system, iTunes AES encrypted +>8 string/W M4B \b, MPEG v4 system, iTunes bookmarked +>8 string/W qt \b, Apple QuickTime movie !:mime video/quicktime # MPEG sequences @@ -71,6 +80,7 @@ >>7 byte x \b @ L %u 0 belong&0xFFFFFF00 0x00000100 >3 byte 0xBA MPEG sequence +!:mime video/mpeg >>4 byte &0x40 \b, v2, program multiplex >>4 byte ^0x40 \b, v1, system multiplex >3 byte 0xBB MPEG sequence, v1/2, multiplex (missing pack header) @@ -80,6 +90,7 @@ >>4 byte 88 \b, extended >>6 byte x \b @ L %u >3 byte 0xB0 MPEG sequence, v4 +!:mime video/mpeg4-generic >>5 belong 0x000001B5 >>>9 byte &0x80 >>>>10 byte&0xF0 16 \b, video @@ -149,6 +160,7 @@ >>4 byte 252 \b, FGS @ L4 >>4 byte 253 \b, FGS @ L5 >3 byte 0xB5 MPEG sequence, v4 +!:mime video/mpeg4-generic >>4 byte &0x80 >>>5 byte&0xF0 16 \b, video (missing profile header) >>>5 byte&0xF0 32 \b, still texture (missing profile header) @@ -159,6 +171,7 @@ >>4 byte&0xF8 24 \b, mesh (missing profile header) >>4 byte&0xF8 32 \b, face (missing profile header) >3 byte 0xB3 MPEG sequence +!:mime video/mpeg >>12 belong 0x000001B8 \b, v1, progressive Y'CbCr 4:2:0 video >>12 belong 0x000001B2 \b, v1, progressive Y'CbCr 4:2:0 video >>12 belong 0x000001B5 \b, v2, @@ -469,6 +482,7 @@ # MPA, M2A 0 beshort&0xFFFE 0xFFF6 MPEG ADTS, layer I, v2 +!:mime audio/mpeg # rate >2 byte&0xF0 0x10 \b, 32 kbps >2 byte&0xF0 0x20 \b, 48 kbps @@ -503,6 +517,7 @@ # MP3, M25A 0 beshort&0xFFFE 0xFFE2 MPEG ADTS, layer III, v2.5 +!:mime audio/mpeg # rate >2 byte&0xF0 0x10 \b, 8 kbps >2 byte&0xF0 0x20 \b, 16 kbps @@ -697,6 +712,7 @@ # Microsoft Advanced Streaming Format (ASF) 0 belong 0x3026b275 Microsoft ASF +!:mime video/x-ms-asf # MNG Video Format, 0 string \x8aMNG MNG video data, @@ -718,16 +734,16 @@ 3 string \x0D\x0AVersion:Vivo Vivo video data # VRML (Virtual Reality Modelling Language) -0 string/b #VRML\ V1.0\ ascii VRML 1 file +0 string/w #VRML\ V1.0\ ascii VRML 1 file !:mime model/vrml -0 string/b #VRML\ V2.0\ utf8 ISO/IEC 14772 VRML 97 file +0 string/w #VRML\ V2.0\ utf8 ISO/IEC 14772 VRML 97 file !:mime model/vrml # X3D (Extensible 3D) [http://www.web3d.org/specifications/x3d-3.0.dtd] # From Michel Briand -0 string \20 search/1000/cb \20 search/1000/cw \ 2008-07-18 0 string BIK Bink Video >3 regex =[a-z] rev.%s @@ -813,3 +830,66 @@ >>51 byte&0x20 !0 stereo #>>51 byte&0x10 0 FFT #>>51 byte&0x10 !0 DCT + +# Type: NUT Container +# URL: http://wiki.multimedia.cx/index.php?title=NUT +# From: Adam Buchbinder +0 string nut/multimedia\ container\0 NUT multimedia container + +# Type: Nullsoft Video (NSV) +# URL: http://wiki.multimedia.cx/index.php?title=Nullsoft_Video +# From: Mike Melanson +0 string NSVf Nullsoft Video + +# Type: REDCode Video +# URL: http://www.red.com/ ; http://wiki.multimedia.cx/index.php?title=REDCode +# From: Mike Melanson +4 string RED1 REDCode Video + +# Type: MTV Multimedia File +# URL: http://wiki.multimedia.cx/index.php?title=MTV +# From: Mike Melanson +0 string AMVS MTV Multimedia File + +# Type: ARMovie +# URL: http://wiki.multimedia.cx/index.php?title=ARMovie +# From: Mike Melanson +0 string ARMovie\012 ARMovie + +# Type: Interplay MVE Movie +# URL: http://wiki.multimedia.cx/index.php?title=Interplay_MVE +# From: Mike Melanson +0 string Interplay\040MVE\040File\032 Interplay MVE Movie + +# Type: Windows Television DVR File +# URL: http://wiki.multimedia.cx/index.php?title=WTV +# From: Mike Melanson +# This takes the form of a Windows-style GUID +0 bequad 0xB7D800203749DA11 +>8 bequad 0xA64E0007E95EAD8D Windows Television DVR Media + +# Type: Sega FILM/CPK Multimedia +# URL: http://wiki.multimedia.cx/index.php?title=Sega_FILM +# From: Mike Melanson +0 string FILM Sega FILM/CPK Multimedia, +>32 belong x %d x +>28 belong x %d + +# Type: Nintendo THP Multimedia +# URL: http://wiki.multimedia.cx/index.php?title=THP +# From: Mike Melanson +0 string THP\0 Nintendo THP Multimedia + +# Type: BBC Dirac Video +# URL: http://wiki.multimedia.cx/index.php?title=Dirac +# From: Mike Melanson +0 string BBCD BBC Dirac Video + +# Type: RAD Game Tools Smacker Multimedia +# URL: http://wiki.multimedia.cx/index.php?title=Smacker +# From: Mike Melanson +0 string SMK RAD Game Tools Smacker Multimedia +>3 byte x version %c, +>4 lelong x %d x +>8 lelong x %d, +>12 lelong x %d frames Modified: stable/9/contrib/file/Magdir/apl ============================================================================== --- stable/9/contrib/file/Magdir/apl Mon Jul 2 08:41:22 2012 (r237982) +++ stable/9/contrib/file/Magdir/apl Mon Jul 2 08:48:58 2012 (r237983) @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------ +# $File: apl,v 1.6 2009/09/19 16:28:07 christos Exp $ # apl: file(1) magic for APL (see also "pdp" and "vax" for other APL # workspaces) # Modified: stable/9/contrib/file/Magdir/apple ============================================================================== --- stable/9/contrib/file/Magdir/apple Mon Jul 2 08:41:22 2012 (r237982) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 08:59:46 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx2.freebsd.org (mx2.freebsd.org [69.147.83.53]) by hub.freebsd.org (Postfix) with ESMTP id AD167106566C; Mon, 2 Jul 2012 08:59:46 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from opti.dougb.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id CDA7114D8E4; Mon, 2 Jul 2012 08:59:45 +0000 (UTC) Message-ID: <4FF16301.10606@FreeBSD.org> Date: Mon, 02 Jul 2012 01:59:45 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:13.0) Gecko/20120621 Thunderbird/13.0.1 MIME-Version: 1.0 To: Andriy Gapon References: <201206290735.q5T7ZbSk026312@svn.freebsd.org> <4FED5C51.9060603@FreeBSD.org> <4FF153DB.7080904@FreeBSD.org> <4FF15506.8080206@FreeBSD.org> In-Reply-To: <4FF15506.8080206@FreeBSD.org> X-Enigmail-Version: 1.4.2 OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r237748 - in head/sys/cddl/dev/dtrace: amd64 i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 08:59:46 -0000 On 07/02/2012 01:00, Andriy Gapon wrote: > on 02/07/2012 10:55 Doug Barton said the following: >> On 06/29/2012 00:42, Andriy Gapon wrote: >>> I haven't studied at all what the newer code brings in, but it must be some >>> fixes and improvements, I guess :-) >> >> Seriously? >> > > I expected to hear from you :-) So let me get this straight ... you intentionally inserted an inflammatory comment that seems to indicate that you didn't actually review the code you committed in an attempt to bait me into saying something? -- This .signature sanitized for your protection From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 09:25:08 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D58E4106564A; Mon, 2 Jul 2012 09:25:08 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C1A598FC19; Mon, 2 Jul 2012 09:25:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q629P8Om060527; Mon, 2 Jul 2012 09:25:08 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q629P8dX060525; Mon, 2 Jul 2012 09:25:08 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201207020925.q629P8dX060525@svn.freebsd.org> From: "David E. O'Brien" Date: Mon, 2 Jul 2012 09:25:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237984 - stable/9/lib/libmagic X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 09:25:09 -0000 Author: obrien Date: Mon Jul 2 09:25:08 2012 New Revision: 237984 URL: http://svn.freebsd.org/changeset/base/237984 Log: Allow building on FreeBSD 7. Note that "HAVE_GETLINE" should be #undef'ed in config.h as were not using the libc interface -- however that leads to redundant redeclaration compiler warnings between the internal file.h and . Modified: stable/9/lib/libmagic/Makefile Modified: stable/9/lib/libmagic/Makefile ============================================================================== --- stable/9/lib/libmagic/Makefile Mon Jul 2 08:48:58 2012 (r237983) +++ stable/9/lib/libmagic/Makefile Mon Jul 2 09:25:08 2012 (r237984) @@ -13,6 +13,7 @@ MAN= libmagic.3 magic.5 SRCS= apprentice.c apptype.c ascmagic.c cdf.c cdf_time.c compress.c \ encoding.c fsmagic.c funcs.c \ is_tar.c magic.c print.c readcdf.c readelf.c softmagic.c +SRCS+= getline.c INCS= magic.h MAGICPATH?= /usr/share/misc From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 09:35:29 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AB80B1065672; Mon, 2 Jul 2012 09:35:29 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7DDA98FC15; Mon, 2 Jul 2012 09:35:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q629ZTpG061158; Mon, 2 Jul 2012 09:35:29 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q629ZTUL061155; Mon, 2 Jul 2012 09:35:29 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201207020935.q629ZTUL061155@svn.freebsd.org> From: "David E. O'Brien" Date: Mon, 2 Jul 2012 09:35:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237985 - stable/9/lib/libedit/edit/readline X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 09:35:29 -0000 Author: obrien Date: Mon Jul 2 09:35:28 2012 New Revision: 237985 URL: http://svn.freebsd.org/changeset/base/237985 Log: MFC: r228114 r228116 r234690: install a readline/tilde.h Added: stable/9/lib/libedit/edit/readline/tilde.h - copied unchanged from r234690, head/lib/libedit/edit/readline/tilde.h Modified: stable/9/lib/libedit/edit/readline/Makefile Directory Properties: stable/9/ (props changed) stable/9/lib/ (props changed) stable/9/lib/libedit/ (props changed) Modified: stable/9/lib/libedit/edit/readline/Makefile ============================================================================== --- stable/9/lib/libedit/edit/readline/Makefile Mon Jul 2 09:25:08 2012 (r237984) +++ stable/9/lib/libedit/edit/readline/Makefile Mon Jul 2 09:35:28 2012 (r237985) @@ -1,7 +1,7 @@ # Copyright (c) 2011 David E O'Brien # $FreeBSD$ -INCS= readline.h history.h +INCS= readline.h history.h tilde.h INCSDIR= ${INCLUDEDIR}/edit/readline Copied: stable/9/lib/libedit/edit/readline/tilde.h (from r234690, head/lib/libedit/edit/readline/tilde.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/lib/libedit/edit/readline/tilde.h Mon Jul 2 09:35:28 2012 (r237985, copy of r234690, head/lib/libedit/edit/readline/tilde.h) @@ -0,0 +1,32 @@ +/*- + * Copyright (c) 2011 David E. O'Brien + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the author nor the names of contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 09:43:22 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 638281065675; Mon, 2 Jul 2012 09:43:22 +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 1BD288FC1B; Mon, 2 Jul 2012 09:43:20 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id MAA06781; Mon, 02 Jul 2012 12:43:19 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1SldA7-000HKa-9w; Mon, 02 Jul 2012 12:43:19 +0300 Message-ID: <4FF16D35.5050104@FreeBSD.org> Date: Mon, 02 Jul 2012 12:43:17 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:13.0) Gecko/20120620 Thunderbird/13.0.1 MIME-Version: 1.0 To: Doug Barton References: <201206290735.q5T7ZbSk026312@svn.freebsd.org> <4FED5C51.9060603@FreeBSD.org> <4FF153DB.7080904@FreeBSD.org> <4FF15506.8080206@FreeBSD.org> <4FF16301.10606@FreeBSD.org> In-Reply-To: <4FF16301.10606@FreeBSD.org> X-Enigmail-Version: 1.4.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r237748 - in head/sys/cddl/dev/dtrace: amd64 i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 09:43:22 -0000 on 02/07/2012 11:59 Doug Barton said the following: > On 07/02/2012 01:00, Andriy Gapon wrote: >> on 02/07/2012 10:55 Doug Barton said the following: >>> On 06/29/2012 00:42, Andriy Gapon wrote: >>>> I haven't studied at all what the newer code brings in, but it must be some >>>> fixes and improvements, I guess :-) >>> >>> Seriously? >>> >> >> I expected to hear from you :-) > > So let me get this straight ... you intentionally inserted an > inflammatory comment that seems to indicate that you didn't actually > review the code you committed in an attempt to bait me into saying > something? No. -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 09:47:39 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6F39B106566B; Mon, 2 Jul 2012 09:47:39 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5A65E8FC17; Mon, 2 Jul 2012 09:47:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q629ldlo061704; Mon, 2 Jul 2012 09:47:39 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q629ldKa061702; Mon, 2 Jul 2012 09:47:39 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201207020947.q629ldKa061702@svn.freebsd.org> From: "David E. O'Brien" Date: Mon, 2 Jul 2012 09:47:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237986 - stable/9/sys/modules/aesni X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 09:47:39 -0000 Author: obrien Date: Mon Jul 2 09:47:38 2012 New Revision: 237986 URL: http://svn.freebsd.org/changeset/base/237986 Log: MFC: r235879: style.Makefile(5) Modified: stable/9/sys/modules/aesni/Makefile Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/modules/ (props changed) Modified: stable/9/sys/modules/aesni/Makefile ============================================================================== --- stable/9/sys/modules/aesni/Makefile Mon Jul 2 09:35:28 2012 (r237985) +++ stable/9/sys/modules/aesni/Makefile Mon Jul 2 09:47:38 2012 (r237986) @@ -4,7 +4,7 @@ KMOD= aesni SRCS= aesni.c aesni_wrap.c -SRCS+= aesencdec_$(MACHINE_CPUARCH).S aeskeys_$(MACHINE_CPUARCH).S +SRCS+= aesencdec_${MACHINE_CPUARCH}.S aeskeys_${MACHINE_CPUARCH}.S SRCS+= device_if.h bus_if.h opt_bus.h cryptodev_if.h .include From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 09:53:09 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3061E1065670; Mon, 2 Jul 2012 09:53:09 +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 D5D0D8FC08; Mon, 2 Jul 2012 09:53:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q629r8JG061962; Mon, 2 Jul 2012 09:53:08 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q629r8kf061960; Mon, 2 Jul 2012 09:53:08 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201207020953.q629r8kf061960@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 2 Jul 2012 09:53:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237987 - head/sys/fs/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 09:53:09 -0000 Author: kib Date: Mon Jul 2 09:53:08 2012 New Revision: 237987 URL: http://svn.freebsd.org/changeset/base/237987 Log: Do not override an error from uiomove() with (non-)error result from bwrite(). VFS needs to know about EFAULT from uiomove() and does not care much that partially filled block writeback after EFAULT was successfull. Early return without error causes short write to be reported to usermode. Reported and tested by: andreast MFC after: 3 weeks Modified: head/sys/fs/nfsclient/nfs_clbio.c Modified: head/sys/fs/nfsclient/nfs_clbio.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clbio.c Mon Jul 2 09:47:38 2012 (r237986) +++ head/sys/fs/nfsclient/nfs_clbio.c Mon Jul 2 09:53:08 2012 (r237987) @@ -897,7 +897,7 @@ ncl_write(struct vop_write_args *ap) struct nfsmount *nmp = VFSTONFS(vp->v_mount); daddr_t lbn; int bcount; - int bp_cached, n, on, error = 0; + int bp_cached, n, on, error = 0, error1; size_t orig_resid, local_resid; off_t orig_size, tmp_off; @@ -1259,9 +1259,12 @@ again: if ((ioflag & IO_SYNC)) { if (ioflag & IO_INVAL) bp->b_flags |= B_NOCACHE; - error = bwrite(bp); - if (error) + error1 = bwrite(bp); + if (error1 != 0) { + if (error == 0) + error = error1; break; + } } else if ((n + on) == biosize) { bp->b_flags |= B_ASYNC; (void) ncl_writebp(bp, 0, NULL); From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 09:53:58 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0C8531065670; Mon, 2 Jul 2012 09:53:58 +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 ECEBA8FC12; Mon, 2 Jul 2012 09:53:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q629rvU0062032; Mon, 2 Jul 2012 09:53:57 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q629rvF4062030; Mon, 2 Jul 2012 09:53:57 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201207020953.q629rvF4062030@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 2 Jul 2012 09:53:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237988 - head/usr.bin/xinstall X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 09:53:58 -0000 Author: kib Date: Mon Jul 2 09:53:57 2012 New Revision: 237988 URL: http://svn.freebsd.org/changeset/base/237988 Log: Issue proper diagnostic on the short writes, also consider the case of write reporting 0 bytes as short write. Reported and tested by: adreast MFC after: 1 week Modified: head/usr.bin/xinstall/xinstall.c Modified: head/usr.bin/xinstall/xinstall.c ============================================================================== --- head/usr.bin/xinstall/xinstall.c Mon Jul 2 09:53:08 2012 (r237987) +++ head/usr.bin/xinstall/xinstall.c Mon Jul 2 09:53:57 2012 (r237988) @@ -55,6 +55,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -671,11 +672,18 @@ copy(int from_fd, const char *from_name, if (size <= 8 * 1048576 && trymmap(from_fd) && (p = mmap(NULL, (size_t)size, PROT_READ, MAP_SHARED, from_fd, (off_t)0)) != (char *)MAP_FAILED) { - if ((nw = write(to_fd, p, size)) != size) { + nw = write(to_fd, p, size); + if (nw != size) { serrno = errno; (void)unlink(to_name); - errno = nw > 0 ? EIO : serrno; - err(EX_OSERR, "%s", to_name); + if (nw >= 0) { + errx(EX_OSERR, + "short write to %s: %jd bytes written, %jd bytes asked to write", + to_name, (uintmax_t)nw, (uintmax_t)size); + } else { + errno = serrno; + err(EX_OSERR, "%s", to_name); + } } done_copy = 1; } @@ -684,8 +692,15 @@ copy(int from_fd, const char *from_name, if ((nw = write(to_fd, buf, nr)) != nr) { serrno = errno; (void)unlink(to_name); - errno = nw > 0 ? EIO : serrno; - err(EX_OSERR, "%s", to_name); + if (nw >= 0) { + errx(EX_OSERR, + "short write to %s: %jd bytes written, %jd bytes asked to write", + to_name, (uintmax_t)nw, + (uintmax_t)size); + } else { + errno = serrno; + err(EX_OSERR, "%s", to_name); + } } if (nr != 0) { serrno = errno; From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 10:00:28 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A98E1106566C; Mon, 2 Jul 2012 10:00:28 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 955088FC14; Mon, 2 Jul 2012 10:00:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q62A0SIB062439; Mon, 2 Jul 2012 10:00:28 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q62A0SFV062437; Mon, 2 Jul 2012 10:00:28 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201207021000.q62A0SFV062437@svn.freebsd.org> From: "David E. O'Brien" Date: Mon, 2 Jul 2012 10:00:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237989 - stable/9/lib/libstand X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 10:00:28 -0000 Author: obrien Date: Mon Jul 2 10:00:28 2012 New Revision: 237989 URL: http://svn.freebsd.org/changeset/base/237989 Log: MFC: r235939: consitently use "__LP64__" Modified: stable/9/lib/libstand/bswap.c Directory Properties: stable/9/ (props changed) stable/9/lib/ (props changed) stable/9/lib/libstand/ (props changed) Modified: stable/9/lib/libstand/bswap.c ============================================================================== --- stable/9/lib/libstand/bswap.c Mon Jul 2 09:53:57 2012 (r237988) +++ stable/9/lib/libstand/bswap.c Mon Jul 2 10:00:28 2012 (r237989) @@ -31,7 +31,7 @@ bswap32(u_int32_t x) u_int64_t bswap64(u_int64_t x) { -#ifdef _LP64 +#ifdef __LP64__ /* * Assume we have wide enough registers to do it without touching * memory. From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 10:06:01 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4B3C4106566C; Mon, 2 Jul 2012 10:06:01 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1E8998FC08; Mon, 2 Jul 2012 10:06:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q62A60Qs062793; Mon, 2 Jul 2012 10:06:00 GMT (envelope-from bms@svn.freebsd.org) Received: (from bms@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q62A60uu062790; Mon, 2 Jul 2012 10:06:00 GMT (envelope-from bms@svn.freebsd.org) Message-Id: <201207021006.q62A60uu062790@svn.freebsd.org> From: Bruce M Simpson Date: Mon, 2 Jul 2012 10:06:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237990 - stable/9/sys/netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 10:06:01 -0000 Author: bms Date: Mon Jul 2 10:06:00 2012 New Revision: 237990 URL: http://svn.freebsd.org/changeset/base/237990 Log: Merge r237734 from HEAD: In MLDv2 general query processing, do not enforce the strict check on query origins. Submitted by: Gu Yong Modified: stable/9/sys/netinet6/mld6.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/e1000/ (props changed) stable/9/sys/dev/isp/ (props changed) stable/9/sys/dev/ixgbe/ (props changed) stable/9/sys/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/modules/ (props changed) Modified: stable/9/sys/netinet6/mld6.c ============================================================================== --- stable/9/sys/netinet6/mld6.c Mon Jul 2 10:00:28 2012 (r237989) +++ stable/9/sys/netinet6/mld6.c Mon Jul 2 10:06:00 2012 (r237990) @@ -866,16 +866,10 @@ mld_v2_input_query(struct ifnet *ifp, co */ if (IN6_IS_ADDR_UNSPECIFIED(&mld->mld_addr)) { /* - * General Queries SHOULD be directed to ff02::1. * A general query with a source list has undefined * behaviour; discard it. */ - struct in6_addr dst; - - dst = ip6->ip6_dst; - in6_clearscope(&dst); - if (!IN6_ARE_ADDR_EQUAL(&dst, &in6addr_linklocal_allnodes) || - nsrc > 0) + if (nsrc > 0) return (EINVAL); is_general_query = 1; } else { From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 10:06:14 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A0074106564A; Mon, 2 Jul 2012 10:06:14 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1C30F8FC17; Mon, 2 Jul 2012 10:06:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q62A6DZo062840; Mon, 2 Jul 2012 10:06:13 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q62A6DaB062838; Mon, 2 Jul 2012 10:06:13 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201207021006.q62A6DaB062838@svn.freebsd.org> From: "David E. O'Brien" Date: Mon, 2 Jul 2012 10:06:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237991 - stable/9/kerberos5 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 10:06:14 -0000 Author: obrien Date: Mon Jul 2 10:06:13 2012 New Revision: 237991 URL: http://svn.freebsd.org/changeset/base/237991 Log: Revert r223540 - it broke the simple 'make -C kerberos5' build. Modified: stable/9/kerberos5/Makefile Modified: stable/9/kerberos5/Makefile ============================================================================== --- stable/9/kerberos5/Makefile Mon Jul 2 10:06:00 2012 (r237990) +++ stable/9/kerberos5/Makefile Mon Jul 2 10:06:13 2012 (r237991) @@ -1,6 +1,6 @@ # $FreeBSD$ -SUBDIR= doc lib libexec usr.bin usr.sbin +SUBDIR= doc tools lib libexec usr.bin usr.sbin # These are the programs which depend on Kerberos. KPROGS= lib/libpam \ From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 10:07:32 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B7498106566B; Mon, 2 Jul 2012 10:07:32 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A29978FC0A; Mon, 2 Jul 2012 10:07:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q62A7W0s062947; Mon, 2 Jul 2012 10:07:32 GMT (envelope-from bms@svn.freebsd.org) Received: (from bms@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q62A7W58062945; Mon, 2 Jul 2012 10:07:32 GMT (envelope-from bms@svn.freebsd.org) Message-Id: <201207021007.q62A7W58062945@svn.freebsd.org> From: Bruce M Simpson Date: Mon, 2 Jul 2012 10:07:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237992 - stable/9/sys/netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 10:07:32 -0000 Author: bms Date: Mon Jul 2 10:07:32 2012 New Revision: 237992 URL: http://svn.freebsd.org/changeset/base/237992 Log: Merge r237735 from HEAD: Fix a typo in MLD query exponent processing. Submitted by: rpaulo@ Modified: stable/9/sys/netinet6/mld6.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/e1000/ (props changed) stable/9/sys/dev/isp/ (props changed) stable/9/sys/dev/ixgbe/ (props changed) stable/9/sys/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/modules/ (props changed) Modified: stable/9/sys/netinet6/mld6.c ============================================================================== --- stable/9/sys/netinet6/mld6.c Mon Jul 2 10:06:13 2012 (r237991) +++ stable/9/sys/netinet6/mld6.c Mon Jul 2 10:07:32 2012 (r237992) @@ -832,7 +832,7 @@ mld_v2_input_query(struct ifnet *ifp, co mld = (struct mldv2_query *)(mtod(m, uint8_t *) + off); maxdelay = ntohs(mld->mld_maxdelay); /* in 1/10ths of a second */ - if (maxdelay >= 32678) { + if (maxdelay >= 32768) { maxdelay = (MLD_MRC_MANT(maxdelay) | 0x1000) << (MLD_MRC_EXP(maxdelay) + 3); } From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 10:14:13 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 00E7F1065672; Mon, 2 Jul 2012 10:14:13 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E07538FC0C; Mon, 2 Jul 2012 10:14:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q62AECKB063292; Mon, 2 Jul 2012 10:14:12 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q62AECMl063289; Mon, 2 Jul 2012 10:14:12 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201207021014.q62AECMl063289@svn.freebsd.org> From: "David E. O'Brien" Date: Mon, 2 Jul 2012 10:14:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237993 - in stable/9/kerberos5: usr.bin/kadmin usr.sbin/ktutil X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 10:14:13 -0000 Author: obrien Date: Mon Jul 2 10:14:12 2012 New Revision: 237993 URL: http://svn.freebsd.org/changeset/base/237993 Log: * Avoid race conditions with 'make -j'. (partially MFC r236337 (in spirit)) Modified: stable/9/kerberos5/usr.bin/kadmin/Makefile stable/9/kerberos5/usr.sbin/ktutil/Makefile Modified: stable/9/kerberos5/usr.bin/kadmin/Makefile ============================================================================== --- stable/9/kerberos5/usr.bin/kadmin/Makefile Mon Jul 2 10:07:32 2012 (r237992) +++ stable/9/kerberos5/usr.bin/kadmin/Makefile Mon Jul 2 10:14:12 2012 (r237993) @@ -38,9 +38,13 @@ LDFLAGS=${LDAPLDFLAGS} .include -kadmin-commands.c kadmin-commands.h: ${KRB5DIR}/kadmin/kadmin-commands.in ../../tools/slc/slc +kadmin-commands.h: ${KRB5DIR}/kadmin/kadmin-commands.in ../../tools/slc/slc ../../tools/slc/slc ${.ALLSRC:M*.in} +.for ext in c o +kadmin-commands.${ext}: kadmin-commands.h +.endfor + ../../tools/slc/slc: cd ${.CURDIR}/../../tools/slc && ${MAKE} Modified: stable/9/kerberos5/usr.sbin/ktutil/Makefile ============================================================================== --- stable/9/kerberos5/usr.sbin/ktutil/Makefile Mon Jul 2 10:07:32 2012 (r237992) +++ stable/9/kerberos5/usr.sbin/ktutil/Makefile Mon Jul 2 10:14:12 2012 (r237993) @@ -25,9 +25,13 @@ LDADD= -lkadm5clnt -lkrb5 -lhx509 ${LIBS .include -ktutil-commands.c ktutil-commands.h: ${KRB5DIR}/admin/ktutil-commands.in ../../tools/slc/slc +ktutil-commands.h: ${KRB5DIR}/admin/ktutil-commands.in ../../tools/slc/slc ../../tools/slc/slc ${.ALLSRC:M*.in} +.for ext in c o +ktutil-commands.${ext}: ktutil-commands.h +.endfor + ../../tools/slc/slc: cd ${.CURDIR}/../../tools/slc && ${MAKE} From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 10:16:14 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DCD3A1065676; Mon, 2 Jul 2012 10:16:14 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C83CF8FC08; Mon, 2 Jul 2012 10:16:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q62AGEik063514; Mon, 2 Jul 2012 10:16:14 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q62AGEl0063512; Mon, 2 Jul 2012 10:16:14 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201207021016.q62AGEl0063512@svn.freebsd.org> From: "David E. O'Brien" Date: Mon, 2 Jul 2012 10:16:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237994 - stable/9/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 10:16:15 -0000 Author: obrien Date: Mon Jul 2 10:16:14 2012 New Revision: 237994 URL: http://svn.freebsd.org/changeset/base/237994 Log: MFC: r236623: RAID is an acronym Modified: stable/9/share/man/man4/mpt.4 Directory Properties: stable/9/ (props changed) stable/9/share/ (props changed) stable/9/share/man/ (props changed) stable/9/share/man/man4/ (props changed) Modified: stable/9/share/man/man4/mpt.4 ============================================================================== --- stable/9/share/man/man4/mpt.4 Mon Jul 2 10:14:12 2012 (r237993) +++ stable/9/share/man/man4/mpt.4 Mon Jul 2 10:16:14 2012 (r237994) @@ -124,15 +124,15 @@ Dell PowerEdge 1750 thru 2850 IBM eServer xSeries 335 .El .Pp -These systems also contain Integrated Raid Mirroring and Integrated -Raid Mirroring Enhanced which this driver also supports. +These systems also contain Integrated RAID Mirroring and Integrated +RAID Mirroring Enhanced which this driver also supports. .Pp The .Tn SAS controller chips are also present on many new AMD/Opteron based systems, like the Sun 4100. Note that this controller can drive both SAS and SATA -drives or a mix of them at the same time. The Integrated Raid Mirroring +drives or a mix of them at the same time. The Integrated RAID Mirroring available for these controllers is poorly supported at best. .Pp The From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 11:46:47 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AB7A91065670; Mon, 2 Jul 2012 11:46:47 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9596B8FC0A; Mon, 2 Jul 2012 11:46:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q62BklKh069037; Mon, 2 Jul 2012 11:46:47 GMT (envelope-from bms@svn.freebsd.org) Received: (from bms@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q62BklLn069035; Mon, 2 Jul 2012 11:46:47 GMT (envelope-from bms@svn.freebsd.org) Message-Id: <201207021146.q62BklLn069035@svn.freebsd.org> From: Bruce M Simpson Date: Mon, 2 Jul 2012 11:46:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237995 - stable/9/sys/netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 11:46:47 -0000 Author: bms Date: Mon Jul 2 11:46:47 2012 New Revision: 237995 URL: http://svn.freebsd.org/changeset/base/237995 Log: Merge r237736 from HEAD: Kick the current-state report timer when a V1 group report would be triggered. Submitted by: rpaulo@ Modified: stable/9/sys/netinet6/mld6.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/e1000/ (props changed) stable/9/sys/dev/isp/ (props changed) stable/9/sys/dev/ixgbe/ (props changed) stable/9/sys/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/modules/ (props changed) Modified: stable/9/sys/netinet6/mld6.c ============================================================================== --- stable/9/sys/netinet6/mld6.c Mon Jul 2 10:16:14 2012 (r237994) +++ stable/9/sys/netinet6/mld6.c Mon Jul 2 11:46:47 2012 (r237995) @@ -2196,6 +2196,7 @@ mld_final_leave(struct in6_multi *inm, s #endif mld_v1_transmit_report(inm, MLD_LISTENER_DONE); inm->in6m_state = MLD_NOT_MEMBER; + V_current_state_timers_running6 = 1; } else if (mli->mli_version == MLD_VERSION_2) { /* * Stop group timer and all pending reports. From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 14:03:20 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9E396106566B; Mon, 2 Jul 2012 14:03:20 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 89DFD8FC14; Mon, 2 Jul 2012 14:03:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q62E3Kum074544; Mon, 2 Jul 2012 14:03:20 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q62E3KkH074542; Mon, 2 Jul 2012 14:03:20 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201207021403.q62E3KkH074542@svn.freebsd.org> From: Christian Brueffer Date: Mon, 2 Jul 2012 14:03:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237996 - head/sys/i386/i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 14:03:20 -0000 Author: brueffer Date: Mon Jul 2 14:03:19 2012 New Revision: 237996 URL: http://svn.freebsd.org/changeset/base/237996 Log: Fix XEN build, broken in r237924. Reported by: gcooper Pointy hat: brueffer Modified: head/sys/i386/i386/machdep.c Modified: head/sys/i386/i386/machdep.c ============================================================================== --- head/sys/i386/i386/machdep.c Mon Jul 2 11:46:47 2012 (r237995) +++ head/sys/i386/i386/machdep.c Mon Jul 2 14:03:19 2012 (r237996) @@ -2176,13 +2176,13 @@ basemem_setup(void) static void getmemsize(int first) { - int has_smap, off, physmap_idx, pa_indx, da_indx, res; + int has_smap, off, physmap_idx, pa_indx, da_indx; u_long physmem_tunable, memtest; vm_paddr_t physmap[PHYSMAP_SIZE]; pt_entry_t *pte; quad_t dcons_addr, dcons_size; #ifndef XEN - int hasbrokenint12, i; + int hasbrokenint12, i, res; u_int extmem; struct vm86frame vmf; struct vm86context vmc; From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 15:28:50 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E1E51106566B; Mon, 2 Jul 2012 15:28:50 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B416F8FC08; Mon, 2 Jul 2012 15:28:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q62FSobQ078097; Mon, 2 Jul 2012 15:28:50 GMT (envelope-from bapt@svn.freebsd.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q62FSoot078093; Mon, 2 Jul 2012 15:28:50 GMT (envelope-from bapt@svn.freebsd.org) Message-Id: <201207021528.q62FSoot078093@svn.freebsd.org> From: Baptiste Daroussin Date: Mon, 2 Jul 2012 15:28:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237997 - in head: tools/build/mk tools/build/options usr.sbin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 15:28:51 -0000 Author: bapt Date: Mon Jul 2 15:28:50 2012 New Revision: 237997 URL: http://svn.freebsd.org/changeset/base/237997 Log: New build KNOB: WITHOUT_PKGBOOTSTRAP to condition building of usr.sbin/pkg Do not condition usr.sbin/pkg building on WITHOUT_PKGTOOLS anymore, so that users can remove the old pkg_* tools without removing the pkgng boostrap Approved by: des (mentor) MFC after: 1 month Added: head/tools/build/options/WITHOUT_PKGBOOSTRAP (contents, props changed) Modified: head/tools/build/mk/OptionalObsoleteFiles.inc head/usr.sbin/Makefile Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Mon Jul 2 14:03:19 2012 (r237996) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Mon Jul 2 15:28:50 2012 (r237997) @@ -3482,6 +3482,10 @@ OLD_FILES+=usr/share/man/man8/pflogd.8.g OLD_FILES+=usr/share/man/man8/tftp-proxy.8.gz .endif +.if ${MK_PKGBOOTSTRAP} == no +OLD_FILES+=usr/sbin/pkg +.endif + .if ${MK_PKGTOOLS} == no OLD_FILES+=etc/periodic/daily/490.status-pkg-changes OLD_FILES+=etc/periodic/security/460.chkportsum Added: head/tools/build/options/WITHOUT_PKGBOOSTRAP ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITHOUT_PKGBOOSTRAP Mon Jul 2 15:28:50 2012 (r237997) @@ -0,0 +1,4 @@ +.\" $FreeBSD$ +Set to not build +.Xr pkg +bootstrap tool Modified: head/usr.sbin/Makefile ============================================================================== --- head/usr.sbin/Makefile Mon Jul 2 14:03:19 2012 (r237996) +++ head/usr.sbin/Makefile Mon Jul 2 15:28:50 2012 (r237997) @@ -259,9 +259,12 @@ SUBDIR+= keyserv SUBDIR+= ftp-proxy .endif +.if ${PK_PKGBOOTSTRAP} != "no" +SUBDIR+= pkg +.endif + .if ${MK_PKGTOOLS} != "no" SUBDIR+= pkg_install -SUBDIR+= pkg .endif # XXX MK_TOOLCHAIN? From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 16:00:39 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E36B7106566B; Mon, 2 Jul 2012 16:00:39 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CA1E48FC16; Mon, 2 Jul 2012 16:00:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q62G0dmm079543; Mon, 2 Jul 2012 16:00:39 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q62G0den079533; Mon, 2 Jul 2012 16:00:39 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201207021600.q62G0den079533@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 2 Jul 2012 16:00:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237998 - in stable/9: crypto/openssl crypto/openssl/apps crypto/openssl/crypto crypto/openssl/crypto/asn1 crypto/openssl/crypto/bio crypto/openssl/crypto/bn crypto/openssl/crypto/bn/as... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 16:00:40 -0000 Author: jkim Date: Mon Jul 2 16:00:38 2012 New Revision: 237998 URL: http://svn.freebsd.org/changeset/base/237998 Log: MFC: r237657, r237658, r237666 Merge OpenSSL 0.9.8x and regen manual pages. Modified: stable/9/crypto/openssl/CHANGES stable/9/crypto/openssl/Configure stable/9/crypto/openssl/FAQ stable/9/crypto/openssl/LICENSE stable/9/crypto/openssl/Makefile stable/9/crypto/openssl/NEWS stable/9/crypto/openssl/README stable/9/crypto/openssl/apps/Makefile stable/9/crypto/openssl/apps/asn1pars.c stable/9/crypto/openssl/apps/cms.c stable/9/crypto/openssl/apps/openssl.cnf stable/9/crypto/openssl/apps/pkcs12.c stable/9/crypto/openssl/apps/s_client.c stable/9/crypto/openssl/apps/s_server.c stable/9/crypto/openssl/apps/x509.c stable/9/crypto/openssl/config stable/9/crypto/openssl/crypto/asn1/a_object.c stable/9/crypto/openssl/crypto/asn1/a_strex.c stable/9/crypto/openssl/crypto/asn1/a_strnid.c stable/9/crypto/openssl/crypto/asn1/asn1.h stable/9/crypto/openssl/crypto/asn1/asn_mime.c stable/9/crypto/openssl/crypto/asn1/x_name.c stable/9/crypto/openssl/crypto/asn1/x_pubkey.c stable/9/crypto/openssl/crypto/bio/bf_buff.c stable/9/crypto/openssl/crypto/bio/bio.h stable/9/crypto/openssl/crypto/bio/bss_dgram.c stable/9/crypto/openssl/crypto/bn/asm/mo-586.pl stable/9/crypto/openssl/crypto/bn/asm/ppc.pl stable/9/crypto/openssl/crypto/bn/bn_blind.c stable/9/crypto/openssl/crypto/bn/bn_gf2m.c stable/9/crypto/openssl/crypto/cms/cms.h stable/9/crypto/openssl/crypto/cms/cms_enc.c stable/9/crypto/openssl/crypto/cms/cms_env.c stable/9/crypto/openssl/crypto/cms/cms_io.c stable/9/crypto/openssl/crypto/cms/cms_lcl.h stable/9/crypto/openssl/crypto/cms/cms_smime.c stable/9/crypto/openssl/crypto/comp/c_rle.c stable/9/crypto/openssl/crypto/conf/conf_api.c stable/9/crypto/openssl/crypto/cryptlib.c stable/9/crypto/openssl/crypto/crypto.h stable/9/crypto/openssl/crypto/ec/ec2_smpl.c stable/9/crypto/openssl/crypto/ec/ec_key.c stable/9/crypto/openssl/crypto/ec/ecp_smpl.c stable/9/crypto/openssl/crypto/ecdsa/ecdsatest.c stable/9/crypto/openssl/crypto/ecdsa/ecs_ossl.c stable/9/crypto/openssl/crypto/evp/evp_test.c stable/9/crypto/openssl/crypto/ocsp/ocsp_lib.c stable/9/crypto/openssl/crypto/opensslv.h stable/9/crypto/openssl/crypto/perlasm/cbc.pl stable/9/crypto/openssl/crypto/pkcs7/pk7_smime.c stable/9/crypto/openssl/crypto/rc4/asm/rc4-x86_64.pl stable/9/crypto/openssl/crypto/rc4/rc4_skey.c stable/9/crypto/openssl/crypto/rsa/rsa_eay.c stable/9/crypto/openssl/crypto/x509/x509_vfy.c stable/9/crypto/openssl/crypto/x509v3/v3_addr.c stable/9/crypto/openssl/crypto/x509v3/v3_asid.c stable/9/crypto/openssl/doc/HOWTO/proxy_certificates.txt stable/9/crypto/openssl/doc/apps/ca.pod stable/9/crypto/openssl/doc/apps/dgst.pod stable/9/crypto/openssl/doc/crypto/engine.pod stable/9/crypto/openssl/doc/ssl/SSL_clear.pod stable/9/crypto/openssl/engines/e_capi.c stable/9/crypto/openssl/engines/e_capi_err.h stable/9/crypto/openssl/fips/fips_canister.c stable/9/crypto/openssl/openssl.spec stable/9/crypto/openssl/ssl/bio_ssl.c stable/9/crypto/openssl/ssl/d1_both.c stable/9/crypto/openssl/ssl/d1_clnt.c stable/9/crypto/openssl/ssl/d1_enc.c stable/9/crypto/openssl/ssl/d1_lib.c stable/9/crypto/openssl/ssl/d1_pkt.c stable/9/crypto/openssl/ssl/d1_srvr.c stable/9/crypto/openssl/ssl/s2_srvr.c stable/9/crypto/openssl/ssl/s3_clnt.c stable/9/crypto/openssl/ssl/s3_lib.c stable/9/crypto/openssl/ssl/s3_srvr.c stable/9/crypto/openssl/ssl/ssl.h stable/9/crypto/openssl/ssl/ssl_ciph.c stable/9/crypto/openssl/ssl/ssl_err.c stable/9/crypto/openssl/ssl/ssl_lib.c stable/9/crypto/openssl/ssl/ssl_locl.h stable/9/crypto/openssl/ssl/t1_lib.c stable/9/crypto/openssl/util/fipslink.pl stable/9/crypto/openssl/util/mkerr.pl stable/9/crypto/openssl/util/pl/VC-32.pl stable/9/secure/lib/libcrypto/Makefile.inc stable/9/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 stable/9/secure/lib/libcrypto/man/ASN1_STRING_length.3 stable/9/secure/lib/libcrypto/man/ASN1_STRING_new.3 stable/9/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 stable/9/secure/lib/libcrypto/man/ASN1_generate_nconf.3 stable/9/secure/lib/libcrypto/man/BIO_ctrl.3 stable/9/secure/lib/libcrypto/man/BIO_f_base64.3 stable/9/secure/lib/libcrypto/man/BIO_f_buffer.3 stable/9/secure/lib/libcrypto/man/BIO_f_cipher.3 stable/9/secure/lib/libcrypto/man/BIO_f_md.3 stable/9/secure/lib/libcrypto/man/BIO_f_null.3 stable/9/secure/lib/libcrypto/man/BIO_f_ssl.3 stable/9/secure/lib/libcrypto/man/BIO_find_type.3 stable/9/secure/lib/libcrypto/man/BIO_new.3 stable/9/secure/lib/libcrypto/man/BIO_push.3 stable/9/secure/lib/libcrypto/man/BIO_read.3 stable/9/secure/lib/libcrypto/man/BIO_s_accept.3 stable/9/secure/lib/libcrypto/man/BIO_s_bio.3 stable/9/secure/lib/libcrypto/man/BIO_s_connect.3 stable/9/secure/lib/libcrypto/man/BIO_s_fd.3 stable/9/secure/lib/libcrypto/man/BIO_s_file.3 stable/9/secure/lib/libcrypto/man/BIO_s_mem.3 stable/9/secure/lib/libcrypto/man/BIO_s_null.3 stable/9/secure/lib/libcrypto/man/BIO_s_socket.3 stable/9/secure/lib/libcrypto/man/BIO_set_callback.3 stable/9/secure/lib/libcrypto/man/BIO_should_retry.3 stable/9/secure/lib/libcrypto/man/BN_BLINDING_new.3 stable/9/secure/lib/libcrypto/man/BN_CTX_new.3 stable/9/secure/lib/libcrypto/man/BN_CTX_start.3 stable/9/secure/lib/libcrypto/man/BN_add.3 stable/9/secure/lib/libcrypto/man/BN_add_word.3 stable/9/secure/lib/libcrypto/man/BN_bn2bin.3 stable/9/secure/lib/libcrypto/man/BN_cmp.3 stable/9/secure/lib/libcrypto/man/BN_copy.3 stable/9/secure/lib/libcrypto/man/BN_generate_prime.3 stable/9/secure/lib/libcrypto/man/BN_mod_inverse.3 stable/9/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 stable/9/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 stable/9/secure/lib/libcrypto/man/BN_new.3 stable/9/secure/lib/libcrypto/man/BN_num_bytes.3 stable/9/secure/lib/libcrypto/man/BN_rand.3 stable/9/secure/lib/libcrypto/man/BN_set_bit.3 stable/9/secure/lib/libcrypto/man/BN_swap.3 stable/9/secure/lib/libcrypto/man/BN_zero.3 stable/9/secure/lib/libcrypto/man/CONF_modules_free.3 stable/9/secure/lib/libcrypto/man/CONF_modules_load_file.3 stable/9/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 stable/9/secure/lib/libcrypto/man/DH_generate_key.3 stable/9/secure/lib/libcrypto/man/DH_generate_parameters.3 stable/9/secure/lib/libcrypto/man/DH_get_ex_new_index.3 stable/9/secure/lib/libcrypto/man/DH_new.3 stable/9/secure/lib/libcrypto/man/DH_set_method.3 stable/9/secure/lib/libcrypto/man/DH_size.3 stable/9/secure/lib/libcrypto/man/DSA_SIG_new.3 stable/9/secure/lib/libcrypto/man/DSA_do_sign.3 stable/9/secure/lib/libcrypto/man/DSA_dup_DH.3 stable/9/secure/lib/libcrypto/man/DSA_generate_key.3 stable/9/secure/lib/libcrypto/man/DSA_generate_parameters.3 stable/9/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 stable/9/secure/lib/libcrypto/man/DSA_new.3 stable/9/secure/lib/libcrypto/man/DSA_set_method.3 stable/9/secure/lib/libcrypto/man/DSA_sign.3 stable/9/secure/lib/libcrypto/man/DSA_size.3 stable/9/secure/lib/libcrypto/man/ERR_GET_LIB.3 stable/9/secure/lib/libcrypto/man/ERR_clear_error.3 stable/9/secure/lib/libcrypto/man/ERR_error_string.3 stable/9/secure/lib/libcrypto/man/ERR_get_error.3 stable/9/secure/lib/libcrypto/man/ERR_load_crypto_strings.3 stable/9/secure/lib/libcrypto/man/ERR_load_strings.3 stable/9/secure/lib/libcrypto/man/ERR_print_errors.3 stable/9/secure/lib/libcrypto/man/ERR_put_error.3 stable/9/secure/lib/libcrypto/man/ERR_remove_state.3 stable/9/secure/lib/libcrypto/man/ERR_set_mark.3 stable/9/secure/lib/libcrypto/man/EVP_BytesToKey.3 stable/9/secure/lib/libcrypto/man/EVP_DigestInit.3 stable/9/secure/lib/libcrypto/man/EVP_EncryptInit.3 stable/9/secure/lib/libcrypto/man/EVP_OpenInit.3 stable/9/secure/lib/libcrypto/man/EVP_PKEY_new.3 stable/9/secure/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 stable/9/secure/lib/libcrypto/man/EVP_SealInit.3 stable/9/secure/lib/libcrypto/man/EVP_SignInit.3 stable/9/secure/lib/libcrypto/man/EVP_VerifyInit.3 stable/9/secure/lib/libcrypto/man/OBJ_nid2obj.3 stable/9/secure/lib/libcrypto/man/OPENSSL_Applink.3 stable/9/secure/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3 stable/9/secure/lib/libcrypto/man/OPENSSL_config.3 stable/9/secure/lib/libcrypto/man/OPENSSL_ia32cap.3 stable/9/secure/lib/libcrypto/man/OPENSSL_load_builtin_modules.3 stable/9/secure/lib/libcrypto/man/OpenSSL_add_all_algorithms.3 stable/9/secure/lib/libcrypto/man/PKCS12_create.3 stable/9/secure/lib/libcrypto/man/PKCS12_parse.3 stable/9/secure/lib/libcrypto/man/PKCS7_decrypt.3 stable/9/secure/lib/libcrypto/man/PKCS7_encrypt.3 stable/9/secure/lib/libcrypto/man/PKCS7_sign.3 stable/9/secure/lib/libcrypto/man/PKCS7_verify.3 stable/9/secure/lib/libcrypto/man/RAND_add.3 stable/9/secure/lib/libcrypto/man/RAND_bytes.3 stable/9/secure/lib/libcrypto/man/RAND_cleanup.3 stable/9/secure/lib/libcrypto/man/RAND_egd.3 stable/9/secure/lib/libcrypto/man/RAND_load_file.3 stable/9/secure/lib/libcrypto/man/RAND_set_rand_method.3 stable/9/secure/lib/libcrypto/man/RSA_blinding_on.3 stable/9/secure/lib/libcrypto/man/RSA_check_key.3 stable/9/secure/lib/libcrypto/man/RSA_generate_key.3 stable/9/secure/lib/libcrypto/man/RSA_get_ex_new_index.3 stable/9/secure/lib/libcrypto/man/RSA_new.3 stable/9/secure/lib/libcrypto/man/RSA_padding_add_PKCS1_type_1.3 stable/9/secure/lib/libcrypto/man/RSA_print.3 stable/9/secure/lib/libcrypto/man/RSA_private_encrypt.3 stable/9/secure/lib/libcrypto/man/RSA_public_encrypt.3 stable/9/secure/lib/libcrypto/man/RSA_set_method.3 stable/9/secure/lib/libcrypto/man/RSA_sign.3 stable/9/secure/lib/libcrypto/man/RSA_sign_ASN1_OCTET_STRING.3 stable/9/secure/lib/libcrypto/man/RSA_size.3 stable/9/secure/lib/libcrypto/man/SMIME_read_PKCS7.3 stable/9/secure/lib/libcrypto/man/SMIME_write_PKCS7.3 stable/9/secure/lib/libcrypto/man/X509_NAME_ENTRY_get_object.3 stable/9/secure/lib/libcrypto/man/X509_NAME_add_entry_by_txt.3 stable/9/secure/lib/libcrypto/man/X509_NAME_get_index_by_NID.3 stable/9/secure/lib/libcrypto/man/X509_NAME_print_ex.3 stable/9/secure/lib/libcrypto/man/X509_new.3 stable/9/secure/lib/libcrypto/man/bio.3 stable/9/secure/lib/libcrypto/man/blowfish.3 stable/9/secure/lib/libcrypto/man/bn.3 stable/9/secure/lib/libcrypto/man/bn_internal.3 stable/9/secure/lib/libcrypto/man/buffer.3 stable/9/secure/lib/libcrypto/man/crypto.3 stable/9/secure/lib/libcrypto/man/d2i_ASN1_OBJECT.3 stable/9/secure/lib/libcrypto/man/d2i_DHparams.3 stable/9/secure/lib/libcrypto/man/d2i_DSAPublicKey.3 stable/9/secure/lib/libcrypto/man/d2i_PKCS8PrivateKey.3 stable/9/secure/lib/libcrypto/man/d2i_RSAPublicKey.3 stable/9/secure/lib/libcrypto/man/d2i_X509.3 stable/9/secure/lib/libcrypto/man/d2i_X509_ALGOR.3 stable/9/secure/lib/libcrypto/man/d2i_X509_CRL.3 stable/9/secure/lib/libcrypto/man/d2i_X509_NAME.3 stable/9/secure/lib/libcrypto/man/d2i_X509_REQ.3 stable/9/secure/lib/libcrypto/man/d2i_X509_SIG.3 stable/9/secure/lib/libcrypto/man/des.3 stable/9/secure/lib/libcrypto/man/dh.3 stable/9/secure/lib/libcrypto/man/dsa.3 stable/9/secure/lib/libcrypto/man/ecdsa.3 stable/9/secure/lib/libcrypto/man/engine.3 stable/9/secure/lib/libcrypto/man/err.3 stable/9/secure/lib/libcrypto/man/evp.3 stable/9/secure/lib/libcrypto/man/hmac.3 stable/9/secure/lib/libcrypto/man/lh_stats.3 stable/9/secure/lib/libcrypto/man/lhash.3 stable/9/secure/lib/libcrypto/man/md5.3 stable/9/secure/lib/libcrypto/man/mdc2.3 stable/9/secure/lib/libcrypto/man/pem.3 stable/9/secure/lib/libcrypto/man/rand.3 stable/9/secure/lib/libcrypto/man/rc4.3 stable/9/secure/lib/libcrypto/man/ripemd.3 stable/9/secure/lib/libcrypto/man/rsa.3 stable/9/secure/lib/libcrypto/man/sha.3 stable/9/secure/lib/libcrypto/man/threads.3 stable/9/secure/lib/libcrypto/man/ui.3 stable/9/secure/lib/libcrypto/man/ui_compat.3 stable/9/secure/lib/libcrypto/man/x509.3 stable/9/secure/lib/libssl/man/SSL_CIPHER_get_name.3 stable/9/secure/lib/libssl/man/SSL_COMP_add_compression_method.3 stable/9/secure/lib/libssl/man/SSL_CTX_add_extra_chain_cert.3 stable/9/secure/lib/libssl/man/SSL_CTX_add_session.3 stable/9/secure/lib/libssl/man/SSL_CTX_ctrl.3 stable/9/secure/lib/libssl/man/SSL_CTX_flush_sessions.3 stable/9/secure/lib/libssl/man/SSL_CTX_free.3 stable/9/secure/lib/libssl/man/SSL_CTX_get_ex_new_index.3 stable/9/secure/lib/libssl/man/SSL_CTX_get_verify_mode.3 stable/9/secure/lib/libssl/man/SSL_CTX_load_verify_locations.3 stable/9/secure/lib/libssl/man/SSL_CTX_new.3 stable/9/secure/lib/libssl/man/SSL_CTX_sess_number.3 stable/9/secure/lib/libssl/man/SSL_CTX_sess_set_cache_size.3 stable/9/secure/lib/libssl/man/SSL_CTX_sess_set_get_cb.3 stable/9/secure/lib/libssl/man/SSL_CTX_sessions.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_cert_store.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_cert_verify_callback.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_cipher_list.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_client_CA_list.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_client_cert_cb.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_default_passwd_cb.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_generate_session_id.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_info_callback.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_max_cert_list.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_mode.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_msg_callback.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_options.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_quiet_shutdown.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_session_cache_mode.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_session_id_context.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_ssl_version.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_timeout.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_tmp_dh_callback.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_tmp_rsa_callback.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_verify.3 stable/9/secure/lib/libssl/man/SSL_CTX_use_certificate.3 stable/9/secure/lib/libssl/man/SSL_SESSION_free.3 stable/9/secure/lib/libssl/man/SSL_SESSION_get_ex_new_index.3 stable/9/secure/lib/libssl/man/SSL_SESSION_get_time.3 stable/9/secure/lib/libssl/man/SSL_accept.3 stable/9/secure/lib/libssl/man/SSL_alert_type_string.3 stable/9/secure/lib/libssl/man/SSL_clear.3 stable/9/secure/lib/libssl/man/SSL_connect.3 stable/9/secure/lib/libssl/man/SSL_do_handshake.3 stable/9/secure/lib/libssl/man/SSL_free.3 stable/9/secure/lib/libssl/man/SSL_get_SSL_CTX.3 stable/9/secure/lib/libssl/man/SSL_get_ciphers.3 stable/9/secure/lib/libssl/man/SSL_get_client_CA_list.3 stable/9/secure/lib/libssl/man/SSL_get_current_cipher.3 stable/9/secure/lib/libssl/man/SSL_get_default_timeout.3 stable/9/secure/lib/libssl/man/SSL_get_error.3 stable/9/secure/lib/libssl/man/SSL_get_ex_data_X509_STORE_CTX_idx.3 stable/9/secure/lib/libssl/man/SSL_get_ex_new_index.3 stable/9/secure/lib/libssl/man/SSL_get_fd.3 stable/9/secure/lib/libssl/man/SSL_get_peer_cert_chain.3 stable/9/secure/lib/libssl/man/SSL_get_peer_certificate.3 stable/9/secure/lib/libssl/man/SSL_get_rbio.3 stable/9/secure/lib/libssl/man/SSL_get_session.3 stable/9/secure/lib/libssl/man/SSL_get_verify_result.3 stable/9/secure/lib/libssl/man/SSL_get_version.3 stable/9/secure/lib/libssl/man/SSL_library_init.3 stable/9/secure/lib/libssl/man/SSL_load_client_CA_file.3 stable/9/secure/lib/libssl/man/SSL_new.3 stable/9/secure/lib/libssl/man/SSL_pending.3 stable/9/secure/lib/libssl/man/SSL_read.3 stable/9/secure/lib/libssl/man/SSL_rstate_string.3 stable/9/secure/lib/libssl/man/SSL_session_reused.3 stable/9/secure/lib/libssl/man/SSL_set_bio.3 stable/9/secure/lib/libssl/man/SSL_set_connect_state.3 stable/9/secure/lib/libssl/man/SSL_set_fd.3 stable/9/secure/lib/libssl/man/SSL_set_session.3 stable/9/secure/lib/libssl/man/SSL_set_shutdown.3 stable/9/secure/lib/libssl/man/SSL_set_verify_result.3 stable/9/secure/lib/libssl/man/SSL_shutdown.3 stable/9/secure/lib/libssl/man/SSL_state_string.3 stable/9/secure/lib/libssl/man/SSL_want.3 stable/9/secure/lib/libssl/man/SSL_write.3 stable/9/secure/lib/libssl/man/d2i_SSL_SESSION.3 stable/9/secure/lib/libssl/man/ssl.3 stable/9/secure/usr.bin/openssl/man/CA.pl.1 stable/9/secure/usr.bin/openssl/man/asn1parse.1 stable/9/secure/usr.bin/openssl/man/ca.1 stable/9/secure/usr.bin/openssl/man/ciphers.1 stable/9/secure/usr.bin/openssl/man/crl.1 stable/9/secure/usr.bin/openssl/man/crl2pkcs7.1 stable/9/secure/usr.bin/openssl/man/dgst.1 stable/9/secure/usr.bin/openssl/man/dhparam.1 stable/9/secure/usr.bin/openssl/man/dsa.1 stable/9/secure/usr.bin/openssl/man/dsaparam.1 stable/9/secure/usr.bin/openssl/man/ec.1 stable/9/secure/usr.bin/openssl/man/ecparam.1 stable/9/secure/usr.bin/openssl/man/enc.1 stable/9/secure/usr.bin/openssl/man/errstr.1 stable/9/secure/usr.bin/openssl/man/gendsa.1 stable/9/secure/usr.bin/openssl/man/genrsa.1 stable/9/secure/usr.bin/openssl/man/nseq.1 stable/9/secure/usr.bin/openssl/man/ocsp.1 stable/9/secure/usr.bin/openssl/man/openssl.1 stable/9/secure/usr.bin/openssl/man/passwd.1 stable/9/secure/usr.bin/openssl/man/pkcs12.1 stable/9/secure/usr.bin/openssl/man/pkcs7.1 stable/9/secure/usr.bin/openssl/man/pkcs8.1 stable/9/secure/usr.bin/openssl/man/rand.1 stable/9/secure/usr.bin/openssl/man/req.1 stable/9/secure/usr.bin/openssl/man/rsa.1 stable/9/secure/usr.bin/openssl/man/rsautl.1 stable/9/secure/usr.bin/openssl/man/s_client.1 stable/9/secure/usr.bin/openssl/man/s_server.1 stable/9/secure/usr.bin/openssl/man/s_time.1 stable/9/secure/usr.bin/openssl/man/sess_id.1 stable/9/secure/usr.bin/openssl/man/smime.1 stable/9/secure/usr.bin/openssl/man/speed.1 stable/9/secure/usr.bin/openssl/man/spkac.1 stable/9/secure/usr.bin/openssl/man/verify.1 stable/9/secure/usr.bin/openssl/man/version.1 stable/9/secure/usr.bin/openssl/man/x509.1 stable/9/secure/usr.bin/openssl/man/x509v3_config.1 Directory Properties: stable/9/crypto/openssl/ (props changed) stable/9/secure/lib/libcrypto/ (props changed) stable/9/secure/lib/libssl/ (props changed) stable/9/secure/usr.bin/openssl/ (props changed) Modified: stable/9/crypto/openssl/CHANGES ============================================================================== --- stable/9/crypto/openssl/CHANGES Mon Jul 2 15:28:50 2012 (r237997) +++ stable/9/crypto/openssl/CHANGES Mon Jul 2 16:00:38 2012 (r237998) @@ -2,6 +2,142 @@ OpenSSL CHANGES _______________ + Changes between 0.9.8w and 0.9.8x [10 May 2012] + + *) Sanity check record length before skipping explicit IV in DTLS + to fix DoS attack. + + Thanks to Codenomicon for discovering this issue using Fuzz-o-Matic + fuzzing as a service testing platform. + (CVE-2012-2333) + [Steve Henson] + + *) Initialise tkeylen properly when encrypting CMS messages. + Thanks to Solar Designer of Openwall for reporting this issue. + [Steve Henson] + + Changes between 0.9.8v and 0.9.8w [23 Apr 2012] + + *) The fix for CVE-2012-2110 did not take into account that the + 'len' argument to BUF_MEM_grow and BUF_MEM_grow_clean is an + int in OpenSSL 0.9.8, making it still vulnerable. Fix by + rejecting negative len parameter. (CVE-2012-2131) + [Tomas Hoger ] + + Changes between 0.9.8u and 0.9.8v [19 Apr 2012] + + *) Check for potentially exploitable overflows in asn1_d2i_read_bio + BUF_mem_grow and BUF_mem_grow_clean. Refuse attempts to shrink buffer + in CRYPTO_realloc_clean. + + Thanks to Tavis Ormandy, Google Security Team, for discovering this + issue and to Adam Langley for fixing it. + (CVE-2012-2110) + [Adam Langley (Google), Tavis Ormandy, Google Security Team] + + Changes between 0.9.8t and 0.9.8u [12 Mar 2012] + + *) Fix MMA (Bleichenbacher's attack on PKCS #1 v1.5 RSA padding) weakness + in CMS and PKCS7 code. When RSA decryption fails use a random key for + content decryption and always return the same error. Note: this attack + needs on average 2^20 messages so it only affects automated senders. The + old behaviour can be reenabled in the CMS code by setting the + CMS_DEBUG_DECRYPT flag: this is useful for debugging and testing where + an MMA defence is not necessary. + Thanks to Ivan Nestlerode for discovering + this issue. (CVE-2012-0884) + [Steve Henson] + + *) Fix CVE-2011-4619: make sure we really are receiving a + client hello before rejecting multiple SGC restarts. Thanks to + Ivan Nestlerode for discovering this bug. + [Steve Henson] + + Changes between 0.9.8s and 0.9.8t [18 Jan 2012] + + *) Fix for DTLS DoS issue introduced by fix for CVE-2011-4109. + Thanks to Antonio Martin, Enterprise Secure Access Research and + Development, Cisco Systems, Inc. for discovering this bug and + preparing a fix. (CVE-2012-0050) + [Antonio Martin] + + Changes between 0.9.8r and 0.9.8s [4 Jan 2012] + + *) Nadhem Alfardan and Kenny Paterson have discovered an extension + of the Vaudenay padding oracle attack on CBC mode encryption + which enables an efficient plaintext recovery attack against + the OpenSSL implementation of DTLS. Their attack exploits timing + differences arising during decryption processing. A research + paper describing this attack can be found at: + http://www.isg.rhul.ac.uk/~kp/dtls.pdf + Thanks go to Nadhem Alfardan and Kenny Paterson of the Information + Security Group at Royal Holloway, University of London + (www.isg.rhul.ac.uk) for discovering this flaw and to Robin Seggelmann + and Michael Tuexen + for preparing the fix. (CVE-2011-4108) + [Robin Seggelmann, Michael Tuexen] + + *) Stop policy check failure freeing same buffer twice. (CVE-2011-4109) + [Ben Laurie, Kasper ] + + *) Clear bytes used for block padding of SSL 3.0 records. + (CVE-2011-4576) + [Adam Langley (Google)] + + *) Only allow one SGC handshake restart for SSL/TLS. Thanks to George + Kadianakis for discovering this issue and + Adam Langley for preparing the fix. (CVE-2011-4619) + [Adam Langley (Google)] + + *) Prevent malformed RFC3779 data triggering an assertion failure. + Thanks to Andrew Chi, BBN Technologies, for discovering the flaw + and Rob Austein for fixing it. (CVE-2011-4577) + [Rob Austein ] + + *) Fix ssl_ciph.c set-up race. + [Adam Langley (Google)] + + *) Fix spurious failures in ecdsatest.c. + [Emilia Käsper (Google)] + + *) Fix the BIO_f_buffer() implementation (which was mixing different + interpretations of the '..._len' fields). + [Adam Langley (Google)] + + *) Fix handling of BN_BLINDING: now BN_BLINDING_invert_ex (rather than + BN_BLINDING_invert_ex) calls BN_BLINDING_update, ensuring that concurrent + threads won't reuse the same blinding coefficients. + + This also avoids the need to obtain the CRYPTO_LOCK_RSA_BLINDING + lock to call BN_BLINDING_invert_ex, and avoids one use of + BN_BLINDING_update for each BN_BLINDING structure (previously, + the last update always remained unused). + [Emilia Käsper (Google)] + + *) Fix SSL memory handling for (EC)DH ciphersuites, in particular + for multi-threaded use of ECDH. + [Adam Langley (Google)] + + *) Fix x509_name_ex_d2i memory leak on bad inputs. + [Bodo Moeller] + + *) Add protection against ECDSA timing attacks as mentioned in the paper + by Billy Bob Brumley and Nicola Tuveri, see: + + http://eprint.iacr.org/2011/232.pdf + + [Billy Bob Brumley and Nicola Tuveri] + + Changes between 0.9.8q and 0.9.8r [8 Feb 2011] + + *) Fix parsing of OCSP stapling ClientHello extension. CVE-2011-0014 + [Neel Mehta, Adam Langley, Bodo Moeller (Google)] + + *) Fix bug in string printing code: if *any* escaping is enabled we must + escape the escape character (backslash) or the resulting string is + ambiguous. + [Steve Henson] + Changes between 0.9.8p and 0.9.8q [2 Dec 2010] *) Disable code workaround for ancient and obsolete Netscape browsers Modified: stable/9/crypto/openssl/Configure ============================================================================== --- stable/9/crypto/openssl/Configure Mon Jul 2 15:28:50 2012 (r237997) +++ stable/9/crypto/openssl/Configure Mon Jul 2 16:00:38 2012 (r237998) @@ -371,6 +371,9 @@ my %table=( "linux-alpha-ccc","ccc:-fast -readonly_strings -DL_ENDIAN -DTERMIO::-D_REENTRANT:::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL:${no_asm}", "linux-alpha+bwx-ccc","ccc:-fast -readonly_strings -DL_ENDIAN -DTERMIO::-D_REENTRANT:::SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL:${no_asm}", +# Android: Linux but without -DTERMIO and pointers to headers and libs. +"android","gcc:-mandroid -I\$(ANDROID_DEV)/include -B\$(ANDROID_DEV)/lib -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", + #### *BSD [do see comment about ${BSDthreads} above!] "BSD-generic32","gcc:-DTERMIOS -O3 -fomit-frame-pointer -Wall::${BSDthreads}:::BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "BSD-x86", "gcc:-DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer -Wall::${BSDthreads}:::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}:dlfcn:bsd-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", Modified: stable/9/crypto/openssl/FAQ ============================================================================== --- stable/9/crypto/openssl/FAQ Mon Jul 2 15:28:50 2012 (r237997) +++ stable/9/crypto/openssl/FAQ Mon Jul 2 16:00:38 2012 (r237998) @@ -10,6 +10,7 @@ OpenSSL - Frequently Asked Questions * Why aren't tools like 'autoconf' and 'libtool' used? * What is an 'engine' version? * How do I check the authenticity of the OpenSSL distribution? +* How does the versioning scheme work? [LEGAL] Legal questions @@ -82,7 +83,7 @@ OpenSSL - Frequently Asked Questions * Which is the current version of OpenSSL? The current version is available from . -OpenSSL 1.0.0c was released on Dec 2nd, 2010. +OpenSSL 1.0.1c was released on May 10th, 2012. In addition to the current stable release, you can also access daily snapshots of the OpenSSL development version at . Note that the online documents refer to the very latest development versions of OpenSSL and may include features not present in released versions. If in doubt refer to the documentation -that came with the version of OpenSSL you are using. +that came with the version of OpenSSL you are using. The pod format +documentation is included in each OpenSSL distribution under the docs +directory. For information on parts of libcrypto that are not yet documented, you might want to read Ariel Glenn's documentation on SSLeay 0.9, OpenSSL's @@ -173,6 +176,19 @@ just do: pgp TARBALL.asc +* How does the versioning scheme work? + +After the release of OpenSSL 1.0.0 the versioning scheme changed. Letter +releases (e.g. 1.0.1a) can only contain bug and security fixes and no +new features. Minor releases change the last number (e.g. 1.0.2) and +can contain new features that retain binary compatibility. Changes to +the middle number are considered major releases and neither source nor +binary compatibility is guaranteed. + +Therefore the answer to the common question "when will feature X be +backported to OpenSSL 1.0.0/0.9.8?" is "never" but it could appear +in the next minor release. + [LEGAL] ======================================================================= * Do I need patent licenses to use OpenSSL? @@ -284,7 +300,7 @@ current directory in this case, but this Check out the CA.pl(1) manual page. This provides a simple wrapper round the 'req', 'verify', 'ca' and 'pkcs12' utilities. For finer control check out the manual pages for the individual utilities and the certificate -extensions documentation (currently in doc/openssl.txt). +extensions documentation (in ca(1), req(1), x509v3_config(5) ) * Why can't I create certificate requests? Modified: stable/9/crypto/openssl/LICENSE ============================================================================== --- stable/9/crypto/openssl/LICENSE Mon Jul 2 15:28:50 2012 (r237997) +++ stable/9/crypto/openssl/LICENSE Mon Jul 2 16:00:38 2012 (r237998) @@ -12,7 +12,7 @@ --------------- /* ==================================================================== - * Copyright (c) 1998-2008 The OpenSSL Project. All rights reserved. + * Copyright (c) 1998-2011 The OpenSSL Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/9/crypto/openssl/Makefile ============================================================================== --- stable/9/crypto/openssl/Makefile Mon Jul 2 15:28:50 2012 (r237997) +++ stable/9/crypto/openssl/Makefile Mon Jul 2 16:00:38 2012 (r237998) @@ -4,7 +4,7 @@ ## Makefile for OpenSSL ## -VERSION=0.9.8q +VERSION=0.9.8x MAJOR=0 MINOR=9.8 SHLIB_VERSION_NUMBER=0.9.8 Modified: stable/9/crypto/openssl/NEWS ============================================================================== --- stable/9/crypto/openssl/NEWS Mon Jul 2 15:28:50 2012 (r237997) +++ stable/9/crypto/openssl/NEWS Mon Jul 2 16:00:38 2012 (r237998) @@ -5,6 +5,40 @@ This file gives a brief overview of the major changes between each OpenSSL release. For more details please read the CHANGES file. + Major changes between OpenSSL 0.9.8w and OpenSSL 0.9.8x: + + o Fix DTLS record length checking bug CVE-2012-2333 + + Major changes between OpenSSL 0.9.8v and OpenSSL 0.9.8w: + + o Fix for CVE-2012-2131 (corrected fix for 0.9.8 and CVE-2012-2110) + + Major changes between OpenSSL 0.9.8u and OpenSSL 0.9.8v: + + o Fix for ASN1 overflow bug CVE-2012-2110 + + Major changes between OpenSSL 0.9.8t and OpenSSL 0.9.8u: + + o Fix for CMS/PKCS#7 MMA CVE-2012-0884 + o Corrected fix for CVE-2011-4619 + o Various DTLS fixes. + + Major changes between OpenSSL 0.9.8s and OpenSSL 0.9.8t: + + o Fix for DTLS DoS issue CVE-2012-0050 + + Major changes between OpenSSL 0.9.8r and OpenSSL 0.9.8s: + + o Fix for DTLS plaintext recovery attack CVE-2011-4108 + o Fix policy check double free error CVE-2011-4109 + o Clear block padding bytes of SSL 3.0 records CVE-2011-4576 + o Only allow one SGC handshake restart for SSL/TLS CVE-2011-4619 + o Check for malformed RFC3779 data CVE-2011-4577 + + Major changes between OpenSSL 0.9.8q and OpenSSL 0.9.8r: + + o Fix for security issue CVE-2011-0014 + Major changes between OpenSSL 0.9.8p and OpenSSL 0.9.8q: o Fix for security issue CVE-2010-4180 @@ -181,6 +215,11 @@ o Added initial support for Win64. o Added alternate pkg-config files. + Major changes between OpenSSL 0.9.7l and OpenSSL 0.9.7m: + + o FIPS 1.1.1 module linking. + o Various ciphersuite selection fixes. + Major changes between OpenSSL 0.9.7k and OpenSSL 0.9.7l: o Introduce limits to prevent malicious key DoS (CVE-2006-2940) Modified: stable/9/crypto/openssl/README ============================================================================== --- stable/9/crypto/openssl/README Mon Jul 2 15:28:50 2012 (r237997) +++ stable/9/crypto/openssl/README Mon Jul 2 16:00:38 2012 (r237998) @@ -1,7 +1,7 @@ - OpenSSL 0.9.8q 2 Dec 2010 + OpenSSL 0.9.8x 10 May 2012 - Copyright (c) 1998-2009 The OpenSSL Project + Copyright (c) 1998-2011 The OpenSSL Project Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson All rights reserved. Modified: stable/9/crypto/openssl/apps/Makefile ============================================================================== --- stable/9/crypto/openssl/apps/Makefile Mon Jul 2 15:28:50 2012 (r237997) +++ stable/9/crypto/openssl/apps/Makefile Mon Jul 2 16:00:38 2012 (r237998) @@ -176,720 +176,703 @@ progs.h: progs.pl app_rand.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h app_rand.o: ../include/openssl/buffer.h ../include/openssl/conf.h app_rand.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h -app_rand.o: ../include/openssl/ec.h ../include/openssl/ecdh.h -app_rand.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h -app_rand.o: ../include/openssl/evp.h ../include/openssl/fips.h -app_rand.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h -app_rand.o: ../include/openssl/objects.h ../include/openssl/ocsp.h -app_rand.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -app_rand.o: ../include/openssl/ossl_typ.h ../include/openssl/pkcs7.h -app_rand.o: ../include/openssl/rand.h ../include/openssl/safestack.h -app_rand.o: ../include/openssl/sha.h ../include/openssl/stack.h -app_rand.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h -app_rand.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h -app_rand.o: ../include/openssl/x509v3.h app_rand.c apps.h +app_rand.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h +app_rand.o: ../include/openssl/engine.h ../include/openssl/evp.h +app_rand.o: ../include/openssl/fips.h ../include/openssl/lhash.h +app_rand.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +app_rand.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h +app_rand.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +app_rand.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h +app_rand.o: ../include/openssl/safestack.h ../include/openssl/sha.h +app_rand.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +app_rand.o: ../include/openssl/txt_db.h ../include/openssl/x509.h +app_rand.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h +app_rand.o: app_rand.c apps.h apps.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h apps.o: ../include/openssl/bn.h ../include/openssl/buffer.h apps.o: ../include/openssl/conf.h ../include/openssl/crypto.h apps.o: ../include/openssl/e_os2.h ../include/openssl/ec.h -apps.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h -apps.o: ../include/openssl/engine.h ../include/openssl/err.h -apps.o: ../include/openssl/evp.h ../include/openssl/fips.h -apps.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h -apps.o: ../include/openssl/objects.h ../include/openssl/ocsp.h -apps.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -apps.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h -apps.o: ../include/openssl/pem2.h ../include/openssl/pkcs12.h -apps.o: ../include/openssl/pkcs7.h ../include/openssl/rsa.h -apps.o: ../include/openssl/safestack.h ../include/openssl/sha.h -apps.o: ../include/openssl/stack.h ../include/openssl/symhacks.h -apps.o: ../include/openssl/txt_db.h ../include/openssl/ui.h -apps.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h -apps.o: ../include/openssl/x509v3.h apps.c apps.h +apps.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h +apps.o: ../include/openssl/err.h ../include/openssl/evp.h +apps.o: ../include/openssl/fips.h ../include/openssl/lhash.h +apps.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +apps.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h +apps.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +apps.o: ../include/openssl/pem.h ../include/openssl/pem2.h +apps.o: ../include/openssl/pkcs12.h ../include/openssl/pkcs7.h +apps.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +apps.o: ../include/openssl/sha.h ../include/openssl/stack.h +apps.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h +apps.o: ../include/openssl/ui.h ../include/openssl/x509.h +apps.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.c apps.h asn1pars.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h asn1pars.o: ../include/openssl/buffer.h ../include/openssl/conf.h asn1pars.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h -asn1pars.o: ../include/openssl/ec.h ../include/openssl/ecdh.h -asn1pars.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h -asn1pars.o: ../include/openssl/err.h ../include/openssl/evp.h -asn1pars.o: ../include/openssl/fips.h ../include/openssl/lhash.h -asn1pars.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h -asn1pars.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h -asn1pars.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h -asn1pars.o: ../include/openssl/pem.h ../include/openssl/pem2.h -asn1pars.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h -asn1pars.o: ../include/openssl/sha.h ../include/openssl/stack.h -asn1pars.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h -asn1pars.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h -asn1pars.o: ../include/openssl/x509v3.h apps.h asn1pars.c +asn1pars.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h +asn1pars.o: ../include/openssl/engine.h ../include/openssl/err.h +asn1pars.o: ../include/openssl/evp.h ../include/openssl/fips.h +asn1pars.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h +asn1pars.o: ../include/openssl/objects.h ../include/openssl/ocsp.h +asn1pars.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +asn1pars.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h +asn1pars.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h +asn1pars.o: ../include/openssl/safestack.h ../include/openssl/sha.h +asn1pars.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +asn1pars.o: ../include/openssl/txt_db.h ../include/openssl/x509.h +asn1pars.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h +asn1pars.o: asn1pars.c ca.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h ca.o: ../include/openssl/bn.h ../include/openssl/buffer.h ca.o: ../include/openssl/conf.h ../include/openssl/crypto.h ca.o: ../include/openssl/e_os2.h ../include/openssl/ec.h -ca.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h -ca.o: ../include/openssl/engine.h ../include/openssl/err.h -ca.o: ../include/openssl/evp.h ../include/openssl/fips.h -ca.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h -ca.o: ../include/openssl/objects.h ../include/openssl/ocsp.h -ca.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -ca.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h -ca.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h -ca.o: ../include/openssl/safestack.h ../include/openssl/sha.h -ca.o: ../include/openssl/stack.h ../include/openssl/symhacks.h -ca.o: ../include/openssl/txt_db.h ../include/openssl/x509.h -ca.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h ca.c +ca.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h +ca.o: ../include/openssl/err.h ../include/openssl/evp.h +ca.o: ../include/openssl/fips.h ../include/openssl/lhash.h +ca.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +ca.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h +ca.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +ca.o: ../include/openssl/pem.h ../include/openssl/pem2.h +ca.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h +ca.o: ../include/openssl/sha.h ../include/openssl/stack.h +ca.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h +ca.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h +ca.o: ../include/openssl/x509v3.h apps.h ca.c ciphers.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h ciphers.o: ../include/openssl/bn.h ../include/openssl/buffer.h ciphers.o: ../include/openssl/comp.h ../include/openssl/conf.h ciphers.o: ../include/openssl/crypto.h ../include/openssl/dtls1.h ciphers.o: ../include/openssl/e_os2.h ../include/openssl/ec.h -ciphers.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h -ciphers.o: ../include/openssl/engine.h ../include/openssl/err.h -ciphers.o: ../include/openssl/evp.h ../include/openssl/fips.h -ciphers.o: ../include/openssl/hmac.h ../include/openssl/kssl.h -ciphers.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h -ciphers.o: ../include/openssl/objects.h ../include/openssl/ocsp.h -ciphers.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -ciphers.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h -ciphers.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h -ciphers.o: ../include/openssl/pq_compat.h ../include/openssl/pqueue.h -ciphers.o: ../include/openssl/safestack.h ../include/openssl/sha.h -ciphers.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h -ciphers.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h -ciphers.o: ../include/openssl/stack.h ../include/openssl/symhacks.h -ciphers.o: ../include/openssl/tls1.h ../include/openssl/txt_db.h -ciphers.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h -ciphers.o: ../include/openssl/x509v3.h apps.h ciphers.c +ciphers.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h +ciphers.o: ../include/openssl/err.h ../include/openssl/evp.h +ciphers.o: ../include/openssl/fips.h ../include/openssl/hmac.h +ciphers.o: ../include/openssl/kssl.h ../include/openssl/lhash.h +ciphers.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +ciphers.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h +ciphers.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +ciphers.o: ../include/openssl/pem.h ../include/openssl/pem2.h +ciphers.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h +ciphers.o: ../include/openssl/pqueue.h ../include/openssl/safestack.h +ciphers.o: ../include/openssl/sha.h ../include/openssl/ssl.h +ciphers.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h +ciphers.o: ../include/openssl/ssl3.h ../include/openssl/stack.h +ciphers.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h +ciphers.o: ../include/openssl/txt_db.h ../include/openssl/x509.h +ciphers.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h +ciphers.o: ciphers.c cms.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h cms.o: ../include/openssl/buffer.h ../include/openssl/conf.h cms.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h -cms.o: ../include/openssl/ec.h ../include/openssl/ecdh.h -cms.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h -cms.o: ../include/openssl/evp.h ../include/openssl/fips.h -cms.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h -cms.o: ../include/openssl/objects.h ../include/openssl/ocsp.h -cms.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -cms.o: ../include/openssl/ossl_typ.h ../include/openssl/pkcs7.h -cms.o: ../include/openssl/safestack.h ../include/openssl/sha.h -cms.o: ../include/openssl/stack.h ../include/openssl/symhacks.h -cms.o: ../include/openssl/txt_db.h ../include/openssl/x509.h -cms.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h cms.c +cms.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h +cms.o: ../include/openssl/engine.h ../include/openssl/evp.h +cms.o: ../include/openssl/fips.h ../include/openssl/lhash.h +cms.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +cms.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h +cms.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +cms.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h +cms.o: ../include/openssl/sha.h ../include/openssl/stack.h +cms.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h +cms.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h +cms.o: ../include/openssl/x509v3.h apps.h cms.c crl.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h crl.o: ../include/openssl/buffer.h ../include/openssl/conf.h crl.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h -crl.o: ../include/openssl/ec.h ../include/openssl/ecdh.h -crl.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h -crl.o: ../include/openssl/err.h ../include/openssl/evp.h -crl.o: ../include/openssl/fips.h ../include/openssl/lhash.h -crl.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h -crl.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h -crl.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h -crl.o: ../include/openssl/pem.h ../include/openssl/pem2.h -crl.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h -crl.o: ../include/openssl/sha.h ../include/openssl/stack.h -crl.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h -crl.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h -crl.o: ../include/openssl/x509v3.h apps.h crl.c +crl.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h +crl.o: ../include/openssl/engine.h ../include/openssl/err.h +crl.o: ../include/openssl/evp.h ../include/openssl/fips.h +crl.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h +crl.o: ../include/openssl/objects.h ../include/openssl/ocsp.h +crl.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +crl.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h +crl.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h +crl.o: ../include/openssl/safestack.h ../include/openssl/sha.h +crl.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +crl.o: ../include/openssl/txt_db.h ../include/openssl/x509.h +crl.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h crl.c crl2p7.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h crl2p7.o: ../include/openssl/buffer.h ../include/openssl/conf.h crl2p7.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h -crl2p7.o: ../include/openssl/ec.h ../include/openssl/ecdh.h -crl2p7.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h -crl2p7.o: ../include/openssl/err.h ../include/openssl/evp.h -crl2p7.o: ../include/openssl/fips.h ../include/openssl/lhash.h -crl2p7.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h -crl2p7.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h -crl2p7.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h -crl2p7.o: ../include/openssl/pem.h ../include/openssl/pem2.h -crl2p7.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h -crl2p7.o: ../include/openssl/sha.h ../include/openssl/stack.h -crl2p7.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h -crl2p7.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h -crl2p7.o: ../include/openssl/x509v3.h apps.h crl2p7.c +crl2p7.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h +crl2p7.o: ../include/openssl/engine.h ../include/openssl/err.h +crl2p7.o: ../include/openssl/evp.h ../include/openssl/fips.h +crl2p7.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h +crl2p7.o: ../include/openssl/objects.h ../include/openssl/ocsp.h +crl2p7.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +crl2p7.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h +crl2p7.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h +crl2p7.o: ../include/openssl/safestack.h ../include/openssl/sha.h +crl2p7.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +crl2p7.o: ../include/openssl/txt_db.h ../include/openssl/x509.h +crl2p7.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h +crl2p7.o: crl2p7.c dgst.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h dgst.o: ../include/openssl/buffer.h ../include/openssl/conf.h dgst.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h -dgst.o: ../include/openssl/ec.h ../include/openssl/ecdh.h -dgst.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h -dgst.o: ../include/openssl/err.h ../include/openssl/evp.h -dgst.o: ../include/openssl/fips.h ../include/openssl/hmac.h -dgst.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h -dgst.o: ../include/openssl/objects.h ../include/openssl/ocsp.h -dgst.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -dgst.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h -dgst.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h -dgst.o: ../include/openssl/safestack.h ../include/openssl/sha.h -dgst.o: ../include/openssl/stack.h ../include/openssl/symhacks.h -dgst.o: ../include/openssl/txt_db.h ../include/openssl/x509.h -dgst.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h dgst.c +dgst.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h +dgst.o: ../include/openssl/engine.h ../include/openssl/err.h +dgst.o: ../include/openssl/evp.h ../include/openssl/fips.h +dgst.o: ../include/openssl/hmac.h ../include/openssl/lhash.h +dgst.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +dgst.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h +dgst.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +dgst.o: ../include/openssl/pem.h ../include/openssl/pem2.h +dgst.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h +dgst.o: ../include/openssl/sha.h ../include/openssl/stack.h +dgst.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h +dgst.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h +dgst.o: ../include/openssl/x509v3.h apps.h dgst.c dh.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h dh.o: ../include/openssl/bn.h ../include/openssl/buffer.h dh.o: ../include/openssl/conf.h ../include/openssl/crypto.h dh.o: ../include/openssl/dh.h ../include/openssl/e_os2.h -dh.o: ../include/openssl/ec.h ../include/openssl/ecdh.h -dh.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h -dh.o: ../include/openssl/err.h ../include/openssl/evp.h -dh.o: ../include/openssl/fips.h ../include/openssl/lhash.h -dh.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h -dh.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h -dh.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h -dh.o: ../include/openssl/pem.h ../include/openssl/pem2.h -dh.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h -dh.o: ../include/openssl/sha.h ../include/openssl/stack.h -dh.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h -dh.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h -dh.o: ../include/openssl/x509v3.h apps.h dh.c +dh.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h +dh.o: ../include/openssl/engine.h ../include/openssl/err.h +dh.o: ../include/openssl/evp.h ../include/openssl/fips.h +dh.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h +dh.o: ../include/openssl/objects.h ../include/openssl/ocsp.h +dh.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +dh.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h +dh.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h +dh.o: ../include/openssl/safestack.h ../include/openssl/sha.h +dh.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +dh.o: ../include/openssl/txt_db.h ../include/openssl/x509.h +dh.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h dh.c dsa.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h dsa.o: ../include/openssl/bn.h ../include/openssl/buffer.h dsa.o: ../include/openssl/conf.h ../include/openssl/crypto.h dsa.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h -dsa.o: ../include/openssl/ec.h ../include/openssl/ecdh.h -dsa.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h -dsa.o: ../include/openssl/err.h ../include/openssl/evp.h -dsa.o: ../include/openssl/fips.h ../include/openssl/lhash.h -dsa.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h -dsa.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h -dsa.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h -dsa.o: ../include/openssl/pem.h ../include/openssl/pem2.h -dsa.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h -dsa.o: ../include/openssl/sha.h ../include/openssl/stack.h -dsa.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h -dsa.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h -dsa.o: ../include/openssl/x509v3.h apps.h dsa.c +dsa.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h +dsa.o: ../include/openssl/engine.h ../include/openssl/err.h +dsa.o: ../include/openssl/evp.h ../include/openssl/fips.h +dsa.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h +dsa.o: ../include/openssl/objects.h ../include/openssl/ocsp.h +dsa.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +dsa.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h +dsa.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h +dsa.o: ../include/openssl/safestack.h ../include/openssl/sha.h +dsa.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +dsa.o: ../include/openssl/txt_db.h ../include/openssl/x509.h +dsa.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h dsa.c dsaparam.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h dsaparam.o: ../include/openssl/bn.h ../include/openssl/buffer.h dsaparam.o: ../include/openssl/conf.h ../include/openssl/crypto.h dsaparam.o: ../include/openssl/dh.h ../include/openssl/dsa.h dsaparam.o: ../include/openssl/e_os2.h ../include/openssl/ec.h -dsaparam.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h -dsaparam.o: ../include/openssl/engine.h ../include/openssl/err.h -dsaparam.o: ../include/openssl/evp.h ../include/openssl/fips.h -dsaparam.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h -dsaparam.o: ../include/openssl/objects.h ../include/openssl/ocsp.h -dsaparam.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -dsaparam.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h -dsaparam.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h -dsaparam.o: ../include/openssl/rand.h ../include/openssl/rsa.h -dsaparam.o: ../include/openssl/safestack.h ../include/openssl/sha.h -dsaparam.o: ../include/openssl/stack.h ../include/openssl/store.h -dsaparam.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h -dsaparam.o: ../include/openssl/ui.h ../include/openssl/x509.h -dsaparam.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h -dsaparam.o: dsaparam.c +dsaparam.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h +dsaparam.o: ../include/openssl/err.h ../include/openssl/evp.h +dsaparam.o: ../include/openssl/fips.h ../include/openssl/lhash.h +dsaparam.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +dsaparam.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h +dsaparam.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +dsaparam.o: ../include/openssl/pem.h ../include/openssl/pem2.h +dsaparam.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h +dsaparam.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +dsaparam.o: ../include/openssl/sha.h ../include/openssl/stack.h +dsaparam.o: ../include/openssl/store.h ../include/openssl/symhacks.h +dsaparam.o: ../include/openssl/txt_db.h ../include/openssl/ui.h +dsaparam.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h +dsaparam.o: ../include/openssl/x509v3.h apps.h dsaparam.c ec.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h ec.o: ../include/openssl/buffer.h ../include/openssl/conf.h ec.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h -ec.o: ../include/openssl/ec.h ../include/openssl/ecdh.h -ec.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h -ec.o: ../include/openssl/err.h ../include/openssl/evp.h -ec.o: ../include/openssl/fips.h ../include/openssl/lhash.h -ec.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h -ec.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h -ec.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h -ec.o: ../include/openssl/pem.h ../include/openssl/pem2.h -ec.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h -ec.o: ../include/openssl/sha.h ../include/openssl/stack.h -ec.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h -ec.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h -ec.o: ../include/openssl/x509v3.h apps.h ec.c +ec.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h +ec.o: ../include/openssl/engine.h ../include/openssl/err.h +ec.o: ../include/openssl/evp.h ../include/openssl/fips.h +ec.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h +ec.o: ../include/openssl/objects.h ../include/openssl/ocsp.h +ec.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +ec.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h +ec.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h +ec.o: ../include/openssl/safestack.h ../include/openssl/sha.h +ec.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +ec.o: ../include/openssl/txt_db.h ../include/openssl/x509.h +ec.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h ec.c ecparam.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h ecparam.o: ../include/openssl/bn.h ../include/openssl/buffer.h ecparam.o: ../include/openssl/conf.h ../include/openssl/crypto.h ecparam.o: ../include/openssl/e_os2.h ../include/openssl/ec.h -ecparam.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h -ecparam.o: ../include/openssl/engine.h ../include/openssl/err.h -ecparam.o: ../include/openssl/evp.h ../include/openssl/fips.h -ecparam.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h -ecparam.o: ../include/openssl/objects.h ../include/openssl/ocsp.h -ecparam.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -ecparam.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h -ecparam.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h -ecparam.o: ../include/openssl/safestack.h ../include/openssl/sha.h -ecparam.o: ../include/openssl/stack.h ../include/openssl/symhacks.h -ecparam.o: ../include/openssl/txt_db.h ../include/openssl/x509.h -ecparam.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h -ecparam.o: ecparam.c +ecparam.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h +ecparam.o: ../include/openssl/err.h ../include/openssl/evp.h +ecparam.o: ../include/openssl/fips.h ../include/openssl/lhash.h +ecparam.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +ecparam.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h +ecparam.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +ecparam.o: ../include/openssl/pem.h ../include/openssl/pem2.h +ecparam.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h +ecparam.o: ../include/openssl/sha.h ../include/openssl/stack.h +ecparam.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h +ecparam.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h +ecparam.o: ../include/openssl/x509v3.h apps.h ecparam.c enc.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h enc.o: ../include/openssl/buffer.h ../include/openssl/conf.h enc.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h -enc.o: ../include/openssl/ec.h ../include/openssl/ecdh.h -enc.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h -enc.o: ../include/openssl/err.h ../include/openssl/evp.h -enc.o: ../include/openssl/fips.h ../include/openssl/lhash.h -enc.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h -enc.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h -enc.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h -enc.o: ../include/openssl/pem.h ../include/openssl/pem2.h -enc.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h -enc.o: ../include/openssl/safestack.h ../include/openssl/sha.h -enc.o: ../include/openssl/stack.h ../include/openssl/symhacks.h -enc.o: ../include/openssl/txt_db.h ../include/openssl/x509.h -enc.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h enc.c +enc.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h +enc.o: ../include/openssl/engine.h ../include/openssl/err.h +enc.o: ../include/openssl/evp.h ../include/openssl/fips.h +enc.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h +enc.o: ../include/openssl/objects.h ../include/openssl/ocsp.h +enc.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +enc.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h +enc.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h +enc.o: ../include/openssl/rand.h ../include/openssl/safestack.h +enc.o: ../include/openssl/sha.h ../include/openssl/stack.h +enc.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h +enc.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h +enc.o: ../include/openssl/x509v3.h apps.h enc.c engine.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h engine.o: ../include/openssl/bn.h ../include/openssl/buffer.h engine.o: ../include/openssl/comp.h ../include/openssl/conf.h engine.o: ../include/openssl/crypto.h ../include/openssl/dtls1.h engine.o: ../include/openssl/e_os2.h ../include/openssl/ec.h -engine.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h -engine.o: ../include/openssl/engine.h ../include/openssl/err.h -engine.o: ../include/openssl/evp.h ../include/openssl/fips.h -engine.o: ../include/openssl/hmac.h ../include/openssl/kssl.h -engine.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h -engine.o: ../include/openssl/objects.h ../include/openssl/ocsp.h -engine.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -engine.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h -engine.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h -engine.o: ../include/openssl/pq_compat.h ../include/openssl/pqueue.h -engine.o: ../include/openssl/safestack.h ../include/openssl/sha.h -engine.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h -engine.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h -engine.o: ../include/openssl/stack.h ../include/openssl/symhacks.h -engine.o: ../include/openssl/tls1.h ../include/openssl/txt_db.h -engine.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h -engine.o: ../include/openssl/x509v3.h apps.h engine.c +engine.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h +engine.o: ../include/openssl/err.h ../include/openssl/evp.h +engine.o: ../include/openssl/fips.h ../include/openssl/hmac.h +engine.o: ../include/openssl/kssl.h ../include/openssl/lhash.h +engine.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +engine.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h +engine.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +engine.o: ../include/openssl/pem.h ../include/openssl/pem2.h +engine.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h +engine.o: ../include/openssl/pqueue.h ../include/openssl/safestack.h +engine.o: ../include/openssl/sha.h ../include/openssl/ssl.h +engine.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h +engine.o: ../include/openssl/ssl3.h ../include/openssl/stack.h +engine.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h +engine.o: ../include/openssl/txt_db.h ../include/openssl/x509.h +engine.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h +engine.o: engine.c errstr.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h errstr.o: ../include/openssl/bn.h ../include/openssl/buffer.h errstr.o: ../include/openssl/comp.h ../include/openssl/conf.h errstr.o: ../include/openssl/crypto.h ../include/openssl/dtls1.h errstr.o: ../include/openssl/e_os2.h ../include/openssl/ec.h -errstr.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h -errstr.o: ../include/openssl/engine.h ../include/openssl/err.h -errstr.o: ../include/openssl/evp.h ../include/openssl/fips.h -errstr.o: ../include/openssl/hmac.h ../include/openssl/kssl.h -errstr.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h -errstr.o: ../include/openssl/objects.h ../include/openssl/ocsp.h -errstr.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -errstr.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h -errstr.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h -errstr.o: ../include/openssl/pq_compat.h ../include/openssl/pqueue.h -errstr.o: ../include/openssl/safestack.h ../include/openssl/sha.h -errstr.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h -errstr.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h -errstr.o: ../include/openssl/stack.h ../include/openssl/symhacks.h -errstr.o: ../include/openssl/tls1.h ../include/openssl/txt_db.h -errstr.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h -errstr.o: ../include/openssl/x509v3.h apps.h errstr.c +errstr.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h +errstr.o: ../include/openssl/err.h ../include/openssl/evp.h +errstr.o: ../include/openssl/fips.h ../include/openssl/hmac.h +errstr.o: ../include/openssl/kssl.h ../include/openssl/lhash.h +errstr.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +errstr.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h +errstr.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +errstr.o: ../include/openssl/pem.h ../include/openssl/pem2.h +errstr.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h +errstr.o: ../include/openssl/pqueue.h ../include/openssl/safestack.h +errstr.o: ../include/openssl/sha.h ../include/openssl/ssl.h +errstr.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h +errstr.o: ../include/openssl/ssl3.h ../include/openssl/stack.h +errstr.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h +errstr.o: ../include/openssl/txt_db.h ../include/openssl/x509.h +errstr.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h +errstr.o: errstr.c gendh.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h gendh.o: ../include/openssl/bn.h ../include/openssl/buffer.h gendh.o: ../include/openssl/conf.h ../include/openssl/crypto.h gendh.o: ../include/openssl/dh.h ../include/openssl/dsa.h gendh.o: ../include/openssl/e_os2.h ../include/openssl/ec.h -gendh.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h -gendh.o: ../include/openssl/engine.h ../include/openssl/err.h -gendh.o: ../include/openssl/evp.h ../include/openssl/fips.h -gendh.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h -gendh.o: ../include/openssl/objects.h ../include/openssl/ocsp.h -gendh.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -gendh.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h -gendh.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h -gendh.o: ../include/openssl/rand.h ../include/openssl/rsa.h -gendh.o: ../include/openssl/safestack.h ../include/openssl/sha.h -gendh.o: ../include/openssl/stack.h ../include/openssl/store.h -gendh.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h -gendh.o: ../include/openssl/ui.h ../include/openssl/x509.h -gendh.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h -gendh.o: gendh.c +gendh.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h +gendh.o: ../include/openssl/err.h ../include/openssl/evp.h +gendh.o: ../include/openssl/fips.h ../include/openssl/lhash.h +gendh.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +gendh.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h +gendh.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +gendh.o: ../include/openssl/pem.h ../include/openssl/pem2.h +gendh.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h +gendh.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +gendh.o: ../include/openssl/sha.h ../include/openssl/stack.h +gendh.o: ../include/openssl/store.h ../include/openssl/symhacks.h +gendh.o: ../include/openssl/txt_db.h ../include/openssl/ui.h +gendh.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h +gendh.o: ../include/openssl/x509v3.h apps.h gendh.c gendsa.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h gendsa.o: ../include/openssl/bn.h ../include/openssl/buffer.h gendsa.o: ../include/openssl/conf.h ../include/openssl/crypto.h gendsa.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h -gendsa.o: ../include/openssl/ec.h ../include/openssl/ecdh.h -gendsa.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h -gendsa.o: ../include/openssl/err.h ../include/openssl/evp.h -gendsa.o: ../include/openssl/fips.h ../include/openssl/lhash.h -gendsa.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h -gendsa.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h -gendsa.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h -gendsa.o: ../include/openssl/pem.h ../include/openssl/pem2.h -gendsa.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h -gendsa.o: ../include/openssl/sha.h ../include/openssl/stack.h -gendsa.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h -gendsa.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h -gendsa.o: ../include/openssl/x509v3.h apps.h gendsa.c +gendsa.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h +gendsa.o: ../include/openssl/engine.h ../include/openssl/err.h +gendsa.o: ../include/openssl/evp.h ../include/openssl/fips.h +gendsa.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h +gendsa.o: ../include/openssl/objects.h ../include/openssl/ocsp.h +gendsa.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +gendsa.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h +gendsa.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h +gendsa.o: ../include/openssl/safestack.h ../include/openssl/sha.h +gendsa.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +gendsa.o: ../include/openssl/txt_db.h ../include/openssl/x509.h +gendsa.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h +gendsa.o: gendsa.c genrsa.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h genrsa.o: ../include/openssl/bn.h ../include/openssl/buffer.h genrsa.o: ../include/openssl/conf.h ../include/openssl/crypto.h genrsa.o: ../include/openssl/dh.h ../include/openssl/dsa.h genrsa.o: ../include/openssl/e_os2.h ../include/openssl/ec.h -genrsa.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h -genrsa.o: ../include/openssl/engine.h ../include/openssl/err.h -genrsa.o: ../include/openssl/evp.h ../include/openssl/fips.h -genrsa.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h -genrsa.o: ../include/openssl/objects.h ../include/openssl/ocsp.h -genrsa.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -genrsa.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h -genrsa.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h -genrsa.o: ../include/openssl/rand.h ../include/openssl/rsa.h -genrsa.o: ../include/openssl/safestack.h ../include/openssl/sha.h -genrsa.o: ../include/openssl/stack.h ../include/openssl/store.h -genrsa.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h -genrsa.o: ../include/openssl/ui.h ../include/openssl/x509.h -genrsa.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h -genrsa.o: genrsa.c +genrsa.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h +genrsa.o: ../include/openssl/err.h ../include/openssl/evp.h +genrsa.o: ../include/openssl/fips.h ../include/openssl/lhash.h +genrsa.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +genrsa.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h +genrsa.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +genrsa.o: ../include/openssl/pem.h ../include/openssl/pem2.h +genrsa.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h +genrsa.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +genrsa.o: ../include/openssl/sha.h ../include/openssl/stack.h +genrsa.o: ../include/openssl/store.h ../include/openssl/symhacks.h +genrsa.o: ../include/openssl/txt_db.h ../include/openssl/ui.h +genrsa.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h +genrsa.o: ../include/openssl/x509v3.h apps.h genrsa.c nseq.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h nseq.o: ../include/openssl/buffer.h ../include/openssl/conf.h nseq.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h -nseq.o: ../include/openssl/ec.h ../include/openssl/ecdh.h -nseq.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h -nseq.o: ../include/openssl/err.h ../include/openssl/evp.h -nseq.o: ../include/openssl/fips.h ../include/openssl/lhash.h -nseq.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h -nseq.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h -nseq.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h -nseq.o: ../include/openssl/pem.h ../include/openssl/pem2.h -nseq.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h -nseq.o: ../include/openssl/sha.h ../include/openssl/stack.h -nseq.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h -nseq.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h -nseq.o: ../include/openssl/x509v3.h apps.h nseq.c +nseq.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h +nseq.o: ../include/openssl/engine.h ../include/openssl/err.h +nseq.o: ../include/openssl/evp.h ../include/openssl/fips.h +nseq.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h +nseq.o: ../include/openssl/objects.h ../include/openssl/ocsp.h +nseq.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +nseq.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h +nseq.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h +nseq.o: ../include/openssl/safestack.h ../include/openssl/sha.h +nseq.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +nseq.o: ../include/openssl/txt_db.h ../include/openssl/x509.h +nseq.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h nseq.c ocsp.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h ocsp.o: ../include/openssl/bn.h ../include/openssl/buffer.h ocsp.o: ../include/openssl/comp.h ../include/openssl/conf.h ocsp.o: ../include/openssl/crypto.h ../include/openssl/dtls1.h ocsp.o: ../include/openssl/e_os2.h ../include/openssl/ec.h -ocsp.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h -ocsp.o: ../include/openssl/engine.h ../include/openssl/err.h -ocsp.o: ../include/openssl/evp.h ../include/openssl/fips.h -ocsp.o: ../include/openssl/hmac.h ../include/openssl/kssl.h -ocsp.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h -ocsp.o: ../include/openssl/objects.h ../include/openssl/ocsp.h -ocsp.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -ocsp.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h -ocsp.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h -ocsp.o: ../include/openssl/pq_compat.h ../include/openssl/pqueue.h -ocsp.o: ../include/openssl/safestack.h ../include/openssl/sha.h -ocsp.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h -ocsp.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h -ocsp.o: ../include/openssl/stack.h ../include/openssl/symhacks.h -ocsp.o: ../include/openssl/tls1.h ../include/openssl/txt_db.h -ocsp.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h -ocsp.o: ../include/openssl/x509v3.h apps.h ocsp.c +ocsp.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h +ocsp.o: ../include/openssl/err.h ../include/openssl/evp.h +ocsp.o: ../include/openssl/fips.h ../include/openssl/hmac.h +ocsp.o: ../include/openssl/kssl.h ../include/openssl/lhash.h +ocsp.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +ocsp.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h +ocsp.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +ocsp.o: ../include/openssl/pem.h ../include/openssl/pem2.h +ocsp.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h +ocsp.o: ../include/openssl/pqueue.h ../include/openssl/safestack.h +ocsp.o: ../include/openssl/sha.h ../include/openssl/ssl.h +ocsp.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h +ocsp.o: ../include/openssl/ssl3.h ../include/openssl/stack.h +ocsp.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h +ocsp.o: ../include/openssl/txt_db.h ../include/openssl/x509.h +ocsp.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h ocsp.c openssl.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h openssl.o: ../include/openssl/bn.h ../include/openssl/buffer.h openssl.o: ../include/openssl/comp.h ../include/openssl/conf.h openssl.o: ../include/openssl/crypto.h ../include/openssl/dtls1.h openssl.o: ../include/openssl/e_os2.h ../include/openssl/ec.h -openssl.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h -openssl.o: ../include/openssl/engine.h ../include/openssl/err.h *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 16:14:36 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7E5F61065670; Mon, 2 Jul 2012 16:14:36 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 65DFA8FC08; Mon, 2 Jul 2012 16:14:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q62GEaLi080486; Mon, 2 Jul 2012 16:14:36 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q62GEaQl080476; Mon, 2 Jul 2012 16:14:36 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201207021614.q62GEaQl080476@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 2 Jul 2012 16:14: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: r237999 - in stable/8: crypto/openssl crypto/openssl/apps crypto/openssl/crypto crypto/openssl/crypto/asn1 crypto/openssl/crypto/bio crypto/openssl/crypto/bn crypto/openssl/crypto/bn/as... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 16:14:36 -0000 Author: jkim Date: Mon Jul 2 16:14:35 2012 New Revision: 237999 URL: http://svn.freebsd.org/changeset/base/237999 Log: MFC: r237657, r237658, r237666 Merge OpenSSL 0.9.8x and regen manual pages. Modified: stable/8/crypto/openssl/CHANGES stable/8/crypto/openssl/Configure stable/8/crypto/openssl/FAQ stable/8/crypto/openssl/LICENSE stable/8/crypto/openssl/Makefile stable/8/crypto/openssl/NEWS stable/8/crypto/openssl/README stable/8/crypto/openssl/apps/Makefile stable/8/crypto/openssl/apps/asn1pars.c stable/8/crypto/openssl/apps/cms.c stable/8/crypto/openssl/apps/openssl.cnf stable/8/crypto/openssl/apps/pkcs12.c stable/8/crypto/openssl/apps/s_client.c stable/8/crypto/openssl/apps/s_server.c stable/8/crypto/openssl/apps/x509.c stable/8/crypto/openssl/config stable/8/crypto/openssl/crypto/asn1/a_object.c stable/8/crypto/openssl/crypto/asn1/a_strex.c stable/8/crypto/openssl/crypto/asn1/a_strnid.c stable/8/crypto/openssl/crypto/asn1/asn1.h stable/8/crypto/openssl/crypto/asn1/asn_mime.c stable/8/crypto/openssl/crypto/asn1/x_name.c stable/8/crypto/openssl/crypto/asn1/x_pubkey.c stable/8/crypto/openssl/crypto/bio/bf_buff.c stable/8/crypto/openssl/crypto/bio/bio.h stable/8/crypto/openssl/crypto/bio/bss_dgram.c stable/8/crypto/openssl/crypto/bn/asm/mo-586.pl stable/8/crypto/openssl/crypto/bn/asm/ppc.pl stable/8/crypto/openssl/crypto/bn/bn_blind.c stable/8/crypto/openssl/crypto/bn/bn_gf2m.c stable/8/crypto/openssl/crypto/cms/cms.h stable/8/crypto/openssl/crypto/cms/cms_enc.c stable/8/crypto/openssl/crypto/cms/cms_env.c stable/8/crypto/openssl/crypto/cms/cms_io.c stable/8/crypto/openssl/crypto/cms/cms_lcl.h stable/8/crypto/openssl/crypto/cms/cms_smime.c stable/8/crypto/openssl/crypto/comp/c_rle.c stable/8/crypto/openssl/crypto/conf/conf_api.c stable/8/crypto/openssl/crypto/cryptlib.c stable/8/crypto/openssl/crypto/crypto.h stable/8/crypto/openssl/crypto/ec/ec2_smpl.c stable/8/crypto/openssl/crypto/ec/ec_key.c stable/8/crypto/openssl/crypto/ec/ecp_smpl.c stable/8/crypto/openssl/crypto/ecdsa/ecdsatest.c stable/8/crypto/openssl/crypto/ecdsa/ecs_ossl.c stable/8/crypto/openssl/crypto/evp/evp_test.c stable/8/crypto/openssl/crypto/ocsp/ocsp_lib.c stable/8/crypto/openssl/crypto/opensslv.h stable/8/crypto/openssl/crypto/perlasm/cbc.pl stable/8/crypto/openssl/crypto/pkcs7/pk7_smime.c stable/8/crypto/openssl/crypto/rc4/asm/rc4-x86_64.pl stable/8/crypto/openssl/crypto/rc4/rc4_skey.c stable/8/crypto/openssl/crypto/rsa/rsa_eay.c stable/8/crypto/openssl/crypto/x509/x509_vfy.c stable/8/crypto/openssl/crypto/x509v3/v3_addr.c stable/8/crypto/openssl/crypto/x509v3/v3_asid.c stable/8/crypto/openssl/doc/HOWTO/proxy_certificates.txt stable/8/crypto/openssl/doc/apps/ca.pod stable/8/crypto/openssl/doc/apps/dgst.pod stable/8/crypto/openssl/doc/crypto/engine.pod stable/8/crypto/openssl/doc/ssl/SSL_clear.pod stable/8/crypto/openssl/engines/e_capi.c stable/8/crypto/openssl/engines/e_capi_err.h stable/8/crypto/openssl/fips/fips_canister.c stable/8/crypto/openssl/openssl.spec stable/8/crypto/openssl/ssl/bio_ssl.c stable/8/crypto/openssl/ssl/d1_both.c stable/8/crypto/openssl/ssl/d1_clnt.c stable/8/crypto/openssl/ssl/d1_enc.c stable/8/crypto/openssl/ssl/d1_lib.c stable/8/crypto/openssl/ssl/d1_pkt.c stable/8/crypto/openssl/ssl/d1_srvr.c stable/8/crypto/openssl/ssl/s2_srvr.c stable/8/crypto/openssl/ssl/s3_clnt.c stable/8/crypto/openssl/ssl/s3_lib.c stable/8/crypto/openssl/ssl/s3_srvr.c stable/8/crypto/openssl/ssl/ssl.h stable/8/crypto/openssl/ssl/ssl_ciph.c stable/8/crypto/openssl/ssl/ssl_err.c stable/8/crypto/openssl/ssl/ssl_lib.c stable/8/crypto/openssl/ssl/ssl_locl.h stable/8/crypto/openssl/ssl/t1_lib.c stable/8/crypto/openssl/util/fipslink.pl stable/8/crypto/openssl/util/mkerr.pl stable/8/crypto/openssl/util/pl/VC-32.pl stable/8/secure/lib/libcrypto/Makefile.inc stable/8/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 stable/8/secure/lib/libcrypto/man/ASN1_STRING_length.3 stable/8/secure/lib/libcrypto/man/ASN1_STRING_new.3 stable/8/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 stable/8/secure/lib/libcrypto/man/ASN1_generate_nconf.3 stable/8/secure/lib/libcrypto/man/BIO_ctrl.3 stable/8/secure/lib/libcrypto/man/BIO_f_base64.3 stable/8/secure/lib/libcrypto/man/BIO_f_buffer.3 stable/8/secure/lib/libcrypto/man/BIO_f_cipher.3 stable/8/secure/lib/libcrypto/man/BIO_f_md.3 stable/8/secure/lib/libcrypto/man/BIO_f_null.3 stable/8/secure/lib/libcrypto/man/BIO_f_ssl.3 stable/8/secure/lib/libcrypto/man/BIO_find_type.3 stable/8/secure/lib/libcrypto/man/BIO_new.3 stable/8/secure/lib/libcrypto/man/BIO_push.3 stable/8/secure/lib/libcrypto/man/BIO_read.3 stable/8/secure/lib/libcrypto/man/BIO_s_accept.3 stable/8/secure/lib/libcrypto/man/BIO_s_bio.3 stable/8/secure/lib/libcrypto/man/BIO_s_connect.3 stable/8/secure/lib/libcrypto/man/BIO_s_fd.3 stable/8/secure/lib/libcrypto/man/BIO_s_file.3 stable/8/secure/lib/libcrypto/man/BIO_s_mem.3 stable/8/secure/lib/libcrypto/man/BIO_s_null.3 stable/8/secure/lib/libcrypto/man/BIO_s_socket.3 stable/8/secure/lib/libcrypto/man/BIO_set_callback.3 stable/8/secure/lib/libcrypto/man/BIO_should_retry.3 stable/8/secure/lib/libcrypto/man/BN_BLINDING_new.3 stable/8/secure/lib/libcrypto/man/BN_CTX_new.3 stable/8/secure/lib/libcrypto/man/BN_CTX_start.3 stable/8/secure/lib/libcrypto/man/BN_add.3 stable/8/secure/lib/libcrypto/man/BN_add_word.3 stable/8/secure/lib/libcrypto/man/BN_bn2bin.3 stable/8/secure/lib/libcrypto/man/BN_cmp.3 stable/8/secure/lib/libcrypto/man/BN_copy.3 stable/8/secure/lib/libcrypto/man/BN_generate_prime.3 stable/8/secure/lib/libcrypto/man/BN_mod_inverse.3 stable/8/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 stable/8/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 stable/8/secure/lib/libcrypto/man/BN_new.3 stable/8/secure/lib/libcrypto/man/BN_num_bytes.3 stable/8/secure/lib/libcrypto/man/BN_rand.3 stable/8/secure/lib/libcrypto/man/BN_set_bit.3 stable/8/secure/lib/libcrypto/man/BN_swap.3 stable/8/secure/lib/libcrypto/man/BN_zero.3 stable/8/secure/lib/libcrypto/man/CONF_modules_free.3 stable/8/secure/lib/libcrypto/man/CONF_modules_load_file.3 stable/8/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 stable/8/secure/lib/libcrypto/man/DH_generate_key.3 stable/8/secure/lib/libcrypto/man/DH_generate_parameters.3 stable/8/secure/lib/libcrypto/man/DH_get_ex_new_index.3 stable/8/secure/lib/libcrypto/man/DH_new.3 stable/8/secure/lib/libcrypto/man/DH_set_method.3 stable/8/secure/lib/libcrypto/man/DH_size.3 stable/8/secure/lib/libcrypto/man/DSA_SIG_new.3 stable/8/secure/lib/libcrypto/man/DSA_do_sign.3 stable/8/secure/lib/libcrypto/man/DSA_dup_DH.3 stable/8/secure/lib/libcrypto/man/DSA_generate_key.3 stable/8/secure/lib/libcrypto/man/DSA_generate_parameters.3 stable/8/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 stable/8/secure/lib/libcrypto/man/DSA_new.3 stable/8/secure/lib/libcrypto/man/DSA_set_method.3 stable/8/secure/lib/libcrypto/man/DSA_sign.3 stable/8/secure/lib/libcrypto/man/DSA_size.3 stable/8/secure/lib/libcrypto/man/ERR_GET_LIB.3 stable/8/secure/lib/libcrypto/man/ERR_clear_error.3 stable/8/secure/lib/libcrypto/man/ERR_error_string.3 stable/8/secure/lib/libcrypto/man/ERR_get_error.3 stable/8/secure/lib/libcrypto/man/ERR_load_crypto_strings.3 stable/8/secure/lib/libcrypto/man/ERR_load_strings.3 stable/8/secure/lib/libcrypto/man/ERR_print_errors.3 stable/8/secure/lib/libcrypto/man/ERR_put_error.3 stable/8/secure/lib/libcrypto/man/ERR_remove_state.3 stable/8/secure/lib/libcrypto/man/ERR_set_mark.3 stable/8/secure/lib/libcrypto/man/EVP_BytesToKey.3 stable/8/secure/lib/libcrypto/man/EVP_DigestInit.3 stable/8/secure/lib/libcrypto/man/EVP_EncryptInit.3 stable/8/secure/lib/libcrypto/man/EVP_OpenInit.3 stable/8/secure/lib/libcrypto/man/EVP_PKEY_new.3 stable/8/secure/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 stable/8/secure/lib/libcrypto/man/EVP_SealInit.3 stable/8/secure/lib/libcrypto/man/EVP_SignInit.3 stable/8/secure/lib/libcrypto/man/EVP_VerifyInit.3 stable/8/secure/lib/libcrypto/man/OBJ_nid2obj.3 stable/8/secure/lib/libcrypto/man/OPENSSL_Applink.3 stable/8/secure/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3 stable/8/secure/lib/libcrypto/man/OPENSSL_config.3 stable/8/secure/lib/libcrypto/man/OPENSSL_ia32cap.3 stable/8/secure/lib/libcrypto/man/OPENSSL_load_builtin_modules.3 stable/8/secure/lib/libcrypto/man/OpenSSL_add_all_algorithms.3 stable/8/secure/lib/libcrypto/man/PKCS12_create.3 stable/8/secure/lib/libcrypto/man/PKCS12_parse.3 stable/8/secure/lib/libcrypto/man/PKCS7_decrypt.3 stable/8/secure/lib/libcrypto/man/PKCS7_encrypt.3 stable/8/secure/lib/libcrypto/man/PKCS7_sign.3 stable/8/secure/lib/libcrypto/man/PKCS7_verify.3 stable/8/secure/lib/libcrypto/man/RAND_add.3 stable/8/secure/lib/libcrypto/man/RAND_bytes.3 stable/8/secure/lib/libcrypto/man/RAND_cleanup.3 stable/8/secure/lib/libcrypto/man/RAND_egd.3 stable/8/secure/lib/libcrypto/man/RAND_load_file.3 stable/8/secure/lib/libcrypto/man/RAND_set_rand_method.3 stable/8/secure/lib/libcrypto/man/RSA_blinding_on.3 stable/8/secure/lib/libcrypto/man/RSA_check_key.3 stable/8/secure/lib/libcrypto/man/RSA_generate_key.3 stable/8/secure/lib/libcrypto/man/RSA_get_ex_new_index.3 stable/8/secure/lib/libcrypto/man/RSA_new.3 stable/8/secure/lib/libcrypto/man/RSA_padding_add_PKCS1_type_1.3 stable/8/secure/lib/libcrypto/man/RSA_print.3 stable/8/secure/lib/libcrypto/man/RSA_private_encrypt.3 stable/8/secure/lib/libcrypto/man/RSA_public_encrypt.3 stable/8/secure/lib/libcrypto/man/RSA_set_method.3 stable/8/secure/lib/libcrypto/man/RSA_sign.3 stable/8/secure/lib/libcrypto/man/RSA_sign_ASN1_OCTET_STRING.3 stable/8/secure/lib/libcrypto/man/RSA_size.3 stable/8/secure/lib/libcrypto/man/SMIME_read_PKCS7.3 stable/8/secure/lib/libcrypto/man/SMIME_write_PKCS7.3 stable/8/secure/lib/libcrypto/man/X509_NAME_ENTRY_get_object.3 stable/8/secure/lib/libcrypto/man/X509_NAME_add_entry_by_txt.3 stable/8/secure/lib/libcrypto/man/X509_NAME_get_index_by_NID.3 stable/8/secure/lib/libcrypto/man/X509_NAME_print_ex.3 stable/8/secure/lib/libcrypto/man/X509_new.3 stable/8/secure/lib/libcrypto/man/bio.3 stable/8/secure/lib/libcrypto/man/blowfish.3 stable/8/secure/lib/libcrypto/man/bn.3 stable/8/secure/lib/libcrypto/man/bn_internal.3 stable/8/secure/lib/libcrypto/man/buffer.3 stable/8/secure/lib/libcrypto/man/crypto.3 stable/8/secure/lib/libcrypto/man/d2i_ASN1_OBJECT.3 stable/8/secure/lib/libcrypto/man/d2i_DHparams.3 stable/8/secure/lib/libcrypto/man/d2i_DSAPublicKey.3 stable/8/secure/lib/libcrypto/man/d2i_PKCS8PrivateKey.3 stable/8/secure/lib/libcrypto/man/d2i_RSAPublicKey.3 stable/8/secure/lib/libcrypto/man/d2i_X509.3 stable/8/secure/lib/libcrypto/man/d2i_X509_ALGOR.3 stable/8/secure/lib/libcrypto/man/d2i_X509_CRL.3 stable/8/secure/lib/libcrypto/man/d2i_X509_NAME.3 stable/8/secure/lib/libcrypto/man/d2i_X509_REQ.3 stable/8/secure/lib/libcrypto/man/d2i_X509_SIG.3 stable/8/secure/lib/libcrypto/man/des.3 stable/8/secure/lib/libcrypto/man/dh.3 stable/8/secure/lib/libcrypto/man/dsa.3 stable/8/secure/lib/libcrypto/man/ecdsa.3 stable/8/secure/lib/libcrypto/man/engine.3 stable/8/secure/lib/libcrypto/man/err.3 stable/8/secure/lib/libcrypto/man/evp.3 stable/8/secure/lib/libcrypto/man/hmac.3 stable/8/secure/lib/libcrypto/man/lh_stats.3 stable/8/secure/lib/libcrypto/man/lhash.3 stable/8/secure/lib/libcrypto/man/md5.3 stable/8/secure/lib/libcrypto/man/mdc2.3 stable/8/secure/lib/libcrypto/man/pem.3 stable/8/secure/lib/libcrypto/man/rand.3 stable/8/secure/lib/libcrypto/man/rc4.3 stable/8/secure/lib/libcrypto/man/ripemd.3 stable/8/secure/lib/libcrypto/man/rsa.3 stable/8/secure/lib/libcrypto/man/sha.3 stable/8/secure/lib/libcrypto/man/threads.3 stable/8/secure/lib/libcrypto/man/ui.3 stable/8/secure/lib/libcrypto/man/ui_compat.3 stable/8/secure/lib/libcrypto/man/x509.3 stable/8/secure/lib/libssl/man/SSL_CIPHER_get_name.3 stable/8/secure/lib/libssl/man/SSL_COMP_add_compression_method.3 stable/8/secure/lib/libssl/man/SSL_CTX_add_extra_chain_cert.3 stable/8/secure/lib/libssl/man/SSL_CTX_add_session.3 stable/8/secure/lib/libssl/man/SSL_CTX_ctrl.3 stable/8/secure/lib/libssl/man/SSL_CTX_flush_sessions.3 stable/8/secure/lib/libssl/man/SSL_CTX_free.3 stable/8/secure/lib/libssl/man/SSL_CTX_get_ex_new_index.3 stable/8/secure/lib/libssl/man/SSL_CTX_get_verify_mode.3 stable/8/secure/lib/libssl/man/SSL_CTX_load_verify_locations.3 stable/8/secure/lib/libssl/man/SSL_CTX_new.3 stable/8/secure/lib/libssl/man/SSL_CTX_sess_number.3 stable/8/secure/lib/libssl/man/SSL_CTX_sess_set_cache_size.3 stable/8/secure/lib/libssl/man/SSL_CTX_sess_set_get_cb.3 stable/8/secure/lib/libssl/man/SSL_CTX_sessions.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_cert_store.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_cert_verify_callback.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_cipher_list.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_client_CA_list.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_client_cert_cb.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_default_passwd_cb.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_generate_session_id.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_info_callback.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_max_cert_list.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_mode.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_msg_callback.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_options.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_quiet_shutdown.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_session_cache_mode.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_session_id_context.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_ssl_version.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_timeout.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_tmp_dh_callback.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_tmp_rsa_callback.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_verify.3 stable/8/secure/lib/libssl/man/SSL_CTX_use_certificate.3 stable/8/secure/lib/libssl/man/SSL_SESSION_free.3 stable/8/secure/lib/libssl/man/SSL_SESSION_get_ex_new_index.3 stable/8/secure/lib/libssl/man/SSL_SESSION_get_time.3 stable/8/secure/lib/libssl/man/SSL_accept.3 stable/8/secure/lib/libssl/man/SSL_alert_type_string.3 stable/8/secure/lib/libssl/man/SSL_clear.3 stable/8/secure/lib/libssl/man/SSL_connect.3 stable/8/secure/lib/libssl/man/SSL_do_handshake.3 stable/8/secure/lib/libssl/man/SSL_free.3 stable/8/secure/lib/libssl/man/SSL_get_SSL_CTX.3 stable/8/secure/lib/libssl/man/SSL_get_ciphers.3 stable/8/secure/lib/libssl/man/SSL_get_client_CA_list.3 stable/8/secure/lib/libssl/man/SSL_get_current_cipher.3 stable/8/secure/lib/libssl/man/SSL_get_default_timeout.3 stable/8/secure/lib/libssl/man/SSL_get_error.3 stable/8/secure/lib/libssl/man/SSL_get_ex_data_X509_STORE_CTX_idx.3 stable/8/secure/lib/libssl/man/SSL_get_ex_new_index.3 stable/8/secure/lib/libssl/man/SSL_get_fd.3 stable/8/secure/lib/libssl/man/SSL_get_peer_cert_chain.3 stable/8/secure/lib/libssl/man/SSL_get_peer_certificate.3 stable/8/secure/lib/libssl/man/SSL_get_rbio.3 stable/8/secure/lib/libssl/man/SSL_get_session.3 stable/8/secure/lib/libssl/man/SSL_get_verify_result.3 stable/8/secure/lib/libssl/man/SSL_get_version.3 stable/8/secure/lib/libssl/man/SSL_library_init.3 stable/8/secure/lib/libssl/man/SSL_load_client_CA_file.3 stable/8/secure/lib/libssl/man/SSL_new.3 stable/8/secure/lib/libssl/man/SSL_pending.3 stable/8/secure/lib/libssl/man/SSL_read.3 stable/8/secure/lib/libssl/man/SSL_rstate_string.3 stable/8/secure/lib/libssl/man/SSL_session_reused.3 stable/8/secure/lib/libssl/man/SSL_set_bio.3 stable/8/secure/lib/libssl/man/SSL_set_connect_state.3 stable/8/secure/lib/libssl/man/SSL_set_fd.3 stable/8/secure/lib/libssl/man/SSL_set_session.3 stable/8/secure/lib/libssl/man/SSL_set_shutdown.3 stable/8/secure/lib/libssl/man/SSL_set_verify_result.3 stable/8/secure/lib/libssl/man/SSL_shutdown.3 stable/8/secure/lib/libssl/man/SSL_state_string.3 stable/8/secure/lib/libssl/man/SSL_want.3 stable/8/secure/lib/libssl/man/SSL_write.3 stable/8/secure/lib/libssl/man/d2i_SSL_SESSION.3 stable/8/secure/lib/libssl/man/ssl.3 stable/8/secure/usr.bin/openssl/man/CA.pl.1 stable/8/secure/usr.bin/openssl/man/asn1parse.1 stable/8/secure/usr.bin/openssl/man/ca.1 stable/8/secure/usr.bin/openssl/man/ciphers.1 stable/8/secure/usr.bin/openssl/man/crl.1 stable/8/secure/usr.bin/openssl/man/crl2pkcs7.1 stable/8/secure/usr.bin/openssl/man/dgst.1 stable/8/secure/usr.bin/openssl/man/dhparam.1 stable/8/secure/usr.bin/openssl/man/dsa.1 stable/8/secure/usr.bin/openssl/man/dsaparam.1 stable/8/secure/usr.bin/openssl/man/ec.1 stable/8/secure/usr.bin/openssl/man/ecparam.1 stable/8/secure/usr.bin/openssl/man/enc.1 stable/8/secure/usr.bin/openssl/man/errstr.1 stable/8/secure/usr.bin/openssl/man/gendsa.1 stable/8/secure/usr.bin/openssl/man/genrsa.1 stable/8/secure/usr.bin/openssl/man/nseq.1 stable/8/secure/usr.bin/openssl/man/ocsp.1 stable/8/secure/usr.bin/openssl/man/openssl.1 stable/8/secure/usr.bin/openssl/man/passwd.1 stable/8/secure/usr.bin/openssl/man/pkcs12.1 stable/8/secure/usr.bin/openssl/man/pkcs7.1 stable/8/secure/usr.bin/openssl/man/pkcs8.1 stable/8/secure/usr.bin/openssl/man/rand.1 stable/8/secure/usr.bin/openssl/man/req.1 stable/8/secure/usr.bin/openssl/man/rsa.1 stable/8/secure/usr.bin/openssl/man/rsautl.1 stable/8/secure/usr.bin/openssl/man/s_client.1 stable/8/secure/usr.bin/openssl/man/s_server.1 stable/8/secure/usr.bin/openssl/man/s_time.1 stable/8/secure/usr.bin/openssl/man/sess_id.1 stable/8/secure/usr.bin/openssl/man/smime.1 stable/8/secure/usr.bin/openssl/man/speed.1 stable/8/secure/usr.bin/openssl/man/spkac.1 stable/8/secure/usr.bin/openssl/man/verify.1 stable/8/secure/usr.bin/openssl/man/version.1 stable/8/secure/usr.bin/openssl/man/x509.1 stable/8/secure/usr.bin/openssl/man/x509v3_config.1 Directory Properties: stable/8/crypto/openssl/ (props changed) stable/8/secure/lib/libcrypto/ (props changed) stable/8/secure/lib/libssl/ (props changed) stable/8/secure/usr.bin/openssl/ (props changed) Modified: stable/8/crypto/openssl/CHANGES ============================================================================== --- stable/8/crypto/openssl/CHANGES Mon Jul 2 16:00:38 2012 (r237998) +++ stable/8/crypto/openssl/CHANGES Mon Jul 2 16:14:35 2012 (r237999) @@ -2,6 +2,142 @@ OpenSSL CHANGES _______________ + Changes between 0.9.8w and 0.9.8x [10 May 2012] + + *) Sanity check record length before skipping explicit IV in DTLS + to fix DoS attack. + + Thanks to Codenomicon for discovering this issue using Fuzz-o-Matic + fuzzing as a service testing platform. + (CVE-2012-2333) + [Steve Henson] + + *) Initialise tkeylen properly when encrypting CMS messages. + Thanks to Solar Designer of Openwall for reporting this issue. + [Steve Henson] + + Changes between 0.9.8v and 0.9.8w [23 Apr 2012] + + *) The fix for CVE-2012-2110 did not take into account that the + 'len' argument to BUF_MEM_grow and BUF_MEM_grow_clean is an + int in OpenSSL 0.9.8, making it still vulnerable. Fix by + rejecting negative len parameter. (CVE-2012-2131) + [Tomas Hoger ] + + Changes between 0.9.8u and 0.9.8v [19 Apr 2012] + + *) Check for potentially exploitable overflows in asn1_d2i_read_bio + BUF_mem_grow and BUF_mem_grow_clean. Refuse attempts to shrink buffer + in CRYPTO_realloc_clean. + + Thanks to Tavis Ormandy, Google Security Team, for discovering this + issue and to Adam Langley for fixing it. + (CVE-2012-2110) + [Adam Langley (Google), Tavis Ormandy, Google Security Team] + + Changes between 0.9.8t and 0.9.8u [12 Mar 2012] + + *) Fix MMA (Bleichenbacher's attack on PKCS #1 v1.5 RSA padding) weakness + in CMS and PKCS7 code. When RSA decryption fails use a random key for + content decryption and always return the same error. Note: this attack + needs on average 2^20 messages so it only affects automated senders. The + old behaviour can be reenabled in the CMS code by setting the + CMS_DEBUG_DECRYPT flag: this is useful for debugging and testing where + an MMA defence is not necessary. + Thanks to Ivan Nestlerode for discovering + this issue. (CVE-2012-0884) + [Steve Henson] + + *) Fix CVE-2011-4619: make sure we really are receiving a + client hello before rejecting multiple SGC restarts. Thanks to + Ivan Nestlerode for discovering this bug. + [Steve Henson] + + Changes between 0.9.8s and 0.9.8t [18 Jan 2012] + + *) Fix for DTLS DoS issue introduced by fix for CVE-2011-4109. + Thanks to Antonio Martin, Enterprise Secure Access Research and + Development, Cisco Systems, Inc. for discovering this bug and + preparing a fix. (CVE-2012-0050) + [Antonio Martin] + + Changes between 0.9.8r and 0.9.8s [4 Jan 2012] + + *) Nadhem Alfardan and Kenny Paterson have discovered an extension + of the Vaudenay padding oracle attack on CBC mode encryption + which enables an efficient plaintext recovery attack against + the OpenSSL implementation of DTLS. Their attack exploits timing + differences arising during decryption processing. A research + paper describing this attack can be found at: + http://www.isg.rhul.ac.uk/~kp/dtls.pdf + Thanks go to Nadhem Alfardan and Kenny Paterson of the Information + Security Group at Royal Holloway, University of London + (www.isg.rhul.ac.uk) for discovering this flaw and to Robin Seggelmann + and Michael Tuexen + for preparing the fix. (CVE-2011-4108) + [Robin Seggelmann, Michael Tuexen] + + *) Stop policy check failure freeing same buffer twice. (CVE-2011-4109) + [Ben Laurie, Kasper ] + + *) Clear bytes used for block padding of SSL 3.0 records. + (CVE-2011-4576) + [Adam Langley (Google)] + + *) Only allow one SGC handshake restart for SSL/TLS. Thanks to George + Kadianakis for discovering this issue and + Adam Langley for preparing the fix. (CVE-2011-4619) + [Adam Langley (Google)] + + *) Prevent malformed RFC3779 data triggering an assertion failure. + Thanks to Andrew Chi, BBN Technologies, for discovering the flaw + and Rob Austein for fixing it. (CVE-2011-4577) + [Rob Austein ] + + *) Fix ssl_ciph.c set-up race. + [Adam Langley (Google)] + + *) Fix spurious failures in ecdsatest.c. + [Emilia Käsper (Google)] + + *) Fix the BIO_f_buffer() implementation (which was mixing different + interpretations of the '..._len' fields). + [Adam Langley (Google)] + + *) Fix handling of BN_BLINDING: now BN_BLINDING_invert_ex (rather than + BN_BLINDING_invert_ex) calls BN_BLINDING_update, ensuring that concurrent + threads won't reuse the same blinding coefficients. + + This also avoids the need to obtain the CRYPTO_LOCK_RSA_BLINDING + lock to call BN_BLINDING_invert_ex, and avoids one use of + BN_BLINDING_update for each BN_BLINDING structure (previously, + the last update always remained unused). + [Emilia Käsper (Google)] + + *) Fix SSL memory handling for (EC)DH ciphersuites, in particular + for multi-threaded use of ECDH. + [Adam Langley (Google)] + + *) Fix x509_name_ex_d2i memory leak on bad inputs. + [Bodo Moeller] + + *) Add protection against ECDSA timing attacks as mentioned in the paper + by Billy Bob Brumley and Nicola Tuveri, see: + + http://eprint.iacr.org/2011/232.pdf + + [Billy Bob Brumley and Nicola Tuveri] + + Changes between 0.9.8q and 0.9.8r [8 Feb 2011] + + *) Fix parsing of OCSP stapling ClientHello extension. CVE-2011-0014 + [Neel Mehta, Adam Langley, Bodo Moeller (Google)] + + *) Fix bug in string printing code: if *any* escaping is enabled we must + escape the escape character (backslash) or the resulting string is + ambiguous. + [Steve Henson] + Changes between 0.9.8p and 0.9.8q [2 Dec 2010] *) Disable code workaround for ancient and obsolete Netscape browsers Modified: stable/8/crypto/openssl/Configure ============================================================================== --- stable/8/crypto/openssl/Configure Mon Jul 2 16:00:38 2012 (r237998) +++ stable/8/crypto/openssl/Configure Mon Jul 2 16:14:35 2012 (r237999) @@ -371,6 +371,9 @@ my %table=( "linux-alpha-ccc","ccc:-fast -readonly_strings -DL_ENDIAN -DTERMIO::-D_REENTRANT:::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL:${no_asm}", "linux-alpha+bwx-ccc","ccc:-fast -readonly_strings -DL_ENDIAN -DTERMIO::-D_REENTRANT:::SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL:${no_asm}", +# Android: Linux but without -DTERMIO and pointers to headers and libs. +"android","gcc:-mandroid -I\$(ANDROID_DEV)/include -B\$(ANDROID_DEV)/lib -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", + #### *BSD [do see comment about ${BSDthreads} above!] "BSD-generic32","gcc:-DTERMIOS -O3 -fomit-frame-pointer -Wall::${BSDthreads}:::BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "BSD-x86", "gcc:-DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer -Wall::${BSDthreads}:::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}:dlfcn:bsd-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", Modified: stable/8/crypto/openssl/FAQ ============================================================================== --- stable/8/crypto/openssl/FAQ Mon Jul 2 16:00:38 2012 (r237998) +++ stable/8/crypto/openssl/FAQ Mon Jul 2 16:14:35 2012 (r237999) @@ -10,6 +10,7 @@ OpenSSL - Frequently Asked Questions * Why aren't tools like 'autoconf' and 'libtool' used? * What is an 'engine' version? * How do I check the authenticity of the OpenSSL distribution? +* How does the versioning scheme work? [LEGAL] Legal questions @@ -82,7 +83,7 @@ OpenSSL - Frequently Asked Questions * Which is the current version of OpenSSL? The current version is available from . -OpenSSL 1.0.0c was released on Dec 2nd, 2010. +OpenSSL 1.0.1c was released on May 10th, 2012. In addition to the current stable release, you can also access daily snapshots of the OpenSSL development version at . Note that the online documents refer to the very latest development versions of OpenSSL and may include features not present in released versions. If in doubt refer to the documentation -that came with the version of OpenSSL you are using. +that came with the version of OpenSSL you are using. The pod format +documentation is included in each OpenSSL distribution under the docs +directory. For information on parts of libcrypto that are not yet documented, you might want to read Ariel Glenn's documentation on SSLeay 0.9, OpenSSL's @@ -173,6 +176,19 @@ just do: pgp TARBALL.asc +* How does the versioning scheme work? + +After the release of OpenSSL 1.0.0 the versioning scheme changed. Letter +releases (e.g. 1.0.1a) can only contain bug and security fixes and no +new features. Minor releases change the last number (e.g. 1.0.2) and +can contain new features that retain binary compatibility. Changes to +the middle number are considered major releases and neither source nor +binary compatibility is guaranteed. + +Therefore the answer to the common question "when will feature X be +backported to OpenSSL 1.0.0/0.9.8?" is "never" but it could appear +in the next minor release. + [LEGAL] ======================================================================= * Do I need patent licenses to use OpenSSL? @@ -284,7 +300,7 @@ current directory in this case, but this Check out the CA.pl(1) manual page. This provides a simple wrapper round the 'req', 'verify', 'ca' and 'pkcs12' utilities. For finer control check out the manual pages for the individual utilities and the certificate -extensions documentation (currently in doc/openssl.txt). +extensions documentation (in ca(1), req(1), x509v3_config(5) ) * Why can't I create certificate requests? Modified: stable/8/crypto/openssl/LICENSE ============================================================================== --- stable/8/crypto/openssl/LICENSE Mon Jul 2 16:00:38 2012 (r237998) +++ stable/8/crypto/openssl/LICENSE Mon Jul 2 16:14:35 2012 (r237999) @@ -12,7 +12,7 @@ --------------- /* ==================================================================== - * Copyright (c) 1998-2008 The OpenSSL Project. All rights reserved. + * Copyright (c) 1998-2011 The OpenSSL Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/8/crypto/openssl/Makefile ============================================================================== --- stable/8/crypto/openssl/Makefile Mon Jul 2 16:00:38 2012 (r237998) +++ stable/8/crypto/openssl/Makefile Mon Jul 2 16:14:35 2012 (r237999) @@ -4,7 +4,7 @@ ## Makefile for OpenSSL ## -VERSION=0.9.8q +VERSION=0.9.8x MAJOR=0 MINOR=9.8 SHLIB_VERSION_NUMBER=0.9.8 Modified: stable/8/crypto/openssl/NEWS ============================================================================== --- stable/8/crypto/openssl/NEWS Mon Jul 2 16:00:38 2012 (r237998) +++ stable/8/crypto/openssl/NEWS Mon Jul 2 16:14:35 2012 (r237999) @@ -5,6 +5,40 @@ This file gives a brief overview of the major changes between each OpenSSL release. For more details please read the CHANGES file. + Major changes between OpenSSL 0.9.8w and OpenSSL 0.9.8x: + + o Fix DTLS record length checking bug CVE-2012-2333 + + Major changes between OpenSSL 0.9.8v and OpenSSL 0.9.8w: + + o Fix for CVE-2012-2131 (corrected fix for 0.9.8 and CVE-2012-2110) + + Major changes between OpenSSL 0.9.8u and OpenSSL 0.9.8v: + + o Fix for ASN1 overflow bug CVE-2012-2110 + + Major changes between OpenSSL 0.9.8t and OpenSSL 0.9.8u: + + o Fix for CMS/PKCS#7 MMA CVE-2012-0884 + o Corrected fix for CVE-2011-4619 + o Various DTLS fixes. + + Major changes between OpenSSL 0.9.8s and OpenSSL 0.9.8t: + + o Fix for DTLS DoS issue CVE-2012-0050 + + Major changes between OpenSSL 0.9.8r and OpenSSL 0.9.8s: + + o Fix for DTLS plaintext recovery attack CVE-2011-4108 + o Fix policy check double free error CVE-2011-4109 + o Clear block padding bytes of SSL 3.0 records CVE-2011-4576 + o Only allow one SGC handshake restart for SSL/TLS CVE-2011-4619 + o Check for malformed RFC3779 data CVE-2011-4577 + + Major changes between OpenSSL 0.9.8q and OpenSSL 0.9.8r: + + o Fix for security issue CVE-2011-0014 + Major changes between OpenSSL 0.9.8p and OpenSSL 0.9.8q: o Fix for security issue CVE-2010-4180 @@ -181,6 +215,11 @@ o Added initial support for Win64. o Added alternate pkg-config files. + Major changes between OpenSSL 0.9.7l and OpenSSL 0.9.7m: + + o FIPS 1.1.1 module linking. + o Various ciphersuite selection fixes. + Major changes between OpenSSL 0.9.7k and OpenSSL 0.9.7l: o Introduce limits to prevent malicious key DoS (CVE-2006-2940) Modified: stable/8/crypto/openssl/README ============================================================================== --- stable/8/crypto/openssl/README Mon Jul 2 16:00:38 2012 (r237998) +++ stable/8/crypto/openssl/README Mon Jul 2 16:14:35 2012 (r237999) @@ -1,7 +1,7 @@ - OpenSSL 0.9.8q 2 Dec 2010 + OpenSSL 0.9.8x 10 May 2012 - Copyright (c) 1998-2009 The OpenSSL Project + Copyright (c) 1998-2011 The OpenSSL Project Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson All rights reserved. Modified: stable/8/crypto/openssl/apps/Makefile ============================================================================== --- stable/8/crypto/openssl/apps/Makefile Mon Jul 2 16:00:38 2012 (r237998) +++ stable/8/crypto/openssl/apps/Makefile Mon Jul 2 16:14:35 2012 (r237999) @@ -176,720 +176,703 @@ progs.h: progs.pl app_rand.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h app_rand.o: ../include/openssl/buffer.h ../include/openssl/conf.h app_rand.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h -app_rand.o: ../include/openssl/ec.h ../include/openssl/ecdh.h -app_rand.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h -app_rand.o: ../include/openssl/evp.h ../include/openssl/fips.h -app_rand.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h -app_rand.o: ../include/openssl/objects.h ../include/openssl/ocsp.h -app_rand.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -app_rand.o: ../include/openssl/ossl_typ.h ../include/openssl/pkcs7.h -app_rand.o: ../include/openssl/rand.h ../include/openssl/safestack.h -app_rand.o: ../include/openssl/sha.h ../include/openssl/stack.h -app_rand.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h -app_rand.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h -app_rand.o: ../include/openssl/x509v3.h app_rand.c apps.h +app_rand.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h +app_rand.o: ../include/openssl/engine.h ../include/openssl/evp.h +app_rand.o: ../include/openssl/fips.h ../include/openssl/lhash.h +app_rand.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +app_rand.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h +app_rand.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +app_rand.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h +app_rand.o: ../include/openssl/safestack.h ../include/openssl/sha.h +app_rand.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +app_rand.o: ../include/openssl/txt_db.h ../include/openssl/x509.h +app_rand.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h +app_rand.o: app_rand.c apps.h apps.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h apps.o: ../include/openssl/bn.h ../include/openssl/buffer.h apps.o: ../include/openssl/conf.h ../include/openssl/crypto.h apps.o: ../include/openssl/e_os2.h ../include/openssl/ec.h -apps.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h -apps.o: ../include/openssl/engine.h ../include/openssl/err.h -apps.o: ../include/openssl/evp.h ../include/openssl/fips.h -apps.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h -apps.o: ../include/openssl/objects.h ../include/openssl/ocsp.h -apps.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -apps.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h -apps.o: ../include/openssl/pem2.h ../include/openssl/pkcs12.h -apps.o: ../include/openssl/pkcs7.h ../include/openssl/rsa.h -apps.o: ../include/openssl/safestack.h ../include/openssl/sha.h -apps.o: ../include/openssl/stack.h ../include/openssl/symhacks.h -apps.o: ../include/openssl/txt_db.h ../include/openssl/ui.h -apps.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h -apps.o: ../include/openssl/x509v3.h apps.c apps.h +apps.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h +apps.o: ../include/openssl/err.h ../include/openssl/evp.h +apps.o: ../include/openssl/fips.h ../include/openssl/lhash.h +apps.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +apps.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h +apps.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +apps.o: ../include/openssl/pem.h ../include/openssl/pem2.h +apps.o: ../include/openssl/pkcs12.h ../include/openssl/pkcs7.h +apps.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +apps.o: ../include/openssl/sha.h ../include/openssl/stack.h +apps.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h +apps.o: ../include/openssl/ui.h ../include/openssl/x509.h +apps.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.c apps.h asn1pars.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h asn1pars.o: ../include/openssl/buffer.h ../include/openssl/conf.h asn1pars.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h -asn1pars.o: ../include/openssl/ec.h ../include/openssl/ecdh.h -asn1pars.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h -asn1pars.o: ../include/openssl/err.h ../include/openssl/evp.h -asn1pars.o: ../include/openssl/fips.h ../include/openssl/lhash.h -asn1pars.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h -asn1pars.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h -asn1pars.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h -asn1pars.o: ../include/openssl/pem.h ../include/openssl/pem2.h -asn1pars.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h -asn1pars.o: ../include/openssl/sha.h ../include/openssl/stack.h -asn1pars.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h -asn1pars.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h -asn1pars.o: ../include/openssl/x509v3.h apps.h asn1pars.c +asn1pars.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h +asn1pars.o: ../include/openssl/engine.h ../include/openssl/err.h +asn1pars.o: ../include/openssl/evp.h ../include/openssl/fips.h +asn1pars.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h +asn1pars.o: ../include/openssl/objects.h ../include/openssl/ocsp.h +asn1pars.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +asn1pars.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h +asn1pars.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h +asn1pars.o: ../include/openssl/safestack.h ../include/openssl/sha.h +asn1pars.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +asn1pars.o: ../include/openssl/txt_db.h ../include/openssl/x509.h +asn1pars.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h +asn1pars.o: asn1pars.c ca.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h ca.o: ../include/openssl/bn.h ../include/openssl/buffer.h ca.o: ../include/openssl/conf.h ../include/openssl/crypto.h ca.o: ../include/openssl/e_os2.h ../include/openssl/ec.h -ca.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h -ca.o: ../include/openssl/engine.h ../include/openssl/err.h -ca.o: ../include/openssl/evp.h ../include/openssl/fips.h -ca.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h -ca.o: ../include/openssl/objects.h ../include/openssl/ocsp.h -ca.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -ca.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h -ca.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h -ca.o: ../include/openssl/safestack.h ../include/openssl/sha.h -ca.o: ../include/openssl/stack.h ../include/openssl/symhacks.h -ca.o: ../include/openssl/txt_db.h ../include/openssl/x509.h -ca.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h ca.c +ca.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h +ca.o: ../include/openssl/err.h ../include/openssl/evp.h +ca.o: ../include/openssl/fips.h ../include/openssl/lhash.h +ca.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +ca.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h +ca.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +ca.o: ../include/openssl/pem.h ../include/openssl/pem2.h +ca.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h +ca.o: ../include/openssl/sha.h ../include/openssl/stack.h +ca.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h +ca.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h +ca.o: ../include/openssl/x509v3.h apps.h ca.c ciphers.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h ciphers.o: ../include/openssl/bn.h ../include/openssl/buffer.h ciphers.o: ../include/openssl/comp.h ../include/openssl/conf.h ciphers.o: ../include/openssl/crypto.h ../include/openssl/dtls1.h ciphers.o: ../include/openssl/e_os2.h ../include/openssl/ec.h -ciphers.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h -ciphers.o: ../include/openssl/engine.h ../include/openssl/err.h -ciphers.o: ../include/openssl/evp.h ../include/openssl/fips.h -ciphers.o: ../include/openssl/hmac.h ../include/openssl/kssl.h -ciphers.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h -ciphers.o: ../include/openssl/objects.h ../include/openssl/ocsp.h -ciphers.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -ciphers.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h -ciphers.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h -ciphers.o: ../include/openssl/pq_compat.h ../include/openssl/pqueue.h -ciphers.o: ../include/openssl/safestack.h ../include/openssl/sha.h -ciphers.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h -ciphers.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h -ciphers.o: ../include/openssl/stack.h ../include/openssl/symhacks.h -ciphers.o: ../include/openssl/tls1.h ../include/openssl/txt_db.h -ciphers.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h -ciphers.o: ../include/openssl/x509v3.h apps.h ciphers.c +ciphers.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h +ciphers.o: ../include/openssl/err.h ../include/openssl/evp.h +ciphers.o: ../include/openssl/fips.h ../include/openssl/hmac.h +ciphers.o: ../include/openssl/kssl.h ../include/openssl/lhash.h +ciphers.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +ciphers.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h +ciphers.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +ciphers.o: ../include/openssl/pem.h ../include/openssl/pem2.h +ciphers.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h +ciphers.o: ../include/openssl/pqueue.h ../include/openssl/safestack.h +ciphers.o: ../include/openssl/sha.h ../include/openssl/ssl.h +ciphers.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h +ciphers.o: ../include/openssl/ssl3.h ../include/openssl/stack.h +ciphers.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h +ciphers.o: ../include/openssl/txt_db.h ../include/openssl/x509.h +ciphers.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h +ciphers.o: ciphers.c cms.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h cms.o: ../include/openssl/buffer.h ../include/openssl/conf.h cms.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h -cms.o: ../include/openssl/ec.h ../include/openssl/ecdh.h -cms.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h -cms.o: ../include/openssl/evp.h ../include/openssl/fips.h -cms.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h -cms.o: ../include/openssl/objects.h ../include/openssl/ocsp.h -cms.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -cms.o: ../include/openssl/ossl_typ.h ../include/openssl/pkcs7.h -cms.o: ../include/openssl/safestack.h ../include/openssl/sha.h -cms.o: ../include/openssl/stack.h ../include/openssl/symhacks.h -cms.o: ../include/openssl/txt_db.h ../include/openssl/x509.h -cms.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h cms.c +cms.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h +cms.o: ../include/openssl/engine.h ../include/openssl/evp.h +cms.o: ../include/openssl/fips.h ../include/openssl/lhash.h +cms.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +cms.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h +cms.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +cms.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h +cms.o: ../include/openssl/sha.h ../include/openssl/stack.h +cms.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h +cms.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h +cms.o: ../include/openssl/x509v3.h apps.h cms.c crl.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h crl.o: ../include/openssl/buffer.h ../include/openssl/conf.h crl.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h -crl.o: ../include/openssl/ec.h ../include/openssl/ecdh.h -crl.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h -crl.o: ../include/openssl/err.h ../include/openssl/evp.h -crl.o: ../include/openssl/fips.h ../include/openssl/lhash.h -crl.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h -crl.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h -crl.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h -crl.o: ../include/openssl/pem.h ../include/openssl/pem2.h -crl.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h -crl.o: ../include/openssl/sha.h ../include/openssl/stack.h -crl.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h -crl.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h -crl.o: ../include/openssl/x509v3.h apps.h crl.c +crl.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h +crl.o: ../include/openssl/engine.h ../include/openssl/err.h +crl.o: ../include/openssl/evp.h ../include/openssl/fips.h +crl.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h +crl.o: ../include/openssl/objects.h ../include/openssl/ocsp.h +crl.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +crl.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h +crl.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h +crl.o: ../include/openssl/safestack.h ../include/openssl/sha.h +crl.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +crl.o: ../include/openssl/txt_db.h ../include/openssl/x509.h +crl.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h crl.c crl2p7.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h crl2p7.o: ../include/openssl/buffer.h ../include/openssl/conf.h crl2p7.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h -crl2p7.o: ../include/openssl/ec.h ../include/openssl/ecdh.h -crl2p7.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h -crl2p7.o: ../include/openssl/err.h ../include/openssl/evp.h -crl2p7.o: ../include/openssl/fips.h ../include/openssl/lhash.h -crl2p7.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h -crl2p7.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h -crl2p7.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h -crl2p7.o: ../include/openssl/pem.h ../include/openssl/pem2.h -crl2p7.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h -crl2p7.o: ../include/openssl/sha.h ../include/openssl/stack.h -crl2p7.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h -crl2p7.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h -crl2p7.o: ../include/openssl/x509v3.h apps.h crl2p7.c +crl2p7.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h +crl2p7.o: ../include/openssl/engine.h ../include/openssl/err.h +crl2p7.o: ../include/openssl/evp.h ../include/openssl/fips.h +crl2p7.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h +crl2p7.o: ../include/openssl/objects.h ../include/openssl/ocsp.h +crl2p7.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +crl2p7.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h +crl2p7.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h +crl2p7.o: ../include/openssl/safestack.h ../include/openssl/sha.h +crl2p7.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +crl2p7.o: ../include/openssl/txt_db.h ../include/openssl/x509.h +crl2p7.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h +crl2p7.o: crl2p7.c dgst.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h dgst.o: ../include/openssl/buffer.h ../include/openssl/conf.h dgst.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h -dgst.o: ../include/openssl/ec.h ../include/openssl/ecdh.h -dgst.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h -dgst.o: ../include/openssl/err.h ../include/openssl/evp.h -dgst.o: ../include/openssl/fips.h ../include/openssl/hmac.h -dgst.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h -dgst.o: ../include/openssl/objects.h ../include/openssl/ocsp.h -dgst.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -dgst.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h -dgst.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h -dgst.o: ../include/openssl/safestack.h ../include/openssl/sha.h -dgst.o: ../include/openssl/stack.h ../include/openssl/symhacks.h -dgst.o: ../include/openssl/txt_db.h ../include/openssl/x509.h -dgst.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h dgst.c +dgst.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h +dgst.o: ../include/openssl/engine.h ../include/openssl/err.h +dgst.o: ../include/openssl/evp.h ../include/openssl/fips.h +dgst.o: ../include/openssl/hmac.h ../include/openssl/lhash.h +dgst.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +dgst.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h +dgst.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +dgst.o: ../include/openssl/pem.h ../include/openssl/pem2.h +dgst.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h +dgst.o: ../include/openssl/sha.h ../include/openssl/stack.h +dgst.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h +dgst.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h +dgst.o: ../include/openssl/x509v3.h apps.h dgst.c dh.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h dh.o: ../include/openssl/bn.h ../include/openssl/buffer.h dh.o: ../include/openssl/conf.h ../include/openssl/crypto.h dh.o: ../include/openssl/dh.h ../include/openssl/e_os2.h -dh.o: ../include/openssl/ec.h ../include/openssl/ecdh.h -dh.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h -dh.o: ../include/openssl/err.h ../include/openssl/evp.h -dh.o: ../include/openssl/fips.h ../include/openssl/lhash.h -dh.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h -dh.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h -dh.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h -dh.o: ../include/openssl/pem.h ../include/openssl/pem2.h -dh.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h -dh.o: ../include/openssl/sha.h ../include/openssl/stack.h -dh.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h -dh.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h -dh.o: ../include/openssl/x509v3.h apps.h dh.c +dh.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h +dh.o: ../include/openssl/engine.h ../include/openssl/err.h +dh.o: ../include/openssl/evp.h ../include/openssl/fips.h +dh.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h +dh.o: ../include/openssl/objects.h ../include/openssl/ocsp.h +dh.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +dh.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h +dh.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h +dh.o: ../include/openssl/safestack.h ../include/openssl/sha.h +dh.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +dh.o: ../include/openssl/txt_db.h ../include/openssl/x509.h +dh.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h dh.c dsa.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h dsa.o: ../include/openssl/bn.h ../include/openssl/buffer.h dsa.o: ../include/openssl/conf.h ../include/openssl/crypto.h dsa.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h -dsa.o: ../include/openssl/ec.h ../include/openssl/ecdh.h -dsa.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h -dsa.o: ../include/openssl/err.h ../include/openssl/evp.h -dsa.o: ../include/openssl/fips.h ../include/openssl/lhash.h -dsa.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h -dsa.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h -dsa.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h -dsa.o: ../include/openssl/pem.h ../include/openssl/pem2.h -dsa.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h -dsa.o: ../include/openssl/sha.h ../include/openssl/stack.h -dsa.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h -dsa.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h -dsa.o: ../include/openssl/x509v3.h apps.h dsa.c +dsa.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h +dsa.o: ../include/openssl/engine.h ../include/openssl/err.h +dsa.o: ../include/openssl/evp.h ../include/openssl/fips.h +dsa.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h +dsa.o: ../include/openssl/objects.h ../include/openssl/ocsp.h +dsa.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +dsa.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h +dsa.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h +dsa.o: ../include/openssl/safestack.h ../include/openssl/sha.h +dsa.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +dsa.o: ../include/openssl/txt_db.h ../include/openssl/x509.h +dsa.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h dsa.c dsaparam.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h dsaparam.o: ../include/openssl/bn.h ../include/openssl/buffer.h dsaparam.o: ../include/openssl/conf.h ../include/openssl/crypto.h dsaparam.o: ../include/openssl/dh.h ../include/openssl/dsa.h dsaparam.o: ../include/openssl/e_os2.h ../include/openssl/ec.h -dsaparam.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h -dsaparam.o: ../include/openssl/engine.h ../include/openssl/err.h -dsaparam.o: ../include/openssl/evp.h ../include/openssl/fips.h -dsaparam.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h -dsaparam.o: ../include/openssl/objects.h ../include/openssl/ocsp.h -dsaparam.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -dsaparam.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h -dsaparam.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h -dsaparam.o: ../include/openssl/rand.h ../include/openssl/rsa.h -dsaparam.o: ../include/openssl/safestack.h ../include/openssl/sha.h -dsaparam.o: ../include/openssl/stack.h ../include/openssl/store.h -dsaparam.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h -dsaparam.o: ../include/openssl/ui.h ../include/openssl/x509.h -dsaparam.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h -dsaparam.o: dsaparam.c +dsaparam.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h +dsaparam.o: ../include/openssl/err.h ../include/openssl/evp.h +dsaparam.o: ../include/openssl/fips.h ../include/openssl/lhash.h +dsaparam.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +dsaparam.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h +dsaparam.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +dsaparam.o: ../include/openssl/pem.h ../include/openssl/pem2.h +dsaparam.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h +dsaparam.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +dsaparam.o: ../include/openssl/sha.h ../include/openssl/stack.h +dsaparam.o: ../include/openssl/store.h ../include/openssl/symhacks.h +dsaparam.o: ../include/openssl/txt_db.h ../include/openssl/ui.h +dsaparam.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h +dsaparam.o: ../include/openssl/x509v3.h apps.h dsaparam.c ec.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h ec.o: ../include/openssl/buffer.h ../include/openssl/conf.h ec.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h -ec.o: ../include/openssl/ec.h ../include/openssl/ecdh.h -ec.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h -ec.o: ../include/openssl/err.h ../include/openssl/evp.h -ec.o: ../include/openssl/fips.h ../include/openssl/lhash.h -ec.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h -ec.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h -ec.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h -ec.o: ../include/openssl/pem.h ../include/openssl/pem2.h -ec.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h -ec.o: ../include/openssl/sha.h ../include/openssl/stack.h -ec.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h -ec.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h -ec.o: ../include/openssl/x509v3.h apps.h ec.c +ec.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h +ec.o: ../include/openssl/engine.h ../include/openssl/err.h +ec.o: ../include/openssl/evp.h ../include/openssl/fips.h +ec.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h +ec.o: ../include/openssl/objects.h ../include/openssl/ocsp.h +ec.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +ec.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h +ec.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h +ec.o: ../include/openssl/safestack.h ../include/openssl/sha.h +ec.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +ec.o: ../include/openssl/txt_db.h ../include/openssl/x509.h +ec.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h ec.c ecparam.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h ecparam.o: ../include/openssl/bn.h ../include/openssl/buffer.h ecparam.o: ../include/openssl/conf.h ../include/openssl/crypto.h ecparam.o: ../include/openssl/e_os2.h ../include/openssl/ec.h -ecparam.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h -ecparam.o: ../include/openssl/engine.h ../include/openssl/err.h -ecparam.o: ../include/openssl/evp.h ../include/openssl/fips.h -ecparam.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h -ecparam.o: ../include/openssl/objects.h ../include/openssl/ocsp.h -ecparam.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -ecparam.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h -ecparam.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h -ecparam.o: ../include/openssl/safestack.h ../include/openssl/sha.h -ecparam.o: ../include/openssl/stack.h ../include/openssl/symhacks.h -ecparam.o: ../include/openssl/txt_db.h ../include/openssl/x509.h -ecparam.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h -ecparam.o: ecparam.c +ecparam.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h +ecparam.o: ../include/openssl/err.h ../include/openssl/evp.h +ecparam.o: ../include/openssl/fips.h ../include/openssl/lhash.h +ecparam.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +ecparam.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h +ecparam.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +ecparam.o: ../include/openssl/pem.h ../include/openssl/pem2.h +ecparam.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h +ecparam.o: ../include/openssl/sha.h ../include/openssl/stack.h +ecparam.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h +ecparam.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h +ecparam.o: ../include/openssl/x509v3.h apps.h ecparam.c enc.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h enc.o: ../include/openssl/buffer.h ../include/openssl/conf.h enc.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h -enc.o: ../include/openssl/ec.h ../include/openssl/ecdh.h -enc.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h -enc.o: ../include/openssl/err.h ../include/openssl/evp.h -enc.o: ../include/openssl/fips.h ../include/openssl/lhash.h -enc.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h -enc.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h -enc.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h -enc.o: ../include/openssl/pem.h ../include/openssl/pem2.h -enc.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h -enc.o: ../include/openssl/safestack.h ../include/openssl/sha.h -enc.o: ../include/openssl/stack.h ../include/openssl/symhacks.h -enc.o: ../include/openssl/txt_db.h ../include/openssl/x509.h -enc.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h enc.c +enc.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h +enc.o: ../include/openssl/engine.h ../include/openssl/err.h +enc.o: ../include/openssl/evp.h ../include/openssl/fips.h +enc.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h +enc.o: ../include/openssl/objects.h ../include/openssl/ocsp.h +enc.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +enc.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h +enc.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h +enc.o: ../include/openssl/rand.h ../include/openssl/safestack.h +enc.o: ../include/openssl/sha.h ../include/openssl/stack.h +enc.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h +enc.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h +enc.o: ../include/openssl/x509v3.h apps.h enc.c engine.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h engine.o: ../include/openssl/bn.h ../include/openssl/buffer.h engine.o: ../include/openssl/comp.h ../include/openssl/conf.h engine.o: ../include/openssl/crypto.h ../include/openssl/dtls1.h engine.o: ../include/openssl/e_os2.h ../include/openssl/ec.h -engine.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h -engine.o: ../include/openssl/engine.h ../include/openssl/err.h -engine.o: ../include/openssl/evp.h ../include/openssl/fips.h -engine.o: ../include/openssl/hmac.h ../include/openssl/kssl.h -engine.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h -engine.o: ../include/openssl/objects.h ../include/openssl/ocsp.h -engine.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -engine.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h -engine.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h -engine.o: ../include/openssl/pq_compat.h ../include/openssl/pqueue.h -engine.o: ../include/openssl/safestack.h ../include/openssl/sha.h -engine.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h -engine.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h -engine.o: ../include/openssl/stack.h ../include/openssl/symhacks.h -engine.o: ../include/openssl/tls1.h ../include/openssl/txt_db.h -engine.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h -engine.o: ../include/openssl/x509v3.h apps.h engine.c +engine.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h +engine.o: ../include/openssl/err.h ../include/openssl/evp.h +engine.o: ../include/openssl/fips.h ../include/openssl/hmac.h +engine.o: ../include/openssl/kssl.h ../include/openssl/lhash.h +engine.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +engine.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h +engine.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +engine.o: ../include/openssl/pem.h ../include/openssl/pem2.h +engine.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h +engine.o: ../include/openssl/pqueue.h ../include/openssl/safestack.h +engine.o: ../include/openssl/sha.h ../include/openssl/ssl.h +engine.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h +engine.o: ../include/openssl/ssl3.h ../include/openssl/stack.h +engine.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h +engine.o: ../include/openssl/txt_db.h ../include/openssl/x509.h +engine.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h +engine.o: engine.c errstr.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h errstr.o: ../include/openssl/bn.h ../include/openssl/buffer.h errstr.o: ../include/openssl/comp.h ../include/openssl/conf.h errstr.o: ../include/openssl/crypto.h ../include/openssl/dtls1.h errstr.o: ../include/openssl/e_os2.h ../include/openssl/ec.h -errstr.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h -errstr.o: ../include/openssl/engine.h ../include/openssl/err.h -errstr.o: ../include/openssl/evp.h ../include/openssl/fips.h -errstr.o: ../include/openssl/hmac.h ../include/openssl/kssl.h -errstr.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h -errstr.o: ../include/openssl/objects.h ../include/openssl/ocsp.h -errstr.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -errstr.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h -errstr.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h -errstr.o: ../include/openssl/pq_compat.h ../include/openssl/pqueue.h -errstr.o: ../include/openssl/safestack.h ../include/openssl/sha.h -errstr.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h -errstr.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h -errstr.o: ../include/openssl/stack.h ../include/openssl/symhacks.h -errstr.o: ../include/openssl/tls1.h ../include/openssl/txt_db.h -errstr.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h -errstr.o: ../include/openssl/x509v3.h apps.h errstr.c +errstr.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h +errstr.o: ../include/openssl/err.h ../include/openssl/evp.h +errstr.o: ../include/openssl/fips.h ../include/openssl/hmac.h +errstr.o: ../include/openssl/kssl.h ../include/openssl/lhash.h +errstr.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +errstr.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h +errstr.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +errstr.o: ../include/openssl/pem.h ../include/openssl/pem2.h +errstr.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h +errstr.o: ../include/openssl/pqueue.h ../include/openssl/safestack.h +errstr.o: ../include/openssl/sha.h ../include/openssl/ssl.h +errstr.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h +errstr.o: ../include/openssl/ssl3.h ../include/openssl/stack.h +errstr.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h +errstr.o: ../include/openssl/txt_db.h ../include/openssl/x509.h +errstr.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h +errstr.o: errstr.c gendh.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h gendh.o: ../include/openssl/bn.h ../include/openssl/buffer.h gendh.o: ../include/openssl/conf.h ../include/openssl/crypto.h gendh.o: ../include/openssl/dh.h ../include/openssl/dsa.h gendh.o: ../include/openssl/e_os2.h ../include/openssl/ec.h -gendh.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h -gendh.o: ../include/openssl/engine.h ../include/openssl/err.h -gendh.o: ../include/openssl/evp.h ../include/openssl/fips.h -gendh.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h -gendh.o: ../include/openssl/objects.h ../include/openssl/ocsp.h -gendh.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -gendh.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h -gendh.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h -gendh.o: ../include/openssl/rand.h ../include/openssl/rsa.h -gendh.o: ../include/openssl/safestack.h ../include/openssl/sha.h -gendh.o: ../include/openssl/stack.h ../include/openssl/store.h -gendh.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h -gendh.o: ../include/openssl/ui.h ../include/openssl/x509.h -gendh.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h -gendh.o: gendh.c +gendh.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h +gendh.o: ../include/openssl/err.h ../include/openssl/evp.h +gendh.o: ../include/openssl/fips.h ../include/openssl/lhash.h +gendh.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +gendh.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h +gendh.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +gendh.o: ../include/openssl/pem.h ../include/openssl/pem2.h +gendh.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h +gendh.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +gendh.o: ../include/openssl/sha.h ../include/openssl/stack.h +gendh.o: ../include/openssl/store.h ../include/openssl/symhacks.h +gendh.o: ../include/openssl/txt_db.h ../include/openssl/ui.h +gendh.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h +gendh.o: ../include/openssl/x509v3.h apps.h gendh.c gendsa.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h gendsa.o: ../include/openssl/bn.h ../include/openssl/buffer.h gendsa.o: ../include/openssl/conf.h ../include/openssl/crypto.h gendsa.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h -gendsa.o: ../include/openssl/ec.h ../include/openssl/ecdh.h -gendsa.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h -gendsa.o: ../include/openssl/err.h ../include/openssl/evp.h -gendsa.o: ../include/openssl/fips.h ../include/openssl/lhash.h -gendsa.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h -gendsa.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h -gendsa.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h -gendsa.o: ../include/openssl/pem.h ../include/openssl/pem2.h -gendsa.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h -gendsa.o: ../include/openssl/sha.h ../include/openssl/stack.h -gendsa.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h -gendsa.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h -gendsa.o: ../include/openssl/x509v3.h apps.h gendsa.c +gendsa.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h +gendsa.o: ../include/openssl/engine.h ../include/openssl/err.h +gendsa.o: ../include/openssl/evp.h ../include/openssl/fips.h +gendsa.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h +gendsa.o: ../include/openssl/objects.h ../include/openssl/ocsp.h +gendsa.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +gendsa.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h +gendsa.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h +gendsa.o: ../include/openssl/safestack.h ../include/openssl/sha.h +gendsa.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +gendsa.o: ../include/openssl/txt_db.h ../include/openssl/x509.h +gendsa.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h +gendsa.o: gendsa.c genrsa.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h genrsa.o: ../include/openssl/bn.h ../include/openssl/buffer.h genrsa.o: ../include/openssl/conf.h ../include/openssl/crypto.h genrsa.o: ../include/openssl/dh.h ../include/openssl/dsa.h genrsa.o: ../include/openssl/e_os2.h ../include/openssl/ec.h -genrsa.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h -genrsa.o: ../include/openssl/engine.h ../include/openssl/err.h -genrsa.o: ../include/openssl/evp.h ../include/openssl/fips.h -genrsa.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h -genrsa.o: ../include/openssl/objects.h ../include/openssl/ocsp.h -genrsa.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -genrsa.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h -genrsa.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h -genrsa.o: ../include/openssl/rand.h ../include/openssl/rsa.h -genrsa.o: ../include/openssl/safestack.h ../include/openssl/sha.h -genrsa.o: ../include/openssl/stack.h ../include/openssl/store.h -genrsa.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h -genrsa.o: ../include/openssl/ui.h ../include/openssl/x509.h -genrsa.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h -genrsa.o: genrsa.c +genrsa.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h +genrsa.o: ../include/openssl/err.h ../include/openssl/evp.h +genrsa.o: ../include/openssl/fips.h ../include/openssl/lhash.h +genrsa.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +genrsa.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h +genrsa.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +genrsa.o: ../include/openssl/pem.h ../include/openssl/pem2.h +genrsa.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h +genrsa.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +genrsa.o: ../include/openssl/sha.h ../include/openssl/stack.h +genrsa.o: ../include/openssl/store.h ../include/openssl/symhacks.h +genrsa.o: ../include/openssl/txt_db.h ../include/openssl/ui.h +genrsa.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h +genrsa.o: ../include/openssl/x509v3.h apps.h genrsa.c nseq.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h nseq.o: ../include/openssl/buffer.h ../include/openssl/conf.h nseq.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h -nseq.o: ../include/openssl/ec.h ../include/openssl/ecdh.h -nseq.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h -nseq.o: ../include/openssl/err.h ../include/openssl/evp.h -nseq.o: ../include/openssl/fips.h ../include/openssl/lhash.h -nseq.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h -nseq.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h -nseq.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h -nseq.o: ../include/openssl/pem.h ../include/openssl/pem2.h -nseq.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h -nseq.o: ../include/openssl/sha.h ../include/openssl/stack.h -nseq.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h -nseq.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h -nseq.o: ../include/openssl/x509v3.h apps.h nseq.c +nseq.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h +nseq.o: ../include/openssl/engine.h ../include/openssl/err.h +nseq.o: ../include/openssl/evp.h ../include/openssl/fips.h +nseq.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h +nseq.o: ../include/openssl/objects.h ../include/openssl/ocsp.h +nseq.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +nseq.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h +nseq.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h +nseq.o: ../include/openssl/safestack.h ../include/openssl/sha.h +nseq.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +nseq.o: ../include/openssl/txt_db.h ../include/openssl/x509.h +nseq.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h nseq.c ocsp.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h ocsp.o: ../include/openssl/bn.h ../include/openssl/buffer.h ocsp.o: ../include/openssl/comp.h ../include/openssl/conf.h ocsp.o: ../include/openssl/crypto.h ../include/openssl/dtls1.h ocsp.o: ../include/openssl/e_os2.h ../include/openssl/ec.h -ocsp.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h -ocsp.o: ../include/openssl/engine.h ../include/openssl/err.h -ocsp.o: ../include/openssl/evp.h ../include/openssl/fips.h -ocsp.o: ../include/openssl/hmac.h ../include/openssl/kssl.h -ocsp.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h -ocsp.o: ../include/openssl/objects.h ../include/openssl/ocsp.h -ocsp.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -ocsp.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h -ocsp.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h -ocsp.o: ../include/openssl/pq_compat.h ../include/openssl/pqueue.h -ocsp.o: ../include/openssl/safestack.h ../include/openssl/sha.h -ocsp.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h -ocsp.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h -ocsp.o: ../include/openssl/stack.h ../include/openssl/symhacks.h -ocsp.o: ../include/openssl/tls1.h ../include/openssl/txt_db.h -ocsp.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h -ocsp.o: ../include/openssl/x509v3.h apps.h ocsp.c +ocsp.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h +ocsp.o: ../include/openssl/err.h ../include/openssl/evp.h +ocsp.o: ../include/openssl/fips.h ../include/openssl/hmac.h +ocsp.o: ../include/openssl/kssl.h ../include/openssl/lhash.h +ocsp.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +ocsp.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h +ocsp.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +ocsp.o: ../include/openssl/pem.h ../include/openssl/pem2.h +ocsp.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h +ocsp.o: ../include/openssl/pqueue.h ../include/openssl/safestack.h +ocsp.o: ../include/openssl/sha.h ../include/openssl/ssl.h +ocsp.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h +ocsp.o: ../include/openssl/ssl3.h ../include/openssl/stack.h +ocsp.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h +ocsp.o: ../include/openssl/txt_db.h ../include/openssl/x509.h +ocsp.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h ocsp.c openssl.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h openssl.o: ../include/openssl/bn.h ../include/openssl/buffer.h openssl.o: ../include/openssl/comp.h ../include/openssl/conf.h openssl.o: ../include/openssl/crypto.h ../include/openssl/dtls1.h openssl.o: ../include/openssl/e_os2.h ../include/openssl/ec.h -openssl.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h -openssl.o: ../include/openssl/engine.h ../include/openssl/err.h *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 16:14:52 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CC2091065687; Mon, 2 Jul 2012 16:14:52 +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 B87A38FC20; Mon, 2 Jul 2012 16:14:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q62GEq4h080548; Mon, 2 Jul 2012 16:14:52 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q62GEqdj080544; Mon, 2 Jul 2012 16:14:52 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201207021614.q62GEqdj080544@svn.freebsd.org> From: John Baldwin Date: Mon, 2 Jul 2012 16:14:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238000 - in head/sys: kern vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 16:14:52 -0000 Author: jhb Date: Mon Jul 2 16:14:52 2012 New Revision: 238000 URL: http://svn.freebsd.org/changeset/base/238000 Log: Honor db_pager_quit in 'show uma' and 'show malloc'. MFC after: 1 month Modified: head/sys/kern/kern_malloc.c head/sys/vm/uma_core.c Modified: head/sys/kern/kern_malloc.c ============================================================================== --- head/sys/kern/kern_malloc.c Mon Jul 2 16:14:35 2012 (r237999) +++ head/sys/kern/kern_malloc.c Mon Jul 2 16:14:52 2012 (r238000) @@ -1000,6 +1000,8 @@ DB_SHOW_COMMAND(malloc, db_show_malloc) db_printf("%18s %12ju %12juK %12ju\n", mtp->ks_shortdesc, allocs - frees, (alloced - freed + 1023) / 1024, allocs); + if (db_pager_quit) + break; } } @@ -1029,6 +1031,8 @@ DB_SHOW_COMMAND(multizone_matches, db_sh if (mtip->mti_zone != subzone) continue; db_printf("%s\n", mtp->ks_shortdesc); + if (db_pager_quit) + break; } } #endif /* MALLOC_DEBUG_MAXZONES > 1 */ Modified: head/sys/vm/uma_core.c ============================================================================== --- head/sys/vm/uma_core.c Mon Jul 2 16:14:35 2012 (r237999) +++ head/sys/vm/uma_core.c Mon Jul 2 16:14:52 2012 (r238000) @@ -3381,6 +3381,8 @@ DB_SHOW_COMMAND(uma, db_show_uma) (uintmax_t)kz->uk_size, (intmax_t)(allocs - frees), cachefree, (uintmax_t)allocs, sleeps); + if (db_pager_quit) + return; } } } From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 16:24:44 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 33F75106566B; Mon, 2 Jul 2012 16:24:44 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1B0D28FC23; Mon, 2 Jul 2012 16:24:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q62GOi5C081284; Mon, 2 Jul 2012 16:24:44 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q62GOhaT081274; Mon, 2 Jul 2012 16:24:43 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201207021624.q62GOhaT081274@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 2 Jul 2012 16:24:43 +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: r238001 - in stable/7: crypto/openssl crypto/openssl/apps crypto/openssl/crypto crypto/openssl/crypto/asn1 crypto/openssl/crypto/bio crypto/openssl/crypto/bn crypto/openssl/crypto/bn/as... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 16:24:44 -0000 Author: jkim Date: Mon Jul 2 16:24:43 2012 New Revision: 238001 URL: http://svn.freebsd.org/changeset/base/238001 Log: MFC: r237657, r237658, r237666 Merge OpenSSL 0.9.8x and regen manual pages. Modified: stable/7/crypto/openssl/CHANGES stable/7/crypto/openssl/Configure stable/7/crypto/openssl/FAQ stable/7/crypto/openssl/LICENSE stable/7/crypto/openssl/Makefile stable/7/crypto/openssl/NEWS stable/7/crypto/openssl/README stable/7/crypto/openssl/apps/Makefile stable/7/crypto/openssl/apps/asn1pars.c stable/7/crypto/openssl/apps/cms.c stable/7/crypto/openssl/apps/openssl.cnf stable/7/crypto/openssl/apps/pkcs12.c stable/7/crypto/openssl/apps/s_client.c stable/7/crypto/openssl/apps/s_server.c stable/7/crypto/openssl/apps/x509.c stable/7/crypto/openssl/config stable/7/crypto/openssl/crypto/asn1/a_object.c stable/7/crypto/openssl/crypto/asn1/a_strex.c stable/7/crypto/openssl/crypto/asn1/a_strnid.c stable/7/crypto/openssl/crypto/asn1/asn1.h stable/7/crypto/openssl/crypto/asn1/asn_mime.c stable/7/crypto/openssl/crypto/asn1/x_name.c stable/7/crypto/openssl/crypto/asn1/x_pubkey.c stable/7/crypto/openssl/crypto/bio/bf_buff.c stable/7/crypto/openssl/crypto/bio/bio.h stable/7/crypto/openssl/crypto/bio/bss_dgram.c stable/7/crypto/openssl/crypto/bn/asm/mo-586.pl stable/7/crypto/openssl/crypto/bn/asm/ppc.pl stable/7/crypto/openssl/crypto/bn/bn_blind.c stable/7/crypto/openssl/crypto/bn/bn_gf2m.c stable/7/crypto/openssl/crypto/cms/cms.h stable/7/crypto/openssl/crypto/cms/cms_enc.c stable/7/crypto/openssl/crypto/cms/cms_env.c stable/7/crypto/openssl/crypto/cms/cms_io.c stable/7/crypto/openssl/crypto/cms/cms_lcl.h stable/7/crypto/openssl/crypto/cms/cms_smime.c stable/7/crypto/openssl/crypto/comp/c_rle.c stable/7/crypto/openssl/crypto/conf/conf_api.c stable/7/crypto/openssl/crypto/cryptlib.c stable/7/crypto/openssl/crypto/crypto.h stable/7/crypto/openssl/crypto/ec/ec2_smpl.c stable/7/crypto/openssl/crypto/ec/ec_key.c stable/7/crypto/openssl/crypto/ec/ecp_smpl.c stable/7/crypto/openssl/crypto/ecdsa/ecdsatest.c stable/7/crypto/openssl/crypto/ecdsa/ecs_ossl.c stable/7/crypto/openssl/crypto/evp/evp_test.c stable/7/crypto/openssl/crypto/ocsp/ocsp_lib.c stable/7/crypto/openssl/crypto/opensslv.h stable/7/crypto/openssl/crypto/perlasm/cbc.pl stable/7/crypto/openssl/crypto/pkcs7/pk7_smime.c stable/7/crypto/openssl/crypto/rc4/asm/rc4-x86_64.pl stable/7/crypto/openssl/crypto/rc4/rc4_skey.c stable/7/crypto/openssl/crypto/rsa/rsa_eay.c stable/7/crypto/openssl/crypto/x509/x509_vfy.c stable/7/crypto/openssl/crypto/x509v3/v3_addr.c stable/7/crypto/openssl/crypto/x509v3/v3_asid.c stable/7/crypto/openssl/doc/HOWTO/proxy_certificates.txt stable/7/crypto/openssl/doc/apps/ca.pod stable/7/crypto/openssl/doc/apps/dgst.pod stable/7/crypto/openssl/doc/crypto/engine.pod stable/7/crypto/openssl/doc/ssl/SSL_clear.pod stable/7/crypto/openssl/engines/e_capi.c stable/7/crypto/openssl/engines/e_capi_err.h stable/7/crypto/openssl/fips/fips_canister.c stable/7/crypto/openssl/openssl.spec stable/7/crypto/openssl/ssl/bio_ssl.c stable/7/crypto/openssl/ssl/d1_both.c stable/7/crypto/openssl/ssl/d1_clnt.c stable/7/crypto/openssl/ssl/d1_enc.c stable/7/crypto/openssl/ssl/d1_lib.c stable/7/crypto/openssl/ssl/d1_pkt.c stable/7/crypto/openssl/ssl/d1_srvr.c stable/7/crypto/openssl/ssl/s2_srvr.c stable/7/crypto/openssl/ssl/s3_clnt.c stable/7/crypto/openssl/ssl/s3_lib.c stable/7/crypto/openssl/ssl/s3_srvr.c stable/7/crypto/openssl/ssl/ssl.h stable/7/crypto/openssl/ssl/ssl_ciph.c stable/7/crypto/openssl/ssl/ssl_err.c stable/7/crypto/openssl/ssl/ssl_lib.c stable/7/crypto/openssl/ssl/ssl_locl.h stable/7/crypto/openssl/ssl/t1_lib.c stable/7/crypto/openssl/util/fipslink.pl stable/7/crypto/openssl/util/mkerr.pl stable/7/crypto/openssl/util/pl/VC-32.pl stable/7/secure/lib/libcrypto/Makefile.inc stable/7/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 stable/7/secure/lib/libcrypto/man/ASN1_STRING_length.3 stable/7/secure/lib/libcrypto/man/ASN1_STRING_new.3 stable/7/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 stable/7/secure/lib/libcrypto/man/ASN1_generate_nconf.3 stable/7/secure/lib/libcrypto/man/BIO_ctrl.3 stable/7/secure/lib/libcrypto/man/BIO_f_base64.3 stable/7/secure/lib/libcrypto/man/BIO_f_buffer.3 stable/7/secure/lib/libcrypto/man/BIO_f_cipher.3 stable/7/secure/lib/libcrypto/man/BIO_f_md.3 stable/7/secure/lib/libcrypto/man/BIO_f_null.3 stable/7/secure/lib/libcrypto/man/BIO_f_ssl.3 stable/7/secure/lib/libcrypto/man/BIO_find_type.3 stable/7/secure/lib/libcrypto/man/BIO_new.3 stable/7/secure/lib/libcrypto/man/BIO_push.3 stable/7/secure/lib/libcrypto/man/BIO_read.3 stable/7/secure/lib/libcrypto/man/BIO_s_accept.3 stable/7/secure/lib/libcrypto/man/BIO_s_bio.3 stable/7/secure/lib/libcrypto/man/BIO_s_connect.3 stable/7/secure/lib/libcrypto/man/BIO_s_fd.3 stable/7/secure/lib/libcrypto/man/BIO_s_file.3 stable/7/secure/lib/libcrypto/man/BIO_s_mem.3 stable/7/secure/lib/libcrypto/man/BIO_s_null.3 stable/7/secure/lib/libcrypto/man/BIO_s_socket.3 stable/7/secure/lib/libcrypto/man/BIO_set_callback.3 stable/7/secure/lib/libcrypto/man/BIO_should_retry.3 stable/7/secure/lib/libcrypto/man/BN_BLINDING_new.3 stable/7/secure/lib/libcrypto/man/BN_CTX_new.3 stable/7/secure/lib/libcrypto/man/BN_CTX_start.3 stable/7/secure/lib/libcrypto/man/BN_add.3 stable/7/secure/lib/libcrypto/man/BN_add_word.3 stable/7/secure/lib/libcrypto/man/BN_bn2bin.3 stable/7/secure/lib/libcrypto/man/BN_cmp.3 stable/7/secure/lib/libcrypto/man/BN_copy.3 stable/7/secure/lib/libcrypto/man/BN_generate_prime.3 stable/7/secure/lib/libcrypto/man/BN_mod_inverse.3 stable/7/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 stable/7/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 stable/7/secure/lib/libcrypto/man/BN_new.3 stable/7/secure/lib/libcrypto/man/BN_num_bytes.3 stable/7/secure/lib/libcrypto/man/BN_rand.3 stable/7/secure/lib/libcrypto/man/BN_set_bit.3 stable/7/secure/lib/libcrypto/man/BN_swap.3 stable/7/secure/lib/libcrypto/man/BN_zero.3 stable/7/secure/lib/libcrypto/man/CONF_modules_free.3 stable/7/secure/lib/libcrypto/man/CONF_modules_load_file.3 stable/7/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 stable/7/secure/lib/libcrypto/man/DH_generate_key.3 stable/7/secure/lib/libcrypto/man/DH_generate_parameters.3 stable/7/secure/lib/libcrypto/man/DH_get_ex_new_index.3 stable/7/secure/lib/libcrypto/man/DH_new.3 stable/7/secure/lib/libcrypto/man/DH_set_method.3 stable/7/secure/lib/libcrypto/man/DH_size.3 stable/7/secure/lib/libcrypto/man/DSA_SIG_new.3 stable/7/secure/lib/libcrypto/man/DSA_do_sign.3 stable/7/secure/lib/libcrypto/man/DSA_dup_DH.3 stable/7/secure/lib/libcrypto/man/DSA_generate_key.3 stable/7/secure/lib/libcrypto/man/DSA_generate_parameters.3 stable/7/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 stable/7/secure/lib/libcrypto/man/DSA_new.3 stable/7/secure/lib/libcrypto/man/DSA_set_method.3 stable/7/secure/lib/libcrypto/man/DSA_sign.3 stable/7/secure/lib/libcrypto/man/DSA_size.3 stable/7/secure/lib/libcrypto/man/ERR_GET_LIB.3 stable/7/secure/lib/libcrypto/man/ERR_clear_error.3 stable/7/secure/lib/libcrypto/man/ERR_error_string.3 stable/7/secure/lib/libcrypto/man/ERR_get_error.3 stable/7/secure/lib/libcrypto/man/ERR_load_crypto_strings.3 stable/7/secure/lib/libcrypto/man/ERR_load_strings.3 stable/7/secure/lib/libcrypto/man/ERR_print_errors.3 stable/7/secure/lib/libcrypto/man/ERR_put_error.3 stable/7/secure/lib/libcrypto/man/ERR_remove_state.3 stable/7/secure/lib/libcrypto/man/ERR_set_mark.3 stable/7/secure/lib/libcrypto/man/EVP_BytesToKey.3 stable/7/secure/lib/libcrypto/man/EVP_DigestInit.3 stable/7/secure/lib/libcrypto/man/EVP_EncryptInit.3 stable/7/secure/lib/libcrypto/man/EVP_OpenInit.3 stable/7/secure/lib/libcrypto/man/EVP_PKEY_new.3 stable/7/secure/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 stable/7/secure/lib/libcrypto/man/EVP_SealInit.3 stable/7/secure/lib/libcrypto/man/EVP_SignInit.3 stable/7/secure/lib/libcrypto/man/EVP_VerifyInit.3 stable/7/secure/lib/libcrypto/man/OBJ_nid2obj.3 stable/7/secure/lib/libcrypto/man/OPENSSL_Applink.3 stable/7/secure/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3 stable/7/secure/lib/libcrypto/man/OPENSSL_config.3 stable/7/secure/lib/libcrypto/man/OPENSSL_ia32cap.3 stable/7/secure/lib/libcrypto/man/OPENSSL_load_builtin_modules.3 stable/7/secure/lib/libcrypto/man/OpenSSL_add_all_algorithms.3 stable/7/secure/lib/libcrypto/man/PKCS12_create.3 stable/7/secure/lib/libcrypto/man/PKCS12_parse.3 stable/7/secure/lib/libcrypto/man/PKCS7_decrypt.3 stable/7/secure/lib/libcrypto/man/PKCS7_encrypt.3 stable/7/secure/lib/libcrypto/man/PKCS7_sign.3 stable/7/secure/lib/libcrypto/man/PKCS7_verify.3 stable/7/secure/lib/libcrypto/man/RAND_add.3 stable/7/secure/lib/libcrypto/man/RAND_bytes.3 stable/7/secure/lib/libcrypto/man/RAND_cleanup.3 stable/7/secure/lib/libcrypto/man/RAND_egd.3 stable/7/secure/lib/libcrypto/man/RAND_load_file.3 stable/7/secure/lib/libcrypto/man/RAND_set_rand_method.3 stable/7/secure/lib/libcrypto/man/RSA_blinding_on.3 stable/7/secure/lib/libcrypto/man/RSA_check_key.3 stable/7/secure/lib/libcrypto/man/RSA_generate_key.3 stable/7/secure/lib/libcrypto/man/RSA_get_ex_new_index.3 stable/7/secure/lib/libcrypto/man/RSA_new.3 stable/7/secure/lib/libcrypto/man/RSA_padding_add_PKCS1_type_1.3 stable/7/secure/lib/libcrypto/man/RSA_print.3 stable/7/secure/lib/libcrypto/man/RSA_private_encrypt.3 stable/7/secure/lib/libcrypto/man/RSA_public_encrypt.3 stable/7/secure/lib/libcrypto/man/RSA_set_method.3 stable/7/secure/lib/libcrypto/man/RSA_sign.3 stable/7/secure/lib/libcrypto/man/RSA_sign_ASN1_OCTET_STRING.3 stable/7/secure/lib/libcrypto/man/RSA_size.3 stable/7/secure/lib/libcrypto/man/SMIME_read_PKCS7.3 stable/7/secure/lib/libcrypto/man/SMIME_write_PKCS7.3 stable/7/secure/lib/libcrypto/man/X509_NAME_ENTRY_get_object.3 stable/7/secure/lib/libcrypto/man/X509_NAME_add_entry_by_txt.3 stable/7/secure/lib/libcrypto/man/X509_NAME_get_index_by_NID.3 stable/7/secure/lib/libcrypto/man/X509_NAME_print_ex.3 stable/7/secure/lib/libcrypto/man/X509_new.3 stable/7/secure/lib/libcrypto/man/bio.3 stable/7/secure/lib/libcrypto/man/blowfish.3 stable/7/secure/lib/libcrypto/man/bn.3 stable/7/secure/lib/libcrypto/man/bn_internal.3 stable/7/secure/lib/libcrypto/man/buffer.3 stable/7/secure/lib/libcrypto/man/crypto.3 stable/7/secure/lib/libcrypto/man/d2i_ASN1_OBJECT.3 stable/7/secure/lib/libcrypto/man/d2i_DHparams.3 stable/7/secure/lib/libcrypto/man/d2i_DSAPublicKey.3 stable/7/secure/lib/libcrypto/man/d2i_PKCS8PrivateKey.3 stable/7/secure/lib/libcrypto/man/d2i_RSAPublicKey.3 stable/7/secure/lib/libcrypto/man/d2i_X509.3 stable/7/secure/lib/libcrypto/man/d2i_X509_ALGOR.3 stable/7/secure/lib/libcrypto/man/d2i_X509_CRL.3 stable/7/secure/lib/libcrypto/man/d2i_X509_NAME.3 stable/7/secure/lib/libcrypto/man/d2i_X509_REQ.3 stable/7/secure/lib/libcrypto/man/d2i_X509_SIG.3 stable/7/secure/lib/libcrypto/man/des.3 stable/7/secure/lib/libcrypto/man/dh.3 stable/7/secure/lib/libcrypto/man/dsa.3 stable/7/secure/lib/libcrypto/man/ecdsa.3 stable/7/secure/lib/libcrypto/man/engine.3 stable/7/secure/lib/libcrypto/man/err.3 stable/7/secure/lib/libcrypto/man/evp.3 stable/7/secure/lib/libcrypto/man/hmac.3 stable/7/secure/lib/libcrypto/man/lh_stats.3 stable/7/secure/lib/libcrypto/man/lhash.3 stable/7/secure/lib/libcrypto/man/md5.3 stable/7/secure/lib/libcrypto/man/mdc2.3 stable/7/secure/lib/libcrypto/man/pem.3 stable/7/secure/lib/libcrypto/man/rand.3 stable/7/secure/lib/libcrypto/man/rc4.3 stable/7/secure/lib/libcrypto/man/ripemd.3 stable/7/secure/lib/libcrypto/man/rsa.3 stable/7/secure/lib/libcrypto/man/sha.3 stable/7/secure/lib/libcrypto/man/threads.3 stable/7/secure/lib/libcrypto/man/ui.3 stable/7/secure/lib/libcrypto/man/ui_compat.3 stable/7/secure/lib/libcrypto/man/x509.3 stable/7/secure/lib/libssl/man/SSL_CIPHER_get_name.3 stable/7/secure/lib/libssl/man/SSL_COMP_add_compression_method.3 stable/7/secure/lib/libssl/man/SSL_CTX_add_extra_chain_cert.3 stable/7/secure/lib/libssl/man/SSL_CTX_add_session.3 stable/7/secure/lib/libssl/man/SSL_CTX_ctrl.3 stable/7/secure/lib/libssl/man/SSL_CTX_flush_sessions.3 stable/7/secure/lib/libssl/man/SSL_CTX_free.3 stable/7/secure/lib/libssl/man/SSL_CTX_get_ex_new_index.3 stable/7/secure/lib/libssl/man/SSL_CTX_get_verify_mode.3 stable/7/secure/lib/libssl/man/SSL_CTX_load_verify_locations.3 stable/7/secure/lib/libssl/man/SSL_CTX_new.3 stable/7/secure/lib/libssl/man/SSL_CTX_sess_number.3 stable/7/secure/lib/libssl/man/SSL_CTX_sess_set_cache_size.3 stable/7/secure/lib/libssl/man/SSL_CTX_sess_set_get_cb.3 stable/7/secure/lib/libssl/man/SSL_CTX_sessions.3 stable/7/secure/lib/libssl/man/SSL_CTX_set_cert_store.3 stable/7/secure/lib/libssl/man/SSL_CTX_set_cert_verify_callback.3 stable/7/secure/lib/libssl/man/SSL_CTX_set_cipher_list.3 stable/7/secure/lib/libssl/man/SSL_CTX_set_client_CA_list.3 stable/7/secure/lib/libssl/man/SSL_CTX_set_client_cert_cb.3 stable/7/secure/lib/libssl/man/SSL_CTX_set_default_passwd_cb.3 stable/7/secure/lib/libssl/man/SSL_CTX_set_generate_session_id.3 stable/7/secure/lib/libssl/man/SSL_CTX_set_info_callback.3 stable/7/secure/lib/libssl/man/SSL_CTX_set_max_cert_list.3 stable/7/secure/lib/libssl/man/SSL_CTX_set_mode.3 stable/7/secure/lib/libssl/man/SSL_CTX_set_msg_callback.3 stable/7/secure/lib/libssl/man/SSL_CTX_set_options.3 stable/7/secure/lib/libssl/man/SSL_CTX_set_quiet_shutdown.3 stable/7/secure/lib/libssl/man/SSL_CTX_set_session_cache_mode.3 stable/7/secure/lib/libssl/man/SSL_CTX_set_session_id_context.3 stable/7/secure/lib/libssl/man/SSL_CTX_set_ssl_version.3 stable/7/secure/lib/libssl/man/SSL_CTX_set_timeout.3 stable/7/secure/lib/libssl/man/SSL_CTX_set_tmp_dh_callback.3 stable/7/secure/lib/libssl/man/SSL_CTX_set_tmp_rsa_callback.3 stable/7/secure/lib/libssl/man/SSL_CTX_set_verify.3 stable/7/secure/lib/libssl/man/SSL_CTX_use_certificate.3 stable/7/secure/lib/libssl/man/SSL_SESSION_free.3 stable/7/secure/lib/libssl/man/SSL_SESSION_get_ex_new_index.3 stable/7/secure/lib/libssl/man/SSL_SESSION_get_time.3 stable/7/secure/lib/libssl/man/SSL_accept.3 stable/7/secure/lib/libssl/man/SSL_alert_type_string.3 stable/7/secure/lib/libssl/man/SSL_clear.3 stable/7/secure/lib/libssl/man/SSL_connect.3 stable/7/secure/lib/libssl/man/SSL_do_handshake.3 stable/7/secure/lib/libssl/man/SSL_free.3 stable/7/secure/lib/libssl/man/SSL_get_SSL_CTX.3 stable/7/secure/lib/libssl/man/SSL_get_ciphers.3 stable/7/secure/lib/libssl/man/SSL_get_client_CA_list.3 stable/7/secure/lib/libssl/man/SSL_get_current_cipher.3 stable/7/secure/lib/libssl/man/SSL_get_default_timeout.3 stable/7/secure/lib/libssl/man/SSL_get_error.3 stable/7/secure/lib/libssl/man/SSL_get_ex_data_X509_STORE_CTX_idx.3 stable/7/secure/lib/libssl/man/SSL_get_ex_new_index.3 stable/7/secure/lib/libssl/man/SSL_get_fd.3 stable/7/secure/lib/libssl/man/SSL_get_peer_cert_chain.3 stable/7/secure/lib/libssl/man/SSL_get_peer_certificate.3 stable/7/secure/lib/libssl/man/SSL_get_rbio.3 stable/7/secure/lib/libssl/man/SSL_get_session.3 stable/7/secure/lib/libssl/man/SSL_get_verify_result.3 stable/7/secure/lib/libssl/man/SSL_get_version.3 stable/7/secure/lib/libssl/man/SSL_library_init.3 stable/7/secure/lib/libssl/man/SSL_load_client_CA_file.3 stable/7/secure/lib/libssl/man/SSL_new.3 stable/7/secure/lib/libssl/man/SSL_pending.3 stable/7/secure/lib/libssl/man/SSL_read.3 stable/7/secure/lib/libssl/man/SSL_rstate_string.3 stable/7/secure/lib/libssl/man/SSL_session_reused.3 stable/7/secure/lib/libssl/man/SSL_set_bio.3 stable/7/secure/lib/libssl/man/SSL_set_connect_state.3 stable/7/secure/lib/libssl/man/SSL_set_fd.3 stable/7/secure/lib/libssl/man/SSL_set_session.3 stable/7/secure/lib/libssl/man/SSL_set_shutdown.3 stable/7/secure/lib/libssl/man/SSL_set_verify_result.3 stable/7/secure/lib/libssl/man/SSL_shutdown.3 stable/7/secure/lib/libssl/man/SSL_state_string.3 stable/7/secure/lib/libssl/man/SSL_want.3 stable/7/secure/lib/libssl/man/SSL_write.3 stable/7/secure/lib/libssl/man/d2i_SSL_SESSION.3 stable/7/secure/lib/libssl/man/ssl.3 stable/7/secure/usr.bin/openssl/man/CA.pl.1 stable/7/secure/usr.bin/openssl/man/asn1parse.1 stable/7/secure/usr.bin/openssl/man/ca.1 stable/7/secure/usr.bin/openssl/man/ciphers.1 stable/7/secure/usr.bin/openssl/man/crl.1 stable/7/secure/usr.bin/openssl/man/crl2pkcs7.1 stable/7/secure/usr.bin/openssl/man/dgst.1 stable/7/secure/usr.bin/openssl/man/dhparam.1 stable/7/secure/usr.bin/openssl/man/dsa.1 stable/7/secure/usr.bin/openssl/man/dsaparam.1 stable/7/secure/usr.bin/openssl/man/ec.1 stable/7/secure/usr.bin/openssl/man/ecparam.1 stable/7/secure/usr.bin/openssl/man/enc.1 stable/7/secure/usr.bin/openssl/man/errstr.1 stable/7/secure/usr.bin/openssl/man/gendsa.1 stable/7/secure/usr.bin/openssl/man/genrsa.1 stable/7/secure/usr.bin/openssl/man/nseq.1 stable/7/secure/usr.bin/openssl/man/ocsp.1 stable/7/secure/usr.bin/openssl/man/openssl.1 stable/7/secure/usr.bin/openssl/man/passwd.1 stable/7/secure/usr.bin/openssl/man/pkcs12.1 stable/7/secure/usr.bin/openssl/man/pkcs7.1 stable/7/secure/usr.bin/openssl/man/pkcs8.1 stable/7/secure/usr.bin/openssl/man/rand.1 stable/7/secure/usr.bin/openssl/man/req.1 stable/7/secure/usr.bin/openssl/man/rsa.1 stable/7/secure/usr.bin/openssl/man/rsautl.1 stable/7/secure/usr.bin/openssl/man/s_client.1 stable/7/secure/usr.bin/openssl/man/s_server.1 stable/7/secure/usr.bin/openssl/man/s_time.1 stable/7/secure/usr.bin/openssl/man/sess_id.1 stable/7/secure/usr.bin/openssl/man/smime.1 stable/7/secure/usr.bin/openssl/man/speed.1 stable/7/secure/usr.bin/openssl/man/spkac.1 stable/7/secure/usr.bin/openssl/man/verify.1 stable/7/secure/usr.bin/openssl/man/version.1 stable/7/secure/usr.bin/openssl/man/x509.1 stable/7/secure/usr.bin/openssl/man/x509v3_config.1 Directory Properties: stable/7/crypto/openssl/ (props changed) stable/7/secure/lib/libcrypto/ (props changed) stable/7/secure/lib/libssl/ (props changed) stable/7/secure/usr.bin/openssl/ (props changed) Modified: stable/7/crypto/openssl/CHANGES ============================================================================== --- stable/7/crypto/openssl/CHANGES Mon Jul 2 16:14:52 2012 (r238000) +++ stable/7/crypto/openssl/CHANGES Mon Jul 2 16:24:43 2012 (r238001) @@ -2,6 +2,142 @@ OpenSSL CHANGES _______________ + Changes between 0.9.8w and 0.9.8x [10 May 2012] + + *) Sanity check record length before skipping explicit IV in DTLS + to fix DoS attack. + + Thanks to Codenomicon for discovering this issue using Fuzz-o-Matic + fuzzing as a service testing platform. + (CVE-2012-2333) + [Steve Henson] + + *) Initialise tkeylen properly when encrypting CMS messages. + Thanks to Solar Designer of Openwall for reporting this issue. + [Steve Henson] + + Changes between 0.9.8v and 0.9.8w [23 Apr 2012] + + *) The fix for CVE-2012-2110 did not take into account that the + 'len' argument to BUF_MEM_grow and BUF_MEM_grow_clean is an + int in OpenSSL 0.9.8, making it still vulnerable. Fix by + rejecting negative len parameter. (CVE-2012-2131) + [Tomas Hoger ] + + Changes between 0.9.8u and 0.9.8v [19 Apr 2012] + + *) Check for potentially exploitable overflows in asn1_d2i_read_bio + BUF_mem_grow and BUF_mem_grow_clean. Refuse attempts to shrink buffer + in CRYPTO_realloc_clean. + + Thanks to Tavis Ormandy, Google Security Team, for discovering this + issue and to Adam Langley for fixing it. + (CVE-2012-2110) + [Adam Langley (Google), Tavis Ormandy, Google Security Team] + + Changes between 0.9.8t and 0.9.8u [12 Mar 2012] + + *) Fix MMA (Bleichenbacher's attack on PKCS #1 v1.5 RSA padding) weakness + in CMS and PKCS7 code. When RSA decryption fails use a random key for + content decryption and always return the same error. Note: this attack + needs on average 2^20 messages so it only affects automated senders. The + old behaviour can be reenabled in the CMS code by setting the + CMS_DEBUG_DECRYPT flag: this is useful for debugging and testing where + an MMA defence is not necessary. + Thanks to Ivan Nestlerode for discovering + this issue. (CVE-2012-0884) + [Steve Henson] + + *) Fix CVE-2011-4619: make sure we really are receiving a + client hello before rejecting multiple SGC restarts. Thanks to + Ivan Nestlerode for discovering this bug. + [Steve Henson] + + Changes between 0.9.8s and 0.9.8t [18 Jan 2012] + + *) Fix for DTLS DoS issue introduced by fix for CVE-2011-4109. + Thanks to Antonio Martin, Enterprise Secure Access Research and + Development, Cisco Systems, Inc. for discovering this bug and + preparing a fix. (CVE-2012-0050) + [Antonio Martin] + + Changes between 0.9.8r and 0.9.8s [4 Jan 2012] + + *) Nadhem Alfardan and Kenny Paterson have discovered an extension + of the Vaudenay padding oracle attack on CBC mode encryption + which enables an efficient plaintext recovery attack against + the OpenSSL implementation of DTLS. Their attack exploits timing + differences arising during decryption processing. A research + paper describing this attack can be found at: + http://www.isg.rhul.ac.uk/~kp/dtls.pdf + Thanks go to Nadhem Alfardan and Kenny Paterson of the Information + Security Group at Royal Holloway, University of London + (www.isg.rhul.ac.uk) for discovering this flaw and to Robin Seggelmann + and Michael Tuexen + for preparing the fix. (CVE-2011-4108) + [Robin Seggelmann, Michael Tuexen] + + *) Stop policy check failure freeing same buffer twice. (CVE-2011-4109) + [Ben Laurie, Kasper ] + + *) Clear bytes used for block padding of SSL 3.0 records. + (CVE-2011-4576) + [Adam Langley (Google)] + + *) Only allow one SGC handshake restart for SSL/TLS. Thanks to George + Kadianakis for discovering this issue and + Adam Langley for preparing the fix. (CVE-2011-4619) + [Adam Langley (Google)] + + *) Prevent malformed RFC3779 data triggering an assertion failure. + Thanks to Andrew Chi, BBN Technologies, for discovering the flaw + and Rob Austein for fixing it. (CVE-2011-4577) + [Rob Austein ] + + *) Fix ssl_ciph.c set-up race. + [Adam Langley (Google)] + + *) Fix spurious failures in ecdsatest.c. + [Emilia Käsper (Google)] + + *) Fix the BIO_f_buffer() implementation (which was mixing different + interpretations of the '..._len' fields). + [Adam Langley (Google)] + + *) Fix handling of BN_BLINDING: now BN_BLINDING_invert_ex (rather than + BN_BLINDING_invert_ex) calls BN_BLINDING_update, ensuring that concurrent + threads won't reuse the same blinding coefficients. + + This also avoids the need to obtain the CRYPTO_LOCK_RSA_BLINDING + lock to call BN_BLINDING_invert_ex, and avoids one use of + BN_BLINDING_update for each BN_BLINDING structure (previously, + the last update always remained unused). + [Emilia Käsper (Google)] + + *) Fix SSL memory handling for (EC)DH ciphersuites, in particular + for multi-threaded use of ECDH. + [Adam Langley (Google)] + + *) Fix x509_name_ex_d2i memory leak on bad inputs. + [Bodo Moeller] + + *) Add protection against ECDSA timing attacks as mentioned in the paper + by Billy Bob Brumley and Nicola Tuveri, see: + + http://eprint.iacr.org/2011/232.pdf + + [Billy Bob Brumley and Nicola Tuveri] + + Changes between 0.9.8q and 0.9.8r [8 Feb 2011] + + *) Fix parsing of OCSP stapling ClientHello extension. CVE-2011-0014 + [Neel Mehta, Adam Langley, Bodo Moeller (Google)] + + *) Fix bug in string printing code: if *any* escaping is enabled we must + escape the escape character (backslash) or the resulting string is + ambiguous. + [Steve Henson] + Changes between 0.9.8p and 0.9.8q [2 Dec 2010] *) Disable code workaround for ancient and obsolete Netscape browsers Modified: stable/7/crypto/openssl/Configure ============================================================================== --- stable/7/crypto/openssl/Configure Mon Jul 2 16:14:52 2012 (r238000) +++ stable/7/crypto/openssl/Configure Mon Jul 2 16:24:43 2012 (r238001) @@ -371,6 +371,9 @@ my %table=( "linux-alpha-ccc","ccc:-fast -readonly_strings -DL_ENDIAN -DTERMIO::-D_REENTRANT:::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL:${no_asm}", "linux-alpha+bwx-ccc","ccc:-fast -readonly_strings -DL_ENDIAN -DTERMIO::-D_REENTRANT:::SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL:${no_asm}", +# Android: Linux but without -DTERMIO and pointers to headers and libs. +"android","gcc:-mandroid -I\$(ANDROID_DEV)/include -B\$(ANDROID_DEV)/lib -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", + #### *BSD [do see comment about ${BSDthreads} above!] "BSD-generic32","gcc:-DTERMIOS -O3 -fomit-frame-pointer -Wall::${BSDthreads}:::BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "BSD-x86", "gcc:-DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer -Wall::${BSDthreads}:::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}:dlfcn:bsd-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", Modified: stable/7/crypto/openssl/FAQ ============================================================================== --- stable/7/crypto/openssl/FAQ Mon Jul 2 16:14:52 2012 (r238000) +++ stable/7/crypto/openssl/FAQ Mon Jul 2 16:24:43 2012 (r238001) @@ -10,6 +10,7 @@ OpenSSL - Frequently Asked Questions * Why aren't tools like 'autoconf' and 'libtool' used? * What is an 'engine' version? * How do I check the authenticity of the OpenSSL distribution? +* How does the versioning scheme work? [LEGAL] Legal questions @@ -82,7 +83,7 @@ OpenSSL - Frequently Asked Questions * Which is the current version of OpenSSL? The current version is available from . -OpenSSL 1.0.0c was released on Dec 2nd, 2010. +OpenSSL 1.0.1c was released on May 10th, 2012. In addition to the current stable release, you can also access daily snapshots of the OpenSSL development version at . Note that the online documents refer to the very latest development versions of OpenSSL and may include features not present in released versions. If in doubt refer to the documentation -that came with the version of OpenSSL you are using. +that came with the version of OpenSSL you are using. The pod format +documentation is included in each OpenSSL distribution under the docs +directory. For information on parts of libcrypto that are not yet documented, you might want to read Ariel Glenn's documentation on SSLeay 0.9, OpenSSL's @@ -173,6 +176,19 @@ just do: pgp TARBALL.asc +* How does the versioning scheme work? + +After the release of OpenSSL 1.0.0 the versioning scheme changed. Letter +releases (e.g. 1.0.1a) can only contain bug and security fixes and no +new features. Minor releases change the last number (e.g. 1.0.2) and +can contain new features that retain binary compatibility. Changes to +the middle number are considered major releases and neither source nor +binary compatibility is guaranteed. + +Therefore the answer to the common question "when will feature X be +backported to OpenSSL 1.0.0/0.9.8?" is "never" but it could appear +in the next minor release. + [LEGAL] ======================================================================= * Do I need patent licenses to use OpenSSL? @@ -284,7 +300,7 @@ current directory in this case, but this Check out the CA.pl(1) manual page. This provides a simple wrapper round the 'req', 'verify', 'ca' and 'pkcs12' utilities. For finer control check out the manual pages for the individual utilities and the certificate -extensions documentation (currently in doc/openssl.txt). +extensions documentation (in ca(1), req(1), x509v3_config(5) ) * Why can't I create certificate requests? Modified: stable/7/crypto/openssl/LICENSE ============================================================================== --- stable/7/crypto/openssl/LICENSE Mon Jul 2 16:14:52 2012 (r238000) +++ stable/7/crypto/openssl/LICENSE Mon Jul 2 16:24:43 2012 (r238001) @@ -12,7 +12,7 @@ --------------- /* ==================================================================== - * Copyright (c) 1998-2008 The OpenSSL Project. All rights reserved. + * Copyright (c) 1998-2011 The OpenSSL Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/7/crypto/openssl/Makefile ============================================================================== --- stable/7/crypto/openssl/Makefile Mon Jul 2 16:14:52 2012 (r238000) +++ stable/7/crypto/openssl/Makefile Mon Jul 2 16:24:43 2012 (r238001) @@ -4,7 +4,7 @@ ## Makefile for OpenSSL ## -VERSION=0.9.8q +VERSION=0.9.8x MAJOR=0 MINOR=9.8 SHLIB_VERSION_NUMBER=0.9.8 Modified: stable/7/crypto/openssl/NEWS ============================================================================== --- stable/7/crypto/openssl/NEWS Mon Jul 2 16:14:52 2012 (r238000) +++ stable/7/crypto/openssl/NEWS Mon Jul 2 16:24:43 2012 (r238001) @@ -5,6 +5,40 @@ This file gives a brief overview of the major changes between each OpenSSL release. For more details please read the CHANGES file. + Major changes between OpenSSL 0.9.8w and OpenSSL 0.9.8x: + + o Fix DTLS record length checking bug CVE-2012-2333 + + Major changes between OpenSSL 0.9.8v and OpenSSL 0.9.8w: + + o Fix for CVE-2012-2131 (corrected fix for 0.9.8 and CVE-2012-2110) + + Major changes between OpenSSL 0.9.8u and OpenSSL 0.9.8v: + + o Fix for ASN1 overflow bug CVE-2012-2110 + + Major changes between OpenSSL 0.9.8t and OpenSSL 0.9.8u: + + o Fix for CMS/PKCS#7 MMA CVE-2012-0884 + o Corrected fix for CVE-2011-4619 + o Various DTLS fixes. + + Major changes between OpenSSL 0.9.8s and OpenSSL 0.9.8t: + + o Fix for DTLS DoS issue CVE-2012-0050 + + Major changes between OpenSSL 0.9.8r and OpenSSL 0.9.8s: + + o Fix for DTLS plaintext recovery attack CVE-2011-4108 + o Fix policy check double free error CVE-2011-4109 + o Clear block padding bytes of SSL 3.0 records CVE-2011-4576 + o Only allow one SGC handshake restart for SSL/TLS CVE-2011-4619 + o Check for malformed RFC3779 data CVE-2011-4577 + + Major changes between OpenSSL 0.9.8q and OpenSSL 0.9.8r: + + o Fix for security issue CVE-2011-0014 + Major changes between OpenSSL 0.9.8p and OpenSSL 0.9.8q: o Fix for security issue CVE-2010-4180 @@ -181,6 +215,11 @@ o Added initial support for Win64. o Added alternate pkg-config files. + Major changes between OpenSSL 0.9.7l and OpenSSL 0.9.7m: + + o FIPS 1.1.1 module linking. + o Various ciphersuite selection fixes. + Major changes between OpenSSL 0.9.7k and OpenSSL 0.9.7l: o Introduce limits to prevent malicious key DoS (CVE-2006-2940) Modified: stable/7/crypto/openssl/README ============================================================================== --- stable/7/crypto/openssl/README Mon Jul 2 16:14:52 2012 (r238000) +++ stable/7/crypto/openssl/README Mon Jul 2 16:24:43 2012 (r238001) @@ -1,7 +1,7 @@ - OpenSSL 0.9.8q 2 Dec 2010 + OpenSSL 0.9.8x 10 May 2012 - Copyright (c) 1998-2009 The OpenSSL Project + Copyright (c) 1998-2011 The OpenSSL Project Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson All rights reserved. Modified: stable/7/crypto/openssl/apps/Makefile ============================================================================== --- stable/7/crypto/openssl/apps/Makefile Mon Jul 2 16:14:52 2012 (r238000) +++ stable/7/crypto/openssl/apps/Makefile Mon Jul 2 16:24:43 2012 (r238001) @@ -176,720 +176,703 @@ progs.h: progs.pl app_rand.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h app_rand.o: ../include/openssl/buffer.h ../include/openssl/conf.h app_rand.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h -app_rand.o: ../include/openssl/ec.h ../include/openssl/ecdh.h -app_rand.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h -app_rand.o: ../include/openssl/evp.h ../include/openssl/fips.h -app_rand.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h -app_rand.o: ../include/openssl/objects.h ../include/openssl/ocsp.h -app_rand.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -app_rand.o: ../include/openssl/ossl_typ.h ../include/openssl/pkcs7.h -app_rand.o: ../include/openssl/rand.h ../include/openssl/safestack.h -app_rand.o: ../include/openssl/sha.h ../include/openssl/stack.h -app_rand.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h -app_rand.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h -app_rand.o: ../include/openssl/x509v3.h app_rand.c apps.h +app_rand.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h +app_rand.o: ../include/openssl/engine.h ../include/openssl/evp.h +app_rand.o: ../include/openssl/fips.h ../include/openssl/lhash.h +app_rand.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +app_rand.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h +app_rand.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +app_rand.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h +app_rand.o: ../include/openssl/safestack.h ../include/openssl/sha.h +app_rand.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +app_rand.o: ../include/openssl/txt_db.h ../include/openssl/x509.h +app_rand.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h +app_rand.o: app_rand.c apps.h apps.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h apps.o: ../include/openssl/bn.h ../include/openssl/buffer.h apps.o: ../include/openssl/conf.h ../include/openssl/crypto.h apps.o: ../include/openssl/e_os2.h ../include/openssl/ec.h -apps.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h -apps.o: ../include/openssl/engine.h ../include/openssl/err.h -apps.o: ../include/openssl/evp.h ../include/openssl/fips.h -apps.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h -apps.o: ../include/openssl/objects.h ../include/openssl/ocsp.h -apps.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -apps.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h -apps.o: ../include/openssl/pem2.h ../include/openssl/pkcs12.h -apps.o: ../include/openssl/pkcs7.h ../include/openssl/rsa.h -apps.o: ../include/openssl/safestack.h ../include/openssl/sha.h -apps.o: ../include/openssl/stack.h ../include/openssl/symhacks.h -apps.o: ../include/openssl/txt_db.h ../include/openssl/ui.h -apps.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h -apps.o: ../include/openssl/x509v3.h apps.c apps.h +apps.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h +apps.o: ../include/openssl/err.h ../include/openssl/evp.h +apps.o: ../include/openssl/fips.h ../include/openssl/lhash.h +apps.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +apps.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h +apps.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +apps.o: ../include/openssl/pem.h ../include/openssl/pem2.h +apps.o: ../include/openssl/pkcs12.h ../include/openssl/pkcs7.h +apps.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +apps.o: ../include/openssl/sha.h ../include/openssl/stack.h +apps.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h +apps.o: ../include/openssl/ui.h ../include/openssl/x509.h +apps.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.c apps.h asn1pars.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h asn1pars.o: ../include/openssl/buffer.h ../include/openssl/conf.h asn1pars.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h -asn1pars.o: ../include/openssl/ec.h ../include/openssl/ecdh.h -asn1pars.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h -asn1pars.o: ../include/openssl/err.h ../include/openssl/evp.h -asn1pars.o: ../include/openssl/fips.h ../include/openssl/lhash.h -asn1pars.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h -asn1pars.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h -asn1pars.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h -asn1pars.o: ../include/openssl/pem.h ../include/openssl/pem2.h -asn1pars.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h -asn1pars.o: ../include/openssl/sha.h ../include/openssl/stack.h -asn1pars.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h -asn1pars.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h -asn1pars.o: ../include/openssl/x509v3.h apps.h asn1pars.c +asn1pars.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h +asn1pars.o: ../include/openssl/engine.h ../include/openssl/err.h +asn1pars.o: ../include/openssl/evp.h ../include/openssl/fips.h +asn1pars.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h +asn1pars.o: ../include/openssl/objects.h ../include/openssl/ocsp.h +asn1pars.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +asn1pars.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h +asn1pars.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h +asn1pars.o: ../include/openssl/safestack.h ../include/openssl/sha.h +asn1pars.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +asn1pars.o: ../include/openssl/txt_db.h ../include/openssl/x509.h +asn1pars.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h +asn1pars.o: asn1pars.c ca.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h ca.o: ../include/openssl/bn.h ../include/openssl/buffer.h ca.o: ../include/openssl/conf.h ../include/openssl/crypto.h ca.o: ../include/openssl/e_os2.h ../include/openssl/ec.h -ca.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h -ca.o: ../include/openssl/engine.h ../include/openssl/err.h -ca.o: ../include/openssl/evp.h ../include/openssl/fips.h -ca.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h -ca.o: ../include/openssl/objects.h ../include/openssl/ocsp.h -ca.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -ca.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h -ca.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h -ca.o: ../include/openssl/safestack.h ../include/openssl/sha.h -ca.o: ../include/openssl/stack.h ../include/openssl/symhacks.h -ca.o: ../include/openssl/txt_db.h ../include/openssl/x509.h -ca.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h ca.c +ca.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h +ca.o: ../include/openssl/err.h ../include/openssl/evp.h +ca.o: ../include/openssl/fips.h ../include/openssl/lhash.h +ca.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +ca.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h +ca.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +ca.o: ../include/openssl/pem.h ../include/openssl/pem2.h +ca.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h +ca.o: ../include/openssl/sha.h ../include/openssl/stack.h +ca.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h +ca.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h +ca.o: ../include/openssl/x509v3.h apps.h ca.c ciphers.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h ciphers.o: ../include/openssl/bn.h ../include/openssl/buffer.h ciphers.o: ../include/openssl/comp.h ../include/openssl/conf.h ciphers.o: ../include/openssl/crypto.h ../include/openssl/dtls1.h ciphers.o: ../include/openssl/e_os2.h ../include/openssl/ec.h -ciphers.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h -ciphers.o: ../include/openssl/engine.h ../include/openssl/err.h -ciphers.o: ../include/openssl/evp.h ../include/openssl/fips.h -ciphers.o: ../include/openssl/hmac.h ../include/openssl/kssl.h -ciphers.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h -ciphers.o: ../include/openssl/objects.h ../include/openssl/ocsp.h -ciphers.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -ciphers.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h -ciphers.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h -ciphers.o: ../include/openssl/pq_compat.h ../include/openssl/pqueue.h -ciphers.o: ../include/openssl/safestack.h ../include/openssl/sha.h -ciphers.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h -ciphers.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h -ciphers.o: ../include/openssl/stack.h ../include/openssl/symhacks.h -ciphers.o: ../include/openssl/tls1.h ../include/openssl/txt_db.h -ciphers.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h -ciphers.o: ../include/openssl/x509v3.h apps.h ciphers.c +ciphers.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h +ciphers.o: ../include/openssl/err.h ../include/openssl/evp.h +ciphers.o: ../include/openssl/fips.h ../include/openssl/hmac.h +ciphers.o: ../include/openssl/kssl.h ../include/openssl/lhash.h +ciphers.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +ciphers.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h +ciphers.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +ciphers.o: ../include/openssl/pem.h ../include/openssl/pem2.h +ciphers.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h +ciphers.o: ../include/openssl/pqueue.h ../include/openssl/safestack.h +ciphers.o: ../include/openssl/sha.h ../include/openssl/ssl.h +ciphers.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h +ciphers.o: ../include/openssl/ssl3.h ../include/openssl/stack.h +ciphers.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h +ciphers.o: ../include/openssl/txt_db.h ../include/openssl/x509.h +ciphers.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h +ciphers.o: ciphers.c cms.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h cms.o: ../include/openssl/buffer.h ../include/openssl/conf.h cms.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h -cms.o: ../include/openssl/ec.h ../include/openssl/ecdh.h -cms.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h -cms.o: ../include/openssl/evp.h ../include/openssl/fips.h -cms.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h -cms.o: ../include/openssl/objects.h ../include/openssl/ocsp.h -cms.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -cms.o: ../include/openssl/ossl_typ.h ../include/openssl/pkcs7.h -cms.o: ../include/openssl/safestack.h ../include/openssl/sha.h -cms.o: ../include/openssl/stack.h ../include/openssl/symhacks.h -cms.o: ../include/openssl/txt_db.h ../include/openssl/x509.h -cms.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h cms.c +cms.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h +cms.o: ../include/openssl/engine.h ../include/openssl/evp.h +cms.o: ../include/openssl/fips.h ../include/openssl/lhash.h +cms.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +cms.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h +cms.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +cms.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h +cms.o: ../include/openssl/sha.h ../include/openssl/stack.h +cms.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h +cms.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h +cms.o: ../include/openssl/x509v3.h apps.h cms.c crl.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h crl.o: ../include/openssl/buffer.h ../include/openssl/conf.h crl.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h -crl.o: ../include/openssl/ec.h ../include/openssl/ecdh.h -crl.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h -crl.o: ../include/openssl/err.h ../include/openssl/evp.h -crl.o: ../include/openssl/fips.h ../include/openssl/lhash.h -crl.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h -crl.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h -crl.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h -crl.o: ../include/openssl/pem.h ../include/openssl/pem2.h -crl.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h -crl.o: ../include/openssl/sha.h ../include/openssl/stack.h -crl.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h -crl.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h -crl.o: ../include/openssl/x509v3.h apps.h crl.c +crl.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h +crl.o: ../include/openssl/engine.h ../include/openssl/err.h +crl.o: ../include/openssl/evp.h ../include/openssl/fips.h +crl.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h +crl.o: ../include/openssl/objects.h ../include/openssl/ocsp.h +crl.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +crl.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h +crl.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h +crl.o: ../include/openssl/safestack.h ../include/openssl/sha.h +crl.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +crl.o: ../include/openssl/txt_db.h ../include/openssl/x509.h +crl.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h crl.c crl2p7.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h crl2p7.o: ../include/openssl/buffer.h ../include/openssl/conf.h crl2p7.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h -crl2p7.o: ../include/openssl/ec.h ../include/openssl/ecdh.h -crl2p7.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h -crl2p7.o: ../include/openssl/err.h ../include/openssl/evp.h -crl2p7.o: ../include/openssl/fips.h ../include/openssl/lhash.h -crl2p7.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h -crl2p7.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h -crl2p7.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h -crl2p7.o: ../include/openssl/pem.h ../include/openssl/pem2.h -crl2p7.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h -crl2p7.o: ../include/openssl/sha.h ../include/openssl/stack.h -crl2p7.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h -crl2p7.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h -crl2p7.o: ../include/openssl/x509v3.h apps.h crl2p7.c +crl2p7.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h +crl2p7.o: ../include/openssl/engine.h ../include/openssl/err.h +crl2p7.o: ../include/openssl/evp.h ../include/openssl/fips.h +crl2p7.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h +crl2p7.o: ../include/openssl/objects.h ../include/openssl/ocsp.h +crl2p7.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +crl2p7.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h +crl2p7.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h +crl2p7.o: ../include/openssl/safestack.h ../include/openssl/sha.h +crl2p7.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +crl2p7.o: ../include/openssl/txt_db.h ../include/openssl/x509.h +crl2p7.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h +crl2p7.o: crl2p7.c dgst.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h dgst.o: ../include/openssl/buffer.h ../include/openssl/conf.h dgst.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h -dgst.o: ../include/openssl/ec.h ../include/openssl/ecdh.h -dgst.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h -dgst.o: ../include/openssl/err.h ../include/openssl/evp.h -dgst.o: ../include/openssl/fips.h ../include/openssl/hmac.h -dgst.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h -dgst.o: ../include/openssl/objects.h ../include/openssl/ocsp.h -dgst.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -dgst.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h -dgst.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h -dgst.o: ../include/openssl/safestack.h ../include/openssl/sha.h -dgst.o: ../include/openssl/stack.h ../include/openssl/symhacks.h -dgst.o: ../include/openssl/txt_db.h ../include/openssl/x509.h -dgst.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h dgst.c +dgst.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h +dgst.o: ../include/openssl/engine.h ../include/openssl/err.h +dgst.o: ../include/openssl/evp.h ../include/openssl/fips.h +dgst.o: ../include/openssl/hmac.h ../include/openssl/lhash.h +dgst.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +dgst.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h +dgst.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +dgst.o: ../include/openssl/pem.h ../include/openssl/pem2.h +dgst.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h +dgst.o: ../include/openssl/sha.h ../include/openssl/stack.h +dgst.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h +dgst.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h +dgst.o: ../include/openssl/x509v3.h apps.h dgst.c dh.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h dh.o: ../include/openssl/bn.h ../include/openssl/buffer.h dh.o: ../include/openssl/conf.h ../include/openssl/crypto.h dh.o: ../include/openssl/dh.h ../include/openssl/e_os2.h -dh.o: ../include/openssl/ec.h ../include/openssl/ecdh.h -dh.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h -dh.o: ../include/openssl/err.h ../include/openssl/evp.h -dh.o: ../include/openssl/fips.h ../include/openssl/lhash.h -dh.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h -dh.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h -dh.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h -dh.o: ../include/openssl/pem.h ../include/openssl/pem2.h -dh.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h -dh.o: ../include/openssl/sha.h ../include/openssl/stack.h -dh.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h -dh.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h -dh.o: ../include/openssl/x509v3.h apps.h dh.c +dh.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h +dh.o: ../include/openssl/engine.h ../include/openssl/err.h +dh.o: ../include/openssl/evp.h ../include/openssl/fips.h +dh.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h +dh.o: ../include/openssl/objects.h ../include/openssl/ocsp.h +dh.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +dh.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h +dh.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h +dh.o: ../include/openssl/safestack.h ../include/openssl/sha.h +dh.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +dh.o: ../include/openssl/txt_db.h ../include/openssl/x509.h +dh.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h dh.c dsa.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h dsa.o: ../include/openssl/bn.h ../include/openssl/buffer.h dsa.o: ../include/openssl/conf.h ../include/openssl/crypto.h dsa.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h -dsa.o: ../include/openssl/ec.h ../include/openssl/ecdh.h -dsa.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h -dsa.o: ../include/openssl/err.h ../include/openssl/evp.h -dsa.o: ../include/openssl/fips.h ../include/openssl/lhash.h -dsa.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h -dsa.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h -dsa.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h -dsa.o: ../include/openssl/pem.h ../include/openssl/pem2.h -dsa.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h -dsa.o: ../include/openssl/sha.h ../include/openssl/stack.h -dsa.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h -dsa.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h -dsa.o: ../include/openssl/x509v3.h apps.h dsa.c +dsa.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h +dsa.o: ../include/openssl/engine.h ../include/openssl/err.h +dsa.o: ../include/openssl/evp.h ../include/openssl/fips.h +dsa.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h +dsa.o: ../include/openssl/objects.h ../include/openssl/ocsp.h +dsa.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +dsa.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h +dsa.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h +dsa.o: ../include/openssl/safestack.h ../include/openssl/sha.h +dsa.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +dsa.o: ../include/openssl/txt_db.h ../include/openssl/x509.h +dsa.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h dsa.c dsaparam.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h dsaparam.o: ../include/openssl/bn.h ../include/openssl/buffer.h dsaparam.o: ../include/openssl/conf.h ../include/openssl/crypto.h dsaparam.o: ../include/openssl/dh.h ../include/openssl/dsa.h dsaparam.o: ../include/openssl/e_os2.h ../include/openssl/ec.h -dsaparam.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h -dsaparam.o: ../include/openssl/engine.h ../include/openssl/err.h -dsaparam.o: ../include/openssl/evp.h ../include/openssl/fips.h -dsaparam.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h -dsaparam.o: ../include/openssl/objects.h ../include/openssl/ocsp.h -dsaparam.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -dsaparam.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h -dsaparam.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h -dsaparam.o: ../include/openssl/rand.h ../include/openssl/rsa.h -dsaparam.o: ../include/openssl/safestack.h ../include/openssl/sha.h -dsaparam.o: ../include/openssl/stack.h ../include/openssl/store.h -dsaparam.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h -dsaparam.o: ../include/openssl/ui.h ../include/openssl/x509.h -dsaparam.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h -dsaparam.o: dsaparam.c +dsaparam.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h +dsaparam.o: ../include/openssl/err.h ../include/openssl/evp.h +dsaparam.o: ../include/openssl/fips.h ../include/openssl/lhash.h +dsaparam.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +dsaparam.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h +dsaparam.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +dsaparam.o: ../include/openssl/pem.h ../include/openssl/pem2.h +dsaparam.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h +dsaparam.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +dsaparam.o: ../include/openssl/sha.h ../include/openssl/stack.h +dsaparam.o: ../include/openssl/store.h ../include/openssl/symhacks.h +dsaparam.o: ../include/openssl/txt_db.h ../include/openssl/ui.h +dsaparam.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h +dsaparam.o: ../include/openssl/x509v3.h apps.h dsaparam.c ec.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h ec.o: ../include/openssl/buffer.h ../include/openssl/conf.h ec.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h -ec.o: ../include/openssl/ec.h ../include/openssl/ecdh.h -ec.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h -ec.o: ../include/openssl/err.h ../include/openssl/evp.h -ec.o: ../include/openssl/fips.h ../include/openssl/lhash.h -ec.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h -ec.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h -ec.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h -ec.o: ../include/openssl/pem.h ../include/openssl/pem2.h -ec.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h -ec.o: ../include/openssl/sha.h ../include/openssl/stack.h -ec.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h -ec.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h -ec.o: ../include/openssl/x509v3.h apps.h ec.c +ec.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h +ec.o: ../include/openssl/engine.h ../include/openssl/err.h +ec.o: ../include/openssl/evp.h ../include/openssl/fips.h +ec.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h +ec.o: ../include/openssl/objects.h ../include/openssl/ocsp.h +ec.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +ec.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h +ec.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h +ec.o: ../include/openssl/safestack.h ../include/openssl/sha.h +ec.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +ec.o: ../include/openssl/txt_db.h ../include/openssl/x509.h +ec.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h ec.c ecparam.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h ecparam.o: ../include/openssl/bn.h ../include/openssl/buffer.h ecparam.o: ../include/openssl/conf.h ../include/openssl/crypto.h ecparam.o: ../include/openssl/e_os2.h ../include/openssl/ec.h -ecparam.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h -ecparam.o: ../include/openssl/engine.h ../include/openssl/err.h -ecparam.o: ../include/openssl/evp.h ../include/openssl/fips.h -ecparam.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h -ecparam.o: ../include/openssl/objects.h ../include/openssl/ocsp.h -ecparam.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -ecparam.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h -ecparam.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h -ecparam.o: ../include/openssl/safestack.h ../include/openssl/sha.h -ecparam.o: ../include/openssl/stack.h ../include/openssl/symhacks.h -ecparam.o: ../include/openssl/txt_db.h ../include/openssl/x509.h -ecparam.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h -ecparam.o: ecparam.c +ecparam.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h +ecparam.o: ../include/openssl/err.h ../include/openssl/evp.h +ecparam.o: ../include/openssl/fips.h ../include/openssl/lhash.h +ecparam.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +ecparam.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h +ecparam.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +ecparam.o: ../include/openssl/pem.h ../include/openssl/pem2.h +ecparam.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h +ecparam.o: ../include/openssl/sha.h ../include/openssl/stack.h +ecparam.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h +ecparam.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h +ecparam.o: ../include/openssl/x509v3.h apps.h ecparam.c enc.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h enc.o: ../include/openssl/buffer.h ../include/openssl/conf.h enc.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h -enc.o: ../include/openssl/ec.h ../include/openssl/ecdh.h -enc.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h -enc.o: ../include/openssl/err.h ../include/openssl/evp.h -enc.o: ../include/openssl/fips.h ../include/openssl/lhash.h -enc.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h -enc.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h -enc.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h -enc.o: ../include/openssl/pem.h ../include/openssl/pem2.h -enc.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h -enc.o: ../include/openssl/safestack.h ../include/openssl/sha.h -enc.o: ../include/openssl/stack.h ../include/openssl/symhacks.h -enc.o: ../include/openssl/txt_db.h ../include/openssl/x509.h -enc.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h enc.c +enc.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h +enc.o: ../include/openssl/engine.h ../include/openssl/err.h +enc.o: ../include/openssl/evp.h ../include/openssl/fips.h +enc.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h +enc.o: ../include/openssl/objects.h ../include/openssl/ocsp.h +enc.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +enc.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h +enc.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h +enc.o: ../include/openssl/rand.h ../include/openssl/safestack.h +enc.o: ../include/openssl/sha.h ../include/openssl/stack.h +enc.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h +enc.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h +enc.o: ../include/openssl/x509v3.h apps.h enc.c engine.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h engine.o: ../include/openssl/bn.h ../include/openssl/buffer.h engine.o: ../include/openssl/comp.h ../include/openssl/conf.h engine.o: ../include/openssl/crypto.h ../include/openssl/dtls1.h engine.o: ../include/openssl/e_os2.h ../include/openssl/ec.h -engine.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h -engine.o: ../include/openssl/engine.h ../include/openssl/err.h -engine.o: ../include/openssl/evp.h ../include/openssl/fips.h -engine.o: ../include/openssl/hmac.h ../include/openssl/kssl.h -engine.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h -engine.o: ../include/openssl/objects.h ../include/openssl/ocsp.h -engine.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -engine.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h -engine.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h -engine.o: ../include/openssl/pq_compat.h ../include/openssl/pqueue.h -engine.o: ../include/openssl/safestack.h ../include/openssl/sha.h -engine.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h -engine.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h -engine.o: ../include/openssl/stack.h ../include/openssl/symhacks.h -engine.o: ../include/openssl/tls1.h ../include/openssl/txt_db.h -engine.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h -engine.o: ../include/openssl/x509v3.h apps.h engine.c +engine.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h +engine.o: ../include/openssl/err.h ../include/openssl/evp.h +engine.o: ../include/openssl/fips.h ../include/openssl/hmac.h +engine.o: ../include/openssl/kssl.h ../include/openssl/lhash.h +engine.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +engine.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h +engine.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +engine.o: ../include/openssl/pem.h ../include/openssl/pem2.h +engine.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h +engine.o: ../include/openssl/pqueue.h ../include/openssl/safestack.h +engine.o: ../include/openssl/sha.h ../include/openssl/ssl.h +engine.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h +engine.o: ../include/openssl/ssl3.h ../include/openssl/stack.h +engine.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h +engine.o: ../include/openssl/txt_db.h ../include/openssl/x509.h +engine.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h +engine.o: engine.c errstr.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h errstr.o: ../include/openssl/bn.h ../include/openssl/buffer.h errstr.o: ../include/openssl/comp.h ../include/openssl/conf.h errstr.o: ../include/openssl/crypto.h ../include/openssl/dtls1.h errstr.o: ../include/openssl/e_os2.h ../include/openssl/ec.h -errstr.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h -errstr.o: ../include/openssl/engine.h ../include/openssl/err.h -errstr.o: ../include/openssl/evp.h ../include/openssl/fips.h -errstr.o: ../include/openssl/hmac.h ../include/openssl/kssl.h -errstr.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h -errstr.o: ../include/openssl/objects.h ../include/openssl/ocsp.h -errstr.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -errstr.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h -errstr.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h -errstr.o: ../include/openssl/pq_compat.h ../include/openssl/pqueue.h -errstr.o: ../include/openssl/safestack.h ../include/openssl/sha.h -errstr.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h -errstr.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h -errstr.o: ../include/openssl/stack.h ../include/openssl/symhacks.h -errstr.o: ../include/openssl/tls1.h ../include/openssl/txt_db.h -errstr.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h -errstr.o: ../include/openssl/x509v3.h apps.h errstr.c +errstr.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h +errstr.o: ../include/openssl/err.h ../include/openssl/evp.h +errstr.o: ../include/openssl/fips.h ../include/openssl/hmac.h +errstr.o: ../include/openssl/kssl.h ../include/openssl/lhash.h +errstr.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +errstr.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h +errstr.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +errstr.o: ../include/openssl/pem.h ../include/openssl/pem2.h +errstr.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h +errstr.o: ../include/openssl/pqueue.h ../include/openssl/safestack.h +errstr.o: ../include/openssl/sha.h ../include/openssl/ssl.h +errstr.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h +errstr.o: ../include/openssl/ssl3.h ../include/openssl/stack.h +errstr.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h +errstr.o: ../include/openssl/txt_db.h ../include/openssl/x509.h +errstr.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h +errstr.o: errstr.c gendh.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h gendh.o: ../include/openssl/bn.h ../include/openssl/buffer.h gendh.o: ../include/openssl/conf.h ../include/openssl/crypto.h gendh.o: ../include/openssl/dh.h ../include/openssl/dsa.h gendh.o: ../include/openssl/e_os2.h ../include/openssl/ec.h -gendh.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h -gendh.o: ../include/openssl/engine.h ../include/openssl/err.h -gendh.o: ../include/openssl/evp.h ../include/openssl/fips.h -gendh.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h -gendh.o: ../include/openssl/objects.h ../include/openssl/ocsp.h -gendh.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -gendh.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h -gendh.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h -gendh.o: ../include/openssl/rand.h ../include/openssl/rsa.h -gendh.o: ../include/openssl/safestack.h ../include/openssl/sha.h -gendh.o: ../include/openssl/stack.h ../include/openssl/store.h -gendh.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h -gendh.o: ../include/openssl/ui.h ../include/openssl/x509.h -gendh.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h -gendh.o: gendh.c +gendh.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h +gendh.o: ../include/openssl/err.h ../include/openssl/evp.h +gendh.o: ../include/openssl/fips.h ../include/openssl/lhash.h +gendh.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +gendh.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h +gendh.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +gendh.o: ../include/openssl/pem.h ../include/openssl/pem2.h +gendh.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h +gendh.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +gendh.o: ../include/openssl/sha.h ../include/openssl/stack.h +gendh.o: ../include/openssl/store.h ../include/openssl/symhacks.h +gendh.o: ../include/openssl/txt_db.h ../include/openssl/ui.h +gendh.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h +gendh.o: ../include/openssl/x509v3.h apps.h gendh.c gendsa.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h gendsa.o: ../include/openssl/bn.h ../include/openssl/buffer.h gendsa.o: ../include/openssl/conf.h ../include/openssl/crypto.h gendsa.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h -gendsa.o: ../include/openssl/ec.h ../include/openssl/ecdh.h -gendsa.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h -gendsa.o: ../include/openssl/err.h ../include/openssl/evp.h -gendsa.o: ../include/openssl/fips.h ../include/openssl/lhash.h -gendsa.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h -gendsa.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h -gendsa.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h -gendsa.o: ../include/openssl/pem.h ../include/openssl/pem2.h -gendsa.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h -gendsa.o: ../include/openssl/sha.h ../include/openssl/stack.h -gendsa.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h -gendsa.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h -gendsa.o: ../include/openssl/x509v3.h apps.h gendsa.c +gendsa.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h +gendsa.o: ../include/openssl/engine.h ../include/openssl/err.h +gendsa.o: ../include/openssl/evp.h ../include/openssl/fips.h +gendsa.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h +gendsa.o: ../include/openssl/objects.h ../include/openssl/ocsp.h +gendsa.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +gendsa.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h +gendsa.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h +gendsa.o: ../include/openssl/safestack.h ../include/openssl/sha.h +gendsa.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +gendsa.o: ../include/openssl/txt_db.h ../include/openssl/x509.h +gendsa.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h +gendsa.o: gendsa.c genrsa.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h genrsa.o: ../include/openssl/bn.h ../include/openssl/buffer.h genrsa.o: ../include/openssl/conf.h ../include/openssl/crypto.h genrsa.o: ../include/openssl/dh.h ../include/openssl/dsa.h genrsa.o: ../include/openssl/e_os2.h ../include/openssl/ec.h -genrsa.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h -genrsa.o: ../include/openssl/engine.h ../include/openssl/err.h -genrsa.o: ../include/openssl/evp.h ../include/openssl/fips.h -genrsa.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h -genrsa.o: ../include/openssl/objects.h ../include/openssl/ocsp.h -genrsa.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -genrsa.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h -genrsa.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h -genrsa.o: ../include/openssl/rand.h ../include/openssl/rsa.h -genrsa.o: ../include/openssl/safestack.h ../include/openssl/sha.h -genrsa.o: ../include/openssl/stack.h ../include/openssl/store.h -genrsa.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h -genrsa.o: ../include/openssl/ui.h ../include/openssl/x509.h -genrsa.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h -genrsa.o: genrsa.c +genrsa.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h +genrsa.o: ../include/openssl/err.h ../include/openssl/evp.h +genrsa.o: ../include/openssl/fips.h ../include/openssl/lhash.h +genrsa.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +genrsa.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h +genrsa.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +genrsa.o: ../include/openssl/pem.h ../include/openssl/pem2.h +genrsa.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h +genrsa.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +genrsa.o: ../include/openssl/sha.h ../include/openssl/stack.h +genrsa.o: ../include/openssl/store.h ../include/openssl/symhacks.h +genrsa.o: ../include/openssl/txt_db.h ../include/openssl/ui.h +genrsa.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h +genrsa.o: ../include/openssl/x509v3.h apps.h genrsa.c nseq.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h nseq.o: ../include/openssl/buffer.h ../include/openssl/conf.h nseq.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h -nseq.o: ../include/openssl/ec.h ../include/openssl/ecdh.h -nseq.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h -nseq.o: ../include/openssl/err.h ../include/openssl/evp.h -nseq.o: ../include/openssl/fips.h ../include/openssl/lhash.h -nseq.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h -nseq.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h -nseq.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h -nseq.o: ../include/openssl/pem.h ../include/openssl/pem2.h -nseq.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h -nseq.o: ../include/openssl/sha.h ../include/openssl/stack.h -nseq.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h -nseq.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h -nseq.o: ../include/openssl/x509v3.h apps.h nseq.c +nseq.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h +nseq.o: ../include/openssl/engine.h ../include/openssl/err.h +nseq.o: ../include/openssl/evp.h ../include/openssl/fips.h +nseq.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h +nseq.o: ../include/openssl/objects.h ../include/openssl/ocsp.h +nseq.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +nseq.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h +nseq.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h +nseq.o: ../include/openssl/safestack.h ../include/openssl/sha.h +nseq.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +nseq.o: ../include/openssl/txt_db.h ../include/openssl/x509.h +nseq.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h nseq.c ocsp.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h ocsp.o: ../include/openssl/bn.h ../include/openssl/buffer.h ocsp.o: ../include/openssl/comp.h ../include/openssl/conf.h ocsp.o: ../include/openssl/crypto.h ../include/openssl/dtls1.h ocsp.o: ../include/openssl/e_os2.h ../include/openssl/ec.h -ocsp.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h -ocsp.o: ../include/openssl/engine.h ../include/openssl/err.h -ocsp.o: ../include/openssl/evp.h ../include/openssl/fips.h -ocsp.o: ../include/openssl/hmac.h ../include/openssl/kssl.h -ocsp.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h -ocsp.o: ../include/openssl/objects.h ../include/openssl/ocsp.h -ocsp.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -ocsp.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h -ocsp.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h -ocsp.o: ../include/openssl/pq_compat.h ../include/openssl/pqueue.h -ocsp.o: ../include/openssl/safestack.h ../include/openssl/sha.h -ocsp.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h -ocsp.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h -ocsp.o: ../include/openssl/stack.h ../include/openssl/symhacks.h -ocsp.o: ../include/openssl/tls1.h ../include/openssl/txt_db.h -ocsp.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h -ocsp.o: ../include/openssl/x509v3.h apps.h ocsp.c +ocsp.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h +ocsp.o: ../include/openssl/err.h ../include/openssl/evp.h +ocsp.o: ../include/openssl/fips.h ../include/openssl/hmac.h +ocsp.o: ../include/openssl/kssl.h ../include/openssl/lhash.h +ocsp.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +ocsp.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h +ocsp.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +ocsp.o: ../include/openssl/pem.h ../include/openssl/pem2.h +ocsp.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h +ocsp.o: ../include/openssl/pqueue.h ../include/openssl/safestack.h +ocsp.o: ../include/openssl/sha.h ../include/openssl/ssl.h +ocsp.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h +ocsp.o: ../include/openssl/ssl3.h ../include/openssl/stack.h +ocsp.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h +ocsp.o: ../include/openssl/txt_db.h ../include/openssl/x509.h +ocsp.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h ocsp.c openssl.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h openssl.o: ../include/openssl/bn.h ../include/openssl/buffer.h openssl.o: ../include/openssl/comp.h ../include/openssl/conf.h openssl.o: ../include/openssl/crypto.h ../include/openssl/dtls1.h openssl.o: ../include/openssl/e_os2.h ../include/openssl/ec.h -openssl.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h -openssl.o: ../include/openssl/engine.h ../include/openssl/err.h *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 16:25:02 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C90E8106567E; Mon, 2 Jul 2012 16:25:02 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from mail.xcllnt.net (mail.xcllnt.net [70.36.220.4]) by mx1.freebsd.org (Postfix) with ESMTP id A382F8FC1F; Mon, 2 Jul 2012 16:25:02 +0000 (UTC) Received: from sa-nc-common-101.static.jnpr.net (natint3.juniper.net [66.129.224.36]) (authenticated bits=0) by mail.xcllnt.net (8.14.5/8.14.5) with ESMTP id q62GOqCB005002 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Mon, 2 Jul 2012 09:24:59 -0700 (PDT) (envelope-from marcel@xcllnt.net) Mime-Version: 1.0 (Apple Message framework v1278) Content-Type: text/plain; charset=us-ascii From: Marcel Moolenaar In-Reply-To: <201207021528.q62FSoot078093@svn.freebsd.org> Date: Mon, 2 Jul 2012 09:24:56 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <20CFC0F6-1EF9-4F01-881D-78B8E2811AD0@xcllnt.net> References: <201207021528.q62FSoot078093@svn.freebsd.org> To: Baptiste Daroussin , Dag-Erling Sm?rgrav X-Mailer: Apple Mail (2.1278) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r237997 - in head: tools/build/mk tools/build/options usr.sbin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 16:25:03 -0000 On Jul 2, 2012, at 8:28 AM, Baptiste Daroussin wrote: > Author: bapt > Date: Mon Jul 2 15:28:50 2012 > New Revision: 237997 > URL: http://svn.freebsd.org/changeset/base/237997 >=20 > Log: > New build KNOB: WITHOUT_PKGBOOTSTRAP to condition building of = usr.sbin/pkg > Do not condition usr.sbin/pkg building on WITHOUT_PKGTOOLS anymore, = so that users can > remove the old pkg_* tools without removing the pkgng boostrap This broke the build for 2 reasons: 1. You misspelled the option in usr.sbin/Makefile 2. You don't have the option in share/mk/bsd.own.mk Can you fix is soon or do you want me to fix it? --=20 Marcel Moolenaar marcel@xcllnt.net From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 16:32:47 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A280C1065799; Mon, 2 Jul 2012 16:32:47 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from mail.xcllnt.net (mail.xcllnt.net [70.36.220.4]) by mx1.freebsd.org (Postfix) with ESMTP id 7F5108FC18; Mon, 2 Jul 2012 16:32:47 +0000 (UTC) Received: from sa-nc-common-101.static.jnpr.net (natint3.juniper.net [66.129.224.36]) (authenticated bits=0) by mail.xcllnt.net (8.14.5/8.14.5) with ESMTP id q62GWc3Y005021 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Mon, 2 Jul 2012 09:32:45 -0700 (PDT) (envelope-from marcel@xcllnt.net) Mime-Version: 1.0 (Apple Message framework v1278) Content-Type: text/plain; charset=us-ascii From: Marcel Moolenaar In-Reply-To: <201207021528.q62FSoot078093@svn.freebsd.org> Date: Mon, 2 Jul 2012 09:32:43 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <2B78C1CB-FC64-4C78-94D1-B01F02C02D2D@xcllnt.net> References: <201207021528.q62FSoot078093@svn.freebsd.org> To: Baptiste Daroussin , Dag-Erling Sm?rgrav X-Mailer: Apple Mail (2.1278) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r237997 - in head: tools/build/mk tools/build/options usr.sbin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 16:32:47 -0000 On Jul 2, 2012, at 8:28 AM, Baptiste Daroussin wrote: > Author: bapt > Date: Mon Jul 2 15:28:50 2012 > New Revision: 237997 > URL: http://svn.freebsd.org/changeset/base/237997 >=20 > Log: > New build KNOB: WITHOUT_PKGBOOTSTRAP to condition building of = usr.sbin/pkg > Do not condition usr.sbin/pkg building on WITHOUT_PKGTOOLS anymore, = so that users can > remove the old pkg_* tools without removing the pkgng boostrap Oh, and: > Added: head/tools/build/options/WITHOUT_PKGBOOSTRAP You have a typo in the options filename as well. With all those mistakes and typos, I cannot escape the notion that this = is a rushed commit or at least that it didn't get the attention it should = have gotten. Worse, it wasn't caught by your mentor. des: please give reviews more attention bapt: it sometimes helps to review your own patches as if they weren't = yours. you won't catch as much as a real 3rd party would, because they = are still your patches and you're bound to overlook stuff, but at = least you may catch some of the boneheaded stuff. HTH, --=20 Marcel Moolenaar marcel@xcllnt.net From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 16:33:55 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AC48D1065675; Mon, 2 Jul 2012 16:33:55 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 8EF1C8FC12; Mon, 2 Jul 2012 16:33:55 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q62GXtlo065050; Mon, 2 Jul 2012 16:33:55 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q62GXtID065049; Mon, 2 Jul 2012 16:33:55 GMT (envelope-from bapt@FreeBSD.org) X-Authentication-Warning: freefall.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f Date: Mon, 2 Jul 2012 16:33:52 +0000 From: Baptiste Daroussin To: Marcel Moolenaar Message-ID: <20120702163351.GC37018@ithaqua.etoilebsd.net> References: <201207021528.q62FSoot078093@svn.freebsd.org> <20CFC0F6-1EF9-4F01-881D-78B8E2811AD0@xcllnt.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="/e2eDi0V/xtL+Mc8" Content-Disposition: inline In-Reply-To: <20CFC0F6-1EF9-4F01-881D-78B8E2811AD0@xcllnt.net> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, Dag-Erling Sm?rgrav , svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r237997 - in head: tools/build/mk tools/build/options usr.sbin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 16:33:55 -0000 --/e2eDi0V/xtL+Mc8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jul 02, 2012 at 09:24:56AM -0700, Marcel Moolenaar wrote: >=20 > On Jul 2, 2012, at 8:28 AM, Baptiste Daroussin wrote: >=20 > > Author: bapt > > Date: Mon Jul 2 15:28:50 2012 > > New Revision: 237997 > > URL: http://svn.freebsd.org/changeset/base/237997 > >=20 > > Log: > > New build KNOB: WITHOUT_PKGBOOTSTRAP to condition building of usr.sbin= /pkg > > Do not condition usr.sbin/pkg building on WITHOUT_PKGTOOLS anymore, so= that users can > > remove the old pkg_* tools without removing the pkgng boostrap >=20 > This broke the build for 2 reasons: > 1. You misspelled the option in usr.sbin/Makefile > 2. You don't have the option in share/mk/bsd.own.mk >=20 > Can you fix is soon or do you want me to fix it? >=20 > --=20 > Marcel Moolenaar > marcel@xcllnt.net >=20 >=20 Arg sorry, can you fix it please, I'm about to be afk. regards, Bapt --/e2eDi0V/xtL+Mc8 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAk/xzW8ACgkQ8kTtMUmk6EzWUwCaAuT21Bo6NtgopqN3IE5/MrxB pWwAn3+9JsBli+b1REW2orAz8RU7Luyy =Xc7U -----END PGP SIGNATURE----- --/e2eDi0V/xtL+Mc8-- From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 16:40:11 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A3F7B106564A; Mon, 2 Jul 2012 16:40:11 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 90D608FC16; Mon, 2 Jul 2012 16:40:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q62GeB0r081948; Mon, 2 Jul 2012 16:40:11 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q62GeB49081946; Mon, 2 Jul 2012 16:40:11 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201207021640.q62GeB49081946@svn.freebsd.org> From: Michael Tuexen Date: Mon, 2 Jul 2012 16:40:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238002 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 16:40:11 -0000 Author: tuexen Date: Mon Jul 2 16:40:11 2012 New Revision: 238002 URL: http://svn.freebsd.org/changeset/base/238002 Log: Remove dead code (on FreeBSD) as suggested by glebius@. MFC after: 3 days Modified: head/sys/netinet/sctp_output.c Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Mon Jul 2 16:24:43 2012 (r238001) +++ head/sys/netinet/sctp_output.c Mon Jul 2 16:40:11 2012 (r238002) @@ -10811,7 +10811,6 @@ sctp_send_resp_msg(struct sockaddr *src, int len, cause_len, padding_len, ret; #ifdef INET - sctp_route_t ro; struct sockaddr_in *src_sin, *dst_sin; struct ip *ip; @@ -10979,8 +10978,6 @@ sctp_send_resp_msg(struct sockaddr *src, SCTP_ATTACH_CHAIN(o_pak, mout, len); #ifdef INET if (ip != NULL) { - /* zap the stack pointer to the route */ - bzero(&ro, sizeof(sctp_route_t)); if (port) { if (V_udp_cksum) { udp->uh_sum = in_pseudo(ip->ip_src.s_addr, ip->ip_dst.s_addr, udp->uh_ulen + htons(IPPROTO_UDP)); @@ -11013,11 +11010,7 @@ sctp_send_resp_msg(struct sockaddr *src, sctp_packet_log(o_pak); } #endif - SCTP_IP_OUTPUT(ret, o_pak, &ro, NULL, vrf_id); - /* Free the route if we got one back */ - if (ro.ro_rt) { - RTFREE(ro.ro_rt); - } + SCTP_IP_OUTPUT(ret, o_pak, NULL, NULL, vrf_id); } #endif #ifdef INET6 From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 16:42:34 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8F19A1065670; Mon, 2 Jul 2012 16:42:34 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 497C08FC18; Mon, 2 Jul 2012 16:42:34 +0000 (UTC) Received: by pbbro2 with SMTP id ro2so8460585pbb.13 for ; Mon, 02 Jul 2012 09:42:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=references:in-reply-to:mime-version:content-transfer-encoding :content-type:message-id:cc:x-mailer:from:subject:date:to; bh=ycvlWI19ysmYFiZHIoSDM5TKWqsr8sJV/nHTyPCJzFU=; b=nTAVUwO+f98M5jh4C3rQIbTKw4SarLoW5M1vHPjsJC9QWRA43hhNbnz3p+JxOVTKBD TZg+jkOnz5SFI1aVOck3R80skJMB92hpYmcG62Cum5npPyKJFfu2CXqf/d9KmLiVG0Lc xD+GP6z73s4qbR4Z9FO22Q8wE4F9cAmg//Mwz2Qs3qpJ4pghI6nkD2zWh3GUGk1IEW6q TTAAc+pf0XvccskwrwS4v596Z3KkK6w8a/o2eY6c6uw0hTpsbZZ2USXrRcYAGLbmRiBz WC+HDcmKGe0Hdf9nKnrlEPOXZ4AoKxkrzDQOxoH9yWSYIUi1lK3NdWJ/yJ5Aau/yheYK QujQ== Received: by 10.68.213.7 with SMTP id no7mr30592079pbc.3.1341247354074; Mon, 02 Jul 2012 09:42:34 -0700 (PDT) Received: from [10.71.80.97] (mobile-166-147-095-114.mycingular.net. [166.147.95.114]) by mx.google.com with ESMTPS id ot4sm13339516pbb.65.2012.07.02.09.42.32 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 02 Jul 2012 09:42:33 -0700 (PDT) References: <201207021528.q62FSoot078093@svn.freebsd.org> <2B78C1CB-FC64-4C78-94D1-B01F02C02D2D@xcllnt.net> In-Reply-To: <2B78C1CB-FC64-4C78-94D1-B01F02C02D2D@xcllnt.net> Mime-Version: 1.0 (1.0) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Message-Id: <5D283E88-BB45-4188-9EC4-7301A6232D01@gmail.com> X-Mailer: iPhone Mail (9B206) From: Garrett Cooper Date: Mon, 2 Jul 2012 09:42:24 -0700 To: Marcel Moolenaar Cc: "svn-src-head@FreeBSD.org" , Dag-Erling Sm?rgrav , Baptiste Daroussin , "src-committers@FreeBSD.org" , "svn-src-all@FreeBSD.org" Subject: Re: svn commit: r237997 - in head: tools/build/mk tools/build/options usr.sbin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 16:42:34 -0000 On Jul 2, 2012, at 9:32 AM, Marcel Moolenaar wrote: >=20 > On Jul 2, 2012, at 8:28 AM, Baptiste Daroussin wrote: >=20 >> Author: bapt >> Date: Mon Jul 2 15:28:50 2012 >> New Revision: 237997 >> URL: http://svn.freebsd.org/changeset/base/237997 >>=20 >> Log: >> New build KNOB: WITHOUT_PKGBOOTSTRAP to condition building of usr.sbin/pk= g >> Do not condition usr.sbin/pkg building on WITHOUT_PKGTOOLS anymore, so th= at users can >> remove the old pkg_* tools without removing the pkgng boostrap >=20 > Oh, and: >=20 >> Added: head/tools/build/options/WITHOUT_PKGBOOSTRAP >=20 > You have a typo in the options filename as well. >=20 > With all those mistakes and typos, I cannot escape the notion that this is= a > rushed commit or at least that it didn't get the attention it should have > gotten. Worse, it wasn't caught by your mentor. >=20 > des: please give reviews more attention > bapt: it sometimes helps to review your own patches as if they weren't you= rs. > you won't catch as much as a real 3rd party would, because they are > still your patches and you're bound to overlook stuff, but at least > you may catch some of the boneheaded stuff. The other thing is that src.conf(5) wasn't regenerated after the commit (the= knob and the src.conf commit should be done separately to as src.conf gener= ation is driven by $Revision$ in the knob file. Thanks, -Garrett= From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 16:44:10 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 58BEC106566C; Mon, 2 Jul 2012 16:44:10 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3B5C38FC1E; Mon, 2 Jul 2012 16:44:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q62GiAXF082147; Mon, 2 Jul 2012 16:44:10 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q62GiAtH082142; Mon, 2 Jul 2012 16:44:10 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201207021644.q62GiAtH082142@svn.freebsd.org> From: Michael Tuexen Date: Mon, 2 Jul 2012 16:44:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238003 - in head/sys: netinet netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 16:44:10 -0000 Author: tuexen Date: Mon Jul 2 16:44:09 2012 New Revision: 238003 URL: http://svn.freebsd.org/changeset/base/238003 Log: Move common code parts to sctp_common_input_processing(). MFC after: 3 days Modified: head/sys/netinet/sctp_input.c head/sys/netinet/sctp_input.h head/sys/netinet6/sctp6_usrreq.c Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Mon Jul 2 16:40:11 2012 (r238002) +++ head/sys/netinet/sctp_input.c Mon Jul 2 16:44:09 2012 (r238003) @@ -5590,26 +5590,141 @@ void sctp_common_input_processing(struct mbuf **mm, int iphlen, int offset, int length, struct sockaddr *src, struct sockaddr *dst, struct sctphdr *sh, struct sctp_chunkhdr *ch, - struct sctp_inpcb *inp, struct sctp_tcb *stcb, - struct sctp_nets *net, uint8_t ecn_bits, +#if !defined(SCTP_WITH_NO_CSUM) + uint8_t compute_crc, +#endif + uint8_t ecn_bits, uint8_t use_mflowid, uint32_t mflowid, uint32_t vrf_id, uint16_t port) { - /* - * Control chunk processing - */ uint32_t high_tsn; int fwd_tsn_seen = 0, data_processed = 0; struct mbuf *m = *mm; int un_sent; int cnt_ctrl_ready = 0; + struct sctp_inpcb *inp, *inp_decr = NULL; + struct sctp_tcb *stcb = NULL; + struct sctp_nets *net; SCTP_STAT_INCR(sctps_recvdatagrams); #ifdef SCTP_AUDITING_ENABLED sctp_audit_log(0xE0, 1); sctp_auditing(0, inp, stcb, net); #endif +#if !defined(SCTP_WITH_NO_CSUM) + if (compute_crc != 0) { + uint32_t check, calc_check; + check = sh->checksum; + sh->checksum = 0; + calc_check = sctp_calculate_cksum(m, iphlen); + sh->checksum = check; + 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", + calc_check, check, m, length, iphlen); + stcb = sctp_findassociation_addr(m, offset, src, dst, + sh, ch, &inp, &net, vrf_id); + if ((net != NULL) && (port != 0)) { + if (net->port == 0) { + sctp_pathmtu_adjustment(stcb, net->mtu - sizeof(struct udphdr)); + } + net->port = port; + } + if ((net != NULL) && (use_mflowid != 0)) { + net->flowid = mflowid; +#ifdef INVARIANTS + net->flowidset = 1; +#endif + } + if ((inp != NULL) && (stcb != NULL)) { + sctp_send_packet_dropped(stcb, net, m, length, iphlen, 1); + sctp_chunk_output(inp, stcb, SCTP_OUTPUT_FROM_INPUT_ERROR, SCTP_SO_NOT_LOCKED); + } else if ((inp != NULL) && (stcb == NULL)) { + inp_decr = inp; + } + SCTP_STAT_INCR(sctps_badsum); + SCTP_STAT_INCR_COUNTER32(sctps_checksumerrors); + goto out; + } + } +#endif + /* Destination port of 0 is illegal, based on RFC4960. */ + if (sh->dest_port == 0) { + SCTP_STAT_INCR(sctps_hdrops); + goto out; + } + stcb = sctp_findassociation_addr(m, offset, src, dst, + sh, ch, &inp, &net, vrf_id); + if ((net != NULL) && (port != 0)) { + if (net->port == 0) { + sctp_pathmtu_adjustment(stcb, net->mtu - sizeof(struct udphdr)); + } + net->port = port; + } + if ((net != NULL) && (use_mflowid != 0)) { + net->flowid = mflowid; +#ifdef INVARIANTS + net->flowidset = 1; +#endif + } + if (inp == NULL) { + SCTP_STAT_INCR(sctps_noport); + if (badport_bandlim(BANDLIM_SCTP_OOTB) < 0) { + goto out; + } + if (ch->chunk_type == SCTP_SHUTDOWN_ACK) { + sctp_send_shutdown_complete2(src, dst, sh, + use_mflowid, mflowid, + vrf_id, port); + goto out; + } + if (ch->chunk_type == SCTP_SHUTDOWN_COMPLETE) { + goto out; + } + if (ch->chunk_type != SCTP_ABORT_ASSOCIATION) { + if ((SCTP_BASE_SYSCTL(sctp_blackhole) == 0) || + ((SCTP_BASE_SYSCTL(sctp_blackhole) == 1) && + (ch->chunk_type != SCTP_INIT))) { + sctp_send_abort(m, iphlen, src, dst, + sh, 0, NULL, + use_mflowid, mflowid, + vrf_id, port); + } + } + goto out; + } else if (stcb == NULL) { + inp_decr = inp; + } +#ifdef IPSEC + /*- + * I very much doubt any of the IPSEC stuff will work but I have no + * idea, so I will leave it in place. + */ + if (inp != NULL) { + switch (dst->sa_family) { +#ifdef INET + case AF_INET: + if (ipsec4_in_reject(m, &inp->ip_inp.inp)) { + MODULE_GLOBAL(ipsec4stat).in_polvio++; + SCTP_STAT_INCR(sctps_hdrops); + goto out; + } + break; +#endif +#ifdef INET6 + case AF_INET6: + if (ipsec6_in_reject(m, &inp->ip_inp.inp)) { + MODULE_GLOBAL(ipsec6stat).in_polvio++; + SCTP_STAT_INCR(sctps_hdrops); + goto out; + } + break; +#endif + default: + break; + } + } +#endif SCTPDBG(SCTP_DEBUG_INPUT1, "Ok, Common input processing called, m:%p iphlen:%d offset:%d length:%d stcb:%p\n", m, iphlen, offset, length, stcb); if (stcb) { @@ -5628,10 +5743,11 @@ sctp_common_input_processing(struct mbuf * NOT respond to any packet.. its OOTB. */ SCTP_TCB_UNLOCK(stcb); + stcb = NULL; sctp_handle_ootb(m, iphlen, offset, src, dst, sh, inp, use_mflowid, mflowid, vrf_id, port); - goto out_now; + goto out; } } if (IS_SCTP_CONTROL(ch)) { @@ -5671,21 +5787,19 @@ sctp_common_input_processing(struct mbuf sctp_auth_is_required_chunk(SCTP_DATA, stcb->asoc.local_auth_chunks)) { /* "silently" ignore */ SCTP_STAT_INCR(sctps_recvauthmissing); - SCTP_TCB_UNLOCK(stcb); - goto out_now; + goto out; } if (stcb == NULL) { /* out of the blue DATA chunk */ sctp_handle_ootb(m, iphlen, offset, src, dst, sh, inp, use_mflowid, mflowid, vrf_id, port); - goto out_now; + goto out; } if (stcb->asoc.my_vtag != ntohl(sh->v_tag)) { /* v_tag mismatch! */ SCTP_STAT_INCR(sctps_badvtag); - SCTP_TCB_UNLOCK(stcb); - goto out_now; + goto out; } } @@ -5695,7 +5809,7 @@ sctp_common_input_processing(struct mbuf * packet while processing control, or we're done with this * packet (done or skip rest of data), so we drop it... */ - goto out_now; + goto out; } /* * DATA chunk processing @@ -5749,8 +5863,7 @@ sctp_common_input_processing(struct mbuf sctp_handle_ootb(m, iphlen, offset, src, dst, sh, inp, use_mflowid, mflowid, vrf_id, port); - SCTP_TCB_UNLOCK(stcb); - goto out_now; + goto out; /* sa_ignore NOTREACHED */ break; case SCTP_STATE_EMPTY: /* should not happen */ @@ -5758,8 +5871,7 @@ sctp_common_input_processing(struct mbuf case SCTP_STATE_SHUTDOWN_RECEIVED: /* This is a peer error */ case SCTP_STATE_SHUTDOWN_ACK_SENT: default: - SCTP_TCB_UNLOCK(stcb); - goto out_now; + goto out; /* sa_ignore NOTREACHED */ break; case SCTP_STATE_OPEN: @@ -5777,7 +5889,8 @@ sctp_common_input_processing(struct mbuf * The association aborted, NO UNLOCK needed since * the association is destroyed. */ - goto out_now; + stcb = NULL; + goto out; } data_processed = 1; /* @@ -5834,10 +5947,20 @@ trigger_send: sctp_audit_log(0xE0, 3); sctp_auditing(2, inp, stcb, net); #endif - SCTP_TCB_UNLOCK(stcb); -out_now: +out: + if (stcb != NULL) { + SCTP_TCB_UNLOCK(stcb); + } + if (inp_decr != NULL) { + /* reduce ref-count */ + SCTP_INP_WLOCK(inp_decr); + SCTP_INP_DECR_REF(inp_decr); + SCTP_INP_WUNLOCK(inp_decr); + } #ifdef INVARIANTS - sctp_validate_no_locks(inp); + if (inp != NULL) { + sctp_validate_no_locks(inp); + } #endif return; } @@ -5867,18 +5990,14 @@ sctp_input_with_port(struct mbuf *i_pak, struct ip *ip; struct sctphdr *sh; struct sctp_chunkhdr *ch; - struct sctp_inpcb *inp = NULL; - struct sctp_tcb *stcb = NULL; - struct sctp_nets *net = NULL; - int refcount_up = 0; int length, offset; - uint32_t mflowid; - uint8_t use_mflowid; #if !defined(SCTP_WITH_NO_CSUM) - uint32_t check, calc_check; + uint8_t compute_crc; #endif + uint32_t mflowid; + uint8_t use_mflowid; iphlen = off; if (SCTP_GET_PKT_VRFID(i_pak, vrf_id)) { @@ -5903,6 +6022,11 @@ sctp_input_with_port(struct mbuf *i_pak, sctp_packet_log(m); } #endif + SCTPDBG(SCTP_DEBUG_CRCOFFLOAD, + "sctp_input(): Packet of length %d received on %s with csum_flags 0x%x.\n", + m->m_pkthdr.len, + if_name(m->m_pkthdr.rcvif), + m->m_pkthdr.csum_flags); if (m->m_flags & M_FLOWID) { mflowid = m->m_pkthdr.flowid; use_mflowid = 1; @@ -5936,161 +6060,42 @@ sctp_input_with_port(struct mbuf *i_pak, dst.sin_addr = ip->ip_dst; length = ip->ip_len + iphlen; /* Validate mbuf chain length with IP payload length. */ - if (SCTP_HEADER_LEN(i_pak) != length) { + if (SCTP_HEADER_LEN(m) != length) { SCTPDBG(SCTP_DEBUG_INPUT1, - "sctp_input() length:%d reported length:%d\n", length, SCTP_HEADER_LEN(i_pak)); + "sctp_input() length:%d reported length:%d\n", length, SCTP_HEADER_LEN(m)); SCTP_STAT_INCR(sctps_hdrops); - goto bad; + goto out; } /* SCTP does not allow broadcasts or multicasts */ if (IN_MULTICAST(ntohl(dst.sin_addr.s_addr))) { - goto bad; + goto out; } if (SCTP_IS_IT_BROADCAST(dst.sin_addr, m)) { - goto bad; + goto out; } - SCTPDBG(SCTP_DEBUG_INPUT1, - "sctp_input() length:%d iphlen:%d\n", length, iphlen); - SCTPDBG(SCTP_DEBUG_CRCOFFLOAD, - "sctp_input(): Packet of length %d received on %s with csum_flags 0x%x.\n", - m->m_pkthdr.len, - if_name(m->m_pkthdr.rcvif), - m->m_pkthdr.csum_flags); + ecn_bits = ip->ip_tos; #if defined(SCTP_WITH_NO_CSUM) SCTP_STAT_INCR(sctps_recvnocrc); #else if (m->m_pkthdr.csum_flags & CSUM_SCTP_VALID) { SCTP_STAT_INCR(sctps_recvhwcrc); - goto sctp_skip_csum; - } - check = sh->checksum; - sh->checksum = 0; - 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", - calc_check, check, m, length, iphlen); - stcb = sctp_findassociation_addr(m, offset, - (struct sockaddr *)&src, - (struct sockaddr *)&dst, - sh, ch, &inp, &net, vrf_id); - if ((net) && (port)) { - if (net->port == 0) { - sctp_pathmtu_adjustment(stcb, net->mtu - sizeof(struct udphdr)); - } - net->port = port; - } - if ((net != NULL) && (use_mflowid != 0)) { - net->flowid = mflowid; -#ifdef INVARIANTS - net->flowidset = 1; -#endif - } - if ((inp) && (stcb)) { - sctp_send_packet_dropped(stcb, net, m, length, iphlen, 1); - sctp_chunk_output(inp, stcb, SCTP_OUTPUT_FROM_INPUT_ERROR, SCTP_SO_NOT_LOCKED); - } else if ((inp != NULL) && (stcb == NULL)) { - refcount_up = 1; - } - SCTP_STAT_INCR(sctps_badsum); - SCTP_STAT_INCR_COUNTER32(sctps_checksumerrors); - goto bad; - } -sctp_skip_csum: -#endif - /* destination port of 0 is illegal, based on RFC2960. */ - if (sh->dest_port == 0) { - SCTP_STAT_INCR(sctps_hdrops); - goto bad; - } - stcb = sctp_findassociation_addr(m, offset, - (struct sockaddr *)&src, - (struct sockaddr *)&dst, - sh, ch, &inp, &net, vrf_id); - if ((net) && (port)) { - if (net->port == 0) { - sctp_pathmtu_adjustment(stcb, net->mtu - sizeof(struct udphdr)); - } - net->port = port; - } - if ((net != NULL) && (use_mflowid != 0)) { - net->flowid = mflowid; -#ifdef INVARIANTS - net->flowidset = 1; -#endif - } - if (inp == NULL) { - SCTP_STAT_INCR(sctps_noport); - if (badport_bandlim(BANDLIM_SCTP_OOTB) < 0) - goto bad; - if (ch->chunk_type == SCTP_SHUTDOWN_ACK) { - sctp_send_shutdown_complete2((struct sockaddr *)&src, - (struct sockaddr *)&dst, - sh, - use_mflowid, mflowid, - vrf_id, port); - goto bad; - } - if (ch->chunk_type == SCTP_SHUTDOWN_COMPLETE) { - goto bad; - } - if (ch->chunk_type != SCTP_ABORT_ASSOCIATION) { - if ((SCTP_BASE_SYSCTL(sctp_blackhole) == 0) || - ((SCTP_BASE_SYSCTL(sctp_blackhole) == 1) && - (ch->chunk_type != SCTP_INIT))) { - sctp_send_abort(m, iphlen, - (struct sockaddr *)&src, - (struct sockaddr *)&dst, - sh, 0, NULL, - use_mflowid, mflowid, - vrf_id, port); - } - } - goto bad; - } else if (stcb == NULL) { - refcount_up = 1; - } -#ifdef IPSEC - /*- - * I very much doubt any of the IPSEC stuff will work but I have no - * idea, so I will leave it in place. - */ - if (inp && ipsec4_in_reject(m, &inp->ip_inp.inp)) { - MODULE_GLOBAL(ipsec4stat).in_polvio++; - SCTP_STAT_INCR(sctps_hdrops); - goto bad; + compute_crc = 0; + } else { + SCTP_STAT_INCR(sctps_recvswcrc); + compute_crc = 1; } #endif - - ecn_bits = ip->ip_tos; - /* sa_ignore NO_NULL_CHK */ sctp_common_input_processing(&m, iphlen, offset, length, (struct sockaddr *)&src, (struct sockaddr *)&dst, - sh, ch, inp, stcb, net, ecn_bits, + sh, ch, +#if !defined(SCTP_WITH_NO_CSUM) + compute_crc, +#endif + ecn_bits, use_mflowid, mflowid, vrf_id, port); - if (m) { - sctp_m_freem(m); - } - if ((inp) && (refcount_up)) { - /* reduce ref-count */ - SCTP_INP_WLOCK(inp); - SCTP_INP_DECR_REF(inp); - SCTP_INP_WUNLOCK(inp); - } - return; -bad: - if (stcb) { - SCTP_TCB_UNLOCK(stcb); - } - if ((inp) && (refcount_up)) { - /* reduce ref-count */ - SCTP_INP_WLOCK(inp); - SCTP_INP_DECR_REF(inp); - SCTP_INP_WUNLOCK(inp); - } +out: if (m) { sctp_m_freem(m); } Modified: head/sys/netinet/sctp_input.h ============================================================================== --- head/sys/netinet/sctp_input.h Mon Jul 2 16:40:11 2012 (r238002) +++ head/sys/netinet/sctp_input.h Mon Jul 2 16:44:09 2012 (r238003) @@ -41,8 +41,10 @@ void sctp_common_input_processing(struct mbuf **, int, int, int, struct sockaddr *, struct sockaddr *, struct sctphdr *, struct sctp_chunkhdr *, - struct sctp_inpcb *, struct sctp_tcb *, - struct sctp_nets *, uint8_t, +#if !defined(SCTP_WITH_NO_CSUM) + uint8_t, +#endif + uint8_t, uint8_t, uint32_t, uint32_t, uint16_t); Modified: head/sys/netinet6/sctp6_usrreq.c ============================================================================== --- head/sys/netinet6/sctp6_usrreq.c Mon Jul 2 16:40:11 2012 (r238002) +++ head/sys/netinet6/sctp6_usrreq.c Mon Jul 2 16:44:09 2012 (r238003) @@ -69,24 +69,20 @@ sctp6_input(struct mbuf **i_pak, int *of { struct mbuf *m; int iphlen; - uint32_t vrf_id = 0; + uint32_t vrf_id; uint8_t ecn_bits; struct sockaddr_in6 src, dst; struct ip6_hdr *ip6; struct sctphdr *sh; struct sctp_chunkhdr *ch; - struct sctp_inpcb *inp = NULL; - struct sctp_tcb *stcb = NULL; - struct sctp_nets *net = NULL; - int refcount_up = 0; int length, offset; - uint32_t mflowid; - uint8_t use_mflowid; #if !defined(SCTP_WITH_NO_CSUM) - uint32_t check, calc_check; + uint8_t compute_crc; #endif + uint32_t mflowid; + uint8_t use_mflowid; uint16_t port = 0; iphlen = *offp; @@ -112,6 +108,11 @@ sctp6_input(struct mbuf **i_pak, int *of sctp_packet_log(m); } #endif + SCTPDBG(SCTP_DEBUG_CRCOFFLOAD, + "sctp6_input(): Packet of length %d received on %s with csum_flags 0x%x.\n", + m->m_pkthdr.len, + if_name(m->m_pkthdr.rcvif), + m->m_pkthdr.csum_flags); if (m->m_flags & M_FLOWID) { mflowid = m->m_pkthdr.flowid; use_mflowid = 1; @@ -122,8 +123,8 @@ sctp6_input(struct mbuf **i_pak, int *of SCTP_STAT_INCR(sctps_recvpackets); SCTP_STAT_INCR_COUNTER64(sctps_inpackets); /* Get IP, SCTP, and first chunk header together in the first mbuf. */ - ip6 = mtod(m, struct ip6_hdr *); offset = iphlen + sizeof(struct sctphdr) + sizeof(struct sctp_chunkhdr); + ip6 = mtod(m, struct ip6_hdr *); IP6_EXTHDR_GET(sh, struct sctphdr *, m, iphlen, (int)(sizeof(struct sctphdr) + sizeof(struct sctp_chunkhdr))); if (sh == NULL) { @@ -138,7 +139,7 @@ sctp6_input(struct mbuf **i_pak, int *of src.sin6_port = sh->src_port; src.sin6_addr = ip6->ip6_src; if (in6_setscope(&src.sin6_addr, m->m_pkthdr.rcvif, NULL) != 0) { - goto bad; + goto out; } memset(&dst, 0, sizeof(struct sockaddr_in6)); dst.sin6_family = AF_INET6; @@ -146,165 +147,46 @@ sctp6_input(struct mbuf **i_pak, int *of dst.sin6_port = sh->dest_port; dst.sin6_addr = ip6->ip6_dst; if (in6_setscope(&dst.sin6_addr, m->m_pkthdr.rcvif, NULL) != 0) { - goto bad; + goto out; } if (faithprefix_p != NULL && (*faithprefix_p) (&dst.sin6_addr)) { /* XXX send icmp6 host/port unreach? */ - goto bad; + goto out; } length = ntohs(ip6->ip6_plen) + iphlen; /* Validate mbuf chain length with IP payload length. */ - if (SCTP_HEADER_LEN(*i_pak) != length) { + if (SCTP_HEADER_LEN(m) != length) { SCTPDBG(SCTP_DEBUG_INPUT1, - "sctp6_input() length:%d reported length:%d\n", length, SCTP_HEADER_LEN(*i_pak)); + "sctp6_input() length:%d reported length:%d\n", length, SCTP_HEADER_LEN(m)); SCTP_STAT_INCR(sctps_hdrops); - goto bad; + goto out; } if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst)) { - goto bad; + goto out; } - SCTPDBG(SCTP_DEBUG_INPUT1, - "sctp6_input() length:%d iphlen:%d\n", length, iphlen); - SCTPDBG(SCTP_DEBUG_CRCOFFLOAD, - "sctp6_input(): Packet of length %d received on %s with csum_flags 0x%x.\n", - m->m_pkthdr.len, - if_name(m->m_pkthdr.rcvif), - m->m_pkthdr.csum_flags); + ecn_bits = ((ntohl(ip6->ip6_flow) >> 20) & 0x000000ff); #if defined(SCTP_WITH_NO_CSUM) SCTP_STAT_INCR(sctps_recvnocrc); #else if (m->m_pkthdr.csum_flags & CSUM_SCTP_VALID) { SCTP_STAT_INCR(sctps_recvhwcrc); - goto sctp_skip_csum; - } - check = sh->checksum; - sh->checksum = 0; - 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", - calc_check, check, m, length, iphlen); - stcb = sctp_findassociation_addr(m, offset, - (struct sockaddr *)&src, - (struct sockaddr *)&dst, - sh, ch, &inp, &net, vrf_id); - if ((net) && (port)) { - if (net->port == 0) { - sctp_pathmtu_adjustment(stcb, net->mtu - sizeof(struct udphdr)); - } - net->port = port; - } - if ((net != NULL) && (use_mflowid != 0)) { - net->flowid = mflowid; -#ifdef INVARIANTS - net->flowidset = 1; -#endif - } - if ((inp) && (stcb)) { - sctp_send_packet_dropped(stcb, net, m, length, iphlen, 1); - sctp_chunk_output(inp, stcb, SCTP_OUTPUT_FROM_INPUT_ERROR, SCTP_SO_NOT_LOCKED); - } else if ((inp != NULL) && (stcb == NULL)) { - refcount_up = 1; - } - SCTP_STAT_INCR(sctps_badsum); - SCTP_STAT_INCR_COUNTER32(sctps_checksumerrors); - goto bad; - } -sctp_skip_csum: -#endif - /* destination port of 0 is illegal, based on RFC2960. */ - if (sh->dest_port == 0) { - SCTP_STAT_INCR(sctps_hdrops); - goto bad; - } - stcb = sctp_findassociation_addr(m, offset, - (struct sockaddr *)&src, - (struct sockaddr *)&dst, - sh, ch, &inp, &net, vrf_id); - if ((net) && (port)) { - if (net->port == 0) { - sctp_pathmtu_adjustment(stcb, net->mtu - sizeof(struct udphdr)); - } - net->port = port; - } - if ((net != NULL) && (use_mflowid != 0)) { - net->flowid = mflowid; -#ifdef INVARIANTS - net->flowidset = 1; -#endif - } - if (inp == NULL) { - SCTP_STAT_INCR(sctps_noport); - if (badport_bandlim(BANDLIM_SCTP_OOTB) < 0) - goto bad; - if (ch->chunk_type == SCTP_SHUTDOWN_ACK) { - sctp_send_shutdown_complete2((struct sockaddr *)&src, - (struct sockaddr *)&dst, - sh, - use_mflowid, mflowid, - vrf_id, port); - goto bad; - } - if (ch->chunk_type == SCTP_SHUTDOWN_COMPLETE) { - goto bad; - } - if (ch->chunk_type != SCTP_ABORT_ASSOCIATION) { - if ((SCTP_BASE_SYSCTL(sctp_blackhole) == 0) || - ((SCTP_BASE_SYSCTL(sctp_blackhole) == 1) && - (ch->chunk_type != SCTP_INIT))) { - sctp_send_abort(m, iphlen, - (struct sockaddr *)&src, - (struct sockaddr *)&dst, - sh, 0, NULL, - use_mflowid, mflowid, - vrf_id, port); - } - } - goto bad; - } else if (stcb == NULL) { - refcount_up = 1; - } -#ifdef IPSEC - /*- - * I very much doubt any of the IPSEC stuff will work but I have no - * idea, so I will leave it in place. - */ - if (inp && ipsec6_in_reject(m, &inp->ip_inp.inp)) { - MODULE_GLOBAL(ipsec6stat).in_polvio++; - SCTP_STAT_INCR(sctps_hdrops); - goto bad; + compute_crc = 0; + } else { + SCTP_STAT_INCR(sctps_recvswcrc); + compute_crc = 1; } #endif - - ecn_bits = ((ntohl(ip6->ip6_flow) >> 20) & 0x000000ff); - /* sa_ignore NO_NULL_CHK */ sctp_common_input_processing(&m, iphlen, offset, length, (struct sockaddr *)&src, (struct sockaddr *)&dst, - sh, ch, inp, stcb, net, ecn_bits, + sh, ch, +#if !defined(SCTP_WITH_NO_CSUM) + compute_crc, +#endif + ecn_bits, use_mflowid, mflowid, vrf_id, port); - if (m) { - sctp_m_freem(m); - } - if ((inp) && (refcount_up)) { - /* reduce ref-count */ - SCTP_INP_WLOCK(inp); - SCTP_INP_DECR_REF(inp); - SCTP_INP_WUNLOCK(inp); - } - return (IPPROTO_DONE); -bad: - if (stcb) { - SCTP_TCB_UNLOCK(stcb); - } - if ((inp) && (refcount_up)) { - /* reduce ref-count */ - SCTP_INP_WLOCK(inp); - SCTP_INP_DECR_REF(inp); - SCTP_INP_WUNLOCK(inp); - } +out: if (m) { sctp_m_freem(m); } From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 16:49:24 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AA478106566C; Mon, 2 Jul 2012 16:49:24 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from mail.xcllnt.net (mail.xcllnt.net [70.36.220.4]) by mx1.freebsd.org (Postfix) with ESMTP id 85FCB8FC0C; Mon, 2 Jul 2012 16:49:24 +0000 (UTC) Received: from sa-nc-common-101.static.jnpr.net (natint3.juniper.net [66.129.224.36]) (authenticated bits=0) by mail.xcllnt.net (8.14.5/8.14.5) with ESMTP id q62GnIkD005112 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Mon, 2 Jul 2012 09:49:22 -0700 (PDT) (envelope-from marcel@xcllnt.net) Mime-Version: 1.0 (Apple Message framework v1278) Content-Type: text/plain; charset=us-ascii From: Marcel Moolenaar In-Reply-To: <20120702163351.GC37018@ithaqua.etoilebsd.net> Date: Mon, 2 Jul 2012 09:49:22 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201207021528.q62FSoot078093@svn.freebsd.org> <20CFC0F6-1EF9-4F01-881D-78B8E2811AD0@xcllnt.net> <20120702163351.GC37018@ithaqua.etoilebsd.net> To: Baptiste Daroussin X-Mailer: Apple Mail (2.1278) Cc: svn-src-head@FreeBSD.org, Dag-Erling Sm?rgrav , svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r237997 - in head: tools/build/mk tools/build/options usr.sbin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 16:49:24 -0000 On Jul 2, 2012, at 9:33 AM, Baptiste Daroussin wrote: > On Mon, Jul 02, 2012 at 09:24:56AM -0700, Marcel Moolenaar wrote: >>=20 >> On Jul 2, 2012, at 8:28 AM, Baptiste Daroussin wrote: >>=20 >>> Author: bapt >>> Date: Mon Jul 2 15:28:50 2012 >>> New Revision: 237997 >>> URL: http://svn.freebsd.org/changeset/base/237997 >>>=20 >>> Log: >>> New build KNOB: WITHOUT_PKGBOOTSTRAP to condition building of = usr.sbin/pkg >>> Do not condition usr.sbin/pkg building on WITHOUT_PKGTOOLS anymore, = so that users can >>> remove the old pkg_* tools without removing the pkgng boostrap >>=20 >> This broke the build for 2 reasons: >> 1. You misspelled the option in usr.sbin/Makefile >> 2. You don't have the option in share/mk/bsd.own.mk >>=20 >> Can you fix is soon or do you want me to fix it? >>=20 >> --=20 >> Marcel Moolenaar >> marcel@xcllnt.net >>=20 >>=20 >=20 > Arg sorry, can you fix it please, I'm about to be afk. Will do. Next time, please don't commit stuff right before going away. --=20 Marcel Moolenaar marcel@xcllnt.net From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 16:57:14 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 36B20106564A; Mon, 2 Jul 2012 16:57:14 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 22E638FC14; Mon, 2 Jul 2012 16:57:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q62GvDxn082720; Mon, 2 Jul 2012 16:57:13 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q62GvD7j082717; Mon, 2 Jul 2012 16:57:13 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201207021657.q62GvD7j082717@svn.freebsd.org> From: Sean Bruno Date: Mon, 2 Jul 2012 16:57:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238004 - in head: etc/rc.d sys/dev/acpica X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 16:57:14 -0000 Author: sbruno Date: Mon Jul 2 16:57:13 2012 New Revision: 238004 URL: http://svn.freebsd.org/changeset/base/238004 Log: Cosmetic display change of Cx states via cx_supported sysctl entries. Adjust power_profile script to handle the new world order as well. Some vendors are opting out of a C2 state and only defining C1 & C3. This leads the acpi_cpu display to indicate that the machine supports C1 & C2 which is caused by the (mis)use of the index of the cx_state array as the ACPI_STATE_CX value. e.g. the code was pretending that cx_state[i] would always convert to i by subtracting 1. cx_state[2] == ACPI_STATE_C3 cx_state[1] == ACPI_STATE_C2 cx_state[0] == ACPI_STATE_C1 however, on certain machines this would lead to cx_state[1] == ACPI_STATE_C3 cx_state[0] == ACPI_STATE_C1 This didn't break anything but led to a display of: * dev.cpu.0.cx_supported: C1/1 C2/96 Instead of * dev.cpu.0.cx_supported: C1/1 C3/96 MFC after: 2 weeks Modified: head/etc/rc.d/power_profile head/sys/dev/acpica/acpi_cpu.c Modified: head/etc/rc.d/power_profile ============================================================================== --- head/etc/rc.d/power_profile Mon Jul 2 16:44:09 2012 (r238003) +++ head/etc/rc.d/power_profile Mon Jul 2 16:57:13 2012 (r238004) @@ -90,7 +90,7 @@ node="dev.cpu.0.freq" highest_value="`(sysctl -n dev.cpu.0.freq_levels | \ awk '{ split($0, a, "[/ ]"); print a[1] }' -) 2> /dev/null`" lowest_value="`(sysctl -n dev.cpu.0.freq_levels | \ - awk '{ split($0, a, "[/ ]"); print a[length(a) - 1] }' -) 2> /dev/null`" + awk '{ split($0, a, "[ /]"); print a[length(a) - 1] }' -) 2> /dev/null`" eval value=\$${profile}_cpu_freq sysctl_set Modified: head/sys/dev/acpica/acpi_cpu.c ============================================================================== --- head/sys/dev/acpica/acpi_cpu.c Mon Jul 2 16:44:09 2012 (r238003) +++ head/sys/dev/acpica/acpi_cpu.c Mon Jul 2 16:57:13 2012 (r238004) @@ -88,7 +88,7 @@ struct acpi_cpu_softc { /* Values for sysctl. */ struct sysctl_ctx_list cpu_sysctl_ctx; struct sysctl_oid *cpu_sysctl_tree; - int cpu_cx_lowest; + int cpu_cx_lowest; /* Index of lowest Cx state in cpu_cx_states[] */ char cpu_cx_supported[64]; int cpu_rid; }; @@ -144,7 +144,8 @@ static int cpu_cx_count; /* Number of static struct sysctl_ctx_list cpu_sysctl_ctx; static struct sysctl_oid *cpu_sysctl_tree; static int cpu_cx_generic; -static int cpu_cx_lowest; +/* Lowest valid Cstate for all cpus -- Cx */ +static int global_lowest_cstate; static device_t *cpu_devices; static int cpu_ndevices; @@ -871,7 +872,7 @@ acpi_cpu_startup(void *arg) "Global lowest Cx sleep state to use"); /* Take over idling from cpu_idle_default(). */ - cpu_cx_lowest = 0; + global_lowest_cstate = 0; cpu_disable_idle = FALSE; cpu_idle_hook = acpi_cpu_idle; } @@ -889,7 +890,8 @@ acpi_cpu_cx_list(struct acpi_cpu_softc * sbuf_new(&sb, sc->cpu_cx_supported, sizeof(sc->cpu_cx_supported), SBUF_FIXEDLEN); for (i = 0; i < sc->cpu_cx_count; i++) { - sbuf_printf(&sb, "C%d/%d ", i + 1, sc->cpu_cx_states[i].trans_lat); + sbuf_printf(&sb, "C%d/%d ", sc->cpu_cx_states[i].type, + sc->cpu_cx_states[i].trans_lat); if (sc->cpu_cx_states[i].type < ACPI_STATE_C3) sc->cpu_non_c3 = i; else @@ -963,9 +965,10 @@ acpi_cpu_idle() /* Find the lowest state that has small enough latency. */ cx_next_idx = 0; - if (cpu_disable_deep_sleep) + if (cpu_disable_deep_sleep) { + /* Chose the lowest valid index in the cpu_cx_states array */ i = min(sc->cpu_cx_lowest, sc->cpu_non_c3); - else + } else i = sc->cpu_cx_lowest; for (; i >= 0; i--) { if (sc->cpu_cx_states[i].trans_lat * 3 <= sc->cpu_prev_sleep) { @@ -1080,8 +1083,8 @@ acpi_cpu_notify(ACPI_HANDLE h, UINT32 no if (isc->cpu_cx_count > cpu_cx_count) cpu_cx_count = isc->cpu_cx_count; } - if (sc->cpu_cx_lowest < cpu_cx_lowest) - acpi_cpu_set_cx_lowest(sc, min(cpu_cx_lowest, sc->cpu_cx_count - 1)); + if (sc->cpu_cx_lowest < global_lowest_cstate) + acpi_cpu_set_cx_lowest(sc, sc->cpu_cx_states[sc->cpu_cx_lowest].type); ACPI_SERIAL_END(cpu); } @@ -1208,13 +1211,31 @@ acpi_cpu_usage_sysctl(SYSCTL_HANDLER_ARG return (0); } +/* + * val is the ACPI_STATE_CX enum request by the caller + */ static int acpi_cpu_set_cx_lowest(struct acpi_cpu_softc *sc, int val) { int i; ACPI_SERIAL_ASSERT(cpu); - sc->cpu_cx_lowest = val; + /* + * scan list of valid cstates. if we do no + * find a match to the requested val, return + * EINVAL + * once we match, set cpu_cx_lowest to the found + * index i + */ + for (i = 0; i < sc->cpu_cx_count; i++) { + if (sc->cpu_cx_states[i].type == val) { + sc->cpu_cx_lowest = i; + break; + } + } + if (i == sc->cpu_cx_count) + return (EINVAL); + /* If not disabling, cache the new lowest non-C3 state. */ sc->cpu_non_c3 = 0; @@ -1238,21 +1259,22 @@ acpi_cpu_cx_lowest_sysctl(SYSCTL_HANDLER int val, error; sc = (struct acpi_cpu_softc *) arg1; - snprintf(state, sizeof(state), "C%d", sc->cpu_cx_lowest + 1); + snprintf(state, sizeof(state), "C%d", + sc->cpu_cx_states[sc->cpu_cx_lowest].type); error = sysctl_handle_string(oidp, state, sizeof(state), req); if (error != 0 || req->newptr == NULL) return (error); if (strlen(state) < 2 || toupper(state[0]) != 'C') return (EINVAL); - val = (int) strtol(state + 1, NULL, 10) - 1; - if (val < 0 || val > sc->cpu_cx_count - 1) + val = (int) strtol(state + 1, NULL, 10); + if (val < 0 || val > MAX_CX_STATES) return (EINVAL); ACPI_SERIAL_BEGIN(cpu); - acpi_cpu_set_cx_lowest(sc, val); + error = acpi_cpu_set_cx_lowest(sc, val); ACPI_SERIAL_END(cpu); - return (0); + return (error); } static int @@ -1262,24 +1284,28 @@ acpi_cpu_global_cx_lowest_sysctl(SYSCTL_ char state[8]; int val, error, i; - snprintf(state, sizeof(state), "C%d", cpu_cx_lowest + 1); + snprintf(state, sizeof(state), "C%d", global_lowest_cstate); error = sysctl_handle_string(oidp, state, sizeof(state), req); if (error != 0 || req->newptr == NULL) return (error); if (strlen(state) < 2 || toupper(state[0]) != 'C') return (EINVAL); - val = (int) strtol(state + 1, NULL, 10) - 1; - if (val < 0 || val > cpu_cx_count - 1) + val = (int) strtol(state + 1, NULL, 10); + if (val < 0 || val > MAX_CX_STATES) return (EINVAL); - cpu_cx_lowest = val; /* Update the new lowest useable Cx state for all CPUs. */ ACPI_SERIAL_BEGIN(cpu); for (i = 0; i < cpu_ndevices; i++) { sc = device_get_softc(cpu_devices[i]); - acpi_cpu_set_cx_lowest(sc, min(val, sc->cpu_cx_count - 1)); + error = acpi_cpu_set_cx_lowest(sc, val); + if (error) { + ACPI_SERIAL_END(cpu); + return(error); + } } ACPI_SERIAL_END(cpu); + global_lowest_cstate = val; return (0); } From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 16:47:31 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C7C85106564A; Mon, 2 Jul 2012 16:47:31 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from mail.xcllnt.net (mail.xcllnt.net [70.36.220.4]) by mx1.freebsd.org (Postfix) with ESMTP id 9B0778FC14; Mon, 2 Jul 2012 16:47:31 +0000 (UTC) Received: from sa-nc-common-101.static.jnpr.net (natint3.juniper.net [66.129.224.36]) (authenticated bits=0) by mail.xcllnt.net (8.14.5/8.14.5) with ESMTP id q62GlMaj005108 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Mon, 2 Jul 2012 09:47:30 -0700 (PDT) (envelope-from marcel@xcllnt.net) Mime-Version: 1.0 (Apple Message framework v1278) Content-Type: multipart/mixed; boundary="Apple-Mail=_074765FA-A8EC-435F-BBA2-37458D24AF08" From: Marcel Moolenaar In-Reply-To: <370956AA-D028-4C44-B808-3160F0193069@bsdimp.com> Date: Mon, 2 Jul 2012 09:47:26 -0700 Message-Id: References: <201207010656.q616ufcY071880@svn.freebsd.org> <370956AA-D028-4C44-B808-3160F0193069@bsdimp.com> To: Warner Losh X-Mailer: Apple Mail (2.1278) X-Mailman-Approved-At: Mon, 02 Jul 2012 17:01:28 +0000 Cc: arm@freebsd.org, Warner Losh Subject: Re: svn commit: r237883 - in head/sys/arm: at91 conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 16:47:31 -0000 --Apple-Mail=_074765FA-A8EC-435F-BBA2-37458D24AF08 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On Jul 1, 2012, at 2:41 PM, Warner Losh wrote: >=20 >> I can port that to FreeBSD. Shall I make some patches for people >> to look at? >=20 > Sure. I'd love to see it. I'd be happy to preview any partial work = if you want early feedbac. See attached. It's fully functional and in production @Juniper. I hope = the last sync with FreeBSD didn't break anything. The change to sys/arm/include/cpufunc.h is needed to avoid a name class in cxgdb(4). That driver defines a structure field called intr_disable, which under ARM is renamed due to intr_disable being a macro. Turning it into an inline-function resulted in undefined symbols for I32_bit and F32_bit. Since those names are pretty bad to begin with, I added ARM_CPSR_I32 and ARM_CPSR_F32. BTW: we may be able to fix the duplicate symbol problem by using weak = symbols. For example, we have 10 definitions of "initarm". We can make them = unique, by renaming the functions and add a weak alias called "initarm". E.g, in sys/arm/mv/mv_machdep.c, rename initarm to mv_initarm() and add a weak alias for mv_initarm called initarm. When building for Marvell SoCs, initarm will resolve to mv_initarm. When building LINT, we only have to provide a non-weak dummy definition for initarm (and all the others that follow the same model) and we're good = to go. Maybe the dummy function could be used as a trampoline even that = resolves at runtime which of the SoC-specific initarm functions is to be called based on the SoC Id? --=20 Marcel Moolenaar marcel@xcllnt.net --Apple-Mail=_074765FA-A8EC-435F-BBA2-37458D24AF08 Content-Disposition: attachment; filename=arm.diff Content-Type: application/octet-stream; name="arm.diff" Content-Transfer-Encoding: 7bit Index: sys/arm/arm/cpufunc.c =================================================================== --- sys/arm/arm/cpufunc.c (revision 238362) +++ sys/arm/arm/cpufunc.c (working copy) @@ -74,7 +74,7 @@ __FBSDID("$FreeBSD$"); #include #endif -#if defined(CPU_XSCALE_81342) +#if defined(CPU_XSCALE_81342) && !defined(CPU_XSCALE_80321) #include #endif Index: sys/arm/conf/Makefile =================================================================== --- sys/arm/conf/Makefile (revision 0) +++ sys/arm/conf/Makefile (revision 0) @@ -0,0 +1,5 @@ +# $FreeBSD$ + +TARGET=arm + +.include "${.CURDIR}/../../conf/makeLINT.mk" Index: sys/arm/conf/NOTES =================================================================== --- sys/arm/conf/NOTES (revision 0) +++ sys/arm/conf/NOTES (revision 0) @@ -0,0 +1,85 @@ +# $FreeBSD$ + +cpu CPU_ARM9 +cpu CPU_ARM9E +cpu CPU_FA526 +cpu CPU_SA1100 +cpu CPU_SA1110 +cpu CPU_XSCALE_80219 +cpu CPU_XSCALE_80321 +cpu CPU_XSCALE_81342 +cpu CPU_XSCALE_IXP425 +cpu CPU_XSCALE_IXP435 +cpu CPU_XSCALE_PXA2X0 + +files "../at91/files.at91" +files "../at91/files.at91sam9" +files "../econa/files.econa" +files "../mv/files.mv" +files "../mv/discovery/files.db78xxx" +files "../mv/kirkwood/files.kirkwood" +files "../mv/kirkwood/files.sheevaplug" +files "../mv/orion/files.db88f5xxx" +files "../mv/orion/files.ts7800" +files "../s3c2xx0/files.s3c2xx0" +files "../sa11x0/files.sa11x0" +files "../xscale/i80321/files.ep80219" +files "../xscale/i80321/files.i80219" +files "../xscale/i80321/files.i80321" +files "../xscale/i80321/files.iq31244" +files "../xscale/i8134x/files.crb" +files "../xscale/i8134x/files.i81342" +files "../xscale/ixp425/files.avila" +files "../xscale/ixp425/files.ixp425" +files "../xscale/pxa/files.pxa" + +options PHYSADDR=0x00000000 +options KERNPHYSADDR=0x00000000 +options KERNVIRTADDR=0xc0000000 + +makeoptions LDFLAGS="-zmuldefs" +makeoptions KERNPHYSADDR=0x00000000 +makeoptions KERNVIRTADDR=0xc0000000 + +options FDT + +options SOC_MV_DISCOVERY +options SOC_MV_KIRKWOOD +options SOC_MV_ORION + +device pci + +device at91_board_bwct +device at91_board_hl200 +device at91_board_hl201 +device at91_board_kb920x +device at91_board_qila9g20 +device at91_board_sam9g20ek +device at91_board_tsc4370 +device board_ln2410sbc + +nooptions SMP +nooptions MAXCPU + +nooptions COMPAT_FREEBSD4 + +nodevice fdc +nodevice sym +nodevice ukbd + +nodevice sc +nodevice blank_saver +nodevice daemon_saver +nodevice dragon_saver +nodevice fade_saver +nodevice fire_saver +nodevice green_saver +nodevice logo_saver +nodevice rain_saver +nodevice snake_saver +nodevice star_saver +nodevice warp_saver + +nodevice pcii +nodevice snd_cmi +nodevice tnt4882 Index: sys/arm/include/cpufunc.h =================================================================== --- sys/arm/include/cpufunc.h (revision 238362) +++ sys/arm/include/cpufunc.h (working copy) @@ -579,20 +579,36 @@ __set_cpsr_c(u_int bic, u_int eor) return ret; } +#define ARM_CPSR_F32 (1 << 6) /* FIQ disable */ +#define ARM_CPSR_I32 (1 << 7) /* IRQ disable */ + #define disable_interrupts(mask) \ - (__set_cpsr_c((mask) & (I32_bit | F32_bit), \ - (mask) & (I32_bit | F32_bit))) + (__set_cpsr_c((mask) & (ARM_CPSR_I32 | ARM_CPSR_F32), \ + (mask) & (ARM_CPSR_I32 | ARM_CPSR_F32))) #define enable_interrupts(mask) \ - (__set_cpsr_c((mask) & (I32_bit | F32_bit), 0)) + (__set_cpsr_c((mask) & (ARM_CPSR_I32 | ARM_CPSR_F32), 0)) #define restore_interrupts(old_cpsr) \ - (__set_cpsr_c((I32_bit | F32_bit), (old_cpsr) & (I32_bit | F32_bit))) + (__set_cpsr_c((ARM_CPSR_I32 | ARM_CPSR_F32), \ + (old_cpsr) & (ARM_CPSR_I32 | ARM_CPSR_F32))) -#define intr_disable() \ - disable_interrupts(I32_bit | F32_bit) -#define intr_restore(s) \ - restore_interrupts(s) +static __inline register_t +intr_disable(void) +{ + register_t s; + + s = disable_interrupts(ARM_CPSR_I32 | ARM_CPSR_F32); + return (s); +} + +static __inline void +intr_restore(register_t s) +{ + + restore_interrupts(s); +} + /* Functions to manipulate the CPSR. */ u_int SetCPSR(u_int bic, u_int eor); u_int GetCPSR(void); Index: sys/arm/mv/mvreg.h =================================================================== --- sys/arm/mv/mvreg.h (revision 238362) +++ sys/arm/mv/mvreg.h (working copy) @@ -294,11 +294,10 @@ #define SAMPLE_AT_RESET 0x10 #elif defined(SOC_MV_KIRKWOOD) #define SAMPLE_AT_RESET 0x30 -#elif defined(SOC_MV_DISCOVERY) +#endif +#if defined(SOC_MV_DISCOVERY) #define SAMPLE_AT_RESET_LO 0x30 #define SAMPLE_AT_RESET_HI 0x34 -#else -#error SOC_MV_XX not defined #endif /* Index: sys/arm/mv/mvwin.h =================================================================== --- sys/arm/mv/mvwin.h (revision 238362) +++ sys/arm/mv/mvwin.h (working copy) @@ -173,6 +173,8 @@ #define MV_WIN_PCIE_MEM_ATTR 0x59 #define MV_WIN_PCIE_IO_TARGET 4 #define MV_WIN_PCIE_IO_ATTR 0x51 +#endif +#if defined(SOC_MV_ORION) #define MV_WIN_PCI_MEM_TARGET 3 #define MV_WIN_PCI_MEM_ATTR 0x59 #define MV_WIN_PCI_IO_TARGET 3 --Apple-Mail=_074765FA-A8EC-435F-BBA2-37458D24AF08-- From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 17:11:14 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AF3F21065674; Mon, 2 Jul 2012 17:11:14 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id A3A178FC08; Mon, 2 Jul 2012 17:11:13 +0000 (UTC) Received: by bkcje9 with SMTP id je9so406135bkc.13 for ; Mon, 02 Jul 2012 10:11:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=Y7X8KJF+fT+LtsiPPXjoeoQ+G78gcdeKBMLxvBTGJKM=; b=TJE+bVXdIetGedVs0hUlC3rY6l3rPKENdnL5pnB4TD6wuRSzR/IC6YEd0tthS+ThYp CtCrVfjehP+LkvuqJWCFRm8WUDa0zzBhnXf36VDpT1SztO1ioJ0O5qLO8EGj129pniXp y/VOXR5KVtAfqia/vPu2U2TKRL4zETKsPjW85Wev9VEWJx7k9VJoBZj0MShlwVR0BcPQ Q8HaJdgiTeAP2PrCPvhOPu2t0Y5Xq61cQNznYke0maPcZhoeJMpZM2WgD+zo82AhzaJ0 +73EJLWpoSFLQz3J0D3tvKwgA+ulHS7HTebHNXjf3yRQ5N9BsHk5N0Aw6ifHqL+Wf6A/ QAhQ== Received: by 10.204.152.13 with SMTP id e13mr8118889bkw.46.1341249072425; Mon, 02 Jul 2012 10:11:12 -0700 (PDT) Received: from mavbook2.mavhome.dp.ua (pc.mavhome.dp.ua. [212.86.226.226]) by mx.google.com with ESMTPS id e20sm14357984bkv.10.2012.07.02.10.11.10 (version=SSLv3 cipher=OTHER); Mon, 02 Jul 2012 10:11:11 -0700 (PDT) Sender: Alexander Motin Message-ID: <4FF1D62C.2090705@FreeBSD.org> Date: Mon, 02 Jul 2012 20:11:08 +0300 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:13.0) Gecko/20120621 Thunderbird/13.0.1 MIME-Version: 1.0 To: Sean Bruno References: <201207021657.q62GvD7j082717@svn.freebsd.org> In-Reply-To: <201207021657.q62GvD7j082717@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r238004 - in head: etc/rc.d sys/dev/acpica X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 17:11:14 -0000 On 07/02/12 19:57, Sean Bruno wrote: > Author: sbruno > Date: Mon Jul 2 16:57:13 2012 > New Revision: 238004 > URL: http://svn.freebsd.org/changeset/base/238004 > > Log: > Cosmetic display change of Cx states via cx_supported sysctl entries. > > Adjust power_profile script to handle the new world order as well. > > Some vendors are opting out of a C2 state and only defining C1 & C3. This > leads the acpi_cpu display to indicate that the machine supports C1 & C2 > which is caused by the (mis)use of the index of the cx_state array as the > ACPI_STATE_CX value. > > e.g. the code was pretending that cx_state[i] would > always convert to i by subtracting 1. > > cx_state[2] == ACPI_STATE_C3 > cx_state[1] == ACPI_STATE_C2 > cx_state[0] == ACPI_STATE_C1 > > however, on certain machines this would lead to > cx_state[1] == ACPI_STATE_C3 > cx_state[0] == ACPI_STATE_C1 > > This didn't break anything but led to a display of: > * dev.cpu.0.cx_supported: C1/1 C2/96 > > Instead of > * dev.cpu.0.cx_supported: C1/1 C3/96 > > MFC after: 2 weeks If I remember correctly, ACPI spec directly specifies that there can be several C-states with the same type but with different enter method and exit latency. I have never seen any system with more then 3 C-states yet, but technically I think that is possible. Type field defines enter/exit semantics, respecting cache coherency and other things, so I think there can be more then one state with, for example, C3 semantics. Latest CPUs support states C1, C3 and C5, while ACPI AFAIK defines only three types and it may happen that both C3 and C5 have type-3 semantics. -- Alexander Motin From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 17:22:39 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1DC2D106566C; Mon, 2 Jul 2012 17:22:39 +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 098008FC0A; Mon, 2 Jul 2012 17:22:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q62HMc7a083803; Mon, 2 Jul 2012 17:22:38 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q62HMcaJ083799; Mon, 2 Jul 2012 17:22:38 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201207021722.q62HMcaJ083799@svn.freebsd.org> From: Alan Cox Date: Mon, 2 Jul 2012 17:22:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238005 - in stable/9/sys: amd64/amd64 i386/i386 i386/xen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 17:22:39 -0000 Author: alc Date: Mon Jul 2 17:22:38 2012 New Revision: 238005 URL: http://svn.freebsd.org/changeset/base/238005 Log: MFC r236534 Various small changes to PV entry management. Modified: stable/9/sys/amd64/amd64/pmap.c stable/9/sys/i386/i386/pmap.c stable/9/sys/i386/xen/pmap.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/amd64/amd64/pmap.c ============================================================================== --- stable/9/sys/amd64/amd64/pmap.c Mon Jul 2 16:57:13 2012 (r238004) +++ stable/9/sys/amd64/amd64/pmap.c Mon Jul 2 17:22:38 2012 (r238005) @@ -2021,7 +2021,7 @@ pv_to_chunk(pv_entry_t pv) #define PC_FREE1 0xfffffffffffffffful #define PC_FREE2 0x000000fffffffffful -static uint64_t pc_freemask[_NPCM] = { PC_FREE0, PC_FREE1, PC_FREE2 }; +static const uint64_t pc_freemask[_NPCM] = { PC_FREE0, PC_FREE1, PC_FREE2 }; SYSCTL_LONG(_vm_pmap, OID_AUTO, pv_entry_count, CTLFLAG_RD, &pv_entry_count, 0, "Current number of pv entries"); @@ -2070,7 +2070,7 @@ pmap_pv_reclaim(pmap_t locked_pmap) pv_entry_t pv; vm_offset_t va; vm_page_t free, m, m_pc; - uint64_t inuse, freemask; + uint64_t inuse; int bit, field, freed; rw_assert(&pvh_global_lock, RA_WLOCKED); @@ -2102,7 +2102,6 @@ pmap_pv_reclaim(pmap_t locked_pmap) */ freed = 0; for (field = 0; field < _NPCM; field++) { - freemask = 0; for (inuse = ~pc->pc_map[field] & pc_freemask[field]; inuse != 0; inuse &= ~(1UL << bit)) { bit = bsfq(inuse); @@ -2131,16 +2130,16 @@ pmap_pv_reclaim(pmap_t locked_pmap) PGA_WRITEABLE); } } + pc->pc_map[field] |= 1UL << bit; pmap_unuse_pt(pmap, va, *pde, &free); - freemask |= 1UL << bit; freed++; } - pc->pc_map[field] |= freemask; } if (freed == 0) { TAILQ_INSERT_TAIL(&newtail, pc, pc_lru); continue; } + /* Every freed mapping is for a 4 KB page. */ pmap_resident_count_dec(pmap, freed); PV_STAT(pv_entry_frees += freed); PV_STAT(pv_entry_spare += freed); @@ -2261,10 +2260,6 @@ retry: TAILQ_INSERT_TAIL(&pmap->pm_pvchunk, pc, pc_list); } - if (pc != TAILQ_LAST(&pv_chunks, pch)) { - TAILQ_REMOVE(&pv_chunks, pc, pc_lru); - TAILQ_INSERT_TAIL(&pv_chunks, pc, pc_lru); - } pv_entry_count++; PV_STAT(pv_entry_spare--); return (pv); @@ -4138,7 +4133,7 @@ pmap_remove_pages(pmap_t pmap) TAILQ_FOREACH_SAFE(pc, &pmap->pm_pvchunk, pc_list, npc) { allfree = 1; for (field = 0; field < _NPCM; field++) { - inuse = (~(pc->pc_map[field])) & pc_freemask[field]; + inuse = ~pc->pc_map[field] & pc_freemask[field]; while (inuse != 0) { bit = bsfq(inuse); bitmask = 1UL << bit; Modified: stable/9/sys/i386/i386/pmap.c ============================================================================== --- stable/9/sys/i386/i386/pmap.c Mon Jul 2 16:57:13 2012 (r238004) +++ stable/9/sys/i386/i386/pmap.c Mon Jul 2 17:22:38 2012 (r238005) @@ -2177,7 +2177,7 @@ pv_to_chunk(pv_entry_t pv) #define PC_FREE0_9 0xfffffffful /* Free values for index 0 through 9 */ #define PC_FREE10 0x0000fffful /* Free values for index 10 */ -static uint32_t pc_freemask[_NPCM] = { +static const uint32_t pc_freemask[_NPCM] = { PC_FREE0_9, PC_FREE0_9, PC_FREE0_9, PC_FREE0_9, PC_FREE0_9, PC_FREE0_9, PC_FREE0_9, PC_FREE0_9, PC_FREE0_9, @@ -2227,7 +2227,7 @@ pmap_pv_reclaim(pmap_t locked_pmap) pv_entry_t pv; vm_offset_t va; vm_page_t free, m, m_pc; - uint32_t inuse, freemask; + uint32_t inuse; int bit, field, freed; PMAP_LOCK_ASSERT(locked_pmap, MA_OWNED); @@ -2260,7 +2260,6 @@ pmap_pv_reclaim(pmap_t locked_pmap) */ freed = 0; for (field = 0; field < _NPCM; field++) { - freemask = 0; for (inuse = ~pc->pc_map[field] & pc_freemask[field]; inuse != 0; inuse &= ~(1UL << bit)) { bit = bsfl(inuse); @@ -2289,16 +2288,16 @@ pmap_pv_reclaim(pmap_t locked_pmap) PGA_WRITEABLE); } } + pc->pc_map[field] |= 1UL << bit; pmap_unuse_pt(pmap, va, &free); - freemask |= 1UL << bit; freed++; } - pc->pc_map[field] |= freemask; } if (freed == 0) { TAILQ_INSERT_TAIL(&newtail, pc, pc_lru); continue; } + /* Every freed mapping is for a 4 KB page. */ pmap->pm_stats.resident_count -= freed; PV_STAT(pv_entry_frees += freed); PV_STAT(pv_entry_spare += freed); @@ -2367,13 +2366,21 @@ free_pv_entry(pmap_t pmap, pv_entry_t pv field = idx / 32; bit = idx % 32; pc->pc_map[field] |= 1ul << bit; - /* move to head of list */ - TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list); for (idx = 0; idx < _NPCM; idx++) if (pc->pc_map[idx] != pc_freemask[idx]) { - TAILQ_INSERT_HEAD(&pmap->pm_pvchunk, pc, pc_list); + /* + * 98% of the time, pc is already at the head of the + * list. If it isn't already, move it to the head. + */ + if (__predict_false(TAILQ_FIRST(&pmap->pm_pvchunk) != + pc)) { + TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list); + TAILQ_INSERT_HEAD(&pmap->pm_pvchunk, pc, + pc_list); + } return; } + TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list); free_pv_chunk(pc); } @@ -2437,10 +2444,6 @@ retry: } TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list); TAILQ_INSERT_TAIL(&pmap->pm_pvchunk, pc, pc_list); - if (pc != TAILQ_LAST(&pv_chunks, pch)) { - TAILQ_REMOVE(&pv_chunks, pc, pc_lru); - TAILQ_INSERT_TAIL(&pv_chunks, pc, pc_lru); - } PV_STAT(pv_entry_spare--); return (pv); } @@ -4371,7 +4374,7 @@ pmap_remove_pages(pmap_t pmap) TAILQ_FOREACH_SAFE(pc, &pmap->pm_pvchunk, pc_list, npc) { allfree = 1; for (field = 0; field < _NPCM; field++) { - inuse = (~(pc->pc_map[field])) & pc_freemask[field]; + inuse = ~pc->pc_map[field] & pc_freemask[field]; while (inuse != 0) { bit = bsfl(inuse); bitmask = 1UL << bit; Modified: stable/9/sys/i386/xen/pmap.c ============================================================================== --- stable/9/sys/i386/xen/pmap.c Mon Jul 2 16:57:13 2012 (r238004) +++ stable/9/sys/i386/xen/pmap.c Mon Jul 2 17:22:38 2012 (r238005) @@ -1930,7 +1930,7 @@ pv_to_chunk(pv_entry_t pv) #define PC_FREE0_9 0xfffffffful /* Free values for index 0 through 9 */ #define PC_FREE10 0x0000fffful /* Free values for index 10 */ -static uint32_t pc_freemask[_NPCM] = { +static const uint32_t pc_freemask[_NPCM] = { PC_FREE0_9, PC_FREE0_9, PC_FREE0_9, PC_FREE0_9, PC_FREE0_9, PC_FREE0_9, PC_FREE0_9, PC_FREE0_9, PC_FREE0_9, @@ -1978,7 +1978,7 @@ pmap_pv_reclaim(pmap_t locked_pmap) pv_entry_t pv; vm_offset_t va; vm_page_t free, m, m_pc; - uint32_t inuse, freemask; + uint32_t inuse; int bit, field, freed; PMAP_LOCK_ASSERT(locked_pmap, MA_OWNED); @@ -2011,7 +2011,6 @@ pmap_pv_reclaim(pmap_t locked_pmap) */ freed = 0; for (field = 0; field < _NPCM; field++) { - freemask = 0; for (inuse = ~pc->pc_map[field] & pc_freemask[field]; inuse != 0; inuse &= ~(1UL << bit)) { bit = bsfl(inuse); @@ -2031,16 +2030,16 @@ pmap_pv_reclaim(pmap_t locked_pmap) TAILQ_REMOVE(&m->md.pv_list, pv, pv_list); if (TAILQ_EMPTY(&m->md.pv_list)) vm_page_aflag_clear(m, PGA_WRITEABLE); + pc->pc_map[field] |= 1UL << bit; pmap_unuse_pt(pmap, va, &free); - freemask |= 1UL << bit; freed++; } - pc->pc_map[field] |= freemask; } if (freed == 0) { TAILQ_INSERT_TAIL(&newtail, pc, pc_lru); continue; } + /* Every freed mapping is for a 4 KB page. */ pmap->pm_stats.resident_count -= freed; PV_STAT(pv_entry_frees += freed); PV_STAT(pv_entry_spare += freed); @@ -2109,13 +2108,21 @@ free_pv_entry(pmap_t pmap, pv_entry_t pv field = idx / 32; bit = idx % 32; pc->pc_map[field] |= 1ul << bit; - /* move to head of list */ - TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list); for (idx = 0; idx < _NPCM; idx++) if (pc->pc_map[idx] != pc_freemask[idx]) { - TAILQ_INSERT_HEAD(&pmap->pm_pvchunk, pc, pc_list); + /* + * 98% of the time, pc is already at the head of the + * list. If it isn't already, move it to the head. + */ + if (__predict_false(TAILQ_FIRST(&pmap->pm_pvchunk) != + pc)) { + TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list); + TAILQ_INSERT_HEAD(&pmap->pm_pvchunk, pc, + pc_list); + } return; } + TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list); free_pv_chunk(pc); } @@ -2179,10 +2186,6 @@ retry: } TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list); TAILQ_INSERT_TAIL(&pmap->pm_pvchunk, pc, pc_list); - if (pc != TAILQ_LAST(&pv_chunks, pch)) { - TAILQ_REMOVE(&pv_chunks, pc, pc_lru); - TAILQ_INSERT_TAIL(&pv_chunks, pc, pc_lru); - } PV_STAT(pv_entry_spare--); return (pv); } @@ -3539,7 +3542,7 @@ pmap_remove_pages(pmap_t pmap) TAILQ_FOREACH_SAFE(pc, &pmap->pm_pvchunk, pc_list, npc) { allfree = 1; for (field = 0; field < _NPCM; field++) { - inuse = (~(pc->pc_map[field])) & pc_freemask[field]; + inuse = ~pc->pc_map[field] & pc_freemask[field]; while (inuse != 0) { bit = bsfl(inuse); bitmask = 1UL << bit; From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 17:30:49 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7E629106566B; Mon, 2 Jul 2012 17:30:49 +0000 (UTC) (envelope-from seanbru@yahoo-inc.com) Received: from mrout1-b.corp.bf1.yahoo.com (mrout1-b.corp.bf1.yahoo.com [98.139.253.104]) by mx1.freebsd.org (Postfix) with ESMTP id 3E8198FC0C; Mon, 2 Jul 2012 17:30:49 +0000 (UTC) Received: from [IPv6:::1] (rideseveral.corp.yahoo.com [10.73.160.231]) by mrout1-b.corp.bf1.yahoo.com (8.14.4/8.14.4/y.out) with ESMTP id q62HUR2I065092; Mon, 2 Jul 2012 10:30:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yahoo-inc.com; s=cobra; t=1341250228; bh=tZqyBLP6aSNfwzwYJi6cDTc6dUZPtWPkMIT4nYDQ/+Y=; h=Subject:From:To:Cc:In-Reply-To:References:Content-Type:Date: Message-ID:Mime-Version:Content-Transfer-Encoding; b=UJXIXur2F7mGnCx+LJlnaEjritJOtql2BJULb/KJrnjB87GSdmPvU3TVPtj33LatB RbHCkNado4sRT2ZkbfCnkUtduca2Q+7i3MYXyLwyTUIMgnn0eNwSooX5I8FdYWSL2I 9iFqLNIv35kJO72MrV98f/irBLWnMj3Ltg3C5yto= From: Sean Bruno To: Alexander Motin In-Reply-To: <4FF1D62C.2090705@FreeBSD.org> References: <201207021657.q62GvD7j082717@svn.freebsd.org> <4FF1D62C.2090705@FreeBSD.org> Content-Type: text/plain; charset="UTF-8" Date: Mon, 02 Jul 2012 10:30:26 -0700 Message-ID: <1341250226.3342.6.camel@powernoodle.corp.yahoo.com> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit X-Milter-Version: master.31+4-gbc07cd5+ X-CLX-ID: 250227009 Cc: "svn-src-head@FreeBSD.org" , Sean Bruno , "src-committers@FreeBSD.org" , "svn-src-all@FreeBSD.org" Subject: Re: svn commit: r238004 - in head: etc/rc.d sys/dev/acpica X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 17:30:49 -0000 On Mon, 2012-07-02 at 10:11 -0700, Alexander Motin wrote: > > This didn't break anything but led to a display of: > > * dev.cpu.0.cx_supported: C1/1 C2/96 > > > > Instead of > > * dev.cpu.0.cx_supported: C1/1 C3/96 > > > > MFC after: 2 weeks > > If I remember correctly, ACPI spec directly specifies that there can > be > several C-states with the same type but with different enter method > and > exit latency. I have never seen any system with more then 3 C-states > yet, but technically I think that is possible. Type field defines > enter/exit semantics, respecting cache coherency and other things, so > I > think there can be more then one state with, for example, C3 > semantics. > Latest CPUs support states C1, C3 and C5, while ACPI AFAIK defines > only > three types and it may happen that both C3 and C5 have type-3 > semantics. > > >From my read of the current ACPI specs, there isn't anything past C3. However, Intel has definied Mwate Cstates that use the same nomenclature and confuse what people think Cstates are. Is this what you mean by "C5" sean From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 17:32:28 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0BB09106566C; Mon, 2 Jul 2012 17:32:28 +0000 (UTC) (envelope-from seanbru@yahoo-inc.com) Received: from mrout2-b.corp.bf1.yahoo.com (mrout2-b.corp.bf1.yahoo.com [98.139.253.105]) by mx1.freebsd.org (Postfix) with ESMTP id B7E8C8FC16; Mon, 2 Jul 2012 17:32:27 +0000 (UTC) Received: from [IPv6:::1] (rideseveral.corp.yahoo.com [10.73.160.231]) by mrout2-b.corp.bf1.yahoo.com (8.14.4/8.14.4/y.out) with ESMTP id q62HWDfh008325; Mon, 2 Jul 2012 10:32:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yahoo-inc.com; s=cobra; t=1341250335; bh=bP4WFVeL5hHxaq5HVFy94g+q2SrYD7hKO5pejsfpG64=; h=Subject:From:To:Cc:In-Reply-To:References:Content-Type:Date: Message-ID:Mime-Version:Content-Transfer-Encoding; b=T2HITV1JpgaTOrdQIVYZW8aR3lq3sXNGpAuZSc50IVOg6ZRMrXlIxFMB4ETPLybis lbEz+1UnmxZJmCAR058akTtbPs7Qz+QM8CILq6ZjYOfJWND6OFNdk40HJYW6f9ExiM bP2nh2l/o9GxReuCFjg1qS00NzzvAsAp9AMnJjQQ= From: Sean Bruno To: Sean Bruno In-Reply-To: <201207021657.q62GvD7j082717@svn.freebsd.org> References: <201207021657.q62GvD7j082717@svn.freebsd.org> Content-Type: text/plain; charset="UTF-8" Date: Mon, 02 Jul 2012 10:32:13 -0700 Message-ID: <1341250333.3342.7.camel@powernoodle.corp.yahoo.com> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit X-Milter-Version: master.31+4-gbc07cd5+ X-CLX-ID: 250334001 Cc: "svn-src-head@FreeBSD.org" , "svn-src-all@FreeBSD.org" , "src-committers@FreeBSD.org" Subject: Re: svn commit: r238004 - in head: etc/rc.d sys/dev/acpica X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 17:32:28 -0000 On Mon, 2012-07-02 at 09:57 -0700, Sean Bruno wrote: > Author: sbruno > Date: Mon Jul 2 16:57:13 2012 > New Revision: 238004 > URL: http://svn.freebsd.org/changeset/base/238004 revert in progress. There's more discussion to be had about this changeset. sean From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 17:37:41 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 607DC106566C; Mon, 2 Jul 2012 17:37:41 +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 4DA588FC0C; Mon, 2 Jul 2012 17:37:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q62Hbf9X084486; Mon, 2 Jul 2012 17:37:41 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q62Hbffl084484; Mon, 2 Jul 2012 17:37:41 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201207021737.q62Hbffl084484@svn.freebsd.org> From: Alan Cox Date: Mon, 2 Jul 2012 17:37:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238006 - stable/9/sys/amd64/amd64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 17:37:41 -0000 Author: alc Date: Mon Jul 2 17:37:40 2012 New Revision: 238006 URL: http://svn.freebsd.org/changeset/base/238006 Log: MFC r237085 Correctly identify the function in a KASSERT(). Modified: stable/9/sys/amd64/amd64/pmap.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/amd64/amd64/pmap.c ============================================================================== --- stable/9/sys/amd64/amd64/pmap.c Mon Jul 2 17:22:38 2012 (r238005) +++ stable/9/sys/amd64/amd64/pmap.c Mon Jul 2 17:37:40 2012 (r238006) @@ -4409,8 +4409,9 @@ small_mappings: pmap = PV_PMAP(pv); PMAP_LOCK(pmap); pde = pmap_pde(pmap, pv->pv_va); - KASSERT((*pde & PG_PS) == 0, ("pmap_clear_write: found" - " a 2mpage in page %p's pv list", m)); + KASSERT((*pde & PG_PS) == 0, + ("pmap_remove_write: found a 2mpage in page %p's pv list", + m)); pte = pmap_pde_to_pte(pde, pv->pv_va); retry: oldpte = *pte; From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 17:41:03 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 151791065675; Mon, 2 Jul 2012 17:41:03 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 105F28FC26; Mon, 2 Jul 2012 17:41:01 +0000 (UTC) Received: by bkcje9 with SMTP id je9so435317bkc.13 for ; Mon, 02 Jul 2012 10:41:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=Lx8nwU3DHuvDd+xiOmJ9pHtxhCuD+P14fuCydJr9afk=; b=wjxwQR94TqYlrtlsfoZDYtY3Cf80L9jvx6vx64R/hjpj/YbVN2s1kHzBycL8fAbE+G muCIkLL0FwXF9yc2VQwS/zBl0roqwyIm/QP9jONicHJz1Xah+rnu5sAuDXK2eCYTj8JE u/GMLDQsbS8AFk5pQx0JelTCRgo1jy4A/YSdgrD8jMSIRaEt8DA3LOf6EBKHLMMSDu6a eK6bnE7i8SnzXcWA1aD2KXC9v9X3uoGeCEjkaGN6PO4iL3EBKOwz4cgmUwP/IhV8dGbS 3mGA7E5WInKGoHOuz3c3tA/1sywr0wy6b92O01GOkAhzaQlUtxH72I5p3nEg545j5Ipy cv0g== Received: by 10.205.136.3 with SMTP id ii3mr7964686bkc.101.1341250861073; Mon, 02 Jul 2012 10:41:01 -0700 (PDT) Received: from mavbook2.mavhome.dp.ua (pc.mavhome.dp.ua. [212.86.226.226]) by mx.google.com with ESMTPS id h18sm14439941bkh.8.2012.07.02.10.40.58 (version=SSLv3 cipher=OTHER); Mon, 02 Jul 2012 10:40:59 -0700 (PDT) Sender: Alexander Motin Message-ID: <4FF1DD29.1040003@FreeBSD.org> Date: Mon, 02 Jul 2012 20:40:57 +0300 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:13.0) Gecko/20120621 Thunderbird/13.0.1 MIME-Version: 1.0 To: Sean Bruno References: <201207021657.q62GvD7j082717@svn.freebsd.org> <4FF1D62C.2090705@FreeBSD.org> <1341250226.3342.6.camel@powernoodle.corp.yahoo.com> In-Reply-To: <1341250226.3342.6.camel@powernoodle.corp.yahoo.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: "svn-src-head@FreeBSD.org" , Sean Bruno , "src-committers@FreeBSD.org" , "svn-src-all@FreeBSD.org" Subject: Re: svn commit: r238004 - in head: etc/rc.d sys/dev/acpica X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 17:41:03 -0000 On 07/02/12 20:30, Sean Bruno wrote: > On Mon, 2012-07-02 at 10:11 -0700, Alexander Motin wrote: >>> This didn't break anything but led to a display of: >>> * dev.cpu.0.cx_supported: C1/1 C2/96 >>> >>> Instead of >>> * dev.cpu.0.cx_supported: C1/1 C3/96 >>> >>> MFC after: 2 weeks >> >> If I remember correctly, ACPI spec directly specifies that there can >> be >> several C-states with the same type but with different enter method >> and >> exit latency. I have never seen any system with more then 3 C-states >> yet, but technically I think that is possible. Type field defines >> enter/exit semantics, respecting cache coherency and other things, so >> I >> think there can be more then one state with, for example, C3 >> semantics. >> Latest CPUs support states C1, C3 and C5, while ACPI AFAIK defines >> only >> three types and it may happen that both C3 and C5 have type-3 >> semantics. > > From my read of the current ACPI specs, there isn't anything past C3. Right. Because that type semantics is already quite strict to not need deeper. ACPI doesn't bother how CPU implements C3 and C5 and where it saves context. > However, Intel has definied Mwate Cstates that use the same nomenclature > and confuse what people think Cstates are. Is this what you mean by > "C5" Yes. ACPI C-states are not equal to CPU C-states and none of them are equal to ACPI types. I am not sure there is enough information to be more precise then we are now, unless we will hardcode it based on CPU IDs. ACPI spec allows BIOS to report how to enter state using MWAIT. In that case it would be possible to report it. But I haven't seen that used. -- Alexander Motin From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 17:48:20 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2A2F61065672; Mon, 2 Jul 2012 17:48:20 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 165DB8FC0C; Mon, 2 Jul 2012 17:48:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q62HmJnQ084991; Mon, 2 Jul 2012 17:48:19 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q62HmJ6O084988; Mon, 2 Jul 2012 17:48:19 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201207021748.q62HmJ6O084988@svn.freebsd.org> From: Christian Brueffer Date: Mon, 2 Jul 2012 17:48:19 +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: r238007 - stable/7/usr.sbin/ndp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 17:48:20 -0000 Author: brueffer Date: Mon Jul 2 17:48:19 2012 New Revision: 238007 URL: http://svn.freebsd.org/changeset/base/238007 Log: MFC: r217140 Use ether_ntoa instead of home-grown version. PR: 169075 Submitted by: Alexandr Modified: stable/7/usr.sbin/ndp/ndp.c Directory Properties: stable/7/usr.sbin/ndp/ (props changed) Modified: stable/7/usr.sbin/ndp/ndp.c ============================================================================== --- stable/7/usr.sbin/ndp/ndp.c Mon Jul 2 17:37:40 2012 (r238006) +++ stable/7/usr.sbin/ndp/ndp.c Mon Jul 2 17:48:19 2012 (r238007) @@ -148,7 +148,6 @@ static void getdefif __P((void)); static void setdefif __P((char *)); #endif static char *sec2str __P((time_t)); -static char *ether_str __P((struct sockaddr_dl *)); static void ts_print __P((const struct timeval *)); #ifdef ICMPV6CTL_ND6_DRLIST @@ -806,17 +805,14 @@ getnbrinfo(addr, ifindex, warning) } static char * -ether_str(sdl) - struct sockaddr_dl *sdl; +ether_str(struct sockaddr_dl *sdl) { static char hbuf[NI_MAXHOST]; - u_char *cp; - if (sdl->sdl_alen) { - cp = (u_char *)LLADDR(sdl); - snprintf(hbuf, sizeof(hbuf), "%x:%x:%x:%x:%x:%x", - cp[0], cp[1], cp[2], cp[3], cp[4], cp[5]); - } else + if (sdl->sdl_alen > 0) + strlcpy(hbuf, ether_ntoa((struct ether_addr *)LLADDR(sdl)), + sizeof(hbuf)); + else snprintf(hbuf, sizeof(hbuf), "(incomplete)"); return(hbuf); From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 17:52:43 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F139B1065672; Mon, 2 Jul 2012 17:52:43 +0000 (UTC) (envelope-from wblock@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DF0468FC14; Mon, 2 Jul 2012 17:52:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q62HqhTl085236; Mon, 2 Jul 2012 17:52:43 GMT (envelope-from wblock@svn.freebsd.org) Received: (from wblock@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q62Hqhgc085234; Mon, 2 Jul 2012 17:52:43 GMT (envelope-from wblock@svn.freebsd.org) Message-Id: <201207021752.q62Hqhgc085234@svn.freebsd.org> From: Warren Block Date: Mon, 2 Jul 2012 17:52:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238008 - head/share/man/man7 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 17:52:44 -0000 Author: wblock (doc committer) Date: Mon Jul 2 17:52:43 2012 New Revision: 238008 URL: http://svn.freebsd.org/changeset/base/238008 Log: Add reference to portsnap(8). Submitted by: Tim Kientzle MFC after: 1 day Modified: head/share/man/man7/build.7 Modified: head/share/man/man7/build.7 ============================================================================== --- head/share/man/man7/build.7 Mon Jul 2 17:48:19 2012 (r238007) +++ head/share/man/man7/build.7 Mon Jul 2 17:52:43 2012 (r238008) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 27, 2012 +.Dd July 2, 2012 .Dt BUILD 7 .Os .Sh NAME @@ -40,9 +40,10 @@ normally and .Pa /usr/ports . These directories may be initially empty or non-existent until updated with -.Xr csup 1 +.Xr csup 1 , +.Xr svn 1 , or -.Xr svn 1 . +.Xr portsnap 8 . Directory .Pa /usr/src contains the @@ -608,6 +609,7 @@ make TARGET=sparc64 DESTDIR=/clients/spa .Xr release 7 , .Xr config 8 , .Xr mergemaster 8 , +.Xr portsnap 8 , .Xr reboot 8 , .Xr shutdown 8 .Sh AUTHORS From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 17:55:30 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 87A58106566C; Mon, 2 Jul 2012 17:55:30 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 742AE8FC17; Mon, 2 Jul 2012 17:55:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q62HtUTw085419; Mon, 2 Jul 2012 17:55:30 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q62HtUfh085416; Mon, 2 Jul 2012 17:55:30 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201207021755.q62HtUfh085416@svn.freebsd.org> From: Sean Bruno Date: Mon, 2 Jul 2012 17:55:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238009 - in head: etc/rc.d sys/dev/acpica X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 17:55:30 -0000 Author: sbruno Date: Mon Jul 2 17:55:29 2012 New Revision: 238009 URL: http://svn.freebsd.org/changeset/base/238009 Log: Revert r238004 as more review has come in and there is now a discussion on how to best proceed. Modified: head/etc/rc.d/power_profile head/sys/dev/acpica/acpi_cpu.c Modified: head/etc/rc.d/power_profile ============================================================================== --- head/etc/rc.d/power_profile Mon Jul 2 17:52:43 2012 (r238008) +++ head/etc/rc.d/power_profile Mon Jul 2 17:55:29 2012 (r238009) @@ -90,7 +90,7 @@ node="dev.cpu.0.freq" highest_value="`(sysctl -n dev.cpu.0.freq_levels | \ awk '{ split($0, a, "[/ ]"); print a[1] }' -) 2> /dev/null`" lowest_value="`(sysctl -n dev.cpu.0.freq_levels | \ - awk '{ split($0, a, "[ /]"); print a[length(a) - 1] }' -) 2> /dev/null`" + awk '{ split($0, a, "[/ ]"); print a[length(a) - 1] }' -) 2> /dev/null`" eval value=\$${profile}_cpu_freq sysctl_set Modified: head/sys/dev/acpica/acpi_cpu.c ============================================================================== --- head/sys/dev/acpica/acpi_cpu.c Mon Jul 2 17:52:43 2012 (r238008) +++ head/sys/dev/acpica/acpi_cpu.c Mon Jul 2 17:55:29 2012 (r238009) @@ -88,7 +88,7 @@ struct acpi_cpu_softc { /* Values for sysctl. */ struct sysctl_ctx_list cpu_sysctl_ctx; struct sysctl_oid *cpu_sysctl_tree; - int cpu_cx_lowest; /* Index of lowest Cx state in cpu_cx_states[] */ + int cpu_cx_lowest; char cpu_cx_supported[64]; int cpu_rid; }; @@ -144,8 +144,7 @@ static int cpu_cx_count; /* Number of static struct sysctl_ctx_list cpu_sysctl_ctx; static struct sysctl_oid *cpu_sysctl_tree; static int cpu_cx_generic; -/* Lowest valid Cstate for all cpus -- Cx */ -static int global_lowest_cstate; +static int cpu_cx_lowest; static device_t *cpu_devices; static int cpu_ndevices; @@ -872,7 +871,7 @@ acpi_cpu_startup(void *arg) "Global lowest Cx sleep state to use"); /* Take over idling from cpu_idle_default(). */ - global_lowest_cstate = 0; + cpu_cx_lowest = 0; cpu_disable_idle = FALSE; cpu_idle_hook = acpi_cpu_idle; } @@ -890,8 +889,7 @@ acpi_cpu_cx_list(struct acpi_cpu_softc * sbuf_new(&sb, sc->cpu_cx_supported, sizeof(sc->cpu_cx_supported), SBUF_FIXEDLEN); for (i = 0; i < sc->cpu_cx_count; i++) { - sbuf_printf(&sb, "C%d/%d ", sc->cpu_cx_states[i].type, - sc->cpu_cx_states[i].trans_lat); + sbuf_printf(&sb, "C%d/%d ", i + 1, sc->cpu_cx_states[i].trans_lat); if (sc->cpu_cx_states[i].type < ACPI_STATE_C3) sc->cpu_non_c3 = i; else @@ -965,10 +963,9 @@ acpi_cpu_idle() /* Find the lowest state that has small enough latency. */ cx_next_idx = 0; - if (cpu_disable_deep_sleep) { - /* Chose the lowest valid index in the cpu_cx_states array */ + if (cpu_disable_deep_sleep) i = min(sc->cpu_cx_lowest, sc->cpu_non_c3); - } else + else i = sc->cpu_cx_lowest; for (; i >= 0; i--) { if (sc->cpu_cx_states[i].trans_lat * 3 <= sc->cpu_prev_sleep) { @@ -1083,8 +1080,8 @@ acpi_cpu_notify(ACPI_HANDLE h, UINT32 no if (isc->cpu_cx_count > cpu_cx_count) cpu_cx_count = isc->cpu_cx_count; } - if (sc->cpu_cx_lowest < global_lowest_cstate) - acpi_cpu_set_cx_lowest(sc, sc->cpu_cx_states[sc->cpu_cx_lowest].type); + if (sc->cpu_cx_lowest < cpu_cx_lowest) + acpi_cpu_set_cx_lowest(sc, min(cpu_cx_lowest, sc->cpu_cx_count - 1)); ACPI_SERIAL_END(cpu); } @@ -1211,31 +1208,13 @@ acpi_cpu_usage_sysctl(SYSCTL_HANDLER_ARG return (0); } -/* - * val is the ACPI_STATE_CX enum request by the caller - */ static int acpi_cpu_set_cx_lowest(struct acpi_cpu_softc *sc, int val) { int i; ACPI_SERIAL_ASSERT(cpu); - /* - * scan list of valid cstates. if we do no - * find a match to the requested val, return - * EINVAL - * once we match, set cpu_cx_lowest to the found - * index i - */ - for (i = 0; i < sc->cpu_cx_count; i++) { - if (sc->cpu_cx_states[i].type == val) { - sc->cpu_cx_lowest = i; - break; - } - } - if (i == sc->cpu_cx_count) - return (EINVAL); - + sc->cpu_cx_lowest = val; /* If not disabling, cache the new lowest non-C3 state. */ sc->cpu_non_c3 = 0; @@ -1259,22 +1238,21 @@ acpi_cpu_cx_lowest_sysctl(SYSCTL_HANDLER int val, error; sc = (struct acpi_cpu_softc *) arg1; - snprintf(state, sizeof(state), "C%d", - sc->cpu_cx_states[sc->cpu_cx_lowest].type); + snprintf(state, sizeof(state), "C%d", sc->cpu_cx_lowest + 1); error = sysctl_handle_string(oidp, state, sizeof(state), req); if (error != 0 || req->newptr == NULL) return (error); if (strlen(state) < 2 || toupper(state[0]) != 'C') return (EINVAL); - val = (int) strtol(state + 1, NULL, 10); - if (val < 0 || val > MAX_CX_STATES) + val = (int) strtol(state + 1, NULL, 10) - 1; + if (val < 0 || val > sc->cpu_cx_count - 1) return (EINVAL); ACPI_SERIAL_BEGIN(cpu); - error = acpi_cpu_set_cx_lowest(sc, val); + acpi_cpu_set_cx_lowest(sc, val); ACPI_SERIAL_END(cpu); - return (error); + return (0); } static int @@ -1284,28 +1262,24 @@ acpi_cpu_global_cx_lowest_sysctl(SYSCTL_ char state[8]; int val, error, i; - snprintf(state, sizeof(state), "C%d", global_lowest_cstate); + snprintf(state, sizeof(state), "C%d", cpu_cx_lowest + 1); error = sysctl_handle_string(oidp, state, sizeof(state), req); if (error != 0 || req->newptr == NULL) return (error); if (strlen(state) < 2 || toupper(state[0]) != 'C') return (EINVAL); - val = (int) strtol(state + 1, NULL, 10); - if (val < 0 || val > MAX_CX_STATES) + val = (int) strtol(state + 1, NULL, 10) - 1; + if (val < 0 || val > cpu_cx_count - 1) return (EINVAL); + cpu_cx_lowest = val; /* Update the new lowest useable Cx state for all CPUs. */ ACPI_SERIAL_BEGIN(cpu); for (i = 0; i < cpu_ndevices; i++) { sc = device_get_softc(cpu_devices[i]); - error = acpi_cpu_set_cx_lowest(sc, val); - if (error) { - ACPI_SERIAL_END(cpu); - return(error); - } + acpi_cpu_set_cx_lowest(sc, min(val, sc->cpu_cx_count - 1)); } ACPI_SERIAL_END(cpu); - global_lowest_cstate = val; return (0); } From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 18:04:31 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 99F34106566B; Mon, 2 Jul 2012 18:04:31 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8730E8FC17; Mon, 2 Jul 2012 18:04:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q62I4VJa085864; Mon, 2 Jul 2012 18:04:31 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q62I4Vc9085861; Mon, 2 Jul 2012 18:04:31 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201207021804.q62I4Vc9085861@svn.freebsd.org> From: Gleb Smirnoff Date: Mon, 2 Jul 2012 18:04:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238010 - in head: share/mk usr.sbin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 18:04:31 -0000 Author: glebius Date: Mon Jul 2 18:04:31 2012 New Revision: 238010 URL: http://svn.freebsd.org/changeset/base/238010 Log: Fix build after r237997. Modified: head/share/mk/bsd.own.mk head/usr.sbin/Makefile Modified: head/share/mk/bsd.own.mk ============================================================================== --- head/share/mk/bsd.own.mk Mon Jul 2 17:55:29 2012 (r238009) +++ head/share/mk/bsd.own.mk Mon Jul 2 18:04:31 2012 (r238010) @@ -385,6 +385,7 @@ __DEFAULT_YES_OPTIONS = \ OPENSSL \ PAM \ PF \ + PKGBOOTSTRAP \ PKGTOOLS \ PMC \ PORTSNAP \ Modified: head/usr.sbin/Makefile ============================================================================== --- head/usr.sbin/Makefile Mon Jul 2 17:55:29 2012 (r238009) +++ head/usr.sbin/Makefile Mon Jul 2 18:04:31 2012 (r238010) @@ -259,7 +259,7 @@ SUBDIR+= keyserv SUBDIR+= ftp-proxy .endif -.if ${PK_PKGBOOTSTRAP} != "no" +.if ${MK_PKGBOOTSTRAP} != "no" SUBDIR+= pkg .endif From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 18:19:40 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 55A9D1065670; Mon, 2 Jul 2012 18:19:40 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id D0EAC8FC18; Mon, 2 Jul 2012 18:19:39 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.5/8.14.5) with ESMTP id q62IJcZi028873; Mon, 2 Jul 2012 22:19:38 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.5/8.14.5/Submit) id q62IJc37028872; Mon, 2 Jul 2012 22:19:38 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Mon, 2 Jul 2012 22:19:38 +0400 From: Gleb Smirnoff To: Baptiste Daroussin Message-ID: <20120702181938.GO21957@FreeBSD.org> References: <201207021528.q62FSoot078093@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <201207021528.q62FSoot078093@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r237997 - in head: tools/build/mk tools/build/options usr.sbin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 18:19:40 -0000 On Mon, Jul 02, 2012 at 03:28:50PM +0000, Baptiste Daroussin wrote: B> Author: bapt B> Date: Mon Jul 2 15:28:50 2012 B> New Revision: 237997 B> URL: http://svn.freebsd.org/changeset/base/237997 B> B> Log: B> New build KNOB: WITHOUT_PKGBOOTSTRAP to condition building of usr.sbin/pkg B> Do not condition usr.sbin/pkg building on WITHOUT_PKGTOOLS anymore, so that users can B> remove the old pkg_* tools without removing the pkgng boostrap I've fixed the build but head/tools/build/options/WITHOUT_PKGBOOSTRAP still needs to be renamed. -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 18:35:09 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 48CEC106566B; Mon, 2 Jul 2012 18:35:09 +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 35E758FC15; Mon, 2 Jul 2012 18:35:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q62IZ963087289; Mon, 2 Jul 2012 18:35:09 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q62IZ8LO087287; Mon, 2 Jul 2012 18:35:08 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201207021835.q62IZ8LO087287@svn.freebsd.org> From: Alexander Motin Date: Mon, 2 Jul 2012 18:35:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238011 - head/sys/dev/sound/pci/hda X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 18:35:09 -0000 Author: mav Date: Mon Jul 2 18:35:08 2012 New Revision: 238011 URL: http://svn.freebsd.org/changeset/base/238011 Log: Restore GPIO config quirks handling, lost during last big refactoring. Tested by: hselasky MFC after: 3 days Modified: head/sys/dev/sound/pci/hda/hdaa_patches.c Modified: head/sys/dev/sound/pci/hda/hdaa_patches.c ============================================================================== --- head/sys/dev/sound/pci/hda/hdaa_patches.c Mon Jul 2 18:04:31 2012 (r238010) +++ head/sys/dev/sound/pci/hda/hdaa_patches.c Mon Jul 2 18:35:08 2012 (r238011) @@ -401,12 +401,9 @@ hdaa_patch(struct hdaa_devinfo *devinfo) if (!(HDA_DEV_MATCH(hdac_quirks[i].model, subid) && HDA_DEV_MATCH(hdac_quirks[i].id, id))) continue; - if (hdac_quirks[i].set != 0) - devinfo->quirks |= - hdac_quirks[i].set; - if (hdac_quirks[i].unset != 0) - devinfo->quirks &= - ~(hdac_quirks[i].unset); + devinfo->quirks |= hdac_quirks[i].set; + devinfo->quirks &= ~(hdac_quirks[i].unset); + devinfo->gpio = hdac_quirks[i].gpio; } /* Apply per-widget patch. */ From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 19:09:10 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 600181065672; Mon, 2 Jul 2012 19:09:10 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214]) by mx1.freebsd.org (Postfix) with ESMTP id D39B38FC1A; Mon, 2 Jul 2012 19:09:09 +0000 (UTC) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.14.4/8.14.4/ALCHEMY.FRANKEN.DE) with ESMTP id q62J92BO021803; Mon, 2 Jul 2012 21:09:02 +0200 (CEST) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.14.4/8.14.4/Submit) id q62J92AV021802; Mon, 2 Jul 2012 21:09:02 +0200 (CEST) (envelope-from marius) Date: Mon, 2 Jul 2012 21:09:02 +0200 From: Marius Strobl To: Doug Barton Message-ID: <20120702190902.GF63893@alchemy.franken.de> References: <201206181911.q5IJB7NL095734@svn.freebsd.org> <4FF15496.7070307@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4FF15496.7070307@FreeBSD.org> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@FreeBSD.org, Marius Strobl , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org Subject: Re: svn commit: r237234 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 19:09:10 -0000 On Mon, Jul 02, 2012 at 12:58:14AM -0700, Doug Barton wrote: > FYI, you didn't change the substance of the text, so there is no reason > to bump .Dd. > Okay, noted. Marius From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 19:13:38 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D4F511065677; Mon, 2 Jul 2012 19:13:38 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A907E8FC16; Mon, 2 Jul 2012 19:13:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q62JDcT7088930; Mon, 2 Jul 2012 19:13:38 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q62JDctC088928; Mon, 2 Jul 2012 19:13:38 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201207021913.q62JDctC088928@svn.freebsd.org> From: Marius Strobl Date: Mon, 2 Jul 2012 19:13:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238012 - stable/9/sys/sparc64/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 19:13:38 -0000 Author: marius Date: Mon Jul 2 19:13:38 2012 New Revision: 238012 URL: http://svn.freebsd.org/changeset/base/238012 Log: MFC: r237842 Switch back to the 4BSD scheduler for now. There is some more or less recent regression with ULE, causing processes to get stuck in getblk as well as interrupt handler execution delays to rise above the command timeout of mpt(4). Modified: stable/9/sys/sparc64/conf/GENERIC Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/e1000/ (props changed) stable/9/sys/dev/isp/ (props changed) stable/9/sys/dev/ixgbe/ (props changed) stable/9/sys/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/modules/ (props changed) Modified: stable/9/sys/sparc64/conf/GENERIC ============================================================================== --- stable/9/sys/sparc64/conf/GENERIC Mon Jul 2 18:35:08 2012 (r238011) +++ stable/9/sys/sparc64/conf/GENERIC Mon Jul 2 19:13:38 2012 (r238012) @@ -26,7 +26,7 @@ makeoptions DEBUG=-g # Build kernel wit # Platforms supported # At this time all platforms are supported, as-is. -options SCHED_ULE # ULE scheduler +options SCHED_4BSD # 4BSD scheduler options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 19:19:08 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AFC021065675; Mon, 2 Jul 2012 19:19:08 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9BD678FC0A; Mon, 2 Jul 2012 19:19:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q62JJ8rM089222; Mon, 2 Jul 2012 19:19:08 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q62JJ85x089217; Mon, 2 Jul 2012 19:19:08 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201207021919.q62JJ85x089217@svn.freebsd.org> From: Marius Strobl Date: Mon, 2 Jul 2012 19:19:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238013 - in stable/9/sys: dev/mfi dev/mps dev/mpt kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 19:19:08 -0000 Author: marius Date: Mon Jul 2 19:19:07 2012 New Revision: 238013 URL: http://svn.freebsd.org/changeset/base/238013 Log: MFC: r237546 Correct sizeof usage Obtained from: DragonFly Modified: stable/9/sys/dev/mfi/mfi_tbolt.c stable/9/sys/dev/mps/mps_sas.c stable/9/sys/dev/mpt/mpt_cam.c stable/9/sys/kern/subr_firmware.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/e1000/ (props changed) stable/9/sys/dev/isp/ (props changed) stable/9/sys/dev/ixgbe/ (props changed) stable/9/sys/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/modules/ (props changed) Modified: stable/9/sys/dev/mfi/mfi_tbolt.c ============================================================================== --- stable/9/sys/dev/mfi/mfi_tbolt.c Mon Jul 2 19:13:38 2012 (r238012) +++ stable/9/sys/dev/mfi/mfi_tbolt.c Mon Jul 2 19:19:07 2012 (r238013) @@ -1078,7 +1078,7 @@ mfi_tbolt_build_mpt_cmd(struct mfi_softc if (!req_desc) return NULL; - bzero(req_desc, sizeof(req_desc)); + bzero(req_desc, sizeof(*req_desc)); req_desc->header.RequestFlags = (MPI2_REQ_DESCRIPT_FLAGS_SCSI_IO << MFI_REQ_DESCRIPT_FLAGS_TYPE_SHIFT); req_desc->header.SMID = index; Modified: stable/9/sys/dev/mps/mps_sas.c ============================================================================== --- stable/9/sys/dev/mps/mps_sas.c Mon Jul 2 19:13:38 2012 (r238012) +++ stable/9/sys/dev/mps/mps_sas.c Mon Jul 2 19:19:07 2012 (r238013) @@ -2217,7 +2217,7 @@ mpssas_scsiio_complete(struct mps_softc sense_len = min(returned_sense_len, ccb->csio.sense_len - ccb->csio.sense_resid); bzero(&ccb->csio.sense_data, - sizeof(&ccb->csio.sense_data)); + sizeof(ccb->csio.sense_data)); bcopy(cm->cm_sense, &ccb->csio.sense_data, sense_len); ccb->ccb_h.status |= CAM_AUTOSNS_VALID; } Modified: stable/9/sys/dev/mpt/mpt_cam.c ============================================================================== --- stable/9/sys/dev/mpt/mpt_cam.c Mon Jul 2 19:13:38 2012 (r238012) +++ stable/9/sys/dev/mpt/mpt_cam.c Mon Jul 2 19:19:07 2012 (r238013) @@ -3187,7 +3187,7 @@ mpt_scsi_reply_frame_handler(struct mpt_ else ccb->csio.sense_resid = 0; - bzero(&ccb->csio.sense_data, sizeof(&ccb->csio.sense_data)); + bzero(&ccb->csio.sense_data, sizeof(ccb->csio.sense_data)); bcopy(req->sense_vbuf, &ccb->csio.sense_data, min(ccb->csio.sense_len, sense_returned)); } Modified: stable/9/sys/kern/subr_firmware.c ============================================================================== --- stable/9/sys/kern/subr_firmware.c Mon Jul 2 19:13:38 2012 (r238012) +++ stable/9/sys/kern/subr_firmware.c Mon Jul 2 19:19:07 2012 (r238013) @@ -193,7 +193,7 @@ firmware_register(const char *imagename, __func__, imagename); return NULL; } - bzero(frp, sizeof(frp)); /* start from a clean record */ + bzero(frp, sizeof(*frp)); /* start from a clean record */ frp->fw.name = imagename; frp->fw.data = data; frp->fw.datasize = datasize; From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 19:19:22 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5BDB0106567B; Mon, 2 Jul 2012 19:19:22 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3E1AE8FC08; Mon, 2 Jul 2012 19:19:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q62JJMGh089270; Mon, 2 Jul 2012 19:19:22 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q62JJLAb089265; Mon, 2 Jul 2012 19:19:21 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201207021919.q62JJLAb089265@svn.freebsd.org> From: Marius Strobl Date: Mon, 2 Jul 2012 19:19: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: r238014 - in stable/8/sys: dev/mfi dev/mps dev/mpt kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 19:19:22 -0000 Author: marius Date: Mon Jul 2 19:19:21 2012 New Revision: 238014 URL: http://svn.freebsd.org/changeset/base/238014 Log: MFC: r237546 Correct sizeof usage Obtained from: DragonFly Modified: stable/8/sys/dev/mfi/mfi_tbolt.c stable/8/sys/dev/mps/mps_sas.c stable/8/sys/dev/mpt/mpt_cam.c stable/8/sys/kern/subr_firmware.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/boot/ (props changed) stable/8/sys/cddl/ (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/e1000/ (props changed) Modified: stable/8/sys/dev/mfi/mfi_tbolt.c ============================================================================== --- stable/8/sys/dev/mfi/mfi_tbolt.c Mon Jul 2 19:19:07 2012 (r238013) +++ stable/8/sys/dev/mfi/mfi_tbolt.c Mon Jul 2 19:19:21 2012 (r238014) @@ -1078,7 +1078,7 @@ mfi_tbolt_build_mpt_cmd(struct mfi_softc if (!req_desc) return NULL; - bzero(req_desc, sizeof(req_desc)); + bzero(req_desc, sizeof(*req_desc)); req_desc->header.RequestFlags = (MPI2_REQ_DESCRIPT_FLAGS_SCSI_IO << MFI_REQ_DESCRIPT_FLAGS_TYPE_SHIFT); req_desc->header.SMID = index; Modified: stable/8/sys/dev/mps/mps_sas.c ============================================================================== --- stable/8/sys/dev/mps/mps_sas.c Mon Jul 2 19:19:07 2012 (r238013) +++ stable/8/sys/dev/mps/mps_sas.c Mon Jul 2 19:19:21 2012 (r238014) @@ -2217,7 +2217,7 @@ mpssas_scsiio_complete(struct mps_softc sense_len = min(returned_sense_len, ccb->csio.sense_len - ccb->csio.sense_resid); bzero(&ccb->csio.sense_data, - sizeof(&ccb->csio.sense_data)); + sizeof(ccb->csio.sense_data)); bcopy(cm->cm_sense, &ccb->csio.sense_data, sense_len); ccb->ccb_h.status |= CAM_AUTOSNS_VALID; } Modified: stable/8/sys/dev/mpt/mpt_cam.c ============================================================================== --- stable/8/sys/dev/mpt/mpt_cam.c Mon Jul 2 19:19:07 2012 (r238013) +++ stable/8/sys/dev/mpt/mpt_cam.c Mon Jul 2 19:19:21 2012 (r238014) @@ -3179,7 +3179,7 @@ mpt_scsi_reply_frame_handler(struct mpt_ ccb->ccb_h.status |= CAM_AUTOSNS_VALID; ccb->csio.sense_resid = ccb->csio.sense_len - le32toh(scsi_io_reply->SenseCount); - bzero(&ccb->csio.sense_data, sizeof(&ccb->csio.sense_data)); + bzero(&ccb->csio.sense_data, sizeof(ccb->csio.sense_data)); bcopy(req->sense_vbuf, &ccb->csio.sense_data, min(ccb->csio.sense_len, le32toh(scsi_io_reply->SenseCount))); Modified: stable/8/sys/kern/subr_firmware.c ============================================================================== --- stable/8/sys/kern/subr_firmware.c Mon Jul 2 19:19:07 2012 (r238013) +++ stable/8/sys/kern/subr_firmware.c Mon Jul 2 19:19:21 2012 (r238014) @@ -193,7 +193,7 @@ firmware_register(const char *imagename, __func__, imagename); return NULL; } - bzero(frp, sizeof(frp)); /* start from a clean record */ + bzero(frp, sizeof(*frp)); /* start from a clean record */ frp->fw.name = imagename; frp->fw.data = data; frp->fw.datasize = datasize; From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 19:35:56 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EA7561065673; Mon, 2 Jul 2012 19:35:56 +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 D79B58FC16; Mon, 2 Jul 2012 19:35:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q62JZufD091075; Mon, 2 Jul 2012 19:35:56 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q62JZuZD091070; Mon, 2 Jul 2012 19:35:56 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201207021935.q62JZuZD091070@svn.freebsd.org> From: Alexander Motin Date: Mon, 2 Jul 2012 19:35:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238015 - in head/sys/dev/usb: . controller X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 19:35:57 -0000 Author: mav Date: Mon Jul 2 19:35:56 2012 New Revision: 238015 URL: http://svn.freebsd.org/changeset/base/238015 Log: Add IDs for some USB controllers I have around. Just a cosmetics. MFC after: 3 days Modified: head/sys/dev/usb/controller/ehci_pci.c head/sys/dev/usb/controller/ohci_pci.c head/sys/dev/usb/controller/xhci_pci.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/controller/ehci_pci.c ============================================================================== --- head/sys/dev/usb/controller/ehci_pci.c Mon Jul 2 19:19:21 2012 (r238014) +++ head/sys/dev/usb/controller/ehci_pci.c Mon Jul 2 19:35:56 2012 (r238015) @@ -104,9 +104,6 @@ ehci_pci_match(device_t self) uint32_t device_id = pci_get_devid(self); switch (device_id) { - case 0x268c8086: - return ("Intel 63XXESB USB 2.0 controller"); - case 0x523910b9: return "ALi M5239 USB 2.0 controller"; @@ -120,7 +117,13 @@ ehci_pci_match(device_t self) return "ATI SB200 USB 2.0 controller"; case 0x43731002: return "ATI SB400 USB 2.0 controller"; + case 0x43961002: + return ("AMD SB7x0/SB8x0/SB9x0 USB 2.0 controller"); + case 0x1e268086: + return ("Intel Panther Point USB 2.0 controller"); + case 0x1e2d8086: + return ("Intel Panther Point USB 2.0 controller"); case 0x25ad8086: return "Intel 6300ESB USB 2.0 controller"; case 0x24cd8086: @@ -129,9 +132,10 @@ ehci_pci_match(device_t self) return "Intel 82801EB/R (ICH5) USB 2.0 controller"; case 0x265c8086: return "Intel 82801FB (ICH6) USB 2.0 controller"; + case 0x268c8086: + return ("Intel 63XXESB USB 2.0 controller"); case 0x27cc8086: return "Intel 82801GB/R (ICH7) USB 2.0 controller"; - case 0x28368086: return "Intel 82801H (ICH8) USB 2.0 controller USB2-A"; case 0x283a8086: Modified: head/sys/dev/usb/controller/ohci_pci.c ============================================================================== --- head/sys/dev/usb/controller/ohci_pci.c Mon Jul 2 19:19:21 2012 (r238014) +++ head/sys/dev/usb/controller/ohci_pci.c Mon Jul 2 19:35:56 2012 (r238015) @@ -132,6 +132,10 @@ ohci_pci_match(device_t self) return "ATI SB400 USB Controller"; case 0x43751002: return "ATI SB400 USB Controller"; + case 0x43971002: + return ("AMD SB7x0/SB8x0/SB9x0 USB controller"); + case 0x43991002: + return ("AMD SB7x0/SB8x0/SB9x0 USB controller"); case 0x06701095: return ("CMD Tech 670 (USB0670) USB controller"); Modified: head/sys/dev/usb/controller/xhci_pci.c ============================================================================== --- head/sys/dev/usb/controller/xhci_pci.c Mon Jul 2 19:19:21 2012 (r238014) +++ head/sys/dev/usb/controller/xhci_pci.c Mon Jul 2 19:35:56 2012 (r238015) @@ -93,6 +93,19 @@ MODULE_DEPEND(xhci, usb, 1, 1, 1); static const char * xhci_pci_match(device_t self) { + uint32_t device_id = pci_get_devid(self); + + switch (device_id) { + case 0x01941033: + return ("NEC uPD720200 USB 3.0 controller"); + + case 0x1e318086: + return ("Intel Panther Point USB 3.0 controller"); + + default: + break; + } + if ((pci_get_class(self) == PCIC_SERIALBUS) && (pci_get_subclass(self) == PCIS_SERIALBUS_USB) && (pci_get_progif(self) == PCIP_SERIALBUS_USB_XHCI)) { Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Mon Jul 2 19:19:21 2012 (r238014) +++ head/sys/dev/usb/usbdevs Mon Jul 2 19:35:56 2012 (r238015) @@ -560,6 +560,7 @@ vendor APACER 0x1005 Apacer vendor MOTOROLA4 0x100d Motorola vendor AIRPLUS 0x1011 Airplus vendor DESKNOTE 0x1019 Desknote +vendor NEC3 0x1033 NEC vendor GIGABYTE 0x1044 GIGABYTE vendor WESTERN 0x1058 Western Digital vendor MOTOROLA 0x1063 Motorola @@ -1924,6 +1925,7 @@ product INSYSTEM STORAGE_V2 0x5701 USB S product INTEL EASYPC_CAMERA 0x0110 Easy PC Camera product INTEL TESTBOARD 0x9890 82930 test board product INTEL2 IRMH 0x0020 Integrated Rate Matching Hub +product INTEL2 IRMH2 0x0024 Integrated Rate Matching Hub /* Intersil products */ product INTERSIL PRISM_GT 0x1000 PrismGT USB 2.0 WLAN From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 19:44:19 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A5D33106566C; Mon, 2 Jul 2012 19:44:19 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 886E18FC17; Mon, 2 Jul 2012 19:44:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q62JiJLp092721; Mon, 2 Jul 2012 19:44:19 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q62JiJju092716; Mon, 2 Jul 2012 19:44:19 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201207021944.q62JiJju092716@svn.freebsd.org> From: Gleb Smirnoff Date: Mon, 2 Jul 2012 19:44:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238016 - in head/sys: netinet netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 19:44:19 -0000 Author: glebius Date: Mon Jul 2 19:44:18 2012 New Revision: 238016 URL: http://svn.freebsd.org/changeset/base/238016 Log: Remove route caching from IP multicast routing code. There is no reason to do that, and also, cached route never got unreferenced, which meant a reference leak. Reviewed by: bms Modified: head/sys/netinet/ip_mroute.c head/sys/netinet/ip_mroute.h head/sys/netinet6/ip6_mroute.c head/sys/netinet6/ip6_mroute.h Modified: head/sys/netinet/ip_mroute.c ============================================================================== --- head/sys/netinet/ip_mroute.c Mon Jul 2 19:35:56 2012 (r238015) +++ head/sys/netinet/ip_mroute.c Mon Jul 2 19:44:18 2012 (r238016) @@ -924,7 +924,6 @@ add_vif(struct vifctl *vifcp) vifp->v_pkt_out = 0; vifp->v_bytes_in = 0; vifp->v_bytes_out = 0; - bzero(&vifp->v_route, sizeof(vifp->v_route)); /* Adjust numvifs up if the vifi is higher than numvifs */ if (V_numvifs <= vifcp->vifc_vifi) @@ -1702,7 +1701,7 @@ send_packet(struct vif *vifp, struct mbu * should get rejected because they appear to come from * the loopback interface, thus preventing looping. */ - error = ip_output(m, NULL, &vifp->v_route, IP_FORWARDING, &imo, NULL); + error = ip_output(m, NULL, NULL, IP_FORWARDING, &imo, NULL); CTR3(KTR_IPMF, "%s: vif %td err %d", __func__, (ptrdiff_t)(vifp - V_viftable), error); } Modified: head/sys/netinet/ip_mroute.h ============================================================================== --- head/sys/netinet/ip_mroute.h Mon Jul 2 19:35:56 2012 (r238015) +++ head/sys/netinet/ip_mroute.h Mon Jul 2 19:44:18 2012 (r238016) @@ -262,7 +262,6 @@ struct vif { u_long v_pkt_out; /* # pkts out on interface */ u_long v_bytes_in; /* # bytes in on interface */ u_long v_bytes_out; /* # bytes out on interface */ - struct route v_route; /* cached route */ }; #ifdef _KERNEL Modified: head/sys/netinet6/ip6_mroute.c ============================================================================== --- head/sys/netinet6/ip6_mroute.c Mon Jul 2 19:35:56 2012 (r238015) +++ head/sys/netinet6/ip6_mroute.c Mon Jul 2 19:44:18 2012 (r238016) @@ -717,7 +717,6 @@ add_m6if(struct mif6ctl *mifcp) mifp->m6_pkt_out = 0; mifp->m6_bytes_in = 0; mifp->m6_bytes_out = 0; - bzero(&mifp->m6_route, sizeof(mifp->m6_route)); /* Adjust nummifs up if the mifi is higher than nummifs */ if (nummifs <= mifcp->mif6c_mifi) @@ -1576,11 +1575,8 @@ phyint_send(struct ip6_hdr *ip6, struct struct mbuf *mb_copy; struct ifnet *ifp = mifp->m6_ifp; int error = 0; - struct sockaddr_in6 *dst6; u_long linkmtu; - dst6 = &mifp->m6_route.ro_dst; - /* * Make a new reference to the packet; make sure that * the IPv6 header is actually copied, not just referenced, @@ -1610,8 +1606,8 @@ phyint_send(struct ip6_hdr *ip6, struct /* XXX: ip6_output will override ip6->ip6_hlim */ im6o.im6o_multicast_hlim = ip6->ip6_hlim; im6o.im6o_multicast_loop = 1; - error = ip6_output(mb_copy, NULL, &mifp->m6_route, - IPV6_FORWARDING, &im6o, NULL, NULL); + error = ip6_output(mb_copy, NULL, NULL, IPV6_FORWARDING, &im6o, + NULL, NULL); #ifdef MRT6DEBUG if (V_mrt6debug & DEBUG_XMIT) @@ -1626,10 +1622,13 @@ phyint_send(struct ip6_hdr *ip6, struct * loop back a copy now. */ if (in6_mcast_loop) { - dst6->sin6_len = sizeof(struct sockaddr_in6); - dst6->sin6_family = AF_INET6; - dst6->sin6_addr = ip6->ip6_dst; - ip6_mloopback(ifp, m, &mifp->m6_route.ro_dst); + struct sockaddr_in6 dst6; + + bzero(&dst6, sizeof(dst6)); + dst6.sin6_len = sizeof(struct sockaddr_in6); + dst6.sin6_family = AF_INET6; + dst6.sin6_addr = ip6->ip6_dst; + ip6_mloopback(ifp, m, &dst6); } /* @@ -1638,15 +1637,18 @@ phyint_send(struct ip6_hdr *ip6, struct */ linkmtu = IN6_LINKMTU(ifp); if (mb_copy->m_pkthdr.len <= linkmtu || linkmtu < IPV6_MMTU) { - dst6->sin6_len = sizeof(struct sockaddr_in6); - dst6->sin6_family = AF_INET6; - dst6->sin6_addr = ip6->ip6_dst; + struct sockaddr_in6 dst6; + + bzero(&dst6, sizeof(dst6)); + dst6.sin6_len = sizeof(struct sockaddr_in6); + dst6.sin6_family = AF_INET6; + dst6.sin6_addr = ip6->ip6_dst; /* * We just call if_output instead of nd6_output here, since * we need no ND for a multicast forwarded packet...right? */ error = (*ifp->if_output)(ifp, mb_copy, - (struct sockaddr *)&mifp->m6_route.ro_dst, NULL); + (struct sockaddr *)&dst6, NULL); #ifdef MRT6DEBUG if (V_mrt6debug & DEBUG_XMIT) log(LOG_DEBUG, "phyint_send on mif %d err %d\n", Modified: head/sys/netinet6/ip6_mroute.h ============================================================================== --- head/sys/netinet6/ip6_mroute.h Mon Jul 2 19:35:56 2012 (r238015) +++ head/sys/netinet6/ip6_mroute.h Mon Jul 2 19:44:18 2012 (r238016) @@ -212,7 +212,6 @@ struct mif6 { u_quad_t m6_pkt_out; /* # pkts out on interface */ u_quad_t m6_bytes_in; /* # bytes in on interface */ u_quad_t m6_bytes_out; /* # bytes out on interface */ - struct route_in6 m6_route; /* cached route */ #ifdef notyet u_int m6_rsvp_on; /* RSVP listening on this vif */ struct socket *m6_rsvpd; /* RSVP daemon socket */ From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 19:51:40 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8C66D1065673; Mon, 2 Jul 2012 19:51:40 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 714438FC0A; Mon, 2 Jul 2012 19:51:40 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q62JpeVj091166; Mon, 2 Jul 2012 19:51:40 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q62JpeWO091164; Mon, 2 Jul 2012 19:51:40 GMT (envelope-from bapt@FreeBSD.org) X-Authentication-Warning: freefall.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f Date: Mon, 2 Jul 2012 19:51:37 +0000 From: Baptiste Daroussin To: Gleb Smirnoff Message-ID: <20120702195137.GD37018@ithaqua.etoilebsd.net> References: <201207021528.q62FSoot078093@svn.freebsd.org> <20120702181938.GO21957@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="+B+y8wtTXqdUj1xM" Content-Disposition: inline In-Reply-To: <20120702181938.GO21957@FreeBSD.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r237997 - in head: tools/build/mk tools/build/options usr.sbin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 19:51:40 -0000 --+B+y8wtTXqdUj1xM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jul 02, 2012 at 10:19:38PM +0400, Gleb Smirnoff wrote: > On Mon, Jul 02, 2012 at 03:28:50PM +0000, Baptiste Daroussin wrote: > B> Author: bapt > B> Date: Mon Jul 2 15:28:50 2012 > B> New Revision: 237997 > B> URL: http://svn.freebsd.org/changeset/base/237997 > B>=20 > B> Log: > B> New build KNOB: WITHOUT_PKGBOOTSTRAP to condition building of usr.sb= in/pkg > B> Do not condition usr.sbin/pkg building on WITHOUT_PKGTOOLS anymore, = so that users can > B> remove the old pkg_* tools without removing the pkgng boostrap >=20 > I've fixed the build but head/tools/build/options/WITHOUT_PKGBOOSTRAP sti= ll > needs to be renamed. thank you, and sorry. regards, Bapt --+B+y8wtTXqdUj1xM Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAk/x+8kACgkQ8kTtMUmk6EyEqgCgnPMaxSPpKHE8i2nEorb0gj/3 MhoAnRcemOZV94TGqnatXf2icsIRsTdb =VxP2 -----END PGP SIGNATURE----- --+B+y8wtTXqdUj1xM-- From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 19:56:29 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 588E91065672; Mon, 2 Jul 2012 19:56:29 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from mail.xcllnt.net (mail.xcllnt.net [70.36.220.4]) by mx1.freebsd.org (Postfix) with ESMTP id 354878FC0A; Mon, 2 Jul 2012 19:56:29 +0000 (UTC) Received: from marcelm-sslvpn-nc.jnpr.net (natint3.juniper.net [66.129.224.36]) (authenticated bits=0) by mail.xcllnt.net (8.14.5/8.14.5) with ESMTP id q62JuMVX005959 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Mon, 2 Jul 2012 12:56:28 -0700 (PDT) (envelope-from marcel@xcllnt.net) Mime-Version: 1.0 (Apple Message framework v1278) Content-Type: text/plain; charset=koi8-r From: Marcel Moolenaar In-Reply-To: <20120702181938.GO21957@FreeBSD.org> Date: Mon, 2 Jul 2012 12:56:17 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201207021528.q62FSoot078093@svn.freebsd.org> <20120702181938.GO21957@FreeBSD.org> To: Gleb Smirnoff X-Mailer: Apple Mail (2.1278) Cc: svn-src-head@FreeBSD.org, Baptiste Daroussin , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org Subject: Re: svn commit: r237997 - in head: tools/build/mk tools/build/options usr.sbin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 19:56:29 -0000 On Jul 2, 2012, at 11:19 AM, Gleb Smirnoff wrote: > On Mon, Jul 02, 2012 at 03:28:50PM +0000, Baptiste Daroussin wrote: > B> Author: bapt > B> Date: Mon Jul 2 15:28:50 2012 > B> New Revision: 237997 > B> URL: http://svn.freebsd.org/changeset/base/237997 > B>=20 > B> Log: > B> New build KNOB: WITHOUT_PKGBOOTSTRAP to condition building of = usr.sbin/pkg > B> Do not condition usr.sbin/pkg building on WITHOUT_PKGTOOLS = anymore, so that users can > B> remove the old pkg_* tools without removing the pkgng boostrap >=20 > I've fixed the build but head/tools/build/options/WITHOUT_PKGBOOSTRAP = still > needs to be renamed. Thanks Gleb. I'll take care of that one then and re-generate the man = page. --=20 Marcel Moolenaar marcel@xcllnt.net From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 19:56:31 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C86DD106566C; Mon, 2 Jul 2012 19:56:31 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B60FD8FC12; Mon, 2 Jul 2012 19:56:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q62JuVaG094099; Mon, 2 Jul 2012 19:56:31 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q62JuVeS094097; Mon, 2 Jul 2012 19:56:31 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201207021956.q62JuVeS094097@svn.freebsd.org> From: Marius Strobl Date: Mon, 2 Jul 2012 19:56:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238017 - stable/9/sys/dev/re X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 19:56:31 -0000 Author: marius Date: Mon Jul 2 19:56:31 2012 New Revision: 238017 URL: http://svn.freebsd.org/changeset/base/238017 Log: MFC: r237547 Fix size of the bcopy when extracting ethernet address Obtained from: DragonFly Modified: stable/9/sys/dev/re/if_re.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/e1000/ (props changed) stable/9/sys/dev/isp/ (props changed) stable/9/sys/dev/ixgbe/ (props changed) stable/9/sys/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/modules/ (props changed) Modified: stable/9/sys/dev/re/if_re.c ============================================================================== --- stable/9/sys/dev/re/if_re.c Mon Jul 2 19:44:18 2012 (r238016) +++ stable/9/sys/dev/re/if_re.c Mon Jul 2 19:56:31 2012 (r238017) @@ -1527,7 +1527,7 @@ re_attach(device_t dev) re_read_eeprom(sc, (caddr_t)as, RL_EE_EADDR, 3); for (i = 0; i < ETHER_ADDR_LEN / 2; i++) as[i] = le16toh(as[i]); - bcopy(as, eaddr, sizeof(eaddr)); + bcopy(as, eaddr, ETHER_ADDR_LEN); } if (sc->rl_type == RL_8169) { From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 20:01:48 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D3A02106566C; Mon, 2 Jul 2012 20:01:48 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C0E858FC0C; Mon, 2 Jul 2012 20:01:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q62K1mjG094625; Mon, 2 Jul 2012 20:01:48 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q62K1mLw094624; Mon, 2 Jul 2012 20:01:48 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201207022001.q62K1mLw094624@svn.freebsd.org> From: Marcel Moolenaar Date: Mon, 2 Jul 2012 20:01:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238018 - head/tools/build/options X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 20:01:48 -0000 Author: marcel Date: Mon Jul 2 20:01:48 2012 New Revision: 238018 URL: http://svn.freebsd.org/changeset/base/238018 Log: Fix typo in option description file (using svn move). Added: head/tools/build/options/WITHOUT_PKGBOOTSTRAP - copied unchanged from r238017, head/tools/build/options/WITHOUT_PKGBOOSTRAP Deleted: head/tools/build/options/WITHOUT_PKGBOOSTRAP Copied: head/tools/build/options/WITHOUT_PKGBOOTSTRAP (from r238017, head/tools/build/options/WITHOUT_PKGBOOSTRAP) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITHOUT_PKGBOOTSTRAP Mon Jul 2 20:01:48 2012 (r238018, copy of r238017, head/tools/build/options/WITHOUT_PKGBOOSTRAP) @@ -0,0 +1,4 @@ +.\" $FreeBSD$ +Set to not build +.Xr pkg +bootstrap tool From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 20:07:10 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9886E106566C; Mon, 2 Jul 2012 20:07:10 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 849AC8FC14; Mon, 2 Jul 2012 20:07:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q62K7Amk095162; Mon, 2 Jul 2012 20:07:10 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q62K7Arv095160; Mon, 2 Jul 2012 20:07:10 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201207022007.q62K7Arv095160@svn.freebsd.org> From: Marius Strobl Date: Mon, 2 Jul 2012 20:07:10 +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: r238019 - stable/8/sys/dev/re X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 20:07:10 -0000 Author: marius Date: Mon Jul 2 20:07:09 2012 New Revision: 238019 URL: http://svn.freebsd.org/changeset/base/238019 Log: MFC: r237547 Fix size of the bcopy when extracting ethernet address Obtained from: DragonFly Modified: stable/8/sys/dev/re/if_re.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/boot/ (props changed) stable/8/sys/cddl/ (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/e1000/ (props changed) Modified: stable/8/sys/dev/re/if_re.c ============================================================================== --- stable/8/sys/dev/re/if_re.c Mon Jul 2 20:01:48 2012 (r238018) +++ stable/8/sys/dev/re/if_re.c Mon Jul 2 20:07:09 2012 (r238019) @@ -1523,7 +1523,7 @@ re_attach(device_t dev) re_read_eeprom(sc, (caddr_t)as, RL_EE_EADDR, 3); for (i = 0; i < ETHER_ADDR_LEN / 2; i++) as[i] = le16toh(as[i]); - bcopy(as, eaddr, sizeof(eaddr)); + bcopy(as, eaddr, ETHER_ADDR_LEN); } if (sc->rl_type == RL_8169) { From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 20:08:12 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 42A92106566B; Mon, 2 Jul 2012 20:08:12 +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 30A8A8FC08; Mon, 2 Jul 2012 20:08:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q62K8CC6095287; Mon, 2 Jul 2012 20:08:12 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q62K8Bch095285; Mon, 2 Jul 2012 20:08:12 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201207022008.q62K8Bch095285@svn.freebsd.org> From: John Baldwin Date: Mon, 2 Jul 2012 20:08:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238020 - head/usr.bin/top X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 20:08:12 -0000 Author: jhb Date: Mon Jul 2 20:08:11 2012 New Revision: 238020 URL: http://svn.freebsd.org/changeset/base/238020 Log: Fix two layout bugs in the previous change: - Properly increase y_mem when per-CPU stats are enabled. - Update y_arc for per-CPU stats being enabled/disabled. MFC after: 3 days Modified: head/usr.bin/top/machine.c Modified: head/usr.bin/top/machine.c ============================================================================== --- head/usr.bin/top/machine.c Mon Jul 2 20:07:09 2012 (r238019) +++ head/usr.bin/top/machine.c Mon Jul 2 20:08:11 2012 (r238020) @@ -263,6 +263,7 @@ update_layout(void) { y_mem = 3; + y_arc = 4; y_swap = 4 + arc_enabled; y_idlecursor = 5 + arc_enabled; y_message = 5 + arc_enabled; @@ -271,7 +272,8 @@ update_layout(void) Header_lines = 7 + arc_enabled; if (pcpu_stats) { - y_mem = ncpus - 1; + y_mem += ncpus - 1; + y_arc += ncpus - 1; y_swap += ncpus - 1; y_idlecursor += ncpus - 1; y_message += ncpus - 1; From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 20:12:30 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 692EA106581C; Mon, 2 Jul 2012 20:12:30 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 4DDC48FC0C; Mon, 2 Jul 2012 20:12:30 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q62KCUXT093492; Mon, 2 Jul 2012 20:12:30 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q62KCUgQ093491; Mon, 2 Jul 2012 20:12:30 GMT (envelope-from bapt@FreeBSD.org) X-Authentication-Warning: freefall.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f Date: Mon, 2 Jul 2012 20:12:27 +0000 From: Baptiste Daroussin To: Marcel Moolenaar Message-ID: <20120702201227.GE37018@ithaqua.etoilebsd.net> References: <201207022001.q62K1mLw094624@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Ns7jmDPpOpCD+GE/" Content-Disposition: inline In-Reply-To: <201207022001.q62K1mLw094624@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r238018 - head/tools/build/options X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 20:12:30 -0000 --Ns7jmDPpOpCD+GE/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jul 02, 2012 at 08:01:48PM +0000, Marcel Moolenaar wrote: > Author: marcel > Date: Mon Jul 2 20:01:48 2012 > New Revision: 238018 > URL: http://svn.freebsd.org/changeset/base/238018 >=20 > Log: > Fix typo in option description file (using svn move). >=20 > Added: > head/tools/build/options/WITHOUT_PKGBOOTSTRAP > - copied unchanged from r238017, head/tools/build/options/WITHOUT_PK= GBOOSTRAP > Deleted: > head/tools/build/options/WITHOUT_PKGBOOSTRAP >=20 > Copied: head/tools/build/options/WITHOUT_PKGBOOTSTRAP (from r238017, head= /tools/build/options/WITHOUT_PKGBOOSTRAP) > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/tools/build/options/WITHOUT_PKGBOOTSTRAP Mon Jul 2 20:01:48 201= 2 (r238018, copy of r238017, head/tools/build/options/WITHOUT_PKGBOOSTRAP) > @@ -0,0 +1,4 @@ > +.\" $FreeBSD$ > +Set to not build > +.Xr pkg > +bootstrap tool THank you very much regards, Bapt --Ns7jmDPpOpCD+GE/ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAk/yAKsACgkQ8kTtMUmk6EwMtgCfW83iYq+z+i8/tkSatU1UZJQV oEQAnRpe/XNHynW/k1jNlm5mRmasM7+j =1uE9 -----END PGP SIGNATURE----- --Ns7jmDPpOpCD+GE/-- From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 20:24:02 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 13B7B106566C; Mon, 2 Jul 2012 20:24:02 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 011658FC17; Mon, 2 Jul 2012 20:24:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q62KO1kB096726; Mon, 2 Jul 2012 20:24:01 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q62KO1lh096725; Mon, 2 Jul 2012 20:24:01 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201207022024.q62KO1lh096725@svn.freebsd.org> From: Marcel Moolenaar Date: Mon, 2 Jul 2012 20:24:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238021 - head/tools/build/options X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 20:24:02 -0000 Author: marcel Date: Mon Jul 2 20:24:01 2012 New Revision: 238021 URL: http://svn.freebsd.org/changeset/base/238021 Log: Add description for INSTALL_AS_USER Added: head/tools/build/options/WITH_INSTALL_AS_USER (contents, props changed) Added: head/tools/build/options/WITH_INSTALL_AS_USER ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITH_INSTALL_AS_USER Mon Jul 2 20:24:01 2012 (r238021) @@ -0,0 +1,9 @@ +.\" $FreeBSD$ +Set to make install targets succeed for non-root users by installing +files with owner and group attributes set to that of the user running +the +.Xr make 1 +command. +The user still has to set the +.Va DESTDIR +variable to point to a directory where the user has write permissions. From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 20:25:51 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1BD36106566B; Mon, 2 Jul 2012 20:25:51 +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 E3BB28FC15; Mon, 2 Jul 2012 20:25:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q62KPo8v096920; Mon, 2 Jul 2012 20:25:50 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q62KPotw096918; Mon, 2 Jul 2012 20:25:50 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201207022025.q62KPotw096918@svn.freebsd.org> From: Alexander Motin Date: Mon, 2 Jul 2012 20:25:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238022 - head/sys/dev/sound/pci/hda X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 20:25:51 -0000 Author: mav Date: Mon Jul 2 20:25:50 2012 New Revision: 238022 URL: http://svn.freebsd.org/changeset/base/238022 Log: Remove 14 not very useful characters " HDA CODEC PCM" from HDA pcm device names to shorten them. PulseAudio reported to have problems with names longer then 63 chars and at least in XMMS long names are inconvinient. Reported by: hselasky MFC after: 3 days Modified: head/sys/dev/sound/pci/hda/hdaa.c Modified: head/sys/dev/sound/pci/hda/hdaa.c ============================================================================== --- head/sys/dev/sound/pci/hda/hdaa.c Mon Jul 2 20:24:01 2012 (r238021) +++ head/sys/dev/sound/pci/hda/hdaa.c Mon Jul 2 20:25:50 2012 (r238022) @@ -6203,12 +6203,14 @@ hdaa_resume(device_t dev) static int hdaa_probe(device_t dev) { + const char *pdesc; char buf[128]; if (hda_get_node_type(dev) != HDA_PARAM_FCT_GRP_TYPE_NODE_TYPE_AUDIO) return (ENXIO); - snprintf(buf, sizeof(buf), "%s Audio Function Group", - device_get_desc(device_get_parent(dev))); + pdesc = device_get_desc(device_get_parent(dev)); + snprintf(buf, sizeof(buf), "%.*s Audio Function Group", + (int)(strlen(pdesc) - 10), pdesc); device_set_desc_copy(dev, buf); return (BUS_PROBE_DEFAULT); } @@ -6565,6 +6567,7 @@ hdaa_pcm_probe(device_t dev) struct hdaa_pcm_devinfo *pdevinfo = (struct hdaa_pcm_devinfo *)device_get_ivars(dev); struct hdaa_devinfo *devinfo = pdevinfo->devinfo; + const char *pdesc; char chans1[8], chans2[8]; char buf[128]; int loc1, loc2, t1, t2; @@ -6610,8 +6613,9 @@ hdaa_pcm_probe(device_t dev) t1 = -2; if (pdevinfo->digital) t1 = -2; - snprintf(buf, sizeof(buf), "%s PCM (%s%s%s%s%s%s%s%s%s)", - device_get_desc(device_get_parent(device_get_parent(dev))), + pdesc = device_get_desc(device_get_parent(dev)); + snprintf(buf, sizeof(buf), "%.*s (%s%s%s%s%s%s%s%s%s)", + (int)(strlen(pdesc) - 21), pdesc, loc1 >= 0 ? HDA_LOCS[loc1] : "", loc1 >= 0 ? " " : "", (pdevinfo->digital == 0x7)?"HDMI/DP": ((pdevinfo->digital == 0x5)?"DisplayPort": From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 20:26:11 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D1D371065686; Mon, 2 Jul 2012 20:26:11 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BE8AB8FC12; Mon, 2 Jul 2012 20:26:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q62KQBgj096993; Mon, 2 Jul 2012 20:26:11 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q62KQBVJ096991; Mon, 2 Jul 2012 20:26:11 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201207022026.q62KQBVJ096991@svn.freebsd.org> From: Marcel Moolenaar Date: Mon, 2 Jul 2012 20:26:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238023 - head/tools/build/options X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 20:26:11 -0000 Author: marcel Date: Mon Jul 2 20:26:11 2012 New Revision: 238023 URL: http://svn.freebsd.org/changeset/base/238023 Log: A cross-reference takes a man page section as well. Assume pkg(1), based on pkg_add(1). Modified: head/tools/build/options/WITHOUT_PKGBOOTSTRAP Modified: head/tools/build/options/WITHOUT_PKGBOOTSTRAP ============================================================================== --- head/tools/build/options/WITHOUT_PKGBOOTSTRAP Mon Jul 2 20:25:50 2012 (r238022) +++ head/tools/build/options/WITHOUT_PKGBOOTSTRAP Mon Jul 2 20:26:11 2012 (r238023) @@ -1,4 +1,4 @@ .\" $FreeBSD$ Set to not build -.Xr pkg +.Xr pkg 1 bootstrap tool From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 20:27:38 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 91CA51065670; Mon, 2 Jul 2012 20:27:38 +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 8016C8FC1E; Mon, 2 Jul 2012 20:27:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q62KRcwG097155; Mon, 2 Jul 2012 20:27:38 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q62KRc7Z097153; Mon, 2 Jul 2012 20:27:38 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201207022027.q62KRc7Z097153@svn.freebsd.org> From: John Baldwin Date: Mon, 2 Jul 2012 20:27:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238024 - head/usr.sbin/cron/crontab X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 20:27:38 -0000 Author: jhb Date: Mon Jul 2 20:27:37 2012 New Revision: 238024 URL: http://svn.freebsd.org/changeset/base/238024 Log: Add a one second sleep before touching the spool directory. If the touch occurs in the same second as the earlier operations to create the temporary file and the cron(8) daemon is rescans the spool directory during that second, then the daemon may miss a cron edit and not properly update its internal database. MFC after: 1 month Modified: head/usr.sbin/cron/crontab/crontab.c Modified: head/usr.sbin/cron/crontab/crontab.c ============================================================================== --- head/usr.sbin/cron/crontab/crontab.c Mon Jul 2 20:26:11 2012 (r238023) +++ head/usr.sbin/cron/crontab/crontab.c Mon Jul 2 20:27:37 2012 (r238024) @@ -608,6 +608,15 @@ replace_cmd() { log_it(RealUser, Pid, "REPLACE", User); + /* + * Creating the 'tn' temp file has already updated the + * modification time of the spool directory. Sleep for a + * second to ensure that poke_daemon() sets a later + * modification time. Otherwise, this can race with the cron + * daemon scanning for updated crontabs. + */ + sleep(1); + poke_daemon(); return (0); From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 20:28:12 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A44A5106566C; Mon, 2 Jul 2012 20:28:12 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 90C128FC0C; Mon, 2 Jul 2012 20:28:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q62KSCFW097249; Mon, 2 Jul 2012 20:28:12 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q62KSCrO097247; Mon, 2 Jul 2012 20:28:12 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201207022028.q62KSCrO097247@svn.freebsd.org> From: Marcel Moolenaar Date: Mon, 2 Jul 2012 20:28:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238025 - head/share/man/man5 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 20:28:12 -0000 Author: marcel Date: Mon Jul 2 20:28:12 2012 New Revision: 238025 URL: http://svn.freebsd.org/changeset/base/238025 Log: Added options: WITH_INSTALL_AS_USER WITHOUT_PKGBOOTSTRAP Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Mon Jul 2 20:27:37 2012 (r238024) +++ head/share/man/man5/src.conf.5 Mon Jul 2 20:28:12 2012 (r238025) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: head/tools/build/options/makeman 236279 2012-05-30 02:37:20Z gjb .\" $FreeBSD$ -.Dd June 27, 2012 +.Dd July 2, 2012 .Dt SRC.CONF 5 .Os .Sh NAME @@ -514,6 +514,16 @@ Set this if you do not want to install o For example when creating a .Xr nanobsd 8 image. +.It Va WITH_INSTALL_AS_USER +.\" from FreeBSD: head/tools/build/options/WITH_INSTALL_AS_USER 238021 2012-07-02 20:24:01Z marcel +Set to make install targets succeed for non-root users by installing +files with owner and group attributes set to that of the user running +the +.Xr make 1 +command. +The user still has to set the +.Va DESTDIR +variable to point to a directory where the user has write permissions. .It Va WITHOUT_IPFILTER .\" from FreeBSD: head/tools/build/options/WITHOUT_IPFILTER 156932 2006-03-21 07:50:50Z ru Set to not build IP Filter package. @@ -839,6 +849,11 @@ When set, it also enforces the following .It .Va WITHOUT_AUTHPF .El +.It Va WITHOUT_PKGBOOTSTRAP +.\" from FreeBSD: head/tools/build/options/WITHOUT_PKGBOOTSTRAP 238023 2012-07-02 20:26:11Z marcel +Set to not build +.Xr pkg 1 +bootstrap tool .It Va WITHOUT_PKGTOOLS .\" from FreeBSD: head/tools/build/options/WITHOUT_PKGTOOLS 183242 2008-09-21 22:02:26Z sam Set to not build From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 20:36:27 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id ACF7E1065670; Mon, 2 Jul 2012 20:36:27 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 80F488FC08; Mon, 2 Jul 2012 20:36:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q62KaRdX098122; Mon, 2 Jul 2012 20:36:27 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q62KaRa3098119; Mon, 2 Jul 2012 20:36:27 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201207022036.q62KaRa3098119@svn.freebsd.org> From: Marcel Moolenaar Date: Mon, 2 Jul 2012 20:36:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238026 - in head/sys: dev/filemon modules X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 20:36:27 -0000 Author: marcel Date: Mon Jul 2 20:36:26 2012 New Revision: 238026 URL: http://svn.freebsd.org/changeset/base/238026 Log: There's no need to make filemon specific to i386 and amd64. All LP64 architectures define elf64_freebsd_sysvec and all ILP32 architectures define elf32_freebsd_sysvec. Modified: head/sys/dev/filemon/filemon_wrapper.c head/sys/modules/Makefile Modified: head/sys/dev/filemon/filemon_wrapper.c ============================================================================== --- head/sys/dev/filemon/filemon_wrapper.c Mon Jul 2 20:28:12 2012 (r238025) +++ head/sys/dev/filemon/filemon_wrapper.c Mon Jul 2 20:36:26 2012 (r238026) @@ -656,12 +656,10 @@ filemon_wrapper_vfork(struct thread *td, static void filemon_wrapper_install(void) { -#if defined(__i386__) - struct sysent *sv_table = elf32_freebsd_sysvec.sv_table; -#elif defined(__amd64__) +#if defined(__LP64__) struct sysent *sv_table = elf64_freebsd_sysvec.sv_table; #else -#error Machine type not supported + struct sysent *sv_table = elf32_freebsd_sysvec.sv_table; #endif sv_table[SYS_chdir].sy_call = (sy_call_t *) filemon_wrapper_chdir; @@ -702,12 +700,10 @@ filemon_wrapper_install(void) static void filemon_wrapper_deinstall(void) { -#if defined(__i386__) - struct sysent *sv_table = elf32_freebsd_sysvec.sv_table; -#elif defined(__amd64__) +#if defined(__LP64__) struct sysent *sv_table = elf64_freebsd_sysvec.sv_table; #else -#error Machine type not supported + struct sysent *sv_table = elf32_freebsd_sysvec.sv_table; #endif sv_table[SYS_chdir].sy_call = (sy_call_t *)sys_chdir; Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Mon Jul 2 20:28:12 2012 (r238025) +++ head/sys/modules/Makefile Mon Jul 2 20:36:26 2012 (r238026) @@ -106,7 +106,7 @@ SUBDIR= \ fdc \ fdescfs \ ${_fe} \ - ${_filemon} \ + filemon \ firewire \ firmware \ ${_fxp} \ @@ -360,10 +360,6 @@ SUBDIR= \ ${_zfs} \ zlib \ -.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" -_filemon= filemon -.endif - .if ${MACHINE_CPUARCH} != "powerpc" && ${MACHINE_CPUARCH} != "arm" && \ ${MACHINE_CPUARCH} != "mips" _syscons= syscons From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 20:36:55 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 04F6F106566B; Mon, 2 Jul 2012 20:36:55 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E17568FC14; Mon, 2 Jul 2012 20:36:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q62KasZg098209; Mon, 2 Jul 2012 20:36:54 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q62KassE098197; Mon, 2 Jul 2012 20:36:54 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201207022036.q62KassE098197@svn.freebsd.org> From: Matthew D Fleming Date: Mon, 2 Jul 2012 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: r238027 - in stable/8/sys: net net80211 netinet netinet/cc netinet/ipfw X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 20:36:55 -0000 Author: mdf Date: Mon Jul 2 20:36:54 2012 New Revision: 238027 URL: http://svn.freebsd.org/changeset/base/238027 Log: MFC r217322. Original commit log: sysctl(9) cleanup checkpoint: amd64 GENERIC builds cleanly. Commit the net* piece. The commit to HEAD was a superset of the proposed patch for PR kern/167357. Modified: stable/8/sys/net/if.c stable/8/sys/net/netisr.c stable/8/sys/net/route.c stable/8/sys/net80211/ieee80211_amrr.c stable/8/sys/net80211/ieee80211_freebsd.c stable/8/sys/netinet/cc/cc_htcp.c stable/8/sys/netinet/ipfw/ip_dn_io.c stable/8/sys/netinet/ipfw/ip_fw_dynamic.c stable/8/sys/netinet/tcp_hostcache.c stable/8/sys/netinet/tcp_subr.c stable/8/sys/netinet/tcp_syncache.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/boot/ (props changed) stable/8/sys/cddl/ (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/e1000/ (props changed) Modified: stable/8/sys/net/if.c ============================================================================== --- stable/8/sys/net/if.c Mon Jul 2 20:36:26 2012 (r238026) +++ stable/8/sys/net/if.c Mon Jul 2 20:36:54 2012 (r238027) @@ -104,7 +104,7 @@ SYSCTL_NODE(_net, PF_LINK, link, CTLFLAG SYSCTL_NODE(_net_link, 0, generic, CTLFLAG_RW, 0, "Generic link-management"); TUNABLE_INT("net.link.ifqmaxlen", &ifqmaxlen); -SYSCTL_UINT(_net_link, OID_AUTO, ifqmaxlen, CTLFLAG_RDTUN, +SYSCTL_INT(_net_link, OID_AUTO, ifqmaxlen, CTLFLAG_RDTUN, &ifqmaxlen, 0, "max send queue size"); /* Log link state change events */ Modified: stable/8/sys/net/netisr.c ============================================================================== --- stable/8/sys/net/netisr.c Mon Jul 2 20:36:26 2012 (r238026) +++ stable/8/sys/net/netisr.c Mon Jul 2 20:36:54 2012 (r238027) @@ -179,7 +179,7 @@ SYSCTL_INT(_net_isr, OID_AUTO, bindthrea #define NETISR_DEFAULT_MAXQLIMIT 10240 static u_int netisr_maxqlimit = NETISR_DEFAULT_MAXQLIMIT; TUNABLE_INT("net.isr.maxqlimit", &netisr_maxqlimit); -SYSCTL_INT(_net_isr, OID_AUTO, maxqlimit, CTLFLAG_RDTUN, +SYSCTL_UINT(_net_isr, OID_AUTO, maxqlimit, CTLFLAG_RDTUN, &netisr_maxqlimit, 0, "Maximum netisr per-protocol, per-CPU queue depth."); @@ -191,7 +191,7 @@ SYSCTL_INT(_net_isr, OID_AUTO, maxqlimit #define NETISR_DEFAULT_DEFAULTQLIMIT 256 static u_int netisr_defaultqlimit = NETISR_DEFAULT_DEFAULTQLIMIT; TUNABLE_INT("net.isr.defaultqlimit", &netisr_defaultqlimit); -SYSCTL_INT(_net_isr, OID_AUTO, defaultqlimit, CTLFLAG_RDTUN, +SYSCTL_UINT(_net_isr, OID_AUTO, defaultqlimit, CTLFLAG_RDTUN, &netisr_defaultqlimit, 0, "Default netisr per-protocol, per-CPU queue limit if not set by protocol"); @@ -201,7 +201,7 @@ SYSCTL_INT(_net_isr, OID_AUTO, defaultql * required for crashdump analysis, as it sizes netisr_proto[]. */ static u_int netisr_maxprot = NETISR_MAXPROT; -SYSCTL_INT(_net_isr, OID_AUTO, maxprot, CTLFLAG_RD, +SYSCTL_UINT(_net_isr, OID_AUTO, maxprot, CTLFLAG_RD, &netisr_maxprot, 0, "Compile-time limit on the number of protocols supported by netisr."); @@ -228,7 +228,7 @@ static u_int nws_array[MAXCPU]; * CPUs once fully started. */ static u_int nws_count; -SYSCTL_INT(_net_isr, OID_AUTO, numthreads, CTLFLAG_RD, +SYSCTL_UINT(_net_isr, OID_AUTO, numthreads, CTLFLAG_RD, &nws_count, 0, "Number of extant netisr threads."); /* Modified: stable/8/sys/net/route.c ============================================================================== --- stable/8/sys/net/route.c Mon Jul 2 20:36:26 2012 (r238026) +++ stable/8/sys/net/route.c Mon Jul 2 20:36:54 2012 (r238027) @@ -87,7 +87,7 @@ #endif u_int rt_numfibs = RT_NUMFIBS; -SYSCTL_INT(_net, OID_AUTO, fibs, CTLFLAG_RD, &rt_numfibs, 0, ""); +SYSCTL_UINT(_net, OID_AUTO, fibs, CTLFLAG_RD, &rt_numfibs, 0, ""); /* * Allow the boot code to allow LESS than RT_MAXFIBS to be used. * We can't do more because storage is statically allocated for now. @@ -110,7 +110,7 @@ TUNABLE_INT("net.fibs", &rt_numfibs); * from the network stack context. */ u_int rt_add_addr_allfibs = 1; -SYSCTL_INT(_net, OID_AUTO, add_addr_allfibs, CTLFLAG_RW, +SYSCTL_UINT(_net, OID_AUTO, add_addr_allfibs, CTLFLAG_RW, &rt_add_addr_allfibs, 0, ""); TUNABLE_INT("net.add_addr_allfibs", &rt_add_addr_allfibs); Modified: stable/8/sys/net80211/ieee80211_amrr.c ============================================================================== --- stable/8/sys/net80211/ieee80211_amrr.c Mon Jul 2 20:36:26 2012 (r238026) +++ stable/8/sys/net80211/ieee80211_amrr.c Mon Jul 2 20:36:54 2012 (r238027) @@ -308,10 +308,10 @@ amrr_sysctlattach(struct ieee80211vap *v "amrr_rate_interval", CTLTYPE_INT | CTLFLAG_RW, vap, 0, amrr_sysctl_interval, "I", "amrr operation interval (ms)"); /* XXX bounds check values */ - SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "amrr_max_sucess_threshold", CTLFLAG_RW, &amrr->amrr_max_success_threshold, 0, ""); - SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "amrr_min_sucess_threshold", CTLFLAG_RW, &amrr->amrr_min_success_threshold, 0, ""); } Modified: stable/8/sys/net80211/ieee80211_freebsd.c ============================================================================== --- stable/8/sys/net80211/ieee80211_freebsd.c Mon Jul 2 20:36:26 2012 (r238026) +++ stable/8/sys/net80211/ieee80211_freebsd.c Mon Jul 2 20:36:54 2012 (r238027) @@ -235,12 +235,12 @@ ieee80211_sysctl_vattach(struct ieee8021 SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, "%parent", CTLTYPE_STRING | CTLFLAG_RD, vap->iv_ic, 0, ieee80211_sysctl_parent, "A", "parent device"); - SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, + SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, "driver_caps", CTLFLAG_RW, &vap->iv_caps, 0, "driver capabilities"); #ifdef IEEE80211_DEBUG vap->iv_debug = ieee80211_debug; - SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, + SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, "debug", CTLFLAG_RW, &vap->iv_debug, 0, "control debugging printfs"); #endif @@ -265,19 +265,19 @@ ieee80211_sysctl_vattach(struct ieee8021 ieee80211_sysctl_inact, "I", "station initial state timeout (sec)"); if (vap->iv_htcaps & IEEE80211_HTC_HT) { - SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, + SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, "ampdu_mintraffic_bk", CTLFLAG_RW, &vap->iv_ampdu_mintraffic[WME_AC_BK], 0, "BK traffic tx aggr threshold (pps)"); - SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, + SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, "ampdu_mintraffic_be", CTLFLAG_RW, &vap->iv_ampdu_mintraffic[WME_AC_BE], 0, "BE traffic tx aggr threshold (pps)"); - SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, + SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, "ampdu_mintraffic_vo", CTLFLAG_RW, &vap->iv_ampdu_mintraffic[WME_AC_VO], 0, "VO traffic tx aggr threshold (pps)"); - SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, + SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, "ampdu_mintraffic_vi", CTLFLAG_RW, &vap->iv_ampdu_mintraffic[WME_AC_VI], 0, "VI traffic tx aggr threshold (pps)"); Modified: stable/8/sys/netinet/cc/cc_htcp.c ============================================================================== --- stable/8/sys/netinet/cc/cc_htcp.c Mon Jul 2 20:36:26 2012 (r238026) +++ stable/8/sys/netinet/cc/cc_htcp.c Mon Jul 2 20:36:54 2012 (r238027) @@ -168,8 +168,8 @@ static int htcp_rtt_ref; static int htcp_max_diff = INT_MAX / ((1 << HTCP_ALPHA_INC_SHIFT) * 10); /* Per-netstack vars. */ -static VNET_DEFINE(uint8_t, htcp_adaptive_backoff) = 0; -static VNET_DEFINE(uint8_t, htcp_rtt_scaling) = 0; +static VNET_DEFINE(u_int, htcp_adaptive_backoff) = 0; +static VNET_DEFINE(u_int, htcp_rtt_scaling) = 0; #define V_htcp_adaptive_backoff VNET(htcp_adaptive_backoff) #define V_htcp_rtt_scaling VNET(htcp_rtt_scaling) Modified: stable/8/sys/netinet/ipfw/ip_dn_io.c ============================================================================== --- stable/8/sys/netinet/ipfw/ip_dn_io.c Mon Jul 2 20:36:26 2012 (r238026) +++ stable/8/sys/netinet/ipfw/ip_dn_io.c Mon Jul 2 20:36:54 2012 (r238027) @@ -164,9 +164,9 @@ SYSCTL_INT(_net_inet_ip_dummynet, OID_AU CTLFLAG_RW, DC(io_fast), 0, "Enable fast dummynet io."); SYSCTL_INT(_net_inet_ip_dummynet, OID_AUTO, debug, CTLFLAG_RW, DC(debug), 0, "Dummynet debug level"); -SYSCTL_INT(_net_inet_ip_dummynet, OID_AUTO, expire, +SYSCTL_UINT(_net_inet_ip_dummynet, OID_AUTO, expire, CTLFLAG_RW, DC(expire), 0, "Expire empty queues/pipes"); -SYSCTL_INT(_net_inet_ip_dummynet, OID_AUTO, expire_cycle, +SYSCTL_UINT(_net_inet_ip_dummynet, OID_AUTO, expire_cycle, CTLFLAG_RD, DC(expire_cycle), 0, "Expire cycle for queues/pipes"); /* RED parameters */ Modified: stable/8/sys/netinet/ipfw/ip_fw_dynamic.c ============================================================================== --- stable/8/sys/netinet/ipfw/ip_fw_dynamic.c Mon Jul 2 20:36:26 2012 (r238026) +++ stable/8/sys/netinet/ipfw/ip_fw_dynamic.c Mon Jul 2 20:36:54 2012 (r238027) @@ -186,37 +186,37 @@ static VNET_DEFINE(u_int32_t, dyn_max); SYSBEGIN(f2) SYSCTL_DECL(_net_inet_ip_fw); -SYSCTL_VNET_INT(_net_inet_ip_fw, OID_AUTO, dyn_buckets, +SYSCTL_VNET_UINT(_net_inet_ip_fw, OID_AUTO, dyn_buckets, CTLFLAG_RW, &VNET_NAME(dyn_buckets), 0, "Number of dyn. buckets"); -SYSCTL_VNET_INT(_net_inet_ip_fw, OID_AUTO, curr_dyn_buckets, +SYSCTL_VNET_UINT(_net_inet_ip_fw, OID_AUTO, curr_dyn_buckets, CTLFLAG_RD, &VNET_NAME(curr_dyn_buckets), 0, "Current Number of dyn. buckets"); -SYSCTL_VNET_INT(_net_inet_ip_fw, OID_AUTO, dyn_count, +SYSCTL_VNET_UINT(_net_inet_ip_fw, OID_AUTO, dyn_count, CTLFLAG_RD, &VNET_NAME(dyn_count), 0, "Number of dyn. rules"); -SYSCTL_VNET_INT(_net_inet_ip_fw, OID_AUTO, dyn_max, +SYSCTL_VNET_UINT(_net_inet_ip_fw, OID_AUTO, dyn_max, CTLFLAG_RW, &VNET_NAME(dyn_max), 0, "Max number of dyn. rules"); -SYSCTL_VNET_INT(_net_inet_ip_fw, OID_AUTO, dyn_ack_lifetime, +SYSCTL_VNET_UINT(_net_inet_ip_fw, OID_AUTO, dyn_ack_lifetime, CTLFLAG_RW, &VNET_NAME(dyn_ack_lifetime), 0, "Lifetime of dyn. rules for acks"); -SYSCTL_VNET_INT(_net_inet_ip_fw, OID_AUTO, dyn_syn_lifetime, +SYSCTL_VNET_UINT(_net_inet_ip_fw, OID_AUTO, dyn_syn_lifetime, CTLFLAG_RW, &VNET_NAME(dyn_syn_lifetime), 0, "Lifetime of dyn. rules for syn"); -SYSCTL_VNET_INT(_net_inet_ip_fw, OID_AUTO, dyn_fin_lifetime, +SYSCTL_VNET_UINT(_net_inet_ip_fw, OID_AUTO, dyn_fin_lifetime, CTLFLAG_RW, &VNET_NAME(dyn_fin_lifetime), 0, "Lifetime of dyn. rules for fin"); -SYSCTL_VNET_INT(_net_inet_ip_fw, OID_AUTO, dyn_rst_lifetime, +SYSCTL_VNET_UINT(_net_inet_ip_fw, OID_AUTO, dyn_rst_lifetime, CTLFLAG_RW, &VNET_NAME(dyn_rst_lifetime), 0, "Lifetime of dyn. rules for rst"); -SYSCTL_VNET_INT(_net_inet_ip_fw, OID_AUTO, dyn_udp_lifetime, +SYSCTL_VNET_UINT(_net_inet_ip_fw, OID_AUTO, dyn_udp_lifetime, CTLFLAG_RW, &VNET_NAME(dyn_udp_lifetime), 0, "Lifetime of dyn. rules for UDP"); -SYSCTL_VNET_INT(_net_inet_ip_fw, OID_AUTO, dyn_short_lifetime, +SYSCTL_VNET_UINT(_net_inet_ip_fw, OID_AUTO, dyn_short_lifetime, CTLFLAG_RW, &VNET_NAME(dyn_short_lifetime), 0, "Lifetime of dyn. rules for other situations"); -SYSCTL_VNET_INT(_net_inet_ip_fw, OID_AUTO, dyn_keepalive, +SYSCTL_VNET_UINT(_net_inet_ip_fw, OID_AUTO, dyn_keepalive, CTLFLAG_RW, &VNET_NAME(dyn_keepalive), 0, "Enable keepalives for dyn. rules"); Modified: stable/8/sys/netinet/tcp_hostcache.c ============================================================================== --- stable/8/sys/netinet/tcp_hostcache.c Mon Jul 2 20:36:26 2012 (r238026) +++ stable/8/sys/netinet/tcp_hostcache.c Mon Jul 2 20:36:54 2012 (r238027) @@ -121,19 +121,19 @@ static void tcp_hc_purge(void *); SYSCTL_NODE(_net_inet_tcp, OID_AUTO, hostcache, CTLFLAG_RW, 0, "TCP Host cache"); -SYSCTL_VNET_INT(_net_inet_tcp_hostcache, OID_AUTO, cachelimit, CTLFLAG_RDTUN, +SYSCTL_VNET_UINT(_net_inet_tcp_hostcache, OID_AUTO, cachelimit, CTLFLAG_RDTUN, &VNET_NAME(tcp_hostcache.cache_limit), 0, "Overall entry limit for hostcache"); -SYSCTL_VNET_INT(_net_inet_tcp_hostcache, OID_AUTO, hashsize, CTLFLAG_RDTUN, +SYSCTL_VNET_UINT(_net_inet_tcp_hostcache, OID_AUTO, hashsize, CTLFLAG_RDTUN, &VNET_NAME(tcp_hostcache.hashsize), 0, "Size of TCP hostcache hashtable"); -SYSCTL_VNET_INT(_net_inet_tcp_hostcache, OID_AUTO, bucketlimit, +SYSCTL_VNET_UINT(_net_inet_tcp_hostcache, OID_AUTO, bucketlimit, CTLFLAG_RDTUN, &VNET_NAME(tcp_hostcache.bucket_limit), 0, "Per-bucket hash limit for hostcache"); -SYSCTL_VNET_INT(_net_inet_tcp_hostcache, OID_AUTO, count, CTLFLAG_RD, +SYSCTL_VNET_UINT(_net_inet_tcp_hostcache, OID_AUTO, count, CTLFLAG_RD, &VNET_NAME(tcp_hostcache.cache_count), 0, "Current number of entries in hostcache"); Modified: stable/8/sys/netinet/tcp_subr.c ============================================================================== --- stable/8/sys/netinet/tcp_subr.c Mon Jul 2 20:36:26 2012 (r238026) +++ stable/8/sys/netinet/tcp_subr.c Mon Jul 2 20:36:54 2012 (r238027) @@ -200,7 +200,7 @@ static int do_tcpdrain = 1; SYSCTL_INT(_net_inet_tcp, OID_AUTO, do_tcpdrain, CTLFLAG_RW, &do_tcpdrain, 0, "Enable tcp_drain routine for extra help when low on mbufs"); -SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, pcbcount, CTLFLAG_RD, +SYSCTL_VNET_UINT(_net_inet_tcp, OID_AUTO, pcbcount, CTLFLAG_RD, &VNET_NAME(tcbinfo.ipi_count), 0, "Number of active PCBs"); static VNET_DEFINE(int, icmp_may_rst) = 1; Modified: stable/8/sys/netinet/tcp_syncache.c ============================================================================== --- stable/8/sys/netinet/tcp_syncache.c Mon Jul 2 20:36:26 2012 (r238026) +++ stable/8/sys/netinet/tcp_syncache.c Mon Jul 2 20:36:54 2012 (r238027) @@ -148,23 +148,23 @@ static VNET_DEFINE(struct tcp_syncache, SYSCTL_NODE(_net_inet_tcp, OID_AUTO, syncache, CTLFLAG_RW, 0, "TCP SYN cache"); -SYSCTL_VNET_INT(_net_inet_tcp_syncache, OID_AUTO, bucketlimit, CTLFLAG_RDTUN, +SYSCTL_VNET_UINT(_net_inet_tcp_syncache, OID_AUTO, bucketlimit, CTLFLAG_RDTUN, &VNET_NAME(tcp_syncache.bucket_limit), 0, "Per-bucket hash limit for syncache"); -SYSCTL_VNET_INT(_net_inet_tcp_syncache, OID_AUTO, cachelimit, CTLFLAG_RDTUN, +SYSCTL_VNET_UINT(_net_inet_tcp_syncache, OID_AUTO, cachelimit, CTLFLAG_RDTUN, &VNET_NAME(tcp_syncache.cache_limit), 0, "Overall entry limit for syncache"); -SYSCTL_VNET_INT(_net_inet_tcp_syncache, OID_AUTO, count, CTLFLAG_RD, +SYSCTL_VNET_UINT(_net_inet_tcp_syncache, OID_AUTO, count, CTLFLAG_RD, &VNET_NAME(tcp_syncache.cache_count), 0, "Current number of entries in syncache"); -SYSCTL_VNET_INT(_net_inet_tcp_syncache, OID_AUTO, hashsize, CTLFLAG_RDTUN, +SYSCTL_VNET_UINT(_net_inet_tcp_syncache, OID_AUTO, hashsize, CTLFLAG_RDTUN, &VNET_NAME(tcp_syncache.hashsize), 0, "Size of TCP syncache hashtable"); -SYSCTL_VNET_INT(_net_inet_tcp_syncache, OID_AUTO, rexmtlimit, CTLFLAG_RW, +SYSCTL_VNET_UINT(_net_inet_tcp_syncache, OID_AUTO, rexmtlimit, CTLFLAG_RW, &VNET_NAME(tcp_syncache.rexmt_limit), 0, "Limit on SYN/ACK retransmissions"); From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 20:42:43 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E5792106566C; Mon, 2 Jul 2012 20:42:43 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D35498FC20; Mon, 2 Jul 2012 20:42:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q62KghoD098475; Mon, 2 Jul 2012 20:42:43 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q62KghKC098473; Mon, 2 Jul 2012 20:42:43 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201207022042.q62KghKC098473@svn.freebsd.org> From: Navdeep Parhar Date: Mon, 2 Jul 2012 20:42:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238028 - head/sys/dev/cxgbe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 20:42:44 -0000 Author: np Date: Mon Jul 2 20:42:43 2012 New Revision: 238028 URL: http://svn.freebsd.org/changeset/base/238028 Log: Instruct the firmware not to provision resources for TCP offload if the kernel is being built without TCP_OFFLOAD. But never override toecaps_allowed if it has been set manually. Modified: head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Mon Jul 2 20:36:54 2012 (r238027) +++ head/sys/dev/cxgbe/t4_main.c Mon Jul 2 20:42:43 2012 (r238028) @@ -222,7 +222,7 @@ TUNABLE_INT("hw.cxgbe.linkcaps_allowed", static int t4_niccaps_allowed = FW_CAPS_CONFIG_NIC; TUNABLE_INT("hw.cxgbe.niccaps_allowed", &t4_niccaps_allowed); -static int t4_toecaps_allowed = FW_CAPS_CONFIG_TOE; +static int t4_toecaps_allowed = -1; TUNABLE_INT("hw.cxgbe.toecaps_allowed", &t4_toecaps_allowed); static int t4_rdmacaps_allowed = 0; @@ -5492,6 +5492,12 @@ tweak_tunables(void) if (t4_nofldrxq1g < 1) t4_nofldrxq1g = min(nc, NOFLDRXQ_1G); + + if (t4_toecaps_allowed == -1) + t4_toecaps_allowed = FW_CAPS_CONFIG_TOE; +#else + if (t4_toecaps_allowed == -1) + t4_toecaps_allowed = 0; #endif if (t4_tmr_idx_10g < 0 || t4_tmr_idx_10g >= SGE_NTIMERS) From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 21:01:03 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id ED5481065674; Mon, 2 Jul 2012 21:01: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 D2A288FC1B; Mon, 2 Jul 2012 21:01:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q62L131H099294; Mon, 2 Jul 2012 21:01:03 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q62L13Vh099286; Mon, 2 Jul 2012 21:01:03 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201207022101.q62L13Vh099286@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 2 Jul 2012 21:01:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238029 - in head/sys: compat/linux fs/devfs kern sys ufs/ffs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 21:01:04 -0000 Author: kib Date: Mon Jul 2 21:01:03 2012 New Revision: 238029 URL: http://svn.freebsd.org/changeset/base/238029 Log: Extend the KPI to lock and unlock f_offset member of struct file. It now fully encapsulates all accesses to f_offset, and extends f_offset locking to other consumers that need it, in particular, to lseek() and variants of getdirentries(). Ensure that on 32bit architectures f_offset, which is 64bit quantity, always read and written under the mtxpool protection. This fixes apparently easy to trigger race when parallel lseek()s or lseek() and read/write could destroy file offset. The already broken ABI emulations, including iBCS and SysV, are not converted (yet). Tested by: pho No objections from: jhb MFC after: 3 weeks Modified: head/sys/compat/linux/linux_file.c head/sys/fs/devfs/devfs_vnops.c head/sys/kern/kern_descrip.c head/sys/kern/vfs_syscalls.c head/sys/kern/vfs_vnops.c head/sys/sys/file.h head/sys/ufs/ffs/ffs_alloc.c Modified: head/sys/compat/linux/linux_file.c ============================================================================== --- head/sys/compat/linux/linux_file.c Mon Jul 2 20:42:43 2012 (r238028) +++ head/sys/compat/linux/linux_file.c Mon Jul 2 21:01:03 2012 (r238029) @@ -357,15 +357,16 @@ getdents_common(struct thread *td, struc return (EBADF); } + off = foffset_lock(fp, 0); vp = fp->f_vnode; vfslocked = VFS_LOCK_GIANT(vp->v_mount); if (vp->v_type != VDIR) { VFS_UNLOCK_GIANT(vfslocked); + foffset_unlock(fp, off, 0); fdrop(fp, td); return (EINVAL); } - off = fp->f_offset; buflen = max(LINUX_DIRBLKSIZ, nbytes); buflen = min(buflen, MAXBSIZE); @@ -514,7 +515,6 @@ getdents_common(struct thread *td, struc goto eof; } - fp->f_offset = off; if (justone) nbytes = resid + linuxreclen; @@ -527,6 +527,7 @@ out: VOP_UNLOCK(vp, 0); VFS_UNLOCK_GIANT(vfslocked); + foffset_unlock(fp, off, 0); fdrop(fp, td); free(buf, M_TEMP); free(lbuf, M_TEMP); Modified: head/sys/fs/devfs/devfs_vnops.c ============================================================================== --- head/sys/fs/devfs/devfs_vnops.c Mon Jul 2 20:42:43 2012 (r238028) +++ head/sys/fs/devfs/devfs_vnops.c Mon Jul 2 21:01:03 2012 (r238029) @@ -1170,18 +1170,14 @@ devfs_read_f(struct file *fp, struct uio if (ioflag & O_DIRECT) ioflag |= IO_DIRECT; - if ((flags & FOF_OFFSET) == 0) - uio->uio_offset = fp->f_offset; - + foffset_lock_uio(fp, uio, flags | FOF_NOLOCK); error = dsw->d_read(dev, uio, ioflag); if (uio->uio_resid != resid || (error == 0 && resid != 0)) vfs_timestamp(&dev->si_atime); td->td_fpop = fpop; dev_relthread(dev, ref); - if ((flags & FOF_OFFSET) == 0) - fp->f_offset = uio->uio_offset; - fp->f_nextoff = uio->uio_offset; + foffset_unlock_uio(fp, uio, flags | FOF_NOLOCK | FOF_NEXTOFF); return (error); } @@ -1648,8 +1644,7 @@ devfs_write_f(struct file *fp, struct ui ioflag = fp->f_flag & (O_NONBLOCK | O_DIRECT | O_FSYNC); if (ioflag & O_DIRECT) ioflag |= IO_DIRECT; - if ((flags & FOF_OFFSET) == 0) - uio->uio_offset = fp->f_offset; + foffset_lock_uio(fp, uio, flags | FOF_NOLOCK); resid = uio->uio_resid; @@ -1661,9 +1656,7 @@ devfs_write_f(struct file *fp, struct ui td->td_fpop = fpop; dev_relthread(dev, ref); - if ((flags & FOF_OFFSET) == 0) - fp->f_offset = uio->uio_offset; - fp->f_nextoff = uio->uio_offset; + foffset_unlock_uio(fp, uio, flags | FOF_NOLOCK | FOF_NEXTOFF); return (error); } Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Mon Jul 2 20:42:43 2012 (r238028) +++ head/sys/kern/kern_descrip.c Mon Jul 2 21:01:03 2012 (r238029) @@ -465,6 +465,7 @@ kern_fcntl(struct thread *td, int fd, in int vfslocked; u_int old, new; uint64_t bsize; + off_t foffset; vfslocked = 0; error = 0; @@ -606,14 +607,15 @@ kern_fcntl(struct thread *td, int fd, in } flp = (struct flock *)arg; if (flp->l_whence == SEEK_CUR) { - if (fp->f_offset < 0 || + foffset = foffset_get(fp); + if (foffset < 0 || (flp->l_start > 0 && - fp->f_offset > OFF_MAX - flp->l_start)) { + foffset > OFF_MAX - flp->l_start)) { FILEDESC_SUNLOCK(fdp); error = EOVERFLOW; break; } - flp->l_start += fp->f_offset; + flp->l_start += foffset; } /* @@ -727,15 +729,16 @@ kern_fcntl(struct thread *td, int fd, in break; } if (flp->l_whence == SEEK_CUR) { + foffset = foffset_get(fp); if ((flp->l_start > 0 && - fp->f_offset > OFF_MAX - flp->l_start) || + foffset > OFF_MAX - flp->l_start) || (flp->l_start < 0 && - fp->f_offset < OFF_MIN - flp->l_start)) { + foffset < OFF_MIN - flp->l_start)) { FILEDESC_SUNLOCK(fdp); error = EOVERFLOW; break; } - flp->l_start += fp->f_offset; + flp->l_start += foffset; } /* * VOP_ADVLOCK() may block. @@ -2810,7 +2813,7 @@ sysctl_kern_file(SYSCTL_HANDLER_ARGS) xf.xf_type = fp->f_type; xf.xf_count = fp->f_count; xf.xf_msgcount = 0; - xf.xf_offset = fp->f_offset; + xf.xf_offset = foffset_get(fp); xf.xf_flag = fp->f_flag; error = SYSCTL_OUT(req, &xf, sizeof(xf)); if (error) @@ -3015,7 +3018,7 @@ sysctl_kern_proc_ofiledesc(SYSCTL_HANDLE kif->kf_flags |= KF_FLAG_DIRECT; if (fp->f_flag & FHASLOCK) kif->kf_flags |= KF_FLAG_HASLOCK; - kif->kf_offset = fp->f_offset; + kif->kf_offset = foffset_get(fp); if (vp != NULL) { vref(vp); switch (vp->v_type) { @@ -3359,7 +3362,7 @@ sysctl_kern_proc_filedesc(SYSCTL_HANDLER } refcnt = fp->f_count; fflags = fp->f_flag; - offset = fp->f_offset; + offset = foffset_get(fp); /* * Create sysctl entry. Modified: head/sys/kern/vfs_syscalls.c ============================================================================== --- head/sys/kern/vfs_syscalls.c Mon Jul 2 20:42:43 2012 (r238028) +++ head/sys/kern/vfs_syscalls.c Mon Jul 2 21:01:03 2012 (r238029) @@ -1981,7 +1981,7 @@ sys_lseek(td, uap) struct file *fp; struct vnode *vp; struct vattr vattr; - off_t offset, size; + off_t foffset, offset, size; int error, noneg; int vfslocked; @@ -1993,18 +1993,19 @@ sys_lseek(td, uap) return (ESPIPE); } vp = fp->f_vnode; + foffset = foffset_lock(fp, 0); vfslocked = VFS_LOCK_GIANT(vp->v_mount); noneg = (vp->v_type != VCHR); offset = uap->offset; switch (uap->whence) { case L_INCR: if (noneg && - (fp->f_offset < 0 || - (offset > 0 && fp->f_offset > OFF_MAX - offset))) { + (foffset < 0 || + (offset > 0 && foffset > OFF_MAX - offset))) { error = EOVERFLOW; break; } - offset += fp->f_offset; + offset += foffset; break; case L_XTND: vn_lock(vp, LK_SHARED | LK_RETRY); @@ -2044,12 +2045,12 @@ sys_lseek(td, uap) error = EINVAL; if (error != 0) goto drop; - fp->f_offset = offset; VFS_KNOTE_UNLOCKED(vp, 0); - *(off_t *)(td->td_retval) = fp->f_offset; + *(off_t *)(td->td_retval) = offset; drop: fdrop(fp, td); VFS_UNLOCK_GIANT(vfslocked); + foffset_unlock(fp, offset, error != 0 ? FOF_NOUPDATE : 0); return (error); } @@ -3982,6 +3983,7 @@ kern_ogetdirentries(struct thread *td, s caddr_t dirbuf; int error, eofflag, readcnt, vfslocked; long loff; + off_t foffset; /* XXX arbitrary sanity limit on `count'. */ if (uap->count > 64 * 1024) @@ -3994,10 +3996,12 @@ kern_ogetdirentries(struct thread *td, s return (EBADF); } vp = fp->f_vnode; + foffset = foffset_lock(fp, 0); unionread: vfslocked = VFS_LOCK_GIANT(vp->v_mount); if (vp->v_type != VDIR) { VFS_UNLOCK_GIANT(vfslocked); + foffset_unlock(fp, foffset, 0); fdrop(fp, td); return (EINVAL); } @@ -4010,12 +4014,13 @@ unionread: auio.uio_td = td; auio.uio_resid = uap->count; vn_lock(vp, LK_SHARED | LK_RETRY); - loff = auio.uio_offset = fp->f_offset; + loff = auio.uio_offset = foffset; #ifdef MAC error = mac_vnode_check_readdir(td->td_ucred, vp); if (error) { VOP_UNLOCK(vp, 0); VFS_UNLOCK_GIANT(vfslocked); + foffset_unlock(fp, foffset, FOF_NOUPDATE); fdrop(fp, td); return (error); } @@ -4024,7 +4029,7 @@ unionread: if (vp->v_mount->mnt_maxsymlinklen <= 0) { error = VOP_READDIR(vp, &auio, fp->f_cred, &eofflag, NULL, NULL); - fp->f_offset = auio.uio_offset; + foffset = auio.uio_offset; } else # endif { @@ -4036,7 +4041,7 @@ unionread: kiov.iov_base = dirbuf; error = VOP_READDIR(vp, &kuio, fp->f_cred, &eofflag, NULL, NULL); - fp->f_offset = kuio.uio_offset; + foffset = kuio.uio_offset; if (error == 0) { readcnt = uap->count - kuio.uio_resid; edp = (struct dirent *)&dirbuf[readcnt]; @@ -4074,6 +4079,7 @@ unionread: if (error) { VOP_UNLOCK(vp, 0); VFS_UNLOCK_GIANT(vfslocked); + foffset_unlock(fp, foffset, 0); fdrop(fp, td); return (error); } @@ -4085,13 +4091,14 @@ unionread: VREF(vp); fp->f_vnode = vp; fp->f_data = vp; - fp->f_offset = 0; + foffset = 0; vput(tvp); VFS_UNLOCK_GIANT(vfslocked); goto unionread; } VOP_UNLOCK(vp, 0); VFS_UNLOCK_GIANT(vfslocked); + foffset_unlock(fp, foffset, 0); fdrop(fp, td); td->td_retval[0] = uap->count - auio.uio_resid; if (error == 0) @@ -4144,6 +4151,7 @@ kern_getdirentries(struct thread *td, in int vfslocked; long loff; int error, eofflag; + off_t foffset; AUDIT_ARG_FD(fd); if (count > IOSIZE_MAX) @@ -4157,6 +4165,7 @@ kern_getdirentries(struct thread *td, in return (EBADF); } vp = fp->f_vnode; + foffset = foffset_lock(fp, 0); unionread: vfslocked = VFS_LOCK_GIANT(vp->v_mount); if (vp->v_type != VDIR) { @@ -4173,14 +4182,14 @@ unionread: auio.uio_td = td; vn_lock(vp, LK_SHARED | LK_RETRY); AUDIT_ARG_VNODE1(vp); - loff = auio.uio_offset = fp->f_offset; + loff = auio.uio_offset = foffset; #ifdef MAC error = mac_vnode_check_readdir(td->td_ucred, vp); if (error == 0) #endif error = VOP_READDIR(vp, &auio, fp->f_cred, &eofflag, NULL, NULL); - fp->f_offset = auio.uio_offset; + foffset = auio.uio_offset; if (error) { VOP_UNLOCK(vp, 0); VFS_UNLOCK_GIANT(vfslocked); @@ -4194,7 +4203,7 @@ unionread: VREF(vp); fp->f_vnode = vp; fp->f_data = vp; - fp->f_offset = 0; + foffset = 0; vput(tvp); VFS_UNLOCK_GIANT(vfslocked); goto unionread; @@ -4206,6 +4215,7 @@ unionread: *residp = auio.uio_resid; td->td_retval[0] = count - auio.uio_resid; fail: + foffset_unlock(fp, foffset, 0); fdrop(fp, td); return (error); } Modified: head/sys/kern/vfs_vnops.c ============================================================================== --- head/sys/kern/vfs_vnops.c Mon Jul 2 20:42:43 2012 (r238028) +++ head/sys/kern/vfs_vnops.c Mon Jul 2 21:01:03 2012 (r238029) @@ -527,13 +527,22 @@ vn_rdwr_inchunks(rw, vp, base, len, offs return (error); } -static void -foffset_lock(struct file *fp, struct uio *uio, int flags) +off_t +foffset_lock(struct file *fp, int flags) { struct mtx *mtxp; + off_t res; - if ((flags & FOF_OFFSET) != 0) - return; + KASSERT((flags & FOF_OFFSET) == 0, ("FOF_OFFSET passed")); + +#if OFF_MAX <= LONG_MAX + /* + * Caller only wants the current f_offset value. Assume that + * the long and shorter integer types reads are atomic. + */ + if ((flags & FOF_NOLOCK) != 0) + return (fp->f_offset); +#endif /* * According to McKusick the vn lock was protecting f_offset here. @@ -541,16 +550,68 @@ foffset_lock(struct file *fp, struct uio */ mtxp = mtx_pool_find(mtxpool_sleep, fp); mtx_lock(mtxp); - while (fp->f_vnread_flags & FOFFSET_LOCKED) { - fp->f_vnread_flags |= FOFFSET_LOCK_WAITING; - msleep(&fp->f_vnread_flags, mtxp, PUSER -1, - "vnread offlock", 0); + if ((flags & FOF_NOLOCK) == 0) { + while (fp->f_vnread_flags & FOFFSET_LOCKED) { + fp->f_vnread_flags |= FOFFSET_LOCK_WAITING; + msleep(&fp->f_vnread_flags, mtxp, PUSER -1, + "vofflock", 0); + } + fp->f_vnread_flags |= FOFFSET_LOCKED; + } + res = fp->f_offset; + mtx_unlock(mtxp); + return (res); +} + +void +foffset_unlock(struct file *fp, off_t val, int flags) +{ + struct mtx *mtxp; + + KASSERT((flags & FOF_OFFSET) == 0, ("FOF_OFFSET passed")); + +#if OFF_MAX <= LONG_MAX + if ((flags & FOF_NOLOCK) != 0) { + if ((flags & FOF_NOUPDATE) == 0) + fp->f_offset = val; + if ((flags & FOF_NEXTOFF) != 0) + fp->f_nextoff = val; + return; + } +#endif + + mtxp = mtx_pool_find(mtxpool_sleep, fp); + mtx_lock(mtxp); + if ((flags & FOF_NOUPDATE) == 0) + fp->f_offset = val; + if ((flags & FOF_NEXTOFF) != 0) + fp->f_nextoff = val; + if ((flags & FOF_NOLOCK) == 0) { + KASSERT((fp->f_vnread_flags & FOFFSET_LOCKED) != 0, + ("Lost FOFFSET_LOCKED")); + if (fp->f_vnread_flags & FOFFSET_LOCK_WAITING) + wakeup(&fp->f_vnread_flags); + fp->f_vnread_flags = 0; } - fp->f_vnread_flags |= FOFFSET_LOCKED; - uio->uio_offset = fp->f_offset; mtx_unlock(mtxp); } +void +foffset_lock_uio(struct file *fp, struct uio *uio, int flags) +{ + + if ((flags & FOF_OFFSET) == 0) + uio->uio_offset = foffset_lock(fp, flags); +} + +void +foffset_unlock_uio(struct file *fp, struct uio *uio, int flags) +{ + + if ((flags & FOF_OFFSET) == 0) + foffset_unlock(fp, uio->uio_offset, flags); +} + static int get_advice(struct file *fp, struct uio *uio) { @@ -570,23 +631,6 @@ get_advice(struct file *fp, struct uio * return (ret); } -static void -foffset_unlock(struct file *fp, struct uio *uio, int flags) -{ - struct mtx *mtxp; - - if ((flags & FOF_OFFSET) != 0) - return; - - fp->f_offset = uio->uio_offset; - mtxp = mtx_pool_find(mtxpool_sleep, fp); - mtx_lock(mtxp); - if (fp->f_vnread_flags & FOFFSET_LOCK_WAITING) - wakeup(&fp->f_vnread_flags); - fp->f_vnread_flags = 0; - mtx_unlock(mtxp); -} - /* * File table vnode read routine. */ @@ -865,7 +909,7 @@ vn_io_fault(struct file *fp, struct uio else doio = vn_write; vp = fp->f_vnode; - foffset_lock(fp, uio, flags); + foffset_lock_uio(fp, uio, flags); if (uio->uio_segflg != UIO_USERSPACE || vp->v_type != VREG || ((mp = vp->v_mount) != NULL && @@ -982,7 +1026,7 @@ out: vn_rangelock_unlock(vp, rl_cookie); free(uio_clone, M_IOV); out_last: - foffset_unlock(fp, uio, flags); + foffset_unlock_uio(fp, uio, flags); return (error); } Modified: head/sys/sys/file.h ============================================================================== --- head/sys/sys/file.h Mon Jul 2 20:42:43 2012 (r238028) +++ head/sys/sys/file.h Mon Jul 2 21:01:03 2012 (r238029) @@ -72,10 +72,25 @@ struct socket; struct file; struct ucred; +#define FOF_OFFSET 0x01 /* Use the offset in uio argument */ +#define FOF_NOLOCK 0x02 /* Do not take FOFFSET_LOCK */ +#define FOF_NEXTOFF 0x04 /* Also update f_nextoff */ +#define FOF_NOUPDATE 0x10 /* Do not update f_offset */ +off_t foffset_lock(struct file *fp, int flags); +void foffset_lock_uio(struct file *fp, struct uio *uio, int flags); +void foffset_unlock(struct file *fp, off_t val, int flags); +void foffset_unlock_uio(struct file *fp, struct uio *uio, int flags); + +static inline off_t +foffset_get(struct file *fp) +{ + + return (foffset_lock(fp, FOF_NOLOCK)); +} + typedef int fo_rdwr_t(struct file *fp, struct uio *uio, struct ucred *active_cred, int flags, struct thread *td); -#define FOF_OFFSET 1 /* Use the offset in uio argument */ typedef int fo_truncate_t(struct file *fp, off_t length, struct ucred *active_cred, struct thread *td); typedef int fo_ioctl_t(struct file *fp, u_long com, void *data, Modified: head/sys/ufs/ffs/ffs_alloc.c ============================================================================== --- head/sys/ufs/ffs/ffs_alloc.c Mon Jul 2 20:42:43 2012 (r238028) +++ head/sys/ufs/ffs/ffs_alloc.c Mon Jul 2 21:01:03 2012 (r238029) @@ -2865,10 +2865,9 @@ buffered_write(fp, uio, active_cred, fla if (ip->i_devvp != devvp) return (EINVAL); fs = ip->i_fs; + foffset_lock_uio(fp, uio, flags); vfslocked = VFS_LOCK_GIANT(ip->i_vnode->v_mount); vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY); - if ((flags & FOF_OFFSET) == 0) - uio->uio_offset = fp->f_offset; #ifdef DEBUG if (fsckcmds) { printf("%s: buffered write for block %jd\n", @@ -2893,11 +2892,9 @@ buffered_write(fp, uio, active_cred, fla goto out; } error = bwrite(bp); - if ((flags & FOF_OFFSET) == 0) - fp->f_offset = uio->uio_offset; - fp->f_nextoff = uio->uio_offset; out: VOP_UNLOCK(devvp, 0); VFS_UNLOCK_GIANT(vfslocked); + foffset_unlock_uio(fp, uio, flags | FOF_NEXTOFF); return (error); } From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 21:02:40 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 35BFA1065674; Mon, 2 Jul 2012 21:02:40 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net (lor.one-eyed-alien.net [69.66.77.232]) by mx1.freebsd.org (Postfix) with ESMTP id 830DB8FC0C; Mon, 2 Jul 2012 21:02:39 +0000 (UTC) Received: from lor.one-eyed-alien.net (localhost [127.0.0.1]) by lor.one-eyed-alien.net (8.14.4/8.14.4) with ESMTP id q62L1NRB077262; Mon, 2 Jul 2012 16:01:23 -0500 (CDT) (envelope-from brooks@lor.one-eyed-alien.net) Received: (from brooks@localhost) by lor.one-eyed-alien.net (8.14.4/8.14.4/Submit) id q62L1NLr077261; Mon, 2 Jul 2012 16:01:23 -0500 (CDT) (envelope-from brooks) Date: Mon, 2 Jul 2012 16:01:23 -0500 From: Brooks Davis To: Warner Losh Message-ID: <20120702210123.GB74604@lor.one-eyed-alien.net> References: <201207010522.q615MDEX067605@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="f2QGlHpHGjS2mn6Y" Content-Disposition: inline In-Reply-To: <201207010522.q615MDEX067605@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r237875 - head/sys/geom X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 21:02:40 -0000 --f2QGlHpHGjS2mn6Y Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jul 01, 2012 at 05:22:13AM +0000, Warner Losh wrote: > Author: imp > Date: Sun Jul 1 05:22:13 2012 > New Revision: 237875 > URL: http://svn.freebsd.org/changeset/base/237875 >=20 > Log: > Use %j to match intmax_t. Thanks for fixing this, sorry for the breakage. -- Brooks --f2QGlHpHGjS2mn6Y Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iD8DBQFP8gwjXY6L6fI4GtQRAo3CAKDRTdwZGloj1tdMTQOhqJobqBQxxwCdFsac einALPNBh3uVbH3wW1+oy8Q= =4CfF -----END PGP SIGNATURE----- --f2QGlHpHGjS2mn6Y-- From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 21:04:39 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5A0EF106566B; Mon, 2 Jul 2012 21:04:39 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (trang.nuxi.org [74.95.12.85]) by mx1.freebsd.org (Postfix) with ESMTP id 377B18FC14; Mon, 2 Jul 2012 21:04:39 +0000 (UTC) Received: from dragon.nuxi.org (obrien@localhost [127.0.0.1]) by dragon.nuxi.org (8.14.5/8.14.5) with ESMTP id q62L4cfA085933; Mon, 2 Jul 2012 14:04:38 -0700 (PDT) (envelope-from obrien@dragon.nuxi.org) Received: (from obrien@localhost) by dragon.nuxi.org (8.14.5/8.14.5/Submit) id q62L4cN1085932; Mon, 2 Jul 2012 14:04:38 -0700 (PDT) (envelope-from obrien) Date: Mon, 2 Jul 2012 14:04:38 -0700 From: "David O'Brien" To: Pedro Giffuni Message-ID: <20120702210438.GA85618@dragon.NUXI.org> References: <20120629152109.GA70522@dragon.NUXI.org> <1340989748.73663.YahooMailClassic@web113504.mail.gq1.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1340989748.73663.YahooMailClassic@web113504.mail.gq1.yahoo.com> X-Operating-System: FreeBSD 10.0-CURRENT X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? Precedence: bulk User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r237624 - in head: cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize cddl/contrib/opensolaris/lib/libdtrace/common sys/cddl/contrib/opensolaris/uts/common/dtrace sys/cddl/c... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Reply-To: obrien@freebsd.org List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 21:04:40 -0000 On Fri, Jun 29, 2012 at 10:09:08AM -0700, Pedro Giffuni wrote: > You are absolutely right. However I am not sure we should > bring Illumos enhancements under the opensolaris vendor > branch. The reason is that this files are CDDL'd but are > there was no property assignment done to the OpenSolaris > copyright owner. [1] I've closely followed the Illumos project (if you're every visiting the Silicon Valley at the right time they have some good usergroup talks). At this point Illumos is the continuation of OpenSolaris. When Solaris 11 came out there was a discussion about if Oracle will fulfill the statement in their leaked email about publishing sources again. There is little to no hope in the Illumos community this will ever happen. [http://www.listbox.com/member/archive/182180/2011/11/sort/thread/page/1/ "Solaris 11 released -- chances of source code to follow?"] [https://blogs.oracle.com/orasysat/entry/summary_of_the_solaris_11 "Any plans to release Solaris 11 source code? i.e. opensolaris?" So I am comfortable with using the Illumos repository as the master source for '^/vendor{,-sys}/opensolaris'. But I recognize not everyone may feel this way. So we should discuss how to handle OpenSolaris-derived Intellectual Property. It may be conceptually cleaner to import into '^/vendor{,-sys}/illumos', but I believe that will cause issues with importing updates to existing files (e.g., r237458) as the 'svn merge' from '^/vendor{,-sys}' will get messy. I believe we may have to resort to a three-way merge using "--ignore-ancestry" -- something I don't believe we want to do. Thus I think this needs to be discussed with the repo Meisters. > If somehow Oracle decides to relicense Dtrace or ZFS we > still must keep these changes isolated from the code > provided in the vendor branch. I don't quite follow. Lets suppose we don't import anything from Illumos, but wait for the Solaris 11 code drop. Should DTrace or ZFS be relicensed, IMHO it should still get imported into '^/vendor{,-sys}/opensolaris' as that is the progression of that Intellectual Property. '^/vendor{,-sys}/opensolaris' states no license. What we would have to do is 'svn move' the resulting merge outside of 'head/{,sys}/cddl/'. > I think we have to decide if we are going to consider > Illumos a vendor on it's own. For ZFS it would seem > the right thing to do, for Dtrace I am not sure: at > least I am not considering bringing any other feature > at this time. Given the number of primary authors & architects of both ZFS and DTrace that have left Oracle/Sun, the works of those folks are the things I believe FreeBSD is interested in. In fact the ZFS Working Group is external to Oracle and Solaris. Doesn't this commit of yours which brought in new DTrace work by Joyent (likely Brendan Gregg or Bryan Cantrill) show this point? Perhaps we should do an 'svn move' of '^/vendor{,-sys}/opensolaris' to '^/vendor{,-sys}/illumos'? What are your thoughts? -- -- David (obrien@FreeBSD.org) From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 21:09:32 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8FAAA106566B; Mon, 2 Jul 2012 21:09:32 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (trang.nuxi.org [74.95.12.85]) by mx1.freebsd.org (Postfix) with ESMTP id 68A9A8FC08; Mon, 2 Jul 2012 21:09:32 +0000 (UTC) Received: from dragon.nuxi.org (obrien@localhost [127.0.0.1]) by dragon.nuxi.org (8.14.5/8.14.5) with ESMTP id q62L9V4j087490; Mon, 2 Jul 2012 14:09:31 -0700 (PDT) (envelope-from obrien@dragon.nuxi.org) Received: (from obrien@localhost) by dragon.nuxi.org (8.14.5/8.14.5/Submit) id q62L9V6o087488; Mon, 2 Jul 2012 14:09:31 -0700 (PDT) (envelope-from obrien) Date: Mon, 2 Jul 2012 14:09:31 -0700 From: "David O'Brien" To: Doug Barton Message-ID: <20120702210931.GB85618@dragon.NUXI.org> References: <1340992732.19144.YahooMailClassic@web113501.mail.gq1.yahoo.com> <4FF11659.8060405@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4FF11659.8060405@FreeBSD.org> X-Operating-System: FreeBSD 10.0-CURRENT X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@FreeBSD.org, George Neville-Neil , pfg@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r237624 - in head: cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize cddl/contrib/opensolaris/lib/libdtrace/common sys/cddl/contrib/opensolaris/uts/common/dtrace sys/cddl/c... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: obrien@FreeBSD.org List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 21:09:32 -0000 On Sun, Jul 01, 2012 at 08:32:41PM -0700, Doug Barton wrote: > On 06/29/2012 10:58, Pedro Giffuni wrote: > > Now .. David pointed out I am not respecting the code > > provenance since I didn't add them to the opensolaris > > vendor area, but these files are copyrighted Joyent > > Inc (not even Illumos) so I cannot put them there > > unless we create a new vendor for Joyent > > Creating a new vendor area would be the right solution, yes. I totally disagree -- it will cause a real pain merging. Think about it -- if we import a new code drop of uts/common/fs/zfs/*.c into '^/vendor-sys/illumos', how do we merge that to HEAD? I don't believe 'svn merge -c ' will work because we already have a different uts/common/fs/zfs/*.c from ^/vendor-sys/opensolaris. I think we either need to just call Illumos OpenSolaris for these purposes, or 'svn move opensolaris illumos'. I think this needs to be discussed with the Repo Meisters. -- -- David (obrien@FreeBSD.org) From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 21:11:02 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 01557106566B; Mon, 2 Jul 2012 21:11:02 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E1FA78FC12; Mon, 2 Jul 2012 21:11:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q62LB1QH099755; Mon, 2 Jul 2012 21:11:01 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q62LB1HK099753; Mon, 2 Jul 2012 21:11:01 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201207022111.q62LB1HK099753@svn.freebsd.org> From: Marcel Moolenaar Date: Mon, 2 Jul 2012 21:11:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238030 - head/sys/powerpc/booke X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 21:11:02 -0000 Author: marcel Date: Mon Jul 2 21:11:01 2012 New Revision: 238030 URL: http://svn.freebsd.org/changeset/base/238030 Log: Implement cpu_flush_dcache(). This allows us to optimize __syncicache() for the common case in chich D-caches are coherent by virtue of busdma. Modified: head/sys/powerpc/booke/machdep.c Modified: head/sys/powerpc/booke/machdep.c ============================================================================== --- head/sys/powerpc/booke/machdep.c Mon Jul 2 21:01:03 2012 (r238029) +++ head/sys/powerpc/booke/machdep.c Mon Jul 2 21:11:01 2012 (r238030) @@ -473,7 +473,24 @@ cpu_pcpu_init(struct pcpu *pcpu, int cpu void cpu_flush_dcache(void *ptr, size_t len) { - /* TBD */ + register_t addr, off; + + /* + * Align the address to a cacheline and adjust the length + * accordingly. Then round the length to a multiple of the + * cacheline for easy looping. + */ + addr = (uintptr_t)ptr; + off = addr & (cacheline_size - 1); + addr -= off; + len = (len + off + cacheline_size - 1) & ~(cacheline_size - 1); + + while (len > 0) { + __asm __volatile ("dcbf 0,%0" :: "r"(addr)); + __asm __volatile ("sync"); + addr += cacheline_size; + len -= cacheline_size; + } } void From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 21:15:57 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 91E6B106566B; Mon, 2 Jul 2012 21:15:57 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7EAC78FC08; Mon, 2 Jul 2012 21:15:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q62LFvtP000118; Mon, 2 Jul 2012 21:15:57 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q62LFvqW000116; Mon, 2 Jul 2012 21:15:57 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201207022115.q62LFvqW000116@svn.freebsd.org> From: Marcel Moolenaar Date: Mon, 2 Jul 2012 21:15:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238031 - head/sys/powerpc/booke X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 21:15:57 -0000 Author: marcel Date: Mon Jul 2 21:15:56 2012 New Revision: 238031 URL: http://svn.freebsd.org/changeset/base/238031 Log: Invalidate any TLB1 entries we don't need. The firmware (e.g. U-Boot) may have added entries that conflict with TLB0 entries. Modified: head/sys/powerpc/booke/pmap.c Modified: head/sys/powerpc/booke/pmap.c ============================================================================== --- head/sys/powerpc/booke/pmap.c Mon Jul 2 21:11:01 2012 (r238030) +++ head/sys/powerpc/booke/pmap.c Mon Jul 2 21:15:56 2012 (r238031) @@ -3042,6 +3042,10 @@ tlb1_init(vm_offset_t ccsrbar) /* Map in CCSRBAR. */ tlb1_set_entry(CCSRBAR_VA, ccsrbar, CCSRBAR_SIZE, _TLB_ENTRY_IO); + /* Purge the remaining entries */ + for (i = tlb1_idx; i < TLB1_ENTRIES; i++) + tlb1_write_entry(i); + /* Setup TLB miss defaults */ set_mas4_defaults(); } From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 21:18:10 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3662E10656AE; Mon, 2 Jul 2012 21:18:10 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 233908FC0C; Mon, 2 Jul 2012 21:18:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q62LI9m2000246; Mon, 2 Jul 2012 21:18:10 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q62LI9q2000244; Mon, 2 Jul 2012 21:18:09 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201207022118.q62LI9q2000244@svn.freebsd.org> From: Marcel Moolenaar Date: Mon, 2 Jul 2012 21:18:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238032 - head/sys/powerpc/booke X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 21:18:10 -0000 Author: marcel Date: Mon Jul 2 21:18:09 2012 New Revision: 238032 URL: http://svn.freebsd.org/changeset/base/238032 Log: Handle traps from the debugger. We need to catch them and re-enter the debugger where they're being taken care of. Modified: head/sys/powerpc/booke/trap.c Modified: head/sys/powerpc/booke/trap.c ============================================================================== --- head/sys/powerpc/booke/trap.c Mon Jul 2 21:15:56 2012 (r238031) +++ head/sys/powerpc/booke/trap.c Mon Jul 2 21:18:09 2012 (r238032) @@ -143,6 +143,13 @@ trap(struct trapframe *frame) int sig, type, user; ksiginfo_t ksi; +#ifdef KDB + if (kdb_active) { + kdb_reenter(); + return; + } +#endif + PCPU_INC(cnt.v_trap); td = curthread; From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 21:21:13 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3CE9B106566B; Mon, 2 Jul 2012 21:21:13 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2A62D8FC17; Mon, 2 Jul 2012 21:21:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q62LLDxX000403; Mon, 2 Jul 2012 21:21:13 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q62LLCPq000401; Mon, 2 Jul 2012 21:21:12 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201207022121.q62LLCPq000401@svn.freebsd.org> From: Marcel Moolenaar Date: Mon, 2 Jul 2012 21:21:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238033 - head/sys/powerpc/booke X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 21:21:13 -0000 Author: marcel Date: Mon Jul 2 21:21:12 2012 New Revision: 238033 URL: http://svn.freebsd.org/changeset/base/238033 Log: Fix a typo that resulted in or-ing PTE_UW twice whrn PTE_SW was needed. Note that setting the PTE_MODIFIED bit based on whether write is possible is incorrect. We should set PTE_MODIFIED based on whether the access is a write operation. Modified: head/sys/powerpc/booke/trap_subr.S Modified: head/sys/powerpc/booke/trap_subr.S ============================================================================== --- head/sys/powerpc/booke/trap_subr.S Mon Jul 2 21:18:09 2012 (r238032) +++ head/sys/powerpc/booke/trap_subr.S Mon Jul 2 21:21:12 2012 (r238033) @@ -668,7 +668,7 @@ tlb_fill_entry: lwarx %r21, %r23, %r25 /* get pte->flags */ oris %r21, %r21, PTE_REFERENCED@h /* set referenced bit */ - andi. %r22, %r21, (PTE_UW | PTE_UW)@l /* check if writable */ + andi. %r22, %r21, (PTE_SW | PTE_UW)@l /* check if writable */ beq 2f oris %r21, %r21, PTE_MODIFIED@h /* set modified bit */ 2: From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 21:25:25 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8F81C106566C; Mon, 2 Jul 2012 21:25:25 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 637A18FC0A; Mon, 2 Jul 2012 21:25:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q62LPPtF000618; Mon, 2 Jul 2012 21:25:25 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q62LPPpH000614; Mon, 2 Jul 2012 21:25:25 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201207022125.q62LPPpH000614@svn.freebsd.org> From: Marcel Moolenaar Date: Mon, 2 Jul 2012 21:25:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238034 - head/sys/powerpc/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 21:25:25 -0000 Author: marcel Date: Mon Jul 2 21:25:24 2012 New Revision: 238034 URL: http://svn.freebsd.org/changeset/base/238034 Log: Remove device uart_z8530 and options GEOM_PART_APM from DEFAULTS and instead add them to GENERIC and GENERIC64. They are applicable to Apple H/W and not at all for Book-E platforms. Modified: head/sys/powerpc/conf/DEFAULTS head/sys/powerpc/conf/GENERIC head/sys/powerpc/conf/GENERIC64 Modified: head/sys/powerpc/conf/DEFAULTS ============================================================================== --- head/sys/powerpc/conf/DEFAULTS Mon Jul 2 21:21:12 2012 (r238033) +++ head/sys/powerpc/conf/DEFAULTS Mon Jul 2 21:25:24 2012 (r238034) @@ -8,9 +8,7 @@ device mem # Memory and kernel memory # UART chips on this platform device uart_ns8250 -device uart_z8530 -options GEOM_PART_APM options GEOM_PART_MBR options NEW_PCIB Modified: head/sys/powerpc/conf/GENERIC ============================================================================== --- head/sys/powerpc/conf/GENERIC Mon Jul 2 21:21:12 2012 (r238033) +++ head/sys/powerpc/conf/GENERIC Mon Jul 2 21:25:24 2012 (r238034) @@ -49,6 +49,7 @@ options MSDOSFS #MSDOS Filesystem options CD9660 #ISO 9660 Filesystem options PROCFS #Process filesystem (requires PSEUDOFS) options PSEUDOFS #Pseudo-filesystem framework +options GEOM_PART_APM #Apple Partition Maps. options GEOM_PART_GPT #GUID Partition Tables. options GEOM_LABEL #Provides labelization options COMPAT_FREEBSD4 #Keep this for a while @@ -127,6 +128,7 @@ makeoptions SC_DFLT_FONT=cp437 # Serial (COM) ports device scc device uart +device uart_z8530 # PCI Ethernet NICs that use the common MII bus controller code. device miibus # MII bus support Modified: head/sys/powerpc/conf/GENERIC64 ============================================================================== --- head/sys/powerpc/conf/GENERIC64 Mon Jul 2 21:21:12 2012 (r238033) +++ head/sys/powerpc/conf/GENERIC64 Mon Jul 2 21:25:24 2012 (r238034) @@ -49,6 +49,7 @@ options MSDOSFS #MSDOS Filesystem options CD9660 #ISO 9660 Filesystem options PROCFS #Process filesystem (requires PSEUDOFS) options PSEUDOFS #Pseudo-filesystem framework +options GEOM_PART_APM #Apple Partition Maps. options GEOM_PART_GPT #GUID Partition Tables. options GEOM_LABEL #Provides labelization options COMPAT_FREEBSD32 #Compatible with FreeBSD/powerpc binaries @@ -125,6 +126,7 @@ makeoptions SC_DFLT_FONT=cp437 # Serial (COM) ports device scc device uart +device uart_z8530 # Ethernet hardware device glc # Sony Playstation 3 Ethernet From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 21:58:48 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B02B510657E8; Mon, 2 Jul 2012 21:58:48 +0000 (UTC) (envelope-from simon@FreeBSD.org) Received: from emx.nitro.dk (emx.nitro.dk [IPv6:2a01:4f8:120:7384::102]) by mx1.freebsd.org (Postfix) with ESMTP id 675468FC0A; Mon, 2 Jul 2012 21:58:48 +0000 (UTC) Received: from mailscan.leto.nitro.dk (mailscan.leto.nitro.dk [127.0.1.4]) by emx.nitro.dk (Postfix) with ESMTP id BE3EE20E1EA; Mon, 2 Jul 2012 21:58:47 +0000 (UTC) Received: from emx.nitro.dk ([127.0.1.2]) by mailscan.leto.nitro.dk (mailscan.leto.nitro.dk [127.0.1.4]) (amavisd-new, port 10024) with LMTP id zo01hcShrLbT; Mon, 2 Jul 2012 21:58:45 +0000 (UTC) Received: from [192.168.4.24] (unknown [89.100.2.68]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by emx.nitro.dk (Postfix) with ESMTPSA id 4A89420E1E3; Mon, 2 Jul 2012 21:58:45 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1278) Content-Type: text/plain; charset=iso-8859-1 From: "Simon L. B. Nielsen" In-Reply-To: <1341143053.16744.YahooMailClassic@web113519.mail.gq1.yahoo.com> Date: Mon, 2 Jul 2012 22:58:43 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: <1341143053.16744.YahooMailClassic@web113519.mail.gq1.yahoo.com> To: pfg@freebsd.org X-Mailer: Apple Mail (2.1278) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r237860 - head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 21:58:48 -0000 On 1 Jul 2012, at 12:44, Pedro Giffuni wrote: >=20 >=20 > --- Dom 1/7/12, Simon L. B. Nielsen ha scritto: > ... >> Data: Domenica 1 luglio 2012, 05:05 >>=20 >> On 1 Jul 2012, at 01:36, Pedro F. Giffuni wrote: >>=20 >>> Author: pfg >>> Date: Sun Jul 1 00:36:07 2012 >>> New Revision: 237860 >>> URL: http://svn.freebsd.org/changeset/base/237860 >>>=20 >>> Log: >>> Import the dtrace llquantize test files from the vendor area. >>>=20 >>> Now that we have an illumos vendor area, import the llquantize >>> test files directly from there to make it easier to track the >>> code provenance. >>>=20 >>> Special thanks to Martin Matuska for populating the illumos >>> vendor area. >>>=20 >>> Requested by: obrien >>>=20 >>> Replaced: >>> =20 >> head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/ >>> - copied from r237859, >> vendor/illumos/dist/cmd/dtrace/test/tst/common/llquantize/ >>=20 >>=20 >> Don't replace files, and even worse directories, and it >> breaks svn2cvs. >>=20 >> --=20 >=20 > Sorry, > I though SVN would do the same I did: first remove, > then copy. I guess I should do it in two commits next > time. For the time being, yes please. svn2cvs should handle replaced files, = but it doesn't and so far nobody has had the time to fix it. > Ps. I didnt see this mentioned in our svn primer We probably forgot documenting this as we sort of hoped it would be = fixed, and there have been a couple of reminder to developers@ over the = years, which of course doesn't help "newer" people. --=20 Simon L. B. Nielsen From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 21:59:11 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 06ADD106581C; Mon, 2 Jul 2012 21:59:11 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CD1518FC1A; Mon, 2 Jul 2012 21:59:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q62LxAfU002171; Mon, 2 Jul 2012 21:59:10 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q62LxAcg002167; Mon, 2 Jul 2012 21:59:10 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201207022159.q62LxAcg002167@svn.freebsd.org> From: Sean Bruno Date: Mon, 2 Jul 2012 21:59:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238035 - stable/9/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 21:59:11 -0000 Author: sbruno Date: Mon Jul 2 21:59:10 2012 New Revision: 238035 URL: http://svn.freebsd.org/changeset/base/238035 Log: MFC r237245, r237250, r237251, r237273, r237330 Document support for Intel Enhanced Speedstep Tech interface of cpufreq(4) via a new man page est(4) Document the two exposed tuneables of est(4). Numerous cleanups and mdoc updates from reviewers. Thanks to mav, joel, wblock, hrs, gjb Added: stable/9/share/man/man4/est.4 - copied, changed from r237245, head/share/man/man4/est.4 Modified: stable/9/share/man/man4/Makefile stable/9/share/man/man4/cpufreq.4 Directory Properties: stable/9/share/man/man4/ (props changed) Modified: stable/9/share/man/man4/Makefile ============================================================================== --- stable/9/share/man/man4/Makefile Mon Jul 2 21:25:24 2012 (r238034) +++ stable/9/share/man/man4/Makefile Mon Jul 2 21:59:10 2012 (r238035) @@ -117,6 +117,7 @@ MAN= aac.4 \ enc.4 \ epair.4 \ esp.4 \ + est.4 \ et.4 \ eventtimers.4 \ exca.4 \ Modified: stable/9/share/man/man4/cpufreq.4 ============================================================================== --- stable/9/share/man/man4/cpufreq.4 Mon Jul 2 21:25:24 2012 (r238034) +++ stable/9/share/man/man4/cpufreq.4 Mon Jul 2 21:59:10 2012 (r238035) @@ -286,6 +286,7 @@ then it should set all elements to .Dv CPUFREQ_VAL_UNKNOWN . .Sh SEE ALSO .Xr acpi 4 , +.Xr est 4 , .Xr powerd 8 , .Xr sysctl 8 .Sh AUTHORS Copied and modified: stable/9/share/man/man4/est.4 (from r237245, head/share/man/man4/est.4) ============================================================================== --- head/share/man/man4/est.4 Mon Jun 18 23:18:49 2012 (r237245, copy source) +++ stable/9/share/man/man4/est.4 Mon Jul 2 21:59:10 2012 (r238035) @@ -63,11 +63,11 @@ behavior. .Bl -tag -width indent .It hw.est.msr_info Attempt to infer information from direct probing of the msr. -Should only be used in diagnostic cases +Should only be used in diagnostic cases .Pq default 0 .It hw.est.strict -Do not allow different cpus to be set to different frequencies. -It appears that this will only work on i386 systems +Validate frequency requested is accepted by the cpu when set. +It appears that this will only work on single core cpus. .Pq default 0 .El .Sh DIAGNOSTICS @@ -89,12 +89,10 @@ Consult your BIOS documentation for more is only found on supported Intel CPUs. .Sh SEE ALSO .Xr cpufreq 4 -.Sh SUPPORT -For general information and support, -go to the Intel 64 and IA-32 Architectures Software Developer -Manuals site. -.Pa http://www.intel.com/content/www/us/en/processors/architectures-software-developer-manuals.html +.Rs +.%T "Intel 64 and IA-32 Architectures Software Developer Manuals" +.%U "http://www.intel.com/content/www/us/en/processors/architectures-software-developer-manuals.html" +.Re .Sh AUTHORS -.Pp This manual page was written by .An Sean Bruno Aq sbruno@FreeBSD.org . From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 22:01:30 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 22D38106566B; Mon, 2 Jul 2012 22:01:30 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E99868FC1B; Mon, 2 Jul 2012 22:01:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q62M1T96002362; Mon, 2 Jul 2012 22:01:29 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q62M1Tcq002358; Mon, 2 Jul 2012 22:01:29 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201207022201.q62M1Tcq002358@svn.freebsd.org> From: Sean Bruno Date: Mon, 2 Jul 2012 22: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: r238036 - stable/8/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 22:01:30 -0000 Author: sbruno Date: Mon Jul 2 22:01:29 2012 New Revision: 238036 URL: http://svn.freebsd.org/changeset/base/238036 Log: MFC r237245, r237250, r237251, r237273, r237330 Document support for Intel Enhanced Speedstep Tech interface of cpufreq(4) via a new man page est(4) Document the two exposed tuneables of est(4). Numerous cleanups and mdoc updates from reviewers. Thanks to mav, joel, wblock, hrs, gjb Added: stable/8/share/man/man4/est.4 - copied, changed from r237245, head/share/man/man4/est.4 Modified: stable/8/share/man/man4/Makefile stable/8/share/man/man4/cpufreq.4 Directory Properties: stable/8/share/man/man4/ (props changed) Modified: stable/8/share/man/man4/Makefile ============================================================================== --- stable/8/share/man/man4/Makefile Mon Jul 2 21:59:10 2012 (r238035) +++ stable/8/share/man/man4/Makefile Mon Jul 2 22:01:29 2012 (r238036) @@ -111,6 +111,7 @@ MAN= aac.4 \ enc.4 \ epair.4 \ esp.4 \ + est.4 \ et.4 \ exca.4 \ faith.4 \ Modified: stable/8/share/man/man4/cpufreq.4 ============================================================================== --- stable/8/share/man/man4/cpufreq.4 Mon Jul 2 21:59:10 2012 (r238035) +++ stable/8/share/man/man4/cpufreq.4 Mon Jul 2 22:01:29 2012 (r238036) @@ -286,6 +286,7 @@ then it should set all elements to .Dv CPUFREQ_VAL_UNKNOWN . .Sh SEE ALSO .Xr acpi 4 , +.Xr est 4 , .Xr powerd 8 , .Xr sysctl 8 .Sh AUTHORS Copied and modified: stable/8/share/man/man4/est.4 (from r237245, head/share/man/man4/est.4) ============================================================================== --- head/share/man/man4/est.4 Mon Jun 18 23:18:49 2012 (r237245, copy source) +++ stable/8/share/man/man4/est.4 Mon Jul 2 22:01:29 2012 (r238036) @@ -63,11 +63,11 @@ behavior. .Bl -tag -width indent .It hw.est.msr_info Attempt to infer information from direct probing of the msr. -Should only be used in diagnostic cases +Should only be used in diagnostic cases .Pq default 0 .It hw.est.strict -Do not allow different cpus to be set to different frequencies. -It appears that this will only work on i386 systems +Validate frequency requested is accepted by the cpu when set. +It appears that this will only work on single core cpus. .Pq default 0 .El .Sh DIAGNOSTICS @@ -89,12 +89,10 @@ Consult your BIOS documentation for more is only found on supported Intel CPUs. .Sh SEE ALSO .Xr cpufreq 4 -.Sh SUPPORT -For general information and support, -go to the Intel 64 and IA-32 Architectures Software Developer -Manuals site. -.Pa http://www.intel.com/content/www/us/en/processors/architectures-software-developer-manuals.html +.Rs +.%T "Intel 64 and IA-32 Architectures Software Developer Manuals" +.%U "http://www.intel.com/content/www/us/en/processors/architectures-software-developer-manuals.html" +.Re .Sh AUTHORS -.Pp This manual page was written by .An Sean Bruno Aq sbruno@FreeBSD.org . From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 22:04:09 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D256B106566B; Mon, 2 Jul 2012 22:04:09 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BE5008FC08; Mon, 2 Jul 2012 22:04:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q62M49UX002505; Mon, 2 Jul 2012 22:04:09 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q62M491o002503; Mon, 2 Jul 2012 22:04:09 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201207022204.q62M491o002503@svn.freebsd.org> From: Navdeep Parhar Date: Mon, 2 Jul 2012 22:04:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238037 - stable/9/sys/dev/cxgbe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 22:04:10 -0000 Author: np Date: Mon Jul 2 22:04:09 2012 New Revision: 238037 URL: http://svn.freebsd.org/changeset/base/238037 Log: MFC r238028: Instruct the firmware not to provision resources for TCP offload if the kernel is being built without TCP_OFFLOAD. But never override toecaps_allowed if it has been set manually. Modified: stable/9/sys/dev/cxgbe/t4_main.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/9/sys/dev/cxgbe/t4_main.c Mon Jul 2 22:01:29 2012 (r238036) +++ stable/9/sys/dev/cxgbe/t4_main.c Mon Jul 2 22:04:09 2012 (r238037) @@ -222,7 +222,7 @@ TUNABLE_INT("hw.cxgbe.linkcaps_allowed", static int t4_niccaps_allowed = FW_CAPS_CONFIG_NIC; TUNABLE_INT("hw.cxgbe.niccaps_allowed", &t4_niccaps_allowed); -static int t4_toecaps_allowed = FW_CAPS_CONFIG_TOE; +static int t4_toecaps_allowed = -1; TUNABLE_INT("hw.cxgbe.toecaps_allowed", &t4_toecaps_allowed); static int t4_rdmacaps_allowed = 0; @@ -5492,6 +5492,12 @@ tweak_tunables(void) if (t4_nofldrxq1g < 1) t4_nofldrxq1g = min(nc, NOFLDRXQ_1G); + + if (t4_toecaps_allowed == -1) + t4_toecaps_allowed = FW_CAPS_CONFIG_TOE; +#else + if (t4_toecaps_allowed == -1) + t4_toecaps_allowed = 0; #endif if (t4_tmr_idx_10g < 0 || t4_tmr_idx_10g >= SGE_NTIMERS) From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 22:14:59 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7C5A01065673; Mon, 2 Jul 2012 22:14:59 +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 697398FC19; Mon, 2 Jul 2012 22:14:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q62MExBH002968; Mon, 2 Jul 2012 22:14:59 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q62MExbh002966; Mon, 2 Jul 2012 22:14:59 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201207022214.q62MExbh002966@svn.freebsd.org> From: Doug Barton Date: Mon, 2 Jul 2012 22:14:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238038 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 22:14:59 -0000 Author: dougb Date: Mon Jul 2 22:14:58 2012 New Revision: 238038 URL: http://svn.freebsd.org/changeset/base/238038 Log: Unfortunately the change in r237958 resulted in s/install/instclean/ due to the aggressive pattern matching of the :C modifier. I tested build and install in 2 phases, however with different solutions, resulting in the breakage. Mea culpa. The solution is to break out the all: target. This causes a few lines of code duplication, but now the all: target works as it should, and the other targets continue to work as they did before. While I'm here, add a ===> header line to the start of each port build to make it easier to find/more clear in the logs. Modified: head/sys/conf/kern.post.mk Modified: head/sys/conf/kern.post.mk ============================================================================== --- head/sys/conf/kern.post.mk Mon Jul 2 22:04:09 2012 (r238037) +++ head/sys/conf/kern.post.mk Mon Jul 2 22:14:58 2012 (r238038) @@ -60,11 +60,21 @@ PORTSMODULESENV=\ SRC_BASE=${SRC_BASE} \ OSVERSION=${OSRELDATE} \ WRKDIRPREFIX=${WRKDIRPREFIX} -.for __target in all install reinstall clean + +# The WRKDIR needs to be cleaned before building, and trying to change the target +# with a :C pattern below results in install -> instclean +all: +.for __i in ${PORTS_MODULES} + @${ECHO} "===> Ports module ${__i} (all)" + cd $${PORTSDIR:-/usr/ports}/${__i}; ${PORTSMODULESENV} ${MAKE} -B clean all +.endfor + +.for __target in install reinstall clean ${__target}: ports-${__target} ports-${__target}: .for __i in ${PORTS_MODULES} - cd $${PORTSDIR:-/usr/ports}/${__i}; ${PORTSMODULESENV} ${MAKE} -B ${__target:C/all/clean all/:C/install/deinstall reinstall/:C/reinstall/deinstall reinstall/} + @${ECHO} "===> Ports module ${__i} (${__target})" + cd $${PORTSDIR:-/usr/ports}/${__i}; ${PORTSMODULESENV} ${MAKE} -B ${__target:C/install/deinstall reinstall/:C/reinstall/deinstall reinstall/} .endfor .endfor .endif From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 22:18:30 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0CB511065816; Mon, 2 Jul 2012 22:18:30 +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 D438C8FC12; Mon, 2 Jul 2012 22:18:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q62MITOu003294; Mon, 2 Jul 2012 22:18:29 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q62MITR0003292; Mon, 2 Jul 2012 22:18:29 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201207022218.q62MITR0003292@svn.freebsd.org> From: Doug Barton Date: Mon, 2 Jul 2012 22:18:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238039 - stable/9/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 22:18:30 -0000 Author: dougb Date: Mon Jul 2 22:18:29 2012 New Revision: 238039 URL: http://svn.freebsd.org/changeset/base/238039 Log: MFC r238038: Unfortunately the change in r237958 resulted in s/install/instclean/ due to the aggressive pattern matching of the :C modifier. I tested build and install in 2 phases, however with different solutions, resulting in the breakage. Mea culpa. The solution is to break out the all: target. This causes a few lines of code duplication, but now the all: target works as it should, and the other targets continue to work as they did before. While I'm here, add a ===> header line to the start of each port build to make it easier to find/more clear in the logs. Modified: stable/9/sys/conf/kern.post.mk Directory Properties: stable/9/sys/ (props changed) stable/9/sys/conf/ (props changed) Modified: stable/9/sys/conf/kern.post.mk ============================================================================== --- stable/9/sys/conf/kern.post.mk Mon Jul 2 22:14:58 2012 (r238038) +++ stable/9/sys/conf/kern.post.mk Mon Jul 2 22:18:29 2012 (r238039) @@ -60,11 +60,21 @@ PORTSMODULESENV=\ SRC_BASE=${SRC_BASE} \ OSVERSION=${OSRELDATE} \ WRKDIRPREFIX=${WRKDIRPREFIX} -.for __target in all install reinstall clean + +# The WRKDIR needs to be cleaned before building, and trying to change the target +# with a :C pattern below results in install -> instclean +all: +.for __i in ${PORTS_MODULES} + @${ECHO} "===> Ports module ${__i} (all)" + cd $${PORTSDIR:-/usr/ports}/${__i}; ${PORTSMODULESENV} ${MAKE} -B clean all +.endfor + +.for __target in install reinstall clean ${__target}: ports-${__target} ports-${__target}: .for __i in ${PORTS_MODULES} - cd $${PORTSDIR:-/usr/ports}/${__i}; ${PORTSMODULESENV} ${MAKE} -B ${__target:C/all/clean all/:C/install/deinstall reinstall/:C/reinstall/deinstall reinstall/} + @${ECHO} "===> Ports module ${__i} (${__target})" + cd $${PORTSDIR:-/usr/ports}/${__i}; ${PORTSMODULESENV} ${MAKE} -B ${__target:C/install/deinstall reinstall/:C/reinstall/deinstall reinstall/} .endfor .endfor .endif From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 22:18:50 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EFC391065838; Mon, 2 Jul 2012 22:18:49 +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 C30BB8FC1B; Mon, 2 Jul 2012 22:18:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q62MIno9003346; Mon, 2 Jul 2012 22:18:49 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q62MInME003344; Mon, 2 Jul 2012 22:18:49 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201207022218.q62MInME003344@svn.freebsd.org> From: Doug Barton Date: Mon, 2 Jul 2012 22:18: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: r238040 - stable/8/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 22:18:50 -0000 Author: dougb Date: Mon Jul 2 22:18:49 2012 New Revision: 238040 URL: http://svn.freebsd.org/changeset/base/238040 Log: MFC r238038: Unfortunately the change in r237958 resulted in s/install/instclean/ due to the aggressive pattern matching of the :C modifier. I tested build and install in 2 phases, however with different solutions, resulting in the breakage. Mea culpa. The solution is to break out the all: target. This causes a few lines of code duplication, but now the all: target works as it should, and the other targets continue to work as they did before. While I'm here, add a ===> header line to the start of each port build to make it easier to find/more clear in the logs. Modified: stable/8/sys/conf/kern.post.mk Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/conf/kern.post.mk ============================================================================== --- stable/8/sys/conf/kern.post.mk Mon Jul 2 22:18:29 2012 (r238039) +++ stable/8/sys/conf/kern.post.mk Mon Jul 2 22:18:49 2012 (r238040) @@ -52,11 +52,21 @@ PORTSMODULESENV=\ SRC_BASE=${SRC_BASE} \ OSVERSION=${OSRELDATE} \ WRKDIRPREFIX=${WRKDIRPREFIX} -.for __target in all install reinstall clean + +# The WRKDIR needs to be cleaned before building, and trying to change the target +# with a :C pattern below results in install -> instclean +all: +.for __i in ${PORTS_MODULES} + @${ECHO} "===> Ports module ${__i} (all)" + cd $${PORTSDIR:-/usr/ports}/${__i}; ${PORTSMODULESENV} ${MAKE} -B clean all +.endfor + +.for __target in install reinstall clean ${__target}: ports-${__target} ports-${__target}: .for __i in ${PORTS_MODULES} - cd $${PORTSDIR:-/usr/ports}/${__i}; ${PORTSMODULESENV} ${MAKE} -B ${__target:C/all/clean all/:C/install/deinstall reinstall/:C/reinstall/deinstall reinstall/} + @${ECHO} "===> Ports module ${__i} (${__target})" + cd $${PORTSDIR:-/usr/ports}/${__i}; ${PORTSMODULESENV} ${MAKE} -B ${__target:C/install/deinstall reinstall/:C/reinstall/deinstall reinstall/} .endfor .endfor .endif From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 22:19:03 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AE4EA10658E5; Mon, 2 Jul 2012 22:19:03 +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 6426E8FC0A; Mon, 2 Jul 2012 22:19:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q62MJ33C003395; Mon, 2 Jul 2012 22:19:03 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q62MJ3El003393; Mon, 2 Jul 2012 22:19:03 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201207022219.q62MJ3El003393@svn.freebsd.org> From: Doug Barton Date: Mon, 2 Jul 2012 22:19: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: r238041 - stable/7/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 22:19:04 -0000 Author: dougb Date: Mon Jul 2 22:19:02 2012 New Revision: 238041 URL: http://svn.freebsd.org/changeset/base/238041 Log: MFC r238038: Unfortunately the change in r237958 resulted in s/install/instclean/ due to the aggressive pattern matching of the :C modifier. I tested build and install in 2 phases, however with different solutions, resulting in the breakage. Mea culpa. The solution is to break out the all: target. This causes a few lines of code duplication, but now the all: target works as it should, and the other targets continue to work as they did before. While I'm here, add a ===> header line to the start of each port build to make it easier to find/more clear in the logs. Modified: stable/7/sys/conf/kern.post.mk Directory Properties: stable/7/sys/ (props changed) Modified: stable/7/sys/conf/kern.post.mk ============================================================================== --- stable/7/sys/conf/kern.post.mk Mon Jul 2 22:18:49 2012 (r238040) +++ stable/7/sys/conf/kern.post.mk Mon Jul 2 22:19:02 2012 (r238041) @@ -52,11 +52,21 @@ PORTSMODULESENV=\ SRC_BASE=${SRC_BASE} \ OSVERSION=${OSRELDATE} \ WRKDIRPREFIX=${WRKDIRPREFIX} -.for __target in all install reinstall clean + +# The WRKDIR needs to be cleaned before building, and trying to change the target +# with a :C pattern below results in install -> instclean +all: +.for __i in ${PORTS_MODULES} + @${ECHO} "===> Ports module ${__i} (all)" + cd $${PORTSDIR:-/usr/ports}/${__i}; ${PORTSMODULESENV} ${MAKE} -B clean all +.endfor + +.for __target in install reinstall clean ${__target}: ports-${__target} ports-${__target}: .for __i in ${PORTS_MODULES} - cd $${PORTSDIR:-/usr/ports}/${__i}; ${PORTSMODULESENV} ${MAKE} -B ${__target:C/all/clean all/:C/install/deinstall reinstall/:C/reinstall/deinstall reinstall/} + @${ECHO} "===> Ports module ${__i} (${__target})" + cd $${PORTSDIR:-/usr/ports}/${__i}; ${PORTSMODULESENV} ${MAKE} -B ${__target:C/install/deinstall reinstall/:C/reinstall/deinstall reinstall/} .endfor .endfor .endif From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 23:10:28 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 27B981065691 for ; Mon, 2 Jul 2012 23:10:28 +0000 (UTC) (envelope-from pfg@freebsd.org) Received: from nm1-vm0.bullet.mail.sp2.yahoo.com (nm1-vm0.bullet.mail.sp2.yahoo.com [98.139.91.202]) by mx1.freebsd.org (Postfix) with SMTP id EE9DE8FC0C for ; Mon, 2 Jul 2012 23:10:27 +0000 (UTC) Received: from [98.139.91.69] by nm1.bullet.mail.sp2.yahoo.com with NNFMP; 02 Jul 2012 23:10:26 -0000 Received: from [98.139.91.48] by tm9.bullet.mail.sp2.yahoo.com with NNFMP; 02 Jul 2012 23:10:26 -0000 Received: from [127.0.0.1] by omp1048.mail.sp2.yahoo.com with NNFMP; 02 Jul 2012 23:10:26 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 951286.13416.bm@omp1048.mail.sp2.yahoo.com Received: (qmail 15843 invoked by uid 60001); 2 Jul 2012 23:10:26 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1341270626; bh=+ogp/ASQWkOEFDYYRzWgZ57UzG6yZuboaqlkTwPHOQY=; h=X-YMail-OSG:Received:X-RocketYMMF:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=q3SbWD2bDP4Jebl62lVVB2e/OI20KlgcY1zw4OybRjhIOaQcnmN4AAxOocienUYwcouR5n+rf4jh61eeA/GeFA7gufBmh5yhV33q/VadHcf4U+iN/slC1Ot/AvBgzeAZ+uCkUpHd5xD16xtCsZ8vsEro7ra8KIfXb5yykN4ZKTw= X-YMail-OSG: RAqCuCYVM1loEpSmPEMTJo_lfNi5ScI1He6ZRsuMOOHfMjK PKjjveF2g2W1HAQCR3pVUJMbrldLPxa57ZOLgNw0ElcV_7sF0WMRRe67hA5x C6C_YaNuYkFor83vlFaklHeRSgrTPRQb6YJ1hQXeyA2u7npXRtgf1GtjX.iW KquTdvNqYQcdJm8DNE3tKNZ1NW6.SKOYqE8Z27toGrDEDNaJ.kvhKQGV8q9j FrBqkVdTMfndDhsmvjhFv0K2k6SsrtXNlD.jXZ9bimJuSONzmY9U.WwSmKOc 7lKsvjtYyU0nHZnBmVJuHSXO3FlSZINkmZJD9rSykP2tCNUc83XTeX5WcJSe bluUymq83PivQ3VSWA5zodEhuVBwlvgpBtoH0oHl3oBUt6TNdu.ZxjlGeXFM ozX8eX3RSkAE23HehdqGL.sdmG_OSpgDi_2Sgm.iNmFqaz3VJXZ9gd54g3s2 JWgch Received: from [200.118.157.7] by web113509.mail.gq1.yahoo.com via HTTP; Mon, 02 Jul 2012 16:10:26 PDT X-RocketYMMF: giffunip X-Mailer: YahooMailClassic/15.0.8 YahooMailWebService/0.8.118.349524 Message-ID: <1341270626.1322.YahooMailClassic@web113509.mail.gq1.yahoo.com> Date: Mon, 2 Jul 2012 16:10:26 -0700 (PDT) From: Pedro Giffuni To: obrien@freebsd.org In-Reply-To: <20120702210438.GA85618@dragon.NUXI.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r237624 - in head: cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize cddl/contrib/opensolaris/lib/libdtrace/common sys/cddl/contrib/opensolaris/uts/common/dtrace sys/cddl/c... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pfg@freebsd.org List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 23:10:28 -0000 =0A=0A--- Lun 2/7/12, David O'Brien ha scritto:=0A...= =0A> =0A> At this point Illumos is the continuation of OpenSolaris.=0A> Whe= n Solaris 11 came out there was a discussion about if=0A> Oracle will fulfi= ll the statement in their leaked email=0A> about publishing sources again.= =A0 There is little to no=0A> hope in the Illumos community this will ever = happen.=0A=0AI tend to agree with the Illumos community on that however=0Aw= e may still be seeing some movement in that area. Oracle=0Ahas a linux dist= ribution and commercial interests are=0Aalways strong in unpredicable ways.= =0A=0AOracle has been porting Dtrace to Linux. Apparently they=0Awill be ad= opting dual GPLv2/CDDL for some few kernel=0Astuff and CDDL only for the ma= in code, but just the same=0Athere may be some stuff we want to take from t= hem.=0A=0A> =0A> It may be conceptually cleaner to import into=0A> '^/vendo= r{,-sys}/illumos', but I believe that will cause=0A> issues with importing = updates to existing files=0A> (e.g., r237458) as the 'svn merge'=0A> from '= ^/vendor{,-sys}' will get messy.=A0 I believe we=0A> may have to resort=0A>= to a three-way merge using "--ignore-ancestry" -- something=0A> I don't be= lieve we want to do.=0A> =0A=0AI think Martin Matuska did exactly the right= thing:=0Ahe created the illumos vendor branch starting from=0Athe opensola= ris branch.=0A=0A> Thus I think this needs to be discussed with the repo=0A= > Meisters.=0A> =0A> =0A> > If somehow Oracle decides to relicense Dtrace o= r ZFS=0A> we=0A> > still must keep these changes isolated from the code=0A>= > provided in the vendor branch.=0A> =0A> I don't quite follow.=0A> =0A> L= ets suppose we don't import anything from Illumos, but wait=0A> for the=0A>= Solaris 11 code drop.=A0 Should DTrace or ZFS be=0A> relicensed, IMHO it= =0A> should still get imported into '^/vendor{,-sys}/opensolaris'=0A> as th= at=0A> is the progression of that Intellectual Property.=0A> '^/vendor{,-sy= s}/opensolaris' states no license.=A0 What=0A> we would have to=0A> do is '= svn move' the resulting merge outside of=0A> 'head/{,sys}/cddl/'.=0A> =0A> = =0A> =0A> > I think we have to decide if we are going to consider=0A> > Ill= umos a vendor on it's own. For ZFS it would seem=0A> > the right thing to d= o, for Dtrace I am not sure: at=0A> > least I am not considering bringing a= ny other feature=0A> > at this time.=0A> =0A> Given the number of primary a= uthors & architects of both=0A> ZFS and=0A> DTrace that have left Oracle/Su= n, the works of those folks=0A> are the=0A> things I believe FreeBSD is int= erested in.=A0 In fact the=0A> ZFS Working=0A> Group is external to Oracle = and Solaris.=0A> =0A=0AI am somewhat biased here because I am a committer i= n=0AApache OpenOffice and I have find it very valuable that=0ASUN/Oracle ke= pt the Contributor License Agreements in=0Aplace to effectively permit reli= censing.=0A=0AConcerning ZFS: the main developer of the encryption stuff=0A= did stay at Oracle. At this time that code will not be seen=0Ain the open (= apparently there was a Solaris 11 source leak=0Abut that's not something we= can touch), but we just never=0Aknow.=0A=0A> Doesn't this commit of yours = which brought in new DTrace=0A> work by Joyent=0A> (likely Brendan Gregg or= Bryan Cantrill) show this point?=0A> =0A> Perhaps we should do an 'svn mov= e' of=0A> '^/vendor{,-sys}/opensolaris'=0A> to '^/vendor{,-sys}/illumos'?= =0A> =0A=0AIllumos is a fork so svn copy works just fine for this, plus=0Ac= opying is a very cheap operation in SVN.=0A=0ACheers,=0A=0APedro. From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 23:41:57 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1C1CF1065673; Mon, 2 Jul 2012 23:41:57 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F1B228FC08; Mon, 2 Jul 2012 23:41:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q62Nfus4006744; Mon, 2 Jul 2012 23:41:56 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q62NfuPe006742; Mon, 2 Jul 2012 23:41:56 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201207022341.q62NfuPe006742@svn.freebsd.org> From: Marcel Moolenaar Date: Mon, 2 Jul 2012 23:41:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238042 - head/sys/powerpc/mpc85xx X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 23:41:57 -0000 Author: marcel Date: Mon Jul 2 23:41:56 2012 New Revision: 238042 URL: http://svn.freebsd.org/changeset/base/238042 Log: Properly implement the bus_config_intr, bus_setup_intr and bus_teardown_intr methods so that MI drvers can depend on us doing the right thing instead of having to go around us and call MD code directly. See the FDT code for example (not for long though). Modified: head/sys/powerpc/mpc85xx/nexus.c Modified: head/sys/powerpc/mpc85xx/nexus.c ============================================================================== --- head/sys/powerpc/mpc85xx/nexus.c Mon Jul 2 22:19:02 2012 (r238041) +++ head/sys/powerpc/mpc85xx/nexus.c Mon Jul 2 23:41:56 2012 (r238042) @@ -65,6 +65,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include + /* * Device interface */ @@ -75,6 +77,13 @@ static int nexus_activate_resource(devic static int nexus_deactivate_resource(device_t, device_t, int, int, struct resource *); +static int nexus_config_intr(device_t, int, enum intr_trigger, + enum intr_polarity); +static int nexus_setup_intr(device_t, device_t, struct resource *, int, + driver_filter_t *, driver_intr_t *, void *, void **); +static int nexus_teardown_intr(device_t, device_t, struct resource *, + void *); + static device_method_t nexus_methods[] = { /* Device interface */ DEVMETHOD(device_probe, nexus_probe), @@ -89,8 +98,9 @@ static device_method_t nexus_methods[] = DEVMETHOD(bus_probe_nomatch, NULL), DEVMETHOD(bus_read_ivar, NULL), DEVMETHOD(bus_write_ivar, NULL), - DEVMETHOD(bus_setup_intr, NULL), - DEVMETHOD(bus_teardown_intr, NULL), + DEVMETHOD(bus_config_intr, nexus_config_intr), + DEVMETHOD(bus_setup_intr, nexus_setup_intr), + DEVMETHOD(bus_teardown_intr, nexus_teardown_intr), DEVMETHOD(bus_alloc_resource, NULL), DEVMETHOD(bus_activate_resource, nexus_activate_resource), DEVMETHOD(bus_deactivate_resource, nexus_deactivate_resource), @@ -143,3 +153,49 @@ nexus_deactivate_resource(device_t bus, /* Not much to be done yet... */ return (rman_deactivate_resource(res)); } + +static int +nexus_config_intr(device_t bus, int irq, enum intr_trigger trig, + enum intr_polarity pol) +{ + + return (powerpc_config_intr(irq, trig, pol)); +} + +static int +nexus_setup_intr(device_t bus, device_t child, struct resource *res, int flags, + driver_filter_t *ifilt, driver_intr_t *ihand, void *arg, void **cookiep) +{ + int error; + + *cookiep = NULL; + + /* somebody tried to setup an irq that failed to allocate! */ + if (res == NULL) + return (EINVAL); + + if ((rman_get_flags(res) & RF_SHAREABLE) == 0) + flags |= INTR_EXCL; + + /* We depend on rman_activate_resource() being idempotent. */ + error = rman_activate_resource(res); + if (error) + return (error); + + error = powerpc_setup_intr(device_get_nameunit(child), + rman_get_start(res), ifilt, ihand, arg, flags, cookiep); + return (error); +} + +static int +nexus_teardown_intr(device_t bus, device_t child, struct resource *res, + void *cookie) +{ + int error; + + if (res == NULL) + return (EINVAL); + + error = powerpc_teardown_intr(cookie); + return (error); +} From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 23:49:29 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 96848106566B; Mon, 2 Jul 2012 23:49:29 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 82FB58FC14; Mon, 2 Jul 2012 23:49:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q62NnTTO007082; Mon, 2 Jul 2012 23:49:29 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q62NnTAH007080; Mon, 2 Jul 2012 23:49:29 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201207022349.q62NnTAH007080@svn.freebsd.org> From: Marcel Moolenaar Date: Mon, 2 Jul 2012 23:49:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238043 - head/sys/dev/fdt X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 23:49:29 -0000 Author: marcel Date: Mon Jul 2 23:49:29 2012 New Revision: 238043 URL: http://svn.freebsd.org/changeset/base/238043 Log: Properly implement bus_setup_intr so that it handles the configuration of interrupts of direct children. Have the bus_config_intr and bus_teardown_intr methods implemented by bus_generic_config_intr and bus_generic_teardown_intr (resp) as we don't need to do anything special outselves. This removes all the ``#ifdef $arch'' code that was there because powerpc didn't have a proper nexus and people tend to copy and paste stuff. Modified: head/sys/dev/fdt/fdtbus.c Modified: head/sys/dev/fdt/fdtbus.c ============================================================================== --- head/sys/dev/fdt/fdtbus.c Mon Jul 2 23:41:56 2012 (r238042) +++ head/sys/dev/fdt/fdtbus.c Mon Jul 2 23:49:29 2012 (r238043) @@ -89,8 +89,6 @@ static int fdtbus_deactivate_resource(de struct resource *); static int fdtbus_setup_intr(device_t, device_t, struct resource *, int, driver_filter_t *, driver_intr_t *, void *, void **); -static int fdtbus_teardown_intr(device_t, device_t, struct resource *, - void *); static const char *fdtbus_ofw_get_name(device_t, device_t); static phandle_t fdtbus_ofw_get_node(device_t, device_t); @@ -121,8 +119,9 @@ static device_method_t fdtbus_methods[] DEVMETHOD(bus_release_resource, fdtbus_release_resource), DEVMETHOD(bus_activate_resource, fdtbus_activate_resource), DEVMETHOD(bus_deactivate_resource, fdtbus_deactivate_resource), + DEVMETHOD(bus_config_intr, bus_generic_config_intr), DEVMETHOD(bus_setup_intr, fdtbus_setup_intr), - DEVMETHOD(bus_teardown_intr, fdtbus_teardown_intr), + DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), /* OFW bus interface */ DEVMETHOD(ofw_bus_get_node, fdtbus_ofw_get_node), @@ -575,30 +574,41 @@ fdtbus_setup_intr(device_t bus, device_t int flags, driver_filter_t *filter, driver_intr_t *ihand, void *arg, void **cookiep) { - int err; + struct fdtbus_devinfo *di; + enum intr_trigger trig; + enum intr_polarity pol; + int error, rid; + + if (res == NULL) + return (EINVAL); - *cookiep = 0; - if ((rman_get_flags(res) & RF_SHAREABLE) == 0) - flags |= INTR_EXCL; - - err = rman_activate_resource(res); - if (err) - return (err); - -#if defined(__powerpc__) - err = powerpc_setup_intr(device_get_nameunit(child), - rman_get_start(res), filter, ihand, arg, flags, cookiep); -#elif defined(__mips__) - cpu_establish_hardintr(device_get_nameunit(child), - filter, ihand, arg, rman_get_start(res), flags, cookiep); -#elif defined(__arm__) - arm_setup_irqhandler(device_get_nameunit(child), - filter, ihand, arg, rman_get_start(res), flags, cookiep); - arm_unmask_irq(rman_get_start(res)); - err = 0; -#endif + /* + * We are responsible for configuring the interrupts of our direct + * children. + */ + if (device_get_parent(child) == bus) { + di = device_get_ivars(child); + if (di == NULL) + return (ENXIO); + + rid = rman_get_rid(res); + if (rid >= DI_MAX_INTR_NUM) + return (ENOENT); + + trig = di->di_intr_sl[rid].trig; + pol = di->di_intr_sl[rid].pol; + if (trig != INTR_TRIGGER_CONFORM || + pol != INTR_POLARITY_CONFORM) { + error = bus_generic_config_intr(bus, + rman_get_start(res), trig, pol); + if (error) + return (error); + } + } - return (err); + error = bus_generic_setup_intr(bus, child, res, flags, filter, ihand, + arg, cookiep); + return (error); } static int @@ -617,21 +627,6 @@ fdtbus_deactivate_resource(device_t bus, return (rman_deactivate_resource(res)); } -static int -fdtbus_teardown_intr(device_t bus, device_t child, struct resource *res, - void *cookie) -{ - -#if defined(__powerpc__) - return (powerpc_teardown_intr(cookie)); -#elif defined(__mips__) - /* mips does not have a teardown yet */ - return (0); -#elif defined(__arm__) - return (arm_remove_irqhandler(rman_get_start(res), cookie)); -#endif -} - static const char * fdtbus_ofw_get_name(device_t bus, device_t dev) { From owner-svn-src-all@FreeBSD.ORG Mon Jul 2 23:53:09 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1CE791065673; Mon, 2 Jul 2012 23:53:09 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E570C8FC1A; Mon, 2 Jul 2012 23:53:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q62Nr8Jt007264; Mon, 2 Jul 2012 23:53:08 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q62Nr8a2007262; Mon, 2 Jul 2012 23:53:08 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201207022353.q62Nr8a2007262@svn.freebsd.org> From: Marcel Moolenaar Date: Mon, 2 Jul 2012 23:53:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238044 - head/sys/dev/fdt X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 23:53:09 -0000 Author: marcel Date: Mon Jul 2 23:53:08 2012 New Revision: 238044 URL: http://svn.freebsd.org/changeset/base/238044 Log: Simplify simplebus_setup_intr and don't call MD code directly. We can (and have to) trust our parent to handle interrupt configuration. Modified: head/sys/dev/fdt/simplebus.c Modified: head/sys/dev/fdt/simplebus.c ============================================================================== --- head/sys/dev/fdt/simplebus.c Mon Jul 2 23:49:29 2012 (r238043) +++ head/sys/dev/fdt/simplebus.c Mon Jul 2 23:53:08 2012 (r238044) @@ -288,39 +288,34 @@ simplebus_setup_intr(device_t bus, devic struct simplebus_devinfo *di; enum intr_trigger trig; enum intr_polarity pol; - int irq, rid; + int error, rid; - if (res == NULL) - panic("simplebus_setup_intr: NULL irq resource!"); + if (device_get_parent(child) != bus) + return (ECHILD); - rid = rman_get_rid(res); - if (rid > DI_MAX_INTR_NUM) { - device_printf(child, "rid out of range rid = %d\n", rid); - return (ERANGE); - } + di = device_get_ivars(child); + if (di == NULL) + return (ENXIO); - irq = rman_get_start(res); + if (res == NULL) + return (EINVAL); - if ((di = device_get_ivars(child)) == NULL) { - device_printf(child, "could not retrieve devinfo\n"); - return (ENXIO); - } + rid = rman_get_rid(res); + if (rid >= DI_MAX_INTR_NUM) + return (ENOENT); trig = di->di_intr_sl[rid].trig; pol = di->di_intr_sl[rid].pol; + if (trig != INTR_TRIGGER_CONFORM || pol != INTR_POLARITY_CONFORM) { + error = bus_generic_config_intr(bus, rman_get_start(res), + trig, pol); + if (error) + return (error); + } - debugf("intr config: irq = %d, trig = %d, pol = %d\n", irq, trig, pol); - -#if defined(__powerpc__) - int err; - - err = powerpc_config_intr(irq, trig, pol); - if (err) - return (err); -#endif - - return (bus_generic_setup_intr(bus, child, res, flags, filter, ihand, - arg, cookiep)); + error = bus_generic_setup_intr(bus, child, res, flags, filter, ihand, + arg, cookiep); + return (error); } static const struct ofw_bus_devinfo * From owner-svn-src-all@FreeBSD.ORG Tue Jul 3 00:06:15 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3ABAB1065670; Tue, 3 Jul 2012 00:06:15 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 263308FC14; Tue, 3 Jul 2012 00:06:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6306E0J007850; Tue, 3 Jul 2012 00:06:14 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6306EDD007847; Tue, 3 Jul 2012 00:06:14 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201207030006.q6306EDD007847@svn.freebsd.org> From: Marcel Moolenaar Date: Tue, 3 Jul 2012 00:06:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238045 - head/sys/powerpc/mpc85xx X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jul 2012 00:06:15 -0000 Author: marcel Date: Tue Jul 3 00:06:14 2012 New Revision: 238045 URL: http://svn.freebsd.org/changeset/base/238045 Log: Support lbc interrupts: o Save and clear the LTESR register in the interrupt handler. o In lbc_read_reg(), return the saved LTESR register value if applicable (i.e. when the saved value is not invalid (read: ~0U)). o In lbc_write_reg(), clear the bits in the saved register when when it's written to and when the asved value is not invalid. o Also in lbc_write_reg(), the LTESR register is unlocked (in H/W) when bit 1 of LTEATR is cleared. We use this to invalidate our saved LTESR register value. Subsequent reads and write go to H/W directly. While here: o In lbc_read_reg() & lbc_write_reg(), add some belts and suspenders to catch when register offsets are out of range. o In lbc_attach(), initialize completely and don't leave something left for lbc_banks_enable(). Modified: head/sys/powerpc/mpc85xx/lbc.c head/sys/powerpc/mpc85xx/lbc.h Modified: head/sys/powerpc/mpc85xx/lbc.c ============================================================================== --- head/sys/powerpc/mpc85xx/lbc.c Mon Jul 2 23:53:08 2012 (r238044) +++ head/sys/powerpc/mpc85xx/lbc.c Tue Jul 3 00:06:14 2012 (r238045) @@ -273,13 +273,8 @@ lbc_banks_enable(struct lbc_softc *sc) for (i = 0; i < LBC_DEV_MAX; i++) { size = sc->sc_banks[i].size; - if (size == 0) { - bus_space_write_4(sc->sc_bst, sc->sc_bsh, - LBC85XX_BR(i), 0); - bus_space_write_4(sc->sc_bst, sc->sc_bsh, - LBC85XX_OR(i), 0); + if (size == 0) continue; - } /* * Compute and program BR value. @@ -331,23 +326,6 @@ lbc_banks_enable(struct lbc_softc *sc) LBC85XX_OR(i), regval); } - /* - * Initialize configuration register: - * - enable Local Bus - * - set data buffer control signal function - * - disable parity byte select - * - set ECC parity type - * - set bus monitor timing and timer prescale - */ - bus_space_write_4(sc->sc_bst, sc->sc_bsh, LBC85XX_LBCR, 0); - - /* - * Initialize clock ratio register: - * - disable PLL bypass mode - * - configure LCLK delay cycles for the assertion of LALE - * - set system clock divider - */ - bus_space_write_4(sc->sc_bst, sc->sc_bsh, LBC85XX_LCRR, 0x00030008); return (0); fail: @@ -426,6 +404,18 @@ out: return (rv); } +static void +lbc_intr(void *arg) +{ + struct lbc_softc *sc = arg; + uint32_t ltesr; + + ltesr = bus_space_read_4(sc->sc_bst, sc->sc_bsh, LBC85XX_LTESR); + sc->sc_ltesr = ltesr; + bus_space_write_4(sc->sc_bst, sc->sc_bsh, LBC85XX_LTESR, ltesr); + wakeup(sc->sc_dev); +} + static int lbc_probe(device_t dev) { @@ -455,14 +445,59 @@ lbc_attach(device_t dev) sc = device_get_softc(dev); sc->sc_dev = dev; - sc->sc_rid = 0; - sc->sc_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &sc->sc_rid, + sc->sc_mrid = 0; + sc->sc_mres = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &sc->sc_mrid, RF_ACTIVE); - if (sc->sc_res == NULL) + if (sc->sc_mres == NULL) return (ENXIO); - sc->sc_bst = rman_get_bustag(sc->sc_res); - sc->sc_bsh = rman_get_bushandle(sc->sc_res); + sc->sc_bst = rman_get_bustag(sc->sc_mres); + sc->sc_bsh = rman_get_bushandle(sc->sc_mres); + + for (bank = 0; bank < LBC_DEV_MAX; bank++) { + bus_space_write_4(sc->sc_bst, sc->sc_bsh, LBC85XX_BR(bank), 0); + bus_space_write_4(sc->sc_bst, sc->sc_bsh, LBC85XX_OR(bank), 0); + } + + /* + * Initialize configuration register: + * - enable Local Bus + * - set data buffer control signal function + * - disable parity byte select + * - set ECC parity type + * - set bus monitor timing and timer prescale + */ + bus_space_write_4(sc->sc_bst, sc->sc_bsh, LBC85XX_LBCR, 0); + + /* + * Initialize clock ratio register: + * - disable PLL bypass mode + * - configure LCLK delay cycles for the assertion of LALE + * - set system clock divider + */ + bus_space_write_4(sc->sc_bst, sc->sc_bsh, LBC85XX_LCRR, 0x00030008); + + bus_space_write_4(sc->sc_bst, sc->sc_bsh, LBC85XX_LTEDR, 0); + bus_space_write_4(sc->sc_bst, sc->sc_bsh, LBC85XX_LTESR, ~0); + bus_space_write_4(sc->sc_bst, sc->sc_bsh, LBC85XX_LTEIR, 0x64080001); + + sc->sc_irid = 0; + sc->sc_ires = bus_alloc_resource_any(dev, SYS_RES_IRQ, &sc->sc_irid, + RF_ACTIVE | RF_SHAREABLE); + if (sc->sc_ires != NULL) { + error = bus_setup_intr(dev, sc->sc_ires, + INTR_TYPE_MISC | INTR_MPSAFE, NULL, lbc_intr, sc, + &sc->sc_icookie); + if (error) { + device_printf(dev, "could not activate interrupt\n"); + bus_release_resource(dev, SYS_RES_IRQ, sc->sc_irid, + sc->sc_ires); + sc->sc_ires = NULL; + } + } + + sc->sc_ltesr = ~0; + rangesptr = NULL; rm = &sc->sc_rman; @@ -614,7 +649,7 @@ lbc_attach(device_t dev) fail: free(rangesptr, M_OFWPROP); - bus_release_resource(dev, SYS_RES_MEMORY, sc->sc_rid, sc->sc_res); + bus_release_resource(dev, SYS_RES_MEMORY, sc->sc_mrid, sc->sc_mres); return (error); } @@ -742,17 +777,49 @@ lbc_get_devinfo(device_t bus, device_t c void lbc_write_reg(device_t child, u_int off, uint32_t val) { + device_t dev; struct lbc_softc *sc; - sc = device_get_softc(device_get_parent(child)); + dev = device_get_parent(child); + + if (off >= 0x1000) { + device_printf(dev, "%s(%s): invalid offset %#x\n", + __func__, device_get_nameunit(child), off); + return; + } + + sc = device_get_softc(dev); + + if (off == LBC85XX_LTESR && sc->sc_ltesr != ~0u) { + sc->sc_ltesr ^= (val & sc->sc_ltesr); + return; + } + + if (off == LBC85XX_LTEATR && (val & 1) == 0) + sc->sc_ltesr = ~0u; bus_space_write_4(sc->sc_bst, sc->sc_bsh, off, val); } uint32_t lbc_read_reg(device_t child, u_int off) { + device_t dev; struct lbc_softc *sc; + uint32_t val; + + dev = device_get_parent(child); + + if (off >= 0x1000) { + device_printf(dev, "%s(%s): invalid offset %#x\n", + __func__, device_get_nameunit(child), off); + return (~0U); + } + + sc = device_get_softc(dev); - sc = device_get_softc(device_get_parent(child)); - return (bus_space_read_4(sc->sc_bst, sc->sc_bsh, off)); + if (off == LBC85XX_LTESR && sc->sc_ltesr != ~0U) + val = sc->sc_ltesr; + else + val = bus_space_read_4(sc->sc_bst, sc->sc_bsh, off); + return (val); } Modified: head/sys/powerpc/mpc85xx/lbc.h ============================================================================== --- head/sys/powerpc/mpc85xx/lbc.h Mon Jul 2 23:53:08 2012 (r238044) +++ head/sys/powerpc/mpc85xx/lbc.h Tue Jul 3 00:06:14 2012 (r238045) @@ -105,10 +105,15 @@ struct lbc_bank { struct lbc_softc { device_t sc_dev; - struct resource *sc_res; + + struct resource *sc_mres; bus_space_handle_t sc_bsh; bus_space_tag_t sc_bst; - int sc_rid; + int sc_mrid; + + int sc_irid; + struct resource *sc_ires; + void *sc_icookie; struct rman sc_rman; @@ -117,6 +122,8 @@ struct lbc_softc { struct lbc_memrange sc_range[LBC_DEV_MAX]; struct lbc_bank sc_banks[LBC_DEV_MAX]; + + uint32_t sc_ltesr; }; struct lbc_devinfo { From owner-svn-src-all@FreeBSD.ORG Tue Jul 3 01:00:29 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D1EF5106566B; Tue, 3 Jul 2012 01:00:29 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BE73F8FC17; Tue, 3 Jul 2012 01:00:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6310TuT010152; Tue, 3 Jul 2012 01:00:29 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6310TIG010148; Tue, 3 Jul 2012 01:00:29 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201207030100.q6310TIG010148@svn.freebsd.org> From: Marcel Moolenaar Date: Tue, 3 Jul 2012 01:00:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238046 - in head/sys: conf dev/nand X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jul 2012 01:00:29 -0000 Author: marcel Date: Tue Jul 3 01:00:29 2012 New Revision: 238046 URL: http://svn.freebsd.org/changeset/base/238046 Log: Add a driver for the Freescale FCM module in the localbus controller. This driver does not yet handle multiple chip selects properly. Note that the NAND infrastructure does not perform full page reads or writes, which means that this driver cannot make use of the hardware ECC that is otherwise present. Added: head/sys/dev/nand/nfc_fsl.c (contents, props changed) head/sys/dev/nand/nfc_fsl.h (contents, props changed) Modified: head/sys/conf/files.powerpc Modified: head/sys/conf/files.powerpc ============================================================================== --- head/sys/conf/files.powerpc Tue Jul 3 00:06:14 2012 (r238045) +++ head/sys/conf/files.powerpc Tue Jul 3 01:00:29 2012 (r238046) @@ -35,6 +35,7 @@ dev/iicbus/ad7417.c optional ad7417 pow dev/iicbus/ds1775.c optional ds1775 powermac dev/iicbus/max6690.c optional max6690 powermac dev/kbd/kbd.c optional sc +dev/nand/nfc_fsl.c optional nand mpc85xx dev/ofw/openfirm.c optional aim | fdt dev/ofw/openfirmio.c optional aim | fdt dev/ofw/ofw_bus_if.m optional aim | fdt Added: head/sys/dev/nand/nfc_fsl.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/nand/nfc_fsl.c Tue Jul 3 01:00:29 2012 (r238046) @@ -0,0 +1,716 @@ +/*- + * Copyright (C) 2012 Juniper Networks, Inc. + * Copyright (C) 2009-2012 Semihalf + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ +/* + * TODO : + * + * -- test support for small pages + * -- support for reading ONFI parameters + * -- support for cached and interleaving commands + * -- proper setting of AL bits in FMR + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include + +#include + +#include +#include + +#include "nfc_fsl.h" + +#include "nfc_if.h" + +#define LBC_READ(regname) lbc_read_reg(dev, (LBC85XX_ ## regname)) +#define LBC_WRITE(regname, val) lbc_write_reg(dev, (LBC85XX_ ## regname), val) + +enum addr_type { + ADDR_NONE, + ADDR_ID, + ADDR_ROW, + ADDR_ROWCOL +}; + +struct fsl_nfc_fcm { + /* Read-only after initialization */ + uint32_t reg_fmr; + + /* To be preserved across "start_command" */ + u_int buf_ofs; + u_int read_ptr; + u_int status:1; + + /* Command state -- cleared by "start_command" */ + uint32_t fcm_startzero; + uint32_t reg_fcr; + uint32_t reg_fir; + uint32_t reg_mdr; + uint32_t reg_fbcr; + uint32_t reg_fbar; + uint32_t reg_fpar; + u_int cmdnr; + u_int opnr; + u_int pg_ofs; + enum addr_type addr_type; + u_int addr_bytes; + u_int row_addr; + u_int column_addr; + u_int data_fir:8; + uint32_t fcm_endzero; +}; + +struct fsl_nand_softc { + struct nand_softc nand_dev; + device_t dev; + struct resource *res; + int rid; /* Resourceid */ + struct lbc_devinfo *dinfo; + struct fsl_nfc_fcm fcm; + uint8_t col_cycles; + uint8_t row_cycles; + uint16_t pgsz; /* Page size */ +}; + +static int fsl_nand_attach(device_t dev); +static int fsl_nand_probe(device_t dev); +static int fsl_nand_detach(device_t dev); + +static int fsl_nfc_select_cs(device_t dev, uint8_t cs); +static int fsl_nfc_read_rnb(device_t dev); +static int fsl_nfc_send_command(device_t dev, uint8_t command); +static int fsl_nfc_send_address(device_t dev, uint8_t address); +static uint8_t fsl_nfc_read_byte(device_t dev); +static int fsl_nfc_start_command(device_t dev); +static void fsl_nfc_read_buf(device_t dev, void *buf, uint32_t len); +static void fsl_nfc_write_buf(device_t dev, void *buf, uint32_t len); + +static device_method_t fsl_nand_methods[] = { + DEVMETHOD(device_probe, fsl_nand_probe), + DEVMETHOD(device_attach, fsl_nand_attach), + DEVMETHOD(device_detach, fsl_nand_detach), + + DEVMETHOD(nfc_select_cs, fsl_nfc_select_cs), + DEVMETHOD(nfc_read_rnb, fsl_nfc_read_rnb), + DEVMETHOD(nfc_start_command, fsl_nfc_start_command), + DEVMETHOD(nfc_send_command, fsl_nfc_send_command), + DEVMETHOD(nfc_send_address, fsl_nfc_send_address), + DEVMETHOD(nfc_read_byte, fsl_nfc_read_byte), + DEVMETHOD(nfc_read_buf, fsl_nfc_read_buf), + DEVMETHOD(nfc_write_buf, fsl_nfc_write_buf), + { 0, 0 }, +}; + +static driver_t fsl_nand_driver = { + "nand", + fsl_nand_methods, + sizeof(struct fsl_nand_softc), +}; + +static devclass_t fsl_nand_devclass; + +DRIVER_MODULE(fsl_nand, lbc, fsl_nand_driver, fsl_nand_devclass, + 0, 0); + +static int fsl_nand_build_address(device_t dev, uint32_t page, uint32_t column); +static int fsl_nand_chip_preprobe(device_t dev, struct nand_id *id); + +#ifdef NAND_DEBUG_TIMING +static device_t fcm_devs[8]; +#endif + +#define CMD_SHIFT(cmd_num) (24 - ((cmd_num) * 8)) +#define OP_SHIFT(op_num) (28 - ((op_num) * 4)) + +#define FSL_LARGE_PAGE_SIZE (2112) +#define FSL_SMALL_PAGE_SIZE (528) + +static void +fsl_nand_init_regs(struct fsl_nand_softc *sc) +{ + uint32_t or_v, br_v; + device_t dev; + + dev = sc->dev; + + sc->fcm.reg_fmr = (15 << FMR_CWTO_SHIFT); + + /* + * Setup 4 row cycles and hope that chip ignores superfluous address + * bytes. + */ + sc->fcm.reg_fmr |= (2 << FMR_AL_SHIFT); + + /* Reprogram BR(x) */ + br_v = lbc_read_reg(dev, LBC85XX_BR(sc->dinfo->di_bank)); + br_v &= 0xffff8000; + br_v |= 1 << 11; /* 8-bit port size */ + br_v |= 0 << 9; /* No ECC checking and generation */ + br_v |= 1 << 5; /* FCM machine */ + br_v |= 1; /* Valid */ + lbc_write_reg(dev, LBC85XX_BR(sc->dinfo->di_bank), br_v); + + /* Reprogram OR(x) */ + or_v = lbc_read_reg(dev, LBC85XX_OR(sc->dinfo->di_bank)); + or_v &= 0xfffffc00; + or_v |= 0x03AE; /* Default POR timing */ + lbc_write_reg(dev, LBC85XX_OR(sc->dinfo->di_bank), or_v); + + if (or_v & OR_FCM_PAGESIZE) { + sc->pgsz = FSL_LARGE_PAGE_SIZE; + sc->col_cycles = 2; + nand_debug(NDBG_DRV, "%s: large page NAND device at #%d", + device_get_nameunit(dev), sc->dinfo->di_bank); + } else { + sc->pgsz = FSL_SMALL_PAGE_SIZE; + sc->col_cycles = 1; + nand_debug(NDBG_DRV, "%s: small page NAND device at #%d", + device_get_nameunit(dev), sc->dinfo->di_bank); + } +} + +static int +fsl_nand_probe(device_t dev) +{ + + if (!ofw_bus_is_compatible(dev, "fsl,elbc-fcm-nand")) + return (ENXIO); + + device_set_desc(dev, "Freescale localbus FCM Controller"); + return (BUS_PROBE_DEFAULT); +} + +static int +fsl_nand_attach(device_t dev) +{ + struct fsl_nand_softc *sc; + struct nand_id id; + struct nand_params *param; + uint32_t num_pages; + + sc = device_get_softc(dev); + sc->dev = dev; + sc->dinfo = device_get_ivars(dev); + + sc->res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &sc->rid, + RF_ACTIVE); + if (sc->res == NULL) { + device_printf(dev, "could not allocate resources!\n"); + return (ENXIO); + } + + bzero(&sc->fcm, sizeof(sc->fcm)); + + /* Init register and check if HW ECC turned on */ + fsl_nand_init_regs(sc); + + /* Chip is probed, so determine number of row address cycles */ + fsl_nand_chip_preprobe(dev, &id); + param = nand_get_params(&id); + if (param != NULL) { + num_pages = (param->chip_size << 20) / param->page_size; + while(num_pages) { + sc->row_cycles++; + num_pages >>= 8; + } + + sc->fcm.reg_fmr &= ~(FMR_AL); + sc->fcm.reg_fmr |= (sc->row_cycles - 2) << FMR_AL_SHIFT; + } + + nand_init(&sc->nand_dev, dev, NAND_ECC_SOFT, 0, 0, NULL, NULL); + +#ifdef NAND_DEBUG_TIMING + fcm_devs[sc->dinfo->di_bank] = dev; +#endif + + return (nandbus_create(dev)); +} + +static int +fsl_nand_detach(device_t dev) +{ + struct fsl_nand_softc *sc; + + sc = device_get_softc(dev); + + if (sc->res != NULL) + bus_release_resource(dev, SYS_RES_MEMORY, sc->rid, sc->res); + + return (0); +} + +static int +fsl_nfc_select_cs(device_t dev, uint8_t cs) +{ + + // device_printf(dev, "%s(cs=%u)\n", __func__, cs); + return ((cs > 0) ? EINVAL : 0); +} + +static int +fsl_nfc_read_rnb(device_t dev) +{ + + // device_printf(dev, "%s()\n", __func__); + return (0); +} + +static int +fsl_nfc_send_command(device_t dev, uint8_t command) +{ + struct fsl_nand_softc *sc; + struct fsl_nfc_fcm *fcm; + uint8_t fir_op; + + // device_printf(dev, "%s(command=%u)\n", __func__, command); + + sc = device_get_softc(dev); + fcm = &sc->fcm; + + if (command == NAND_CMD_PROG_END) { + fcm->reg_fir |= (FIR_OP_WB << OP_SHIFT(fcm->opnr)); + fcm->opnr++; + } + fcm->reg_fcr |= command << CMD_SHIFT(fcm->cmdnr); + fir_op = (fcm->cmdnr == 0) ? FIR_OP_CW0 : FIR_OP_CM(fcm->cmdnr); + fcm->cmdnr++; + + fcm->reg_fir |= (fir_op << OP_SHIFT(fcm->opnr)); + fcm->opnr++; + + switch (command) { + case NAND_CMD_READ_ID: + fcm->data_fir = FIR_OP_RBW; + fcm->addr_type = ADDR_ID; + break; + case NAND_CMD_SMALLOOB: + fcm->pg_ofs += 256; + /*FALLTHROUGH*/ + case NAND_CMD_SMALLB: + fcm->pg_ofs += 256; + /*FALLTHROUGH*/ + case NAND_CMD_READ: /* NAND_CMD_SMALLA */ + fcm->data_fir = FIR_OP_RBW; + fcm->addr_type = ADDR_ROWCOL; + break; + case NAND_CMD_STATUS: + fcm->data_fir = FIR_OP_RS; + fcm->status = 1; + break; + case NAND_CMD_ERASE: + fcm->addr_type = ADDR_ROW; + break; + case NAND_CMD_PROG: + fcm->addr_type = ADDR_ROWCOL; + break; + } + return (0); +} + +static int +fsl_nfc_send_address(device_t dev, uint8_t addr) +{ + struct fsl_nand_softc *sc; + struct fsl_nfc_fcm *fcm; + uint32_t addr_bits; + + // device_printf(dev, "%s(address=%u)\n", __func__, addr); + + sc = device_get_softc(dev); + fcm = &sc->fcm; + + KASSERT(fcm->addr_type != ADDR_NONE, + ("controller doesn't expect address cycle")); + + addr_bits = addr; + + if (fcm->addr_type == ADDR_ID) { + fcm->reg_fir |= (FIR_OP_UA << OP_SHIFT(fcm->opnr)); + fcm->opnr++; + + fcm->reg_fbcr = 5; + fcm->reg_fbar = 0; + fcm->reg_fpar = 0; + fcm->reg_mdr = addr_bits; + fcm->buf_ofs = 0; + fcm->read_ptr = 0; + return (0); + } + + if (fcm->addr_type == ADDR_ROW) { + addr_bits <<= fcm->addr_bytes * 8; + fcm->row_addr |= addr_bits; + fcm->addr_bytes++; + if (fcm->addr_bytes < sc->row_cycles) + return (0); + } else { + if (fcm->addr_bytes < sc->col_cycles) { + addr_bits <<= fcm->addr_bytes * 8; + fcm->column_addr |= addr_bits; + } else { + addr_bits <<= (fcm->addr_bytes - sc->col_cycles) * 8; + fcm->row_addr |= addr_bits; + } + fcm->addr_bytes++; + if (fcm->addr_bytes < (sc->row_cycles + sc->col_cycles)) + return (0); + } + + return (fsl_nand_build_address(dev, fcm->row_addr, fcm->column_addr)); +} + +static int +fsl_nand_build_address(device_t dev, uint32_t row, uint32_t column) +{ + struct fsl_nand_softc *sc; + struct fsl_nfc_fcm *fcm; + uint32_t byte_count = 0; + uint32_t block_address = 0; + uint32_t page_address = 0; + + sc = device_get_softc(dev); + fcm = &sc->fcm; + + fcm->read_ptr = 0; + fcm->buf_ofs = 0; + + if (fcm->addr_type == ADDR_ROWCOL) { + fcm->reg_fir |= (FIR_OP_CA << OP_SHIFT(fcm->opnr)); + fcm->opnr++; + + column += fcm->pg_ofs; + fcm->pg_ofs = 0; + + page_address |= column; + + if (column != 0) { + byte_count = sc->pgsz - column; + fcm->read_ptr = column; + } + } + + fcm->reg_fir |= (FIR_OP_PA << OP_SHIFT(fcm->opnr)); + fcm->opnr++; + + if (sc->pgsz == FSL_LARGE_PAGE_SIZE) { + block_address = row >> 6; + page_address |= ((row << FPAR_LP_PI_SHIFT) & FPAR_LP_PI); + fcm->buf_ofs = (row & 1) * 4096; + } else { + block_address = row >> 5; + page_address |= ((row << FPAR_SP_PI_SHIFT) & FPAR_SP_PI); + fcm->buf_ofs = (row & 7) * 1024; + } + + fcm->reg_fbcr = byte_count; + fcm->reg_fbar = block_address; + fcm->reg_fpar = page_address; + return (0); +} + +static int +fsl_nfc_start_command(device_t dev) +{ + struct fsl_nand_softc *sc; + struct fsl_nfc_fcm *fcm; + uint32_t fmr, ltesr_v; + int error, timeout; + + // device_printf(dev, "%s()\n", __func__); + + sc = device_get_softc(dev); + fcm = &sc->fcm; + + fmr = fcm->reg_fmr | FMR_OP; + + if (fcm->data_fir) + fcm->reg_fir |= (fcm->data_fir << OP_SHIFT(fcm->opnr)); + + LBC_WRITE(FIR, fcm->reg_fir); + LBC_WRITE(FCR, fcm->reg_fcr); + + LBC_WRITE(FMR, fmr); + + LBC_WRITE(FBCR, fcm->reg_fbcr); + LBC_WRITE(FBAR, fcm->reg_fbar); + LBC_WRITE(FPAR, fcm->reg_fpar); + + if (fcm->addr_type == ADDR_ID) + LBC_WRITE(MDR, fcm->reg_mdr); + + nand_debug(NDBG_DRV, "BEFORE:\nFMR=%#x, FIR=%#x, FCR=%#x", fmr, + fcm->reg_fir, fcm->reg_fcr); + nand_debug(NDBG_DRV, "MDR=%#x, FBAR=%#x, FPAR=%#x, FBCR=%#x", + LBC_READ(MDR), fcm->reg_fbar, fcm->reg_fpar, fcm->reg_fbcr); + + LBC_WRITE(LSOR, sc->dinfo->di_bank); + + timeout = (cold) ? FSL_FCM_WAIT_TIMEOUT : ~0; + error = 0; + ltesr_v = LBC_READ(LTESR); + while (!error && (ltesr_v & LTESR_CC) == 0) { + if (cold) { + DELAY(1000); + timeout--; + if (timeout < 0) + error = EWOULDBLOCK; + } else + error = tsleep(device_get_parent(sc->dev), PRIBIO, + "nfcfsl", hz); + ltesr_v = LBC_READ(LTESR); + } + if (error) + nand_debug(NDBG_DRV, "Command complete wait timeout\n"); + + nand_debug(NDBG_DRV, "AFTER:\nLTESR=%#x, LTEDR=%#x, LTEIR=%#x," + " LTEATR=%#x, LTEAR=%#x, LTECCR=%#x", ltesr_v, + LBC_READ(LTEDR), LBC_READ(LTEIR), LBC_READ(LTEATR), + LBC_READ(LTEAR), LBC_READ(LTECCR)); + + bzero(&fcm->fcm_startzero, + __rangeof(struct fsl_nfc_fcm, fcm_startzero, fcm_endzero)); + + if (fcm->status) + sc->fcm.reg_mdr = LBC_READ(MDR); + + /* Even if timeout occured, we should perform steps below */ + LBC_WRITE(LTESR, ltesr_v); + LBC_WRITE(LTEATR, 0); + + return (error); +} + +static uint8_t +fsl_nfc_read_byte(device_t dev) +{ + struct fsl_nand_softc *sc = device_get_softc(dev); + uint32_t offset; + + // device_printf(dev, "%s()\n", __func__); + + /* + * LBC controller allows us to read status into a MDR instead of FCM + * buffer. If last operation requested before read_byte() was STATUS, + * then return MDR instead of reading a single byte from a buffer. + */ + if (sc->fcm.status) { + sc->fcm.status = 0; + return (sc->fcm.reg_mdr); + } + + KASSERT(sc->fcm.read_ptr < sc->pgsz, + ("Attempt to read beyond buffer %x %x", sc->fcm.read_ptr, + sc->pgsz)); + + offset = sc->fcm.buf_ofs + sc->fcm.read_ptr; + sc->fcm.read_ptr++; + return (bus_read_1(sc->res, offset)); +} + +static void +fsl_nfc_read_buf(device_t dev, void *buf, uint32_t len) +{ + struct fsl_nand_softc *sc = device_get_softc(dev); + uint32_t offset; + int bytesleft = 0; + + // device_printf(dev, "%s(buf=%p, len=%u)\n", __func__, buf, len); + + nand_debug(NDBG_DRV, "REQUEST OF 0x%0x B (BIB=0x%0x, NTR=0x%0x)", + len, sc->pgsz, sc->fcm.read_ptr); + + bytesleft = MIN((unsigned int)len, sc->pgsz - sc->fcm.read_ptr); + + offset = sc->fcm.buf_ofs + sc->fcm.read_ptr; + bus_read_region_1(sc->res, offset, buf, bytesleft); + sc->fcm.read_ptr += bytesleft; +} + +static void +fsl_nfc_write_buf(device_t dev, void *buf, uint32_t len) +{ + struct fsl_nand_softc *sc = device_get_softc(dev); + uint32_t offset; + int bytesleft = 0; + + // device_printf(dev, "%s(buf=%p, len=%u)\n", __func__, buf, len); + + KASSERT(len <= sc->pgsz - sc->fcm.read_ptr, + ("Attempt to write beyond buffer")); + + bytesleft = MIN((unsigned int)len, sc->pgsz - sc->fcm.read_ptr); + + nand_debug(NDBG_DRV, "REQUEST TO WRITE 0x%0x (BIB=0x%0x, NTR=0x%0x)", + bytesleft, sc->pgsz, sc->fcm.read_ptr); + + offset = sc->fcm.buf_ofs + sc->fcm.read_ptr; + bus_write_region_1(sc->res, offset, buf, bytesleft); + sc->fcm.read_ptr += bytesleft; +} + +static int +fsl_nand_chip_preprobe(device_t dev, struct nand_id *id) +{ + + if (fsl_nfc_send_command(dev, NAND_CMD_RESET) != 0) + return (ENXIO); + + if (fsl_nfc_start_command(dev) != 0) + return (ENXIO); + + DELAY(1000); + + if (fsl_nfc_send_command(dev, NAND_CMD_READ_ID)) + return (ENXIO); + + if (fsl_nfc_send_address(dev, 0)) + return (ENXIO); + + if (fsl_nfc_start_command(dev) != 0) + return (ENXIO); + + DELAY(25); + + id->man_id = fsl_nfc_read_byte(dev); + id->dev_id = fsl_nfc_read_byte(dev); + + nand_debug(NDBG_DRV, "manufacturer id: %x chip id: %x", + id->man_id, id->dev_id); + + return (0); +} + +#ifdef NAND_DEBUG_TIMING + +static SYSCTL_NODE(_debug, OID_AUTO, fcm, CTLFLAG_RD, 0, "FCM timing"); + +static u_int csct = 1; /* 22: Chip select to command time (trlx). */ +SYSCTL_UINT(_debug_fcm, OID_AUTO, csct, CTLFLAG_RW, &csct, 1, + "Chip select to command time: determines how far in advance -LCSn is " + "asserted prior to any bus activity during a NAND Flash access handled " + "by the FCM. This helps meet chip-select setup times for slow memories."); + +static u_int cst = 1; /* 23: Command setup time (trlx). */ +SYSCTL_UINT(_debug_fcm, OID_AUTO, cst, CTLFLAG_RW, &cst, 1, + "Command setup time: determines the delay of -LFWE assertion relative to " + "the command, address, or data change when the external memory access " + "is handled by the FCM."); + +static u_int cht = 1; /* 24: Command hold time (trlx). */ +SYSCTL_UINT(_debug_fcm, OID_AUTO, cht, CTLFLAG_RW, &cht, 1, + "Command hold time: determines the -LFWE negation prior to the command, " + "address, or data change when the external memory access is handled by " + "the FCM."); + +static u_int scy = 2; /* 25-27: Cycle length in bus clocks */ +SYSCTL_UINT(_debug_fcm, OID_AUTO, scy, CTLFLAG_RW, &scy, 2, + "Cycle length in bus clocks: see RM"); + +static u_int rst = 1; /* 28: Read setup time (trlx). */ +SYSCTL_UINT(_debug_fcm, OID_AUTO, rst, CTLFLAG_RW, &rst, 1, + "Read setup time: determines the delay of -LFRE assertion relative to " + "sampling of read data when the external memory access is handled by " + "the FCM."); + +static u_int trlx = 1; /* 29: Timing relaxed. */ +SYSCTL_UINT(_debug_fcm, OID_AUTO, trlx, CTLFLAG_RW, &trlx, 1, + "Timing relaxed: modifies the settings of timing parameters for slow " + "memories. See RM"); + +static u_int ehtr = 1; /* 30: Extended hold time on read accesses. */ +SYSCTL_UINT(_debug_fcm, OID_AUTO, ehtr, CTLFLAG_RW, &ehtr, 1, + "Extended hold time on read accesses: indicates with TRLX how many " + "cycles are inserted between a read access from the current bank and " + "the next access."); + +static u_int +fsl_nand_get_timing(void) +{ + u_int timing; + + timing = ((csct & 1) << 9) | ((cst & 1) << 8) | ((cht & 1) << 7) | + ((scy & 7) << 4) | ((rst & 1) << 3) | ((trlx & 1) << 2) | + ((ehtr & 1) << 1); + + printf("nfc_fsl: timing = %u\n", timing); + return (timing); +} + +static int +fsl_sysctl_program(SYSCTL_HANDLER_ARGS) +{ + struct fsl_nand_softc *sc; + int error, i; + device_t dev; + uint32_t or_v; + + error = sysctl_wire_old_buffer(req, sizeof(int)); + if (error == 0) { + i = 0; + error = sysctl_handle_int(oidp, &i, 0, req); + } + if (error != 0 || req->newptr == NULL) + return (error); + + for (i = 0; i < 8; i++) { + dev = fcm_devs[i]; + if (dev == NULL) + continue; + sc = device_get_softc(dev); + + /* Reprogram OR(x) */ + or_v = lbc_read_reg(dev, LBC85XX_OR(sc->dinfo->di_bank)); + or_v &= 0xfffffc00; + or_v |= fsl_nand_get_timing(); + lbc_write_reg(dev, LBC85XX_OR(sc->dinfo->di_bank), or_v); + } + return (0); +} + +SYSCTL_PROC(_debug_fcm, OID_AUTO, program, CTLTYPE_INT | CTLFLAG_RW, NULL, 0, + fsl_sysctl_program, "I", "write to program FCM with current values"); + +#endif /* NAND_DEBUG_TIMING */ Added: head/sys/dev/nand/nfc_fsl.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/nand/nfc_fsl.h Tue Jul 3 01:00:29 2012 (r238046) @@ -0,0 +1,97 @@ +/*- + * Copyright (C) 2012 Juniper Networks, Inc. + * Copyright (C) 2009-2012 Semihalf + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _NAND_NFC_FSL_H_ +#define _NAND_NFC_FSL_H_ + +/* LBC BR/OR Registers layout definitions */ +#define BR_V 0x00000001 +#define BR_V_SHIFT 0 +#define BR_MSEL 0x000000E0 +#define BR_MSEL_SHIFT 5 +#define BR_DECC_CHECK_MODE 0x00000600 +#define BR_DECC_CHECK_GEN 0x00000400 + +#define OR_FCM_PAGESIZE 0x00000400 + +/* Options definitions */ +#define NAND_OPT_ECC_MODE_HW 1 +#define NAND_OPT_ECC_MODE_SOFT (1 << 1) + +/* FMR - Flash Mode Register */ +#define FMR_CWTO 0xF000 +#define FMR_CWTO_SHIFT 12 +#define FMR_BOOT 0x0800 +#define FMR_ECCM 0x0100 +#define FMR_AL 0x0030 +#define FMR_AL_SHIFT 4 +#define FMR_OP 0x0003 +#define FMR_OP_SHIFT 0 + +#define FIR_OP_NOP 0x0 /* No operation and end of sequence */ +#define FIR_OP_CA 0x1 /* Issue current column address */ +#define FIR_OP_PA 0x2 /* Issue current block+page address */ +#define FIR_OP_UA 0x3 /* Issue user defined address */ +#define FIR_OP_CM(x) (4 + (x)) /* Issue command from FCR[CMD(x)] */ +#define FIR_OP_WB 0x8 /* Write FBCR bytes from FCM buffer */ +#define FIR_OP_WS 0x9 /* Write 1 or 2 bytes from MDR[AS] */ +#define FIR_OP_RB 0xA /* Read FBCR bytes to FCM buffer */ +#define FIR_OP_RS 0xB /* Read 1 or 2 bytes to MDR[AS] */ +#define FIR_OP_CW0 0xC /* Wait then issue FCR[CMD0] */ +#define FIR_OP_CW1 0xD /* Wait then issue FCR[CMD1] */ +#define FIR_OP_RBW 0xE /* Wait then read FBCR bytes */ +#define FIR_OP_RSW 0xF /* Wait then read 1 or 2 bytes */ + +/* LTESR - Transfer Error Status Register */ +#define LTESR_BM 0x80000000 +#define LTESR_FCT 0x40000000 +#define LTESR_PAR 0x20000000 +#define LTESR_WP 0x04000000 +#define LTESR_ATMW 0x00800000 +#define LTESR_ATMR 0x00400000 +#define LTESR_CS 0x00080000 +#define LTESR_CC 0x00000001 + +#define LTESR_NAND_MASK (LTESR_FCT | LTESR_CC | LTESR_CS) + +/* FPAR - Flash Page Address Register */ +#define FPAR_SP_PI 0x00007C00 +#define FPAR_SP_PI_SHIFT 10 +#define FPAR_SP_MS 0x00000200 +#define FPAR_SP_CI 0x000001FF +#define FPAR_SP_CI_SHIFT 0 +#define FPAR_LP_PI 0x0003F000 +#define FPAR_LP_PI_SHIFT 12 +#define FPAR_LP_MS 0x00000800 +#define FPAR_LP_CI 0x000007FF +#define FPAR_LP_CI_SHIFT 0 + +#define FSL_FCM_WAIT_TIMEOUT 10 + +#endif /* _NAND_NFC_FSL_H_ */ From owner-svn-src-all@FreeBSD.ORG Tue Jul 3 01:45:28 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CA7A61065674; Tue, 3 Jul 2012 01:45:28 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B5F8A8FC1A; Tue, 3 Jul 2012 01:45:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q631jSfl011961; Tue, 3 Jul 2012 01:45:28 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q631jS4d011959; Tue, 3 Jul 2012 01:45:28 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201207030145.q631jS4d011959@svn.freebsd.org> From: Andrew Thompson Date: Tue, 3 Jul 2012 01:45:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238047 - stable/9/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jul 2012 01:45:28 -0000 Author: thompsa Date: Tue Jul 3 01:45:28 2012 New Revision: 238047 URL: http://svn.freebsd.org/changeset/base/238047 Log: MFC r237852 Add the same check as vlan(4) where we ignore the ifnet departure event if the interface is just being renamed. PR: kern/169557 Modified: stable/9/sys/net/if_lagg.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/e1000/ (props changed) stable/9/sys/dev/isp/ (props changed) stable/9/sys/dev/ixgbe/ (props changed) stable/9/sys/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/modules/ (props changed) Modified: stable/9/sys/net/if_lagg.c ============================================================================== --- stable/9/sys/net/if_lagg.c Tue Jul 3 01:00:29 2012 (r238046) +++ stable/9/sys/net/if_lagg.c Tue Jul 3 01:45:28 2012 (r238047) @@ -797,6 +797,9 @@ lagg_port_ifdetach(void *arg __unused, s if ((lp = ifp->if_lagg) == NULL) return; + /* If the ifnet is just being renamed, don't do anything. */ + if (ifp->if_flags & IFF_RENAMING) + return; sc = lp->lp_softc; From owner-svn-src-all@FreeBSD.ORG Tue Jul 3 01:45:38 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 974951065790; Tue, 3 Jul 2012 01:45:38 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 82CFE8FC18; Tue, 3 Jul 2012 01:45:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q631jcaZ012002; Tue, 3 Jul 2012 01:45:38 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q631jcMZ012000; Tue, 3 Jul 2012 01:45:38 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201207030145.q631jcMZ012000@svn.freebsd.org> From: Andrew Thompson Date: Tue, 3 Jul 2012 01:45: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: r238048 - stable/8/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jul 2012 01:45:38 -0000 Author: thompsa Date: Tue Jul 3 01:45:38 2012 New Revision: 238048 URL: http://svn.freebsd.org/changeset/base/238048 Log: MFC r237852 Add the same check as vlan(4) where we ignore the ifnet departure event if the interface is just being renamed. PR: kern/169557 Modified: stable/8/sys/net/if_lagg.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/boot/ (props changed) stable/8/sys/cddl/ (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/e1000/ (props changed) Modified: stable/8/sys/net/if_lagg.c ============================================================================== --- stable/8/sys/net/if_lagg.c Tue Jul 3 01:45:28 2012 (r238047) +++ stable/8/sys/net/if_lagg.c Tue Jul 3 01:45:38 2012 (r238048) @@ -784,6 +784,9 @@ lagg_port_ifdetach(void *arg __unused, s if ((lp = ifp->if_lagg) == NULL) return; + /* If the ifnet is just being renamed, don't do anything. */ + if (ifp->if_flags & IFF_RENAMING) + return; sc = lp->lp_softc; From owner-svn-src-all@FreeBSD.ORG Tue Jul 3 05:01:01 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3DB94106566B; Tue, 3 Jul 2012 05:01:01 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0C50B8FC0A; Tue, 3 Jul 2012 05:01:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q63510PM022162; Tue, 3 Jul 2012 05:01:00 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q63510IN022159; Tue, 3 Jul 2012 05:01:00 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201207030501.q63510IN022159@svn.freebsd.org> From: "David E. O'Brien" Date: Tue, 3 Jul 2012 05:01:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238050 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jul 2012 05:01:01 -0000 Author: obrien Date: Tue Jul 3 05:01:00 2012 New Revision: 238050 URL: http://svn.freebsd.org/changeset/base/238050 Log: Revert r222186 per instructions for FreeBSD 10. (a 10-CURRENT share/mk is already required to build a 10-CURRENT kernel on 9-STABLE) Modified: head/sys/conf/kern.post.mk head/sys/conf/kmod.mk Modified: head/sys/conf/kern.post.mk ============================================================================== --- head/sys/conf/kern.post.mk Tue Jul 3 02:55:27 2012 (r238049) +++ head/sys/conf/kern.post.mk Tue Jul 3 05:01:00 2012 (r238050) @@ -270,8 +270,7 @@ kernel-install: .endif mkdir -p ${DESTDIR}${KODIR} ${INSTALL} -p -m 555 -o ${KMODOWN} -g ${KMODGRP} ${KERNEL_KO} ${DESTDIR}${KODIR} -.if defined(DEBUG) && !defined(INSTALL_NODEBUG) && \ - (defined(MK_KERNEL_SYMBOLS) && ${MK_KERNEL_SYMBOLS} != "no") +.if defined(DEBUG) && !defined(INSTALL_NODEBUG) && ${MK_KERNEL_SYMBOLS} != "no" ${INSTALL} -p -m 555 -o ${KMODOWN} -g ${KMODGRP} ${KERNEL_KO}.symbols ${DESTDIR}${KODIR} .endif .if defined(KERNEL_EXTRA_INSTALL) @@ -283,8 +282,7 @@ kernel-install: kernel-reinstall: @-chflags -R noschg ${DESTDIR}${KODIR} ${INSTALL} -p -m 555 -o ${KMODOWN} -g ${KMODGRP} ${KERNEL_KO} ${DESTDIR}${KODIR} -.if defined(DEBUG) && !defined(INSTALL_NODEBUG) && \ - (defined(MK_KERNEL_SYMBOLS) && ${MK_KERNEL_SYMBOLS} != "no") +.if defined(DEBUG) && !defined(INSTALL_NODEBUG) && ${MK_KERNEL_SYMBOLS} != "no" ${INSTALL} -p -m 555 -o ${KMODOWN} -g ${KMODGRP} ${KERNEL_KO}.symbols ${DESTDIR}${KODIR} .endif Modified: head/sys/conf/kmod.mk ============================================================================== --- head/sys/conf/kmod.mk Tue Jul 3 02:55:27 2012 (r238049) +++ head/sys/conf/kmod.mk Tue Jul 3 05:01:00 2012 (r238050) @@ -283,8 +283,7 @@ realinstall: _kmodinstall _kmodinstall: ${INSTALL} -o ${KMODOWN} -g ${KMODGRP} -m ${KMODMODE} \ ${_INSTALLFLAGS} ${PROG} ${DESTDIR}${KMODDIR} -.if defined(DEBUG_FLAGS) && !defined(INSTALL_NODEBUG) && \ - (defined(MK_KERNEL_SYMBOLS) && ${MK_KERNEL_SYMBOLS} != "no") +.if defined(DEBUG_FLAGS) && !defined(INSTALL_NODEBUG) && ${MK_KERNEL_SYMBOLS} != "no" ${INSTALL} -o ${KMODOWN} -g ${KMODGRP} -m ${KMODMODE} \ ${_INSTALLFLAGS} ${PROG}.symbols ${DESTDIR}${KMODDIR} .endif From owner-svn-src-all@FreeBSD.ORG Tue Jul 3 05:11:35 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DDE4C106566C; Tue, 3 Jul 2012 05:11:35 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (trang.nuxi.org [74.95.12.85]) by mx1.freebsd.org (Postfix) with ESMTP id B119E8FC14; Tue, 3 Jul 2012 05:11:35 +0000 (UTC) Received: from dragon.nuxi.org (obrien@localhost [127.0.0.1]) by dragon.nuxi.org (8.14.5/8.14.5) with ESMTP id q635BZBX069098; Mon, 2 Jul 2012 22:11:35 -0700 (PDT) (envelope-from obrien@dragon.nuxi.org) Received: (from obrien@localhost) by dragon.nuxi.org (8.14.5/8.14.5/Submit) id q635BZkI069097; Mon, 2 Jul 2012 22:11:35 -0700 (PDT) (envelope-from obrien) Date: Mon, 2 Jul 2012 22:11:35 -0700 From: "David O'Brien" To: Pedro Giffuni Message-ID: <20120703051135.GA69017@dragon.NUXI.org> References: <20120702210438.GA85618@dragon.NUXI.org> <1341270626.1322.YahooMailClassic@web113509.mail.gq1.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=unknown-8bit Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1341270626.1322.YahooMailClassic@web113509.mail.gq1.yahoo.com> X-Operating-System: FreeBSD 10.0-CURRENT X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r237624 - in head: cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize cddl/contrib/opensolaris/lib/libdtrace/common sys/cddl/contrib/opensolaris/uts/common/dtrace sys/cddl/c... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: obrien@freebsd.org List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jul 2012 05:11:36 -0000 On Mon, Jul 02, 2012 at 04:10:26PM -0700, Pedro Giffuni wrote: > --- Lun 2/7/12, David O'Brien ha scritto: > I tend to agree with the Illumos community on that however > we may still be seeing some movement in that area. Oracle > has a linux distribution and commercial interests are > always strong in unpredicable ways. > > Oracle has been porting Dtrace to Linux. Apparently they > will be adopting dual GPLv2/CDDL for some few kernel > stuff and CDDL only for the main code, but just the same > there may be some stuff we want to take from them. That may be the case -- but what is the likelihood there would be code from that effort we would want? Vs. the real brain-share of DTrace which commits into Illumos? Isn't it much more likely we would want their innovations? > > It may be conceptually cleaner to import into > > '^/vendor{,-sys}/illumos', but I believe that will cause > > issues with importing updates to existing files > > (e.g., r237458) as the 'svn merge' > > from '^/vendor{,-sys}' will get messy.  I believe we > > may have to resort > > to a three-way merge using "--ignore-ancestry" -- something > > I don't believe we want to do. > > I think Martin Matuska did exactly the right thing: > he created the illumos vendor branch starting from > the opensolaris branch. I don't disagree in principle, but I feel it should have been an 'svn rename' not 'svn copy'. You didn't suggest or comment on the SCM operations having two "vendors" puts us in. I don't think you can make precise statements about an illumos vendor branch without considering those. > Concerning ZFS: the main developer of the encryption stuff > did stay at Oracle. At this time that code will not be seen > in the open (apparently there was a Solaris 11 source leak > but that's not something we can touch), but we just never > know. We can always figure out something *if* it comes to pass that there is a code drop from Oracle that we want to consume. I believe the question which code base are we *most likely* to pull technology from. The proof to date in an 'svn log' of our repo is Illumos. > > Doesn't this commit of yours which brought in new DTrace > > work by Joyent > > (likely Brendan Gregg or Bryan Cantrill) show this point? > > > > Perhaps we should do an 'svn move' of > > '^/vendor{,-sys}/opensolaris' > > to '^/vendor{,-sys}/illumos'? > > Illumos is a fork so svn copy works just fine for this, plus > copying is a very cheap operation in SVN. That misses my point. Yes, copying is a very cheap operation in SVN. (so is 'svn rename') The issue is should we have _two_ vendors that we are attempting to merge into the same files within HEAD? -- -- David (obrien@FreeBSD.org) From owner-svn-src-all@FreeBSD.ORG Tue Jul 3 06:41:01 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 15711106581B; Tue, 3 Jul 2012 06:41:01 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F248E8FC0A; Tue, 3 Jul 2012 06:41:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q636f0HJ026211; Tue, 3 Jul 2012 06:41:00 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q636f0hd026208; Tue, 3 Jul 2012 06:41:00 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201207030641.q636f0hd026208@svn.freebsd.org> From: "David E. O'Brien" Date: Tue, 3 Jul 2012 06:41:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238051 - head X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jul 2012 06:41:01 -0000 Author: obrien Date: Tue Jul 3 06:41:00 2012 New Revision: 238051 URL: http://svn.freebsd.org/changeset/base/238051 Log: Add "hier" as an alternate spelling of "hierarchy" to match hier(9). Modified: head/Makefile head/Makefile.inc1 Modified: head/Makefile ============================================================================== --- head/Makefile Tue Jul 3 05:01:00 2012 (r238050) +++ head/Makefile Tue Jul 3 06:41:00 2012 (r238051) @@ -92,7 +92,7 @@ TGTS= all all-man buildenv buildenvvars delete-old delete-old-dirs delete-old-files delete-old-libs \ depend distribute distributekernel distributekernel.debug \ distributeworld distrib-dirs distribution doxygen \ - everything hierarchy install installcheck installkernel \ + everything hier hierarchy install installcheck installkernel \ installkernel.debug packagekernel packageworld \ reinstallkernel reinstallkernel.debug \ installworld kernel-toolchain libraries lint maninstall \ Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Tue Jul 3 05:01:00 2012 (r238050) +++ head/Makefile.inc1 Tue Jul 3 06:41:00 2012 (r238051) @@ -1197,7 +1197,7 @@ cross-tools: # # hierarchy - ensure that all the needed directories are present # -hierarchy: +hierarchy hier: cd ${.CURDIR}/etc; ${MAKE} distrib-dirs # From owner-svn-src-all@FreeBSD.ORG Tue Jul 3 06:54:38 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BC9481065672; Tue, 3 Jul 2012 06:54:38 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 556B18FC0A; Tue, 3 Jul 2012 06:54:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q636scC4026861; Tue, 3 Jul 2012 06:54:38 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q636scaX026844; Tue, 3 Jul 2012 06:54:38 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201207030654.q636scaX026844@svn.freebsd.org> From: "David E. O'Brien" Date: Tue, 3 Jul 2012 06:54:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238052 - in vendor/gcc/dist/libstdc++: . config/os/aix include/bits include/ext include/tr1 libsupc++ scripts src X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jul 2012 06:54:38 -0000 Author: obrien Date: Tue Jul 3 06:54:37 2012 New Revision: 238052 URL: http://svn.freebsd.org/changeset/base/238052 Log: Vendor import the latest GPLv2 libstdc++ sources. It happens to be that while libstdc++ is a subset of gcc which was changed to GPLv3, libstdc++ was kept under LGPLv2 until the end of the 4.2 branch (gcc 4.2.4) (@ GRN 135556). Obtained from: svn://gcc.gnu.org/svn/gcc/branches/gcc-4_2-branch/libstdc++-v3 Requested by: pfg Reviewed by: pfg Added: vendor/gcc/dist/libstdc++/scripts/check_compile (contents, props changed) Modified: vendor/gcc/dist/libstdc++/ChangeLog vendor/gcc/dist/libstdc++/config/os/aix/os_defines.h vendor/gcc/dist/libstdc++/include/bits/allocator.h vendor/gcc/dist/libstdc++/include/bits/basic_string.h vendor/gcc/dist/libstdc++/include/bits/fstream.tcc vendor/gcc/dist/libstdc++/include/bits/locale_facets.tcc vendor/gcc/dist/libstdc++/include/ext/atomicity.h vendor/gcc/dist/libstdc++/include/ext/codecvt_specializations.h vendor/gcc/dist/libstdc++/include/ext/concurrence.h vendor/gcc/dist/libstdc++/include/ext/vstring.h vendor/gcc/dist/libstdc++/include/tr1/boost_shared_ptr.h vendor/gcc/dist/libstdc++/include/tr1/random vendor/gcc/dist/libstdc++/libsupc++/eh_personality.cc vendor/gcc/dist/libstdc++/libsupc++/typeinfo vendor/gcc/dist/libstdc++/src/valarray-inst.cc Modified: vendor/gcc/dist/libstdc++/ChangeLog ============================================================================== --- vendor/gcc/dist/libstdc++/ChangeLog Tue Jul 3 06:41:00 2012 (r238051) +++ vendor/gcc/dist/libstdc++/ChangeLog Tue Jul 3 06:54:37 2012 (r238052) @@ -1,3 +1,133 @@ +2008-05-19 Release Manager + + * GCC 4.2.4 released. + +2008-03-13 David Edelsohn + + Backport from mainline: + 2008-01-26 David Edelsohn + + PR target/34794 + * config/os/aix/os_defines.h: Define __COMPATMATH__. + +2008-02-14 Kaveh R. Ghazi + + * testsuite/27_io/fpos/14320-1.cc: Check for "long long" and + remove XFAIL. + +2008-02-01 Release Manager + + * GCC 4.2.3 released. + +2008-01-06 Ted Phelps + + PR c++/34152 + * libsupc++/eh_personality.cc (PERSONALITY_FUNCTION): Check + _GLIBCXX_HAVE_GETIPINFO instead of HAVE_GETIPINFO. + +2008-01-05 Paolo Carlini + + PR libstdc++/34680 + + Revert: + 2007-12-17 Jonathan Wakely + * include/bits/locale_facets.tcc (has_facet, use_facet): Simplify + RTTI checks. + + 2007-12-14 Benjamin Kosnik + + PR libstdc++/30127 + PR libstdc++/34449 + * include/bits/locale_facets.tcc (use_facet): Check facet hierarchy. + (has_facet): Same. + * testsuite/22_locale/global_templates/user_facet_hierarchies.cc: New. + * testsuite/22_locale/global_templates/ + standard_facet_hierarchies.cc: New. + +2007-12-17 Jonathan Wakely + + * include/bits/locale_facets.tcc (has_facet, use_facet): Simplify + RTTI checks. + +2007-12-17 Benjamin Kosnik + + * testsuite/22_locale/global_templates/ + standard_facet_hierarchies.cc: Fix for generic locale model. + +2007-12-14 Benjamin Kosnik + + PR libstdc++/30127 + PR libstdc++/34449 + * include/bits/locale_facets.tcc (use_facet): Check facet hierarchy. + (has_facet): Same. + * testsuite/22_locale/global_templates/user_facet_hierarchies.cc: New. + * testsuite/22_locale/global_templates/ + standard_facet_hierarchies.cc: New. + +2007-11-26 Paolo Carlini + + * include/bits/locale_facets.tcc (num_put<>::_M_insert_int): When + ios_base::showpos and the type is signed and the value is zero, + prepend +. + * testsuite/22_locale/num_put/put/char/12.cc: New. + * testsuite/22_locale/num_put/put/wchar_t/12.cc: Likewise. + +2007-10-20 Paolo Carlini + + * include/tr1/random + (uniform_int<>::_M_call(_UniformRandomNumberGenerator&, result_type, + result_type, true_type)): Fix small thinko. + +2007-10-19 Paolo Carlini + + PR libstdc++/33815 + * include/tr1/random + (uniform_int<>::_M_call(_UniformRandomNumberGenerator&, result_type, + result_type, true_type)): Avoid the modulo (which uses the low-order + bits). + +2007-10-18 Paolo Carlini + + PR libstdc++/33807 + * include/bits/allocator.h (operator==(const allocator<_Tp>&, + const allocator<_Tp>&), operator!=(const allocator<_Tp>&, + const allocator<_Tp>&)): Add. + * testsuite/20_util/memory/allocator/33807.cc: New. + +2007-10-14 Jonathan Wakely + + * docs/html/Makefile: Follow up to libstdc++/14991, remove target. + +2007-10-14 Jonathan Wakely + + * src/valarray-inst.cc, include/ext/atomicity.h, + include/ext/concurrence.h, include/bits/basic_string.h, + include/bits/fstream.tcc, include/ext/vstring.h: Fix comment typos. + +2007-10-14 Jonathan Wakely + + * include/tr1_impl/boost_shared_ptr.h: (__weak_ptr::lock()): Add + missing template argument. + * testsuite/tr1/2_general_utilities/memory/shared_ptr/ + explicit_instantiation/2.cc: New. + * testsuite/tr1/2_general_utilities/memory/weak_ptr/ + explicit_instantiation/2.cc: New. + +2007-10-11 Paolo Carlini + + PR libstdc++/33734 + * include/ext/codecvt_specializations.h (encoding_state::good, + init, destroy): Use cast notation instead of reinterpret_cast. + +2007-10-07 Release Manager + + * GCC 4.2.2 released. + +2007-10-06 Benjamin Kosnik + + PR libstdc++/33678 + * libsupc++/typeinfo (typeinfo): Revert ordering of virtual components. + 2007-08-28 Paolo Carlini PR libstdc++/33128 Modified: vendor/gcc/dist/libstdc++/config/os/aix/os_defines.h ============================================================================== --- vendor/gcc/dist/libstdc++/config/os/aix/os_defines.h Tue Jul 3 06:41:00 2012 (r238051) +++ vendor/gcc/dist/libstdc++/config/os/aix/os_defines.h Tue Jul 3 06:54:37 2012 (r238052) @@ -1,6 +1,6 @@ // Specific definitions for AIX -*- C++ -*- -// Copyright (C) 2000, 2002, 2005 Free Software Foundation, Inc. +// Copyright (C) 2000, 2002, 2005, 2008 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -48,4 +48,9 @@ #define _ALL_SOURCE #endif +// C99 math +#ifndef __COMPATMATH__ +#define __COMPATMATH__ +#endif + #endif Modified: vendor/gcc/dist/libstdc++/include/bits/allocator.h ============================================================================== --- vendor/gcc/dist/libstdc++/include/bits/allocator.h Tue Jul 3 06:41:00 2012 (r238051) +++ vendor/gcc/dist/libstdc++/include/bits/allocator.h Tue Jul 3 06:54:37 2012 (r238052) @@ -115,11 +115,21 @@ _GLIBCXX_BEGIN_NAMESPACE(std) operator==(const allocator<_T1>&, const allocator<_T2>&) { return true; } + template + inline bool + operator==(const allocator<_Tp>&, const allocator<_Tp>&) + { return true; } + template inline bool operator!=(const allocator<_T1>&, const allocator<_T2>&) { return false; } + template + inline bool + operator!=(const allocator<_Tp>&, const allocator<_Tp>&) + { return false; } + // Inhibit implicit instantiations for required instantiations, // which are defined via explicit instantiations elsewhere. // NB: This syntax is a GNU extension. Modified: vendor/gcc/dist/libstdc++/include/bits/basic_string.h ============================================================================== --- vendor/gcc/dist/libstdc++/include/bits/basic_string.h Tue Jul 3 06:41:00 2012 (r238051) +++ vendor/gcc/dist/libstdc++/include/bits/basic_string.h Tue Jul 3 06:54:37 2012 (r238052) @@ -1672,7 +1672,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) /** * @brief Find position of a character of C substring. * @param s String containing characters to locate. - * @param pos Index of character to search from (default 0). + * @param pos Index of character to search from. * @param n Number of characters from s to search for. * @return Index of first occurrence. * @@ -1733,7 +1733,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) /** * @brief Find last position of a character of C substring. * @param s C string containing characters to locate. - * @param pos Index of character to search back from (default end). + * @param pos Index of character to search back from. * @param n Number of characters from s to search for. * @return Index of last occurrence. * @@ -1764,7 +1764,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) /** * @brief Find last position of a character. * @param c Character to locate. - * @param pos Index of character to search back from (default 0). + * @param pos Index of character to search back from (default end). * @return Index of last occurrence. * * Starting from @a pos, searches backward for @a c within this string. @@ -1794,7 +1794,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) /** * @brief Find position of a character not in C substring. * @param s C string containing characters to avoid. - * @param pos Index of character to search from (default 0). + * @param pos Index of character to search from. * @param n Number of characters from s to consider. * @return Index of first occurrence. * @@ -1839,8 +1839,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) /** * @brief Find last position of a character not in string. * @param str String containing characters to avoid. - * @param pos Index of character to search from (default 0). - * @return Index of first occurrence. + * @param pos Index of character to search back from (default end). + * @return Index of last occurrence. * * Starting from @a pos, searches backward for a character not * contained in @a str within this string. If found, returns the index @@ -1853,9 +1853,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std) /** * @brief Find last position of a character not in C substring. * @param s C string containing characters to avoid. - * @param pos Index of character to search from (default 0). + * @param pos Index of character to search back from. * @param n Number of characters from s to consider. - * @return Index of first occurrence. + * @return Index of last occurrence. * * Starting from @a pos, searches backward for a character not * contained in the first @a n characters of @a s within this string. @@ -1866,10 +1866,10 @@ _GLIBCXX_BEGIN_NAMESPACE(std) find_last_not_of(const _CharT* __s, size_type __pos, size_type __n) const; /** - * @brief Find position of a character not in C string. + * @brief Find last position of a character not in C string. * @param s C string containing characters to avoid. - * @param pos Index of character to search from (default 0). - * @return Index of first occurrence. + * @param pos Index of character to search back from (default end). + * @return Index of last occurrence. * * Starting from @a pos, searches backward for a character not * contained in @a s within this string. If found, returns the index @@ -1885,8 +1885,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) /** * @brief Find last position of a different character. * @param c Character to avoid. - * @param pos Index of character to search from (default 0). - * @return Index of first occurrence. + * @param pos Index of character to search back from (default end). + * @return Index of last occurrence. * * Starting from @a pos, searches backward for a character other than * @a c within this string. If found, returns the index where it was Modified: vendor/gcc/dist/libstdc++/include/bits/fstream.tcc ============================================================================== --- vendor/gcc/dist/libstdc++/include/bits/fstream.tcc Tue Jul 3 06:41:00 2012 (r238051) +++ vendor/gcc/dist/libstdc++/include/bits/fstream.tcc Tue Jul 3 06:54:37 2012 (r238052) @@ -194,7 +194,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) const bool __testin = _M_mode & ios_base::in; if (__testin && !_M_writing) { - // Check for pback madness, and if so swich back to the + // Check for pback madness, and if so switch back to the // normal buffers and jet outta here before expensive // fileops happen... _M_destroy_pback(); Modified: vendor/gcc/dist/libstdc++/include/bits/locale_facets.tcc ============================================================================== --- vendor/gcc/dist/libstdc++/include/bits/locale_facets.tcc Tue Jul 3 06:41:00 2012 (r238051) +++ vendor/gcc/dist/libstdc++/include/bits/locale_facets.tcc Tue Jul 3 06:54:37 2012 (r238052) @@ -1,6 +1,7 @@ // Locale support -*- C++ -*- -// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 +// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, +// 2006, 2007, 2008 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -117,6 +118,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) return static_cast(*__facets[__i]); } + // Routine to access a cache for the facet. If the cache didn't // exist before, it gets constructed on the fly. template @@ -1015,13 +1017,13 @@ _GLIBCXX_BEGIN_LDBL_NAMESPACE if (__builtin_expect(__dec, true)) { // Decimal. - if (__v > 0) + if (__v >= 0) { if (__flags & ios_base::showpos && numeric_limits<_ValueT>::is_signed) *--__cs = __lit[__num_base::_S_oplus], ++__len; } - else if (__v) + else *--__cs = __lit[__num_base::_S_ominus], ++__len; } else if (__flags & ios_base::showbase && __v) Modified: vendor/gcc/dist/libstdc++/include/ext/atomicity.h ============================================================================== --- vendor/gcc/dist/libstdc++/include/ext/atomicity.h Tue Jul 3 06:41:00 2012 (r238051) +++ vendor/gcc/dist/libstdc++/include/ext/atomicity.h Tue Jul 3 06:54:37 2012 (r238052) @@ -42,7 +42,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) // Functions for portable atomic access. - // To abstract locking primatives across all thread policies, use: + // To abstract locking primitives across all thread policies, use: // __exchange_and_add_dispatch // __atomic_add_dispatch #ifdef _GLIBCXX_ATOMIC_BUILTINS Modified: vendor/gcc/dist/libstdc++/include/ext/codecvt_specializations.h ============================================================================== --- vendor/gcc/dist/libstdc++/include/ext/codecvt_specializations.h Tue Jul 3 06:41:00 2012 (r238051) +++ vendor/gcc/dist/libstdc++/include/ext/codecvt_specializations.h Tue Jul 3 06:54:37 2012 (r238052) @@ -128,7 +128,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) bool good() const throw() { - const descriptor_type __err = reinterpret_cast(-1); + const descriptor_type __err = (iconv_t)(-1); bool __test = _M_in_desc && _M_in_desc != __err; __test &= _M_out_desc && _M_out_desc != __err; return __test; @@ -166,7 +166,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) void init() { - const descriptor_type __err = reinterpret_cast(-1); + const descriptor_type __err = (iconv_t)(-1); const bool __have_encodings = _M_int_enc.size() && _M_ext_enc.size(); if (!_M_in_desc && __have_encodings) { @@ -199,7 +199,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) void destroy() throw() { - const descriptor_type __err = reinterpret_cast(-1); + const descriptor_type __err = (iconv_t)(-1); if (_M_in_desc && _M_in_desc != __err) { iconv_close(_M_in_desc); Modified: vendor/gcc/dist/libstdc++/include/ext/concurrence.h ============================================================================== --- vendor/gcc/dist/libstdc++/include/ext/concurrence.h Tue Jul 3 06:41:00 2012 (r238051) +++ vendor/gcc/dist/libstdc++/include/ext/concurrence.h Tue Jul 3 06:54:37 2012 (r238052) @@ -46,7 +46,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) // Available locking policies: // _S_single single-threaded code that doesn't need to be locked. // _S_mutex multi-threaded code that requires additional support - // from gthr.h or abstraction layers in concurrance.h. + // from gthr.h or abstraction layers in concurrence.h. // _S_atomic multi-threaded code using atomic operations. enum _Lock_policy { _S_single, _S_mutex, _S_atomic }; Modified: vendor/gcc/dist/libstdc++/include/ext/vstring.h ============================================================================== --- vendor/gcc/dist/libstdc++/include/ext/vstring.h Tue Jul 3 06:41:00 2012 (r238051) +++ vendor/gcc/dist/libstdc++/include/ext/vstring.h Tue Jul 3 06:54:37 2012 (r238052) @@ -1407,7 +1407,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) /** * @brief Find position of a character of C substring. * @param s String containing characters to locate. - * @param pos Index of character to search from (default 0). + * @param pos Index of character to search from. * @param n Number of characters from s to search for. * @return Index of first occurrence. * @@ -1468,7 +1468,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) /** * @brief Find last position of a character of C substring. * @param s C string containing characters to locate. - * @param pos Index of character to search back from (default end). + * @param pos Index of character to search back from. * @param n Number of characters from s to search for. * @return Index of last occurrence. * @@ -1499,7 +1499,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) /** * @brief Find last position of a character. * @param c Character to locate. - * @param pos Index of character to search back from (default 0). + * @param pos Index of character to search back from (default end). * @return Index of last occurrence. * * Starting from @a pos, searches backward for @a c within this string. @@ -1529,7 +1529,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) /** * @brief Find position of a character not in C substring. * @param s C string containing characters to avoid. - * @param pos Index of character to search from (default 0). + * @param pos Index of character to search from. * @param n Number of characters from s to consider. * @return Index of first occurrence. * @@ -1574,8 +1574,8 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) /** * @brief Find last position of a character not in string. * @param str String containing characters to avoid. - * @param pos Index of character to search from (default 0). - * @return Index of first occurrence. + * @param pos Index of character to search back from (default end). + * @return Index of last occurrence. * * Starting from @a pos, searches backward for a character not * contained in @a str within this string. If found, returns the index @@ -1589,9 +1589,9 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) /** * @brief Find last position of a character not in C substring. * @param s C string containing characters to avoid. - * @param pos Index of character to search from (default 0). + * @param pos Index of character to search back from. * @param n Number of characters from s to consider. - * @return Index of first occurrence. + * @return Index of last occurrence. * * Starting from @a pos, searches backward for a character not * contained in the first @a n characters of @a s within this string. @@ -1602,10 +1602,10 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) find_last_not_of(const _CharT* __s, size_type __pos, size_type __n) const; /** - * @brief Find position of a character not in C string. + * @brief Find last position of a character not in C string. * @param s C string containing characters to avoid. - * @param pos Index of character to search from (default 0). - * @return Index of first occurrence. + * @param pos Index of character to search back from (default end). + * @return Index of last occurrence. * * Starting from @a pos, searches backward for a character not * contained in @a s within this string. If found, returns the index @@ -1621,8 +1621,8 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) /** * @brief Find last position of a different character. * @param c Character to avoid. - * @param pos Index of character to search from (default 0). - * @return Index of first occurrence. + * @param pos Index of character to search back from (default end). + * @return Index of last occurrence. * * Starting from @a pos, searches backward for a character other than * @a c within this string. If found, returns the index where it was Modified: vendor/gcc/dist/libstdc++/include/tr1/boost_shared_ptr.h ============================================================================== --- vendor/gcc/dist/libstdc++/include/tr1/boost_shared_ptr.h Tue Jul 3 06:41:00 2012 (r238051) +++ vendor/gcc/dist/libstdc++/include/tr1/boost_shared_ptr.h Tue Jul 3 06:54:37 2012 (r238052) @@ -857,7 +857,7 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1) // Q: How can we get here? // A: Another thread may have invalidated r after the // use_count test above. - return __shared_ptr(); + return __shared_ptr(); } #else Modified: vendor/gcc/dist/libstdc++/include/tr1/random ============================================================================== --- vendor/gcc/dist/libstdc++/include/tr1/random Tue Jul 3 06:41:00 2012 (r238051) +++ vendor/gcc/dist/libstdc++/include/tr1/random Tue Jul 3 06:54:37 2012 (r238052) @@ -1618,10 +1618,15 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1) result_type _M_call(_UniformRandomNumberGenerator& __urng, result_type __min, result_type __max, true_type) - { + { + // XXX Must be fixed to also work when __urng.max() - __urng.min() + // is smaller than __max - __min. typedef typename __gnu_cxx::__add_unsigned::__type __utype; - return result_type(__utype(__urng()) % (__max - __min + 1)) + __min; + return result_type((__max - __min + 1.0L) + * (__utype(__urng()) - __utype(__urng.min())) + / (__utype(__urng.max()) + - __utype(__urng.min()) + 1.0L)) + __min; } template Modified: vendor/gcc/dist/libstdc++/libsupc++/eh_personality.cc ============================================================================== --- vendor/gcc/dist/libstdc++/libsupc++/eh_personality.cc Tue Jul 3 06:41:00 2012 (r238051) +++ vendor/gcc/dist/libstdc++/libsupc++/eh_personality.cc Tue Jul 3 06:54:37 2012 (r238052) @@ -1,5 +1,5 @@ // -*- C++ -*- The GNU C++ exception personality routine. -// Copyright (C) 2001, 2002, 2003, 2006 Free Software Foundation, Inc. +// Copyright (C) 2001, 2002, 2003, 2006, 2008 Free Software Foundation, Inc. // // This file is part of GCC. // @@ -434,7 +434,7 @@ PERSONALITY_FUNCTION (int version, // Parse the LSDA header. p = parse_lsda_header (context, language_specific_data, &info); info.ttype_base = base_of_encoded_value (info.ttype_encoding, context); -#ifdef HAVE_GETIPINFO +#ifdef _GLIBCXX_HAVE_GETIPINFO ip = _Unwind_GetIPInfo (context, &ip_before_insn); #else ip = _Unwind_GetIP (context); Modified: vendor/gcc/dist/libstdc++/libsupc++/typeinfo ============================================================================== --- vendor/gcc/dist/libstdc++/libsupc++/typeinfo Tue Jul 3 06:41:00 2012 (r238051) +++ vendor/gcc/dist/libstdc++/libsupc++/typeinfo Tue Jul 3 06:54:37 2012 (r238052) @@ -99,7 +99,13 @@ namespace std #endif bool operator!=(const type_info& __arg) const { return !operator==(__arg); } - + + // Return true if this is a pointer type of some kind + virtual bool __is_pointer_p() const; + + // Return true if this is a function type + virtual bool __is_function_p() const; + // Try and catch a thrown type. Store an adjusted pointer to the // caught type in THR_OBJ. If THR_TYPE is not a pointer type, then // THR_OBJ points to the thrown object. If THR_TYPE is a pointer @@ -113,12 +119,6 @@ namespace std virtual bool __do_upcast(const __cxxabiv1::__class_type_info *__target, void **__obj_ptr) const; - // Return true if this is a pointer type of some kind - virtual bool __is_pointer_p() const; - - // Return true if this is a function type - virtual bool __is_function_p() const; - protected: const char *__name; Added: vendor/gcc/dist/libstdc++/scripts/check_compile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/gcc/dist/libstdc++/scripts/check_compile Tue Jul 3 06:54:37 2012 (r238052) @@ -0,0 +1,57 @@ +#!/usr/bin/env bash + +# Script to do performance testing. + +# Invocation +# check_performance SRC_DIR BUILD_DIR + +# 1: variables +# +SRC_DIR=$1 +BUILD_DIR=$2 + +# Now that we've successfully translated the numerical option into +# a symbolic one, we can safely ignore it. +shift + +# This has been true all along. Found out about it the hard way... +case $BASH_VERSION in + 1*) + echo 'You need bash 2.x to run check_performance. Exiting.'; + exit 1 ;; + *) ;; +esac + +flags_script=$BUILD_DIR/scripts/testsuite_flags +INCLUDES=`$flags_script --build-includes` +PCH_FLAGS=`$flags_script --cxxpchflags` +FLAGS=`$flags_script --cxxflags` +TEST_FLAGS="-S" +COMPILER=`$flags_script --build-cxx` +CXX="$COMPILER $INCLUDES $PCH_FLAGS $FLAGS $TEST_FLAGS" + +echo "compile line is:" +echo $CXX +echo "" + +TESTS_FILE="testsuite_files" + +#mkdir binaries +UNIQUE_ID=0 + +for NAME in `cat $TESTS_FILE` +do + if $RUN; then + echo $NAME + OUTPUT_NAME=$UNIQUE_ID + $CXX $SRC_DIR/testsuite/$NAME -o $OUTPUT_NAME + if [ -f $OUTPUT_NAME ]; then +# mv $OUTPUT_NAME binaries + rm $OUTPUT_NAME + fi + echo "" + let UNIQUE_ID+=1 + fi +done + +exit 0 Modified: vendor/gcc/dist/libstdc++/src/valarray-inst.cc ============================================================================== --- vendor/gcc/dist/libstdc++/src/valarray-inst.cc Tue Jul 3 06:41:00 2012 (r238051) +++ vendor/gcc/dist/libstdc++/src/valarray-inst.cc Tue Jul 3 06:54:37 2012 (r238052) @@ -68,7 +68,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) __gslice_to_index(size_t __o, const valarray& __l, const valarray& __s, valarray& __i) { - // There are as much as dimensions as there are strides. + // There are as many dimensions as there are strides. size_t __n = __l.size(); // Get a buffer to hold current multi-index as we go through From owner-svn-src-all@FreeBSD.ORG Tue Jul 3 06:55:50 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7D4C5106564A; Tue, 3 Jul 2012 06:55:50 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4D7198FC16; Tue, 3 Jul 2012 06:55:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q636toQk026961; Tue, 3 Jul 2012 06:55:50 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q636tomL026960; Tue, 3 Jul 2012 06:55:50 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201207030655.q636tomL026960@svn.freebsd.org> From: "David E. O'Brien" Date: Tue, 3 Jul 2012 06:55:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238053 - vendor/gcc/4.2.4-20080519-SVN135556-libstdc++ X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jul 2012 06:55:50 -0000 Author: obrien Date: Tue Jul 3 06:55:49 2012 New Revision: 238053 URL: http://svn.freebsd.org/changeset/base/238053 Log: "Tag" the r238052 libstdc++ version 4.2.4 import. Added: - copied from r238052, vendor/gcc/dist/libstdc++/ Directory Properties: vendor/gcc/4.2.4-20080519-SVN135556-libstdc++/ (props changed) From owner-svn-src-all@FreeBSD.ORG Tue Jul 3 06:56:12 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 29F6B10657F6; Tue, 3 Jul 2012 06:56:12 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 138928FC14; Tue, 3 Jul 2012 06:56:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q636uBgi027017; Tue, 3 Jul 2012 06:56:11 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q636uBMV027015; Tue, 3 Jul 2012 06:56:11 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201207030656.q636uBMV027015@svn.freebsd.org> From: Navdeep Parhar Date: Tue, 3 Jul 2012 06:56:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238054 - head/sys/dev/cxgbe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jul 2012 06:56:12 -0000 Author: np Date: Tue Jul 3 06:56:11 2012 New Revision: 238054 URL: http://svn.freebsd.org/changeset/base/238054 Log: Fix inverted test that resulted in incorrect multicast hw programming. Modified: head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Tue Jul 3 06:55:49 2012 (r238053) +++ head/sys/dev/cxgbe/t4_main.c Tue Jul 3 06:56:11 2012 (r238054) @@ -2143,7 +2143,7 @@ update_mac_settings(struct port_info *pi if_maddr_rlock(ifp); TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { - if (ifma->ifma_addr->sa_family == AF_LINK) + if (ifma->ifma_addr->sa_family != AF_LINK) continue; mcaddr[i++] = LLADDR((struct sockaddr_dl *)ifma->ifma_addr); From owner-svn-src-all@FreeBSD.ORG Tue Jul 3 06:59:13 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 893A0106566B; Tue, 3 Jul 2012 06:59:13 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 631AF8FC12; Tue, 3 Jul 2012 06:59:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q636xDXd027192; Tue, 3 Jul 2012 06:59:13 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q636xDL5027184; Tue, 3 Jul 2012 06:59:13 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201207030659.q636xDL5027184@svn.freebsd.org> From: Adrian Chadd Date: Tue, 3 Jul 2012 06:59:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238055 - head/sys/dev/ath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jul 2012 06:59:13 -0000 Author: adrian Date: Tue Jul 3 06:59:12 2012 New Revision: 238055 URL: http://svn.freebsd.org/changeset/base/238055 Log: Begin abstracting out the RX path in preparation for RX EDMA support. The RX EDMA support requires a modified approach to the RX descriptor handling. Specifically: * There's now two RX queues - high and low priority; * The RX queues are implemented as FIFOs; they're now an array of pointers to buffers; * .. and the RX buffer and descriptor are in the same "buffer", rather than being separate. So to that end, this commit abstracts out most of the RX related functions from the bulk of the driver. Notably, the RX DMA/buffer allocation isn't updated, primarily because I haven't yet fleshed out what it should look like. Whilst I'm here, create a set of matching but mostly unimplemented EDMA stubs. Tested: * AR9280, station mode TODO: * Thorough AP and other mode testing for non-EDMA chips; * Figure out how to allocate RX buffers suitable for RX EDMA, including correctly setting the mbuf length to compensate for the RX descriptor and completion status area. Added: head/sys/dev/ath/if_ath_rx_edma.c (contents, props changed) head/sys/dev/ath/if_ath_rx_edma.h (contents, props changed) Modified: head/sys/dev/ath/if_ath.c head/sys/dev/ath/if_ath_rx.c head/sys/dev/ath/if_ath_rx.h head/sys/dev/ath/if_athvar.h Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Tue Jul 3 06:56:11 2012 (r238054) +++ head/sys/dev/ath/if_ath.c Tue Jul 3 06:59:12 2012 (r238055) @@ -108,6 +108,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -302,6 +303,17 @@ ath_attach(u_int16_t devid, struct ath_s #endif /* + * Setup the DMA/EDMA functions based on the current + * hardware support. + * + * This is required before the descriptors are allocated. + */ + if (ath_hal_hasedma(sc->sc_ah)) + ath_recv_setup_edma(sc); + else + ath_recv_setup_legacy(sc); + + /* * Check if the MAC has multi-rate retry support. * We do this by trying to setup a fake extended * descriptor. MAC's that don't have support will @@ -376,7 +388,7 @@ ath_attach(u_int16_t devid, struct ath_s taskqueue_start_threads(&sc->sc_tq, 1, PI_NET, "%s taskq", ifp->if_xname); - TASK_INIT(&sc->sc_rxtask, 0, ath_rx_tasklet, sc); + TASK_INIT(&sc->sc_rxtask, 0, sc->sc_rx.recv_tasklet, sc); TASK_INIT(&sc->sc_bmisstask, 0, ath_bmiss_proc, sc); TASK_INIT(&sc->sc_bstucktask,0, ath_bstuck_proc, sc); TASK_INIT(&sc->sc_resettask,0, ath_reset_proc, sc); @@ -2100,7 +2112,7 @@ ath_reset(struct ifnet *ifp, ATH_RESET_T * That way frames aren't dropped which shouldn't be. */ ath_stoprecv(sc, (reset_type != ATH_RESET_NOLOSS)); - ath_rx_proc(sc, 0); + ath_rx_flush(sc); ath_settkipmic(sc); /* configure TKIP MIC handling */ /* NB: indicate channel change so we do a full reset */ @@ -4018,7 +4030,7 @@ ath_chan_set(struct ath_softc *sc, struc /* * First, handle completed TX/RX frames. */ - ath_rx_proc(sc, 0); + ath_rx_flush(sc); ath_draintxq(sc, ATH_RESET_NOLOSS); /* * Next, flush the non-scheduled frames. Modified: head/sys/dev/ath/if_ath_rx.c ============================================================================== --- head/sys/dev/ath/if_ath_rx.c Tue Jul 3 06:56:11 2012 (r238054) +++ head/sys/dev/ath/if_ath_rx.c Tue Jul 3 06:59:12 2012 (r238055) @@ -214,8 +214,8 @@ ath_calcrxfilter(struct ath_softc *sc) return rfilt; } -int -ath_rxbuf_init(struct ath_softc *sc, struct ath_buf *bf) +static int +ath_legacy_rxbuf_init(struct ath_softc *sc, struct ath_buf *bf) { struct ath_hal *ah = sc->sc_ah; int error; @@ -463,29 +463,6 @@ ath_handle_micerror(struct ieee80211com } } -/* - * Only run the RX proc if it's not already running. - * Since this may get run as part of the reset/flush path, - * the task can't clash with an existing, running tasklet. - */ -void -ath_rx_tasklet(void *arg, int npending) -{ - struct ath_softc *sc = arg; - - CTR1(ATH_KTR_INTR, "ath_rx_proc: pending=%d", npending); - DPRINTF(sc, ATH_DEBUG_RX_PROC, "%s: pending %u\n", __func__, npending); - ATH_PCU_LOCK(sc); - if (sc->sc_inreset_cnt > 0) { - device_printf(sc->sc_dev, - "%s: sc_inreset_cnt > 0; skipping\n", __func__); - ATH_PCU_UNLOCK(sc); - return; - } - ATH_PCU_UNLOCK(sc); - ath_rx_proc(sc, 1); -} - static int ath_rx_pkt(struct ath_softc *sc, struct ath_rx_status *rs, HAL_STATUS status, uint64_t tsf, int nf, struct ath_buf *bf) @@ -814,7 +791,7 @@ rx_next: return (is_good); } -void +static void ath_rx_proc(struct ath_softc *sc, int resched) { #define PA2DESC(_sc, _pa) \ @@ -965,10 +942,41 @@ rx_proc_next: } /* + * Only run the RX proc if it's not already running. + * Since this may get run as part of the reset/flush path, + * the task can't clash with an existing, running tasklet. + */ +static void +ath_legacy_rx_tasklet(void *arg, int npending) +{ + struct ath_softc *sc = arg; + + CTR1(ATH_KTR_INTR, "ath_rx_proc: pending=%d", npending); + DPRINTF(sc, ATH_DEBUG_RX_PROC, "%s: pending %u\n", __func__, npending); + ATH_PCU_LOCK(sc); + if (sc->sc_inreset_cnt > 0) { + device_printf(sc->sc_dev, + "%s: sc_inreset_cnt > 0; skipping\n", __func__); + ATH_PCU_UNLOCK(sc); + return; + } + ATH_PCU_UNLOCK(sc); + + ath_rx_proc(sc, 1); +} + +static void +ath_legacy_flushrecv(struct ath_softc *sc) +{ + + ath_rx_proc(sc, 0); +} + +/* * Disable the receive h/w in preparation for a reset. */ -void -ath_stoprecv(struct ath_softc *sc, int dodelay) +static void +ath_legacy_stoprecv(struct ath_softc *sc, int dodelay) { #define PA2DESC(_sc, _pa) \ ((struct ath_desc *)((caddr_t)(_sc)->sc_rxdma.dd_desc + \ @@ -1019,8 +1027,8 @@ ath_stoprecv(struct ath_softc *sc, int d /* * Enable the receive h/w following a reset. */ -int -ath_startrecv(struct ath_softc *sc) +static int +ath_legacy_startrecv(struct ath_softc *sc) { struct ath_hal *ah = sc->sc_ah; struct ath_buf *bf; @@ -1044,3 +1052,17 @@ ath_startrecv(struct ath_softc *sc) ath_hal_startpcurecv(ah); /* re-enable PCU/DMA engine */ return 0; } + + +void +ath_recv_setup_legacy(struct ath_softc *sc) +{ + + device_printf(sc->sc_dev, "DMA setup: legacy\n"); + + sc->sc_rx.recv_start = ath_legacy_startrecv; + sc->sc_rx.recv_stop = ath_legacy_stoprecv; + sc->sc_rx.recv_flush = ath_legacy_flushrecv; + sc->sc_rx.recv_tasklet = ath_legacy_rx_tasklet; + sc->sc_rx.recv_rxbuf_init = ath_legacy_rxbuf_init; +} Modified: head/sys/dev/ath/if_ath_rx.h ============================================================================== --- head/sys/dev/ath/if_ath_rx.h Tue Jul 3 06:56:11 2012 (r238054) +++ head/sys/dev/ath/if_ath_rx.h Tue Jul 3 06:59:12 2012 (r238055) @@ -32,12 +32,26 @@ #define __IF_ATH_RX_H__ extern u_int32_t ath_calcrxfilter(struct ath_softc *sc); -extern int ath_rxbuf_init(struct ath_softc *sc, struct ath_buf *bf); extern void ath_recv_mgmt(struct ieee80211_node *ni, struct mbuf *m, int subtype, int rssi, int nf); + +#define ath_stoprecv(_sc, _dodelay) \ + (_sc)->sc_rx.recv_stop((_sc), (_dodelay)) +#define ath_startrecv(_sc) \ + (_sc)->sc_rx.recv_start((_sc)) +#define ath_rx_flush(_sc) \ + (_sc)->sc_rx.recv_flush((_sc)) +#define ath_rxbuf_init(_sc, _bf) \ + (_sc)->sc_rx.recv_rxbuf_init((_sc), (_bf)) + +#if 0 +extern int ath_rxbuf_init(struct ath_softc *sc, struct ath_buf *bf); extern void ath_rx_tasklet(void *arg, int npending); extern void ath_rx_proc(struct ath_softc *sc, int resched); extern void ath_stoprecv(struct ath_softc *sc, int dodelay); extern int ath_startrecv(struct ath_softc *sc); +#endif + +extern void ath_recv_setup_legacy(struct ath_softc *sc); #endif Added: head/sys/dev/ath/if_ath_rx_edma.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/ath/if_ath_rx_edma.c Tue Jul 3 06:59:12 2012 (r238055) @@ -0,0 +1,192 @@ +/*- + * Copyright (c) 2012 Adrian Chadd + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any + * redistribution must be conditioned upon including a substantially + * similar Disclaimer requirement for further binary redistribution. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY + * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, + * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGES. + */ + +#include +__FBSDID("$FreeBSD$"); + +/* + * Driver for the Atheros Wireless LAN controller. + * + * This software is derived from work of Atsushi Onoe; his contribution + * is greatly appreciated. + */ + +#include "opt_inet.h" +#include "opt_ath.h" +/* + * This is needed for register operations which are performed + * by the driver - eg, calls to ath_hal_gettsf32(). + * + * It's also required for any AH_DEBUG checks in here, eg the + * module dependencies. + */ +#include "opt_ah.h" +#include "opt_wlan.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include /* for mp_ncpus */ + +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#ifdef IEEE80211_SUPPORT_SUPERG +#include +#endif +#ifdef IEEE80211_SUPPORT_TDMA +#include +#endif + +#include + +#ifdef INET +#include +#include +#endif + +#include +#include /* XXX for softled */ +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef ATH_TX99_DIAG +#include +#endif + +#include + +static void +ath_edma_stoprecv(struct ath_softc *sc, int dodelay) +{ + struct ath_hal *ah = sc->sc_ah; + + ath_hal_stoppcurecv(ah); + ath_hal_setrxfilter(ah, 0); + ath_hal_stopdmarecv(ah); + + DELAY(3000); + + if (sc->sc_rxpending != NULL) { + m_freem(sc->sc_rxpending); + sc->sc_rxpending = NULL; + } + + sc->sc_rxlink = NULL; +} + +static int +ath_edma_startrecv(struct ath_softc *sc) +{ + struct ath_hal *ah = sc->sc_ah; + + sc->sc_rxlink = NULL; + sc->sc_rxpending = NULL; + + /* XXX setup HP RX queue FIFO pointer */ + /* XXX setup LP RX queue FIFO pointer */ + /* XXX ath_hal_rxena() */ + ath_mode_init(sc); + ath_hal_startpcurecv(ah); + return (0); +} + +static void +ath_edma_recv_flush(struct ath_softc *sc) +{ + + device_printf(sc->sc_dev, "%s: called\n", __func__); +} + +static void +ath_edma_recv_tasklet(void *arg, int npending) +{ + struct ath_softc *sc = (struct ath_softc *) arg; + + device_printf(sc->sc_dev, "%s: called; npending=%d\n", + __func__, + npending); + /* XXX TODO */ +} + +static int +ath_edma_rxbuf_init(struct ath_softc *sc, struct ath_buf *bf) +{ + + device_printf(sc->sc_dev, "%s: called; bf=%p\n", __func__, bf); + return (EIO); +} + +void +ath_recv_setup_edma(struct ath_softc *sc) +{ + + device_printf(sc->sc_dev, "DMA setup: EDMA\n"); + + sc->sc_rx.recv_stop = ath_edma_stoprecv; + sc->sc_rx.recv_start = ath_edma_startrecv; + sc->sc_rx.recv_flush = ath_edma_recv_flush; + sc->sc_rx.recv_tasklet = ath_edma_recv_tasklet; + sc->sc_rx.recv_rxbuf_init = ath_edma_rxbuf_init; +} Added: head/sys/dev/ath/if_ath_rx_edma.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/ath/if_ath_rx_edma.h Tue Jul 3 06:59:12 2012 (r238055) @@ -0,0 +1,36 @@ +/*- + * Copyright (c) 2012 Adrian Chadd + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any + * redistribution must be conditioned upon including a substantially + * similar Disclaimer requirement for further binary redistribution. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY + * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, + * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGES. + * + * $FreeBSD$ + */ +#ifndef __IF_ATH_RX_EDMA_H__ +#define __IF_ATH_RX_EDMA_H__ + +extern void ath_recv_setup_edma(struct ath_softc *sc); + +#endif Modified: head/sys/dev/ath/if_athvar.h ============================================================================== --- head/sys/dev/ath/if_athvar.h Tue Jul 3 06:56:11 2012 (r238054) +++ head/sys/dev/ath/if_athvar.h Tue Jul 3 06:59:12 2012 (r238055) @@ -372,6 +372,15 @@ typedef enum { ATH_RESET_FULL = 2, } ATH_RESET_TYPE; +struct ath_rx_methods { + void (*recv_stop)(struct ath_softc *sc, int dodelay); + int (*recv_start)(struct ath_softc *sc); + void (*recv_flush)(struct ath_softc *sc); + void (*recv_tasklet)(void *arg, int npending); + int (*recv_rxbuf_init)(struct ath_softc *sc, + struct ath_buf *bf); +}; + struct ath_softc { struct ifnet *sc_ifp; /* interface common */ struct ath_stats sc_stats; /* interface statistics */ @@ -385,6 +394,8 @@ struct ath_softc { u_int8_t sc_nbssid0; /* # vap's using base mac */ uint32_t sc_bssidmask; /* bssid mask */ + struct ath_rx_methods sc_rx; + void (*sc_node_cleanup)(struct ieee80211_node *); void (*sc_node_free)(struct ieee80211_node *); device_t sc_dev; From owner-svn-src-all@FreeBSD.ORG Tue Jul 3 07:01:12 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B1C85106564A; Tue, 3 Jul 2012 07:01:12 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9BA9B8FC19; Tue, 3 Jul 2012 07:01:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6371CGx027342; Tue, 3 Jul 2012 07:01:12 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6371Cv4027339; Tue, 3 Jul 2012 07:01:12 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201207030701.q6371Cv4027339@svn.freebsd.org> From: Adrian Chadd Date: Tue, 3 Jul 2012 07:01:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238056 - in head/sys: conf modules/ath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jul 2012 07:01:12 -0000 Author: adrian Date: Tue Jul 3 07:01:12 2012 New Revision: 238056 URL: http://svn.freebsd.org/changeset/base/238056 Log: Link in the new RX EDMA routines. Modified: head/sys/conf/files head/sys/modules/ath/Makefile Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Tue Jul 3 06:59:12 2012 (r238055) +++ head/sys/conf/files Tue Jul 3 07:01:12 2012 (r238056) @@ -735,6 +735,8 @@ dev/ath/if_ath_sysctl.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/if_ath_rx.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" +dev/ath/if_ath_rx_edma.c optional ath \ + compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/ah_osdep.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" # Modified: head/sys/modules/ath/Makefile ============================================================================== --- head/sys/modules/ath/Makefile Tue Jul 3 06:59:12 2012 (r238055) +++ head/sys/modules/ath/Makefile Tue Jul 3 07:01:12 2012 (r238056) @@ -37,7 +37,7 @@ ATH_RATE?= sample # tx rate control alg KMOD= if_ath SRCS= if_ath.c if_ath_debug.c if_ath_keycache.c if_ath_sysctl.c SRCS+= if_ath_tx.c if_ath_tx_ht.c if_ath_led.c if_ath_rx.c if_ath_tdma.c -SRCS+= if_ath_beacon.c +SRCS+= if_ath_beacon.c if_ath_rx_edma.c # NB: v3 eeprom support used by both AR5211 and AR5212; just include it SRCS+= ah_osdep.c ah.c ah_regdomain.c ah_eeprom_v3.c SRCS+= device_if.h bus_if.h pci_if.h opt_inet.h opt_ath.h opt_ah.h opt_wlan.h From owner-svn-src-all@FreeBSD.ORG Tue Jul 3 07:03:15 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 31728106564A; Tue, 3 Jul 2012 07:03:15 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1A6A98FC12; Tue, 3 Jul 2012 07:03:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6373ETr027469; Tue, 3 Jul 2012 07:03:14 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6373EkS027467; Tue, 3 Jul 2012 07:03:14 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201207030703.q6373EkS027467@svn.freebsd.org> From: Navdeep Parhar Date: Tue, 3 Jul 2012 07:03:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238057 - stable/9/sys/dev/cxgbe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jul 2012 07:03:15 -0000 Author: np Date: Tue Jul 3 07:03:14 2012 New Revision: 238057 URL: http://svn.freebsd.org/changeset/base/238057 Log: MFC r238054: Fix inverted test that resulted in incorrect multicast hw programming. Modified: stable/9/sys/dev/cxgbe/t4_main.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/9/sys/dev/cxgbe/t4_main.c Tue Jul 3 07:01:12 2012 (r238056) +++ stable/9/sys/dev/cxgbe/t4_main.c Tue Jul 3 07:03:14 2012 (r238057) @@ -2143,7 +2143,7 @@ update_mac_settings(struct port_info *pi if_maddr_rlock(ifp); TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { - if (ifma->ifma_addr->sa_family == AF_LINK) + if (ifma->ifma_addr->sa_family != AF_LINK) continue; mcaddr[i++] = LLADDR((struct sockaddr_dl *)ifma->ifma_addr); From owner-svn-src-all@FreeBSD.ORG Tue Jul 3 07:28:58 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1C2D8106566B; Tue, 3 Jul 2012 07:28:58 +0000 (UTC) (envelope-from zeising@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EF4CD8FC0C; Tue, 3 Jul 2012 07:28:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q637SvCP028556; Tue, 3 Jul 2012 07:28:57 GMT (envelope-from zeising@svn.freebsd.org) Received: (from zeising@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q637SvrN028552; Tue, 3 Jul 2012 07:28:57 GMT (envelope-from zeising@svn.freebsd.org) Message-Id: <201207030728.q637SvrN028552@svn.freebsd.org> From: Niclas Zeising Date: Tue, 3 Jul 2012 07:28:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238058 - in head: share/misc usr.bin/calendar/calendars X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jul 2012 07:28:58 -0000 Author: zeising (ports committer) Date: Tue Jul 3 07:28:57 2012 New Revision: 238058 URL: http://svn.freebsd.org/changeset/base/238058 Log: Add myself to commiters-[doc,ports].dot and calendar.freebsd Approved by: joel (doc/www mentor) kwm (ports mentor) Modified: head/share/misc/committers-doc.dot head/share/misc/committers-ports.dot head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/share/misc/committers-doc.dot ============================================================================== --- head/share/misc/committers-doc.dot Tue Jul 3 07:03:14 2012 (r238057) +++ head/share/misc/committers-doc.dot Tue Jul 3 07:28:57 2012 (r238058) @@ -82,6 +82,7 @@ simon [label="Simon L. Nielsen\nsimon@Fr taras [label="Taras Korenko\ntaras@FreeBSD.org\n2010/06/25"] trhodes [label="Tom Rhodes\ntrhodes@FreeBSD.org\n2002/03/25"] wblock [label="Warren Block\nwblock@FreeBSD.org\n2011/09/12"] +zeising [label="Niclas Zeising\nzeising@FreeBSD.org\n2012/07/03"] # Here are the mentor/mentee relationships. # Group together all the mentees for a particular mentor. @@ -123,6 +124,8 @@ jkois -> bcr jkois -> gavin jkois -> gjb +joel -> zeising + keramida -> blackend keramida -> danger keramida -> gabor Modified: head/share/misc/committers-ports.dot ============================================================================== --- head/share/misc/committers-ports.dot Tue Jul 3 07:03:14 2012 (r238057) +++ head/share/misc/committers-ports.dot Tue Jul 3 07:28:57 2012 (r238058) @@ -198,6 +198,7 @@ wen [label="Wen Heping\nwen@FreeBSD.org\ wxs [label="Wesley Shields\nwxs@FreeBSD.org\n2008/01/03"] xride [label="Soeren Straarup\nxride@FreeBSD.org\n2006/09/27"] yzlin [label="Yi-Jheng Lin\nyzlin@FreeBSD.org\n2009/07/19"] +zeising [label="Niclas Zeising\nzeising@FreeBSD.org\n2012/07/03"] zi [label="Ryan Steinmetz\nzi@FreeBSD.org\n2011/07/14"] znerd [label="Ernst de Haan\nznerd@FreeBSD.org\n2001/11/15"] @@ -345,6 +346,7 @@ krion -> sem krion -> sergei kwm -> jsa +kwm -> zeising lawrance -> itetcu @@ -393,6 +395,7 @@ miwi -> sylvio miwi -> tabthorpe miwi -> trasz miwi -> wen +miwi -> zeising mnag -> jmelo Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Tue Jul 3 07:03:14 2012 (r238057) +++ head/usr.bin/calendar/calendars/calendar.freebsd Tue Jul 3 07:28:57 2012 (r238058) @@ -350,6 +350,7 @@ 12/23 Sean Chittenden born in Seattle, Washington, United States, 1979 12/23 Alejandro Pulver born in Buenos Aires, Argentina, 1989 12/24 Guido Falsi born in Firenze, Italy, 1978 +12/25 Niclas Zeising born in Stockholm, Sweden, 1986 12/28 Soren Schmidt born in Maribo, Denmark, 1960 12/28 Ade Lovett born in London, England, 1969 12/28 Marius Strobl born in Cham, Bavaria, Germany, 1978 From owner-svn-src-all@FreeBSD.ORG Tue Jul 3 08:03:08 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 19779106564A; Tue, 3 Jul 2012 08:03:08 +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 03E818FC08; Tue, 3 Jul 2012 08:03:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q63837Ht029981; Tue, 3 Jul 2012 08:03:07 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q63837xi029979; Tue, 3 Jul 2012 08:03:07 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201207030803.q63837xi029979@svn.freebsd.org> From: Kevin Lo Date: Tue, 3 Jul 2012 08:03:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238059 - head/sys/fs/ext2fs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jul 2012 08:03:08 -0000 Author: kevlo Date: Tue Jul 3 08:03:07 2012 New Revision: 238059 URL: http://svn.freebsd.org/changeset/base/238059 Log: Fix a typo Modified: head/sys/fs/ext2fs/ext2_vfsops.c Modified: head/sys/fs/ext2fs/ext2_vfsops.c ============================================================================== --- head/sys/fs/ext2fs/ext2_vfsops.c Tue Jul 3 07:28:57 2012 (r238058) +++ head/sys/fs/ext2fs/ext2_vfsops.c Tue Jul 3 08:03:07 2012 (r238059) @@ -767,7 +767,7 @@ ext2_statfs(struct mount *mp, struct sta ump = VFSTOEXT2(mp); fs = ump->um_e2fs; if (fs->e2fs->e2fs_magic != E2FS_MAGIC) - panic("ext2fs_statvfs"); + panic("ext2fs_statfs"); /* * Compute the overhead (FS structures) From owner-svn-src-all@FreeBSD.ORG Tue Jul 3 08:21:56 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C31471065673; Tue, 3 Jul 2012 08:21:56 +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 ACD568FC08; Tue, 3 Jul 2012 08:21:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q638LujL030830; Tue, 3 Jul 2012 08:21:56 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q638Ludh030828; Tue, 3 Jul 2012 08:21:56 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201207030821.q638Ludh030828@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 3 Jul 2012 08:21:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238060 - stable/9/usr.bin/killall X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jul 2012 08:21:56 -0000 Author: kib Date: Tue Jul 3 08:21:56 2012 New Revision: 238060 URL: http://svn.freebsd.org/changeset/base/238060 Log: MFC r237844, r237845, r237846: Minor tweaks. Modified: stable/9/usr.bin/killall/killall.c Directory Properties: stable/9/usr.bin/killall/ (props changed) Modified: stable/9/usr.bin/killall/killall.c ============================================================================== --- stable/9/usr.bin/killall/killall.c Tue Jul 3 08:03:07 2012 (r238059) +++ stable/9/usr.bin/killall/killall.c Tue Jul 3 08:21:56 2012 (r238060) @@ -90,7 +90,7 @@ nosig(char *name) int main(int ac, char **av) { - struct kinfo_proc *procs = NULL, *newprocs; + struct kinfo_proc *procs, *newprocs; struct stat sb; struct passwd *pw; regex_t rgx; @@ -273,9 +273,6 @@ main(int ac, char **av) size = 0; mib[0] = CTL_KERN; mib[1] = KERN_PROC; - mib[2] = KERN_PROC_PROC; - mib[3] = 0; - miblen = 3; if (user) { mib[2] = eflag ? KERN_PROC_UID : KERN_PROC_RUID; @@ -285,16 +282,20 @@ main(int ac, char **av) mib[2] = KERN_PROC_TTY; mib[3] = tdev; miblen = 4; + } else { + mib[2] = KERN_PROC_PROC; + mib[3] = 0; + miblen = 3; } + procs = NULL; st = sysctl(mib, miblen, NULL, &size, NULL, 0); do { size += size / 10; newprocs = realloc(procs, size); - if (newprocs == 0) { - if (procs) - free(procs); - errx(1, "could not reallocate memory"); + if (newprocs == NULL) { + free(procs); + err(1, "could not reallocate memory"); } procs = newprocs; st = sysctl(mib, miblen, procs, &size, NULL, 0); @@ -304,7 +305,7 @@ main(int ac, char **av) if (size % sizeof(struct kinfo_proc) != 0) { fprintf(stderr, "proc size mismatch (%zu total, %zu chunks)\n", size, sizeof(struct kinfo_proc)); - fprintf(stderr, "userland out of sync with kernel, recompile libkvm etc\n"); + fprintf(stderr, "userland out of sync with kernel\n"); exit(1); } nprocs = size / sizeof(struct kinfo_proc); From owner-svn-src-all@FreeBSD.ORG Tue Jul 3 08:23:23 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0BA4E1065670; Tue, 3 Jul 2012 08:23:23 +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 EA1558FC18; Tue, 3 Jul 2012 08:23:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q638NMrW030946; Tue, 3 Jul 2012 08:23:22 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q638NMcD030944; Tue, 3 Jul 2012 08:23:22 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201207030823.q638NMcD030944@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 3 Jul 2012 08:23:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238061 - stable/9/usr.bin/killall X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jul 2012 08:23:23 -0000 Author: kib Date: Tue Jul 3 08:23:22 2012 New Revision: 238061 URL: http://svn.freebsd.org/changeset/base/238061 Log: MFC 237847: Do not test ki_stat as mask. Modified: stable/9/usr.bin/killall/killall.c Directory Properties: stable/9/usr.bin/killall/ (props changed) Modified: stable/9/usr.bin/killall/killall.c ============================================================================== --- stable/9/usr.bin/killall/killall.c Tue Jul 3 08:21:56 2012 (r238060) +++ stable/9/usr.bin/killall/killall.c Tue Jul 3 08:23:22 2012 (r238061) @@ -314,7 +314,7 @@ main(int ac, char **av) mypid = getpid(); for (i = 0; i < nprocs; i++) { - if ((procs[i].ki_stat & SZOMB) == SZOMB && !zflag) + if (procs[i].ki_stat == SZOMB && !zflag) continue; thispid = procs[i].ki_pid; strlcpy(thiscmd, procs[i].ki_comm, sizeof(thiscmd)); From owner-svn-src-all@FreeBSD.ORG Tue Jul 3 08:40:21 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DC5B5106564A; Tue, 3 Jul 2012 08:40:21 +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 C74928FC08; Tue, 3 Jul 2012 08:40:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q638eLjH031655; Tue, 3 Jul 2012 08:40:21 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q638eLwK031652; Tue, 3 Jul 2012 08:40:21 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201207030840.q638eLwK031652@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 3 Jul 2012 08:40:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238062 - stable/9/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jul 2012 08:40:22 -0000 Author: kib Date: Tue Jul 3 08:40:20 2012 New Revision: 238062 URL: http://svn.freebsd.org/changeset/base/238062 Log: MFC r237848: Remove stray blank line. Modified: stable/9/sys/sys/proc.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/sys/proc.h ============================================================================== --- stable/9/sys/sys/proc.h Tue Jul 3 08:23:22 2012 (r238061) +++ stable/9/sys/sys/proc.h Tue Jul 3 08:40:20 2012 (r238062) @@ -624,7 +624,6 @@ struct proc { #define P_SIGEVENT 0x200000 /* Process pending signals changed. */ #define P_SINGLE_BOUNDARY 0x400000 /* Threads should suspend at user boundary. */ #define P_HWPMC 0x800000 /* Process is using HWPMCs */ - #define P_JAILED 0x1000000 /* Process is in jail. */ #define P_ORPHAN 0x2000000 /* Orphaned. */ #define P_INEXEC 0x4000000 /* Process is in execve(). */ From owner-svn-src-all@FreeBSD.ORG Tue Jul 3 08:42:49 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 56ABF106566C; Tue, 3 Jul 2012 08:42:49 +0000 (UTC) (envelope-from issyl0@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 284388FC08; Tue, 3 Jul 2012 08:42:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q638gneJ031793; Tue, 3 Jul 2012 08:42:49 GMT (envelope-from issyl0@svn.freebsd.org) Received: (from issyl0@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q638gm0J031790; Tue, 3 Jul 2012 08:42:48 GMT (envelope-from issyl0@svn.freebsd.org) Message-Id: <201207030842.q638gm0J031790@svn.freebsd.org> From: Isabell Long Date: Tue, 3 Jul 2012 08:42:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238063 - in head: sbin/ipfw sys/netinet/ipfw X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jul 2012 08:42:49 -0000 Author: issyl0 (doc committer) Date: Tue Jul 3 08:42:48 2012 New Revision: 238063 URL: http://svn.freebsd.org/changeset/base/238063 Log: - Make ipfw's sched rules case insensitive, for user-friendliness. - Add a note to the ipfw(8) man page about the rules no longer being case sensitive. - Fix some typos in the man page. PR: docs/164772 Reviewed by: bz Approved by: gabor (doc mentor, src committer) MFC after: 2 weeks Modified: head/sbin/ipfw/ipfw.8 head/sys/netinet/ipfw/ip_dummynet.c Modified: head/sbin/ipfw/ipfw.8 ============================================================================== --- head/sbin/ipfw/ipfw.8 Tue Jul 3 08:40:20 2012 (r238062) +++ head/sbin/ipfw/ipfw.8 Tue Jul 3 08:42:48 2012 (r238063) @@ -1,7 +1,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 10, 2012 +.Dd July 3, 2012 .Dt IPFW 8 .Os .Sh NAME @@ -2218,19 +2218,20 @@ Specifies the weight to be used for flow The weight must be in the range 1..100, and defaults to 1. .El .Pp -The following parameters can be configured for a scheduler: +The following case-insensitive parameters can be configured for a +scheduler: .Pp .Bl -tag -width indent -compact -.It Cm type Ar {fifo | wf2qp | rr | qfq} +.It Cm type Ar {fifo | wf2q+ | rr | qfq} specifies the scheduling algorithm to use. .Bl -tag -width indent -compact -.It cm fifo +.It Cm fifo is just a FIFO scheduler (which means that all packets are stored in the same queue as they arrive to the scheduler). FIFO has O(1) per-packet time complexity, with very low constants (estimate 60-80ns on a 2GHz desktop machine) but gives no service guarantees. -.It Cm wf2qp +.It Cm wf2q+ implements the WF2Q+ algorithm, which is a Weighted Fair Queueing algorithm which permits flows to share bandwidth according to their weights. Note that weights are not priorities; even a flow Modified: head/sys/netinet/ipfw/ip_dummynet.c ============================================================================== --- head/sys/netinet/ipfw/ip_dummynet.c Tue Jul 3 08:40:20 2012 (r238062) +++ head/sys/netinet/ipfw/ip_dummynet.c Tue Jul 3 08:42:48 2012 (r238063) @@ -97,7 +97,7 @@ find_sched_type(int type, char *name) struct dn_alg *d; SLIST_FOREACH(d, &dn_cfg.schedlist, next) { - if (d->type == type || (name && !strcmp(d->name, name))) + if (d->type == type || (name && !strcasecmp(d->name, name))) return d; } return NULL; /* not found */ From owner-svn-src-all@FreeBSD.ORG Tue Jul 3 08:46:27 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 389A2106566C; Tue, 3 Jul 2012 08:46:27 +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 237488FC08; Tue, 3 Jul 2012 08:46:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q638kQO5032010; Tue, 3 Jul 2012 08:46:27 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q638kQD6032008; Tue, 3 Jul 2012 08:46:26 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201207030846.q638kQD6032008@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 3 Jul 2012 08:46: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: r238064 - stable/8/usr.bin/killall X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jul 2012 08:46:27 -0000 Author: kib Date: Tue Jul 3 08:46:26 2012 New Revision: 238064 URL: http://svn.freebsd.org/changeset/base/238064 Log: MFC r237844, r237845, r237846: Minor tweaks. Modified: stable/8/usr.bin/killall/killall.c Directory Properties: stable/8/usr.bin/killall/ (props changed) Modified: stable/8/usr.bin/killall/killall.c ============================================================================== --- stable/8/usr.bin/killall/killall.c Tue Jul 3 08:42:48 2012 (r238063) +++ stable/8/usr.bin/killall/killall.c Tue Jul 3 08:46:26 2012 (r238064) @@ -102,7 +102,7 @@ nosig(char *name) int main(int ac, char **av) { - struct kinfo_proc *procs = NULL, *newprocs; + struct kinfo_proc *procs, *newprocs; struct stat sb; struct passwd *pw; regex_t rgx; @@ -285,9 +285,6 @@ main(int ac, char **av) size = 0; mib[0] = CTL_KERN; mib[1] = KERN_PROC; - mib[2] = KERN_PROC_PROC; - mib[3] = 0; - miblen = 3; if (user) { mib[2] = eflag ? KERN_PROC_UID : KERN_PROC_RUID; @@ -297,16 +294,20 @@ main(int ac, char **av) mib[2] = KERN_PROC_TTY; mib[3] = tdev; miblen = 4; + } else { + mib[2] = KERN_PROC_PROC; + mib[3] = 0; + miblen = 3; } + procs = NULL; st = sysctl(mib, miblen, NULL, &size, NULL, 0); do { size += size / 10; newprocs = realloc(procs, size); - if (newprocs == 0) { - if (procs) - free(procs); - errx(1, "could not reallocate memory"); + if (newprocs == NULL) { + free(procs); + err(1, "could not reallocate memory"); } procs = newprocs; st = sysctl(mib, miblen, procs, &size, NULL, 0); @@ -316,7 +317,7 @@ main(int ac, char **av) if (size % sizeof(struct kinfo_proc) != 0) { fprintf(stderr, "proc size mismatch (%zu total, %zu chunks)\n", size, sizeof(struct kinfo_proc)); - fprintf(stderr, "userland out of sync with kernel, recompile libkvm etc\n"); + fprintf(stderr, "userland out of sync with kernel\n"); exit(1); } nprocs = size / sizeof(struct kinfo_proc); From owner-svn-src-all@FreeBSD.ORG Tue Jul 3 08:47:07 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2D38C10656D3; Tue, 3 Jul 2012 08:47:07 +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 184258FC0C; Tue, 3 Jul 2012 08:47:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q638l6gR032087; Tue, 3 Jul 2012 08:47:06 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q638l6MO032085; Tue, 3 Jul 2012 08:47:06 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201207030847.q638l6MO032085@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 3 Jul 2012 08:47: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: r238065 - stable/8/usr.bin/killall X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jul 2012 08:47:07 -0000 Author: kib Date: Tue Jul 3 08:47:06 2012 New Revision: 238065 URL: http://svn.freebsd.org/changeset/base/238065 Log: MFC 237847: Do not test ki_stat as mask. Modified: stable/8/usr.bin/killall/killall.c Directory Properties: stable/8/usr.bin/killall/ (props changed) Modified: stable/8/usr.bin/killall/killall.c ============================================================================== --- stable/8/usr.bin/killall/killall.c Tue Jul 3 08:46:26 2012 (r238064) +++ stable/8/usr.bin/killall/killall.c Tue Jul 3 08:47:06 2012 (r238065) @@ -326,7 +326,7 @@ main(int ac, char **av) mypid = getpid(); for (i = 0; i < nprocs; i++) { - if ((procs[i].ki_stat & SZOMB) == SZOMB && !zflag) + if (procs[i].ki_stat == SZOMB && !zflag) continue; thispid = procs[i].ki_pid; strlcpy(thiscmd, procs[i].ki_comm, sizeof(thiscmd)); From owner-svn-src-all@FreeBSD.ORG Tue Jul 3 09:09:50 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BE89A1065670; Tue, 3 Jul 2012 09:09:50 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.dawidek.net (60.wheelsystems.com [83.12.187.60]) by mx1.freebsd.org (Postfix) with ESMTP id 6EBA58FC14; Tue, 3 Jul 2012 09:09:50 +0000 (UTC) Received: from localhost (58.wheelsystems.com [83.12.187.58]) by mail.dawidek.net (Postfix) with ESMTPSA id 871035F0; Tue, 3 Jul 2012 11:09:42 +0200 (CEST) Date: Tue, 3 Jul 2012 11:07:36 +0200 From: Pawel Jakub Dawidek To: Konstantin Belousov Message-ID: <20120703090736.GD1350@garage.freebsd.pl> References: <201207022101.q62L13Vh099286@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="5Mfx4RzfBqgnTE/w" Content-Disposition: inline In-Reply-To: <201207022101.q62L13Vh099286@svn.freebsd.org> X-OS: FreeBSD 10.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r238029 - in head/sys: compat/linux fs/devfs kern sys ufs/ffs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jul 2012 09:09:50 -0000 --5Mfx4RzfBqgnTE/w Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jul 02, 2012 at 09:01:03PM +0000, Konstantin Belousov wrote: > The already broken ABI emulations, including iBCS and SysV, are not > converted (yet). Do people really use that? Why can't we axe those? --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://tupytaj.pl --5Mfx4RzfBqgnTE/w Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAk/ytlgACgkQForvXbEpPzTvLwCaAoZ09XZiJ9qOcrVX3j/YFAju YKEAoKXTFf0A0hCaFdf9kxeG9Pmd0V4q =G6cl -----END PGP SIGNATURE----- --5Mfx4RzfBqgnTE/w-- From owner-svn-src-all@FreeBSD.ORG Tue Jul 3 09:11:48 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2AF59106566B; Tue, 3 Jul 2012 09:11:48 +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 166588FC12; Tue, 3 Jul 2012 09:11:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q639Bl5G033115; Tue, 3 Jul 2012 09:11:47 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q639BlMT033113; Tue, 3 Jul 2012 09:11:47 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201207030911.q639BlMT033113@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 3 Jul 2012 09:11: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: r238066 - stable/8/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jul 2012 09:11:48 -0000 Author: kib Date: Tue Jul 3 09:11:47 2012 New Revision: 238066 URL: http://svn.freebsd.org/changeset/base/238066 Log: MFC r237848: Remove stray blank line. Modified: stable/8/sys/sys/proc.h Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/sys/proc.h ============================================================================== --- stable/8/sys/sys/proc.h Tue Jul 3 08:47:06 2012 (r238065) +++ stable/8/sys/sys/proc.h Tue Jul 3 09:11:47 2012 (r238066) @@ -605,7 +605,6 @@ struct proc { #define P_SIGEVENT 0x200000 /* Process pending signals changed. */ #define P_SINGLE_BOUNDARY 0x400000 /* Threads should suspend at user boundary. */ #define P_HWPMC 0x800000 /* Process is using HWPMCs */ - #define P_JAILED 0x1000000 /* Process is in jail. */ #define P_INEXEC 0x4000000 /* Process is in execve(). */ #define P_STATCHILD 0x8000000 /* Child process stopped or exited. */ From owner-svn-src-all@FreeBSD.ORG Tue Jul 3 09:18:24 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E80A410656DA; Tue, 3 Jul 2012 09:18:24 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 60C7F8FC08; Tue, 3 Jul 2012 09:18:24 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q639IN5Z032632; Tue, 3 Jul 2012 12:18:23 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q639IBim004873; Tue, 3 Jul 2012 12:18:11 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q639IAlG004872; Tue, 3 Jul 2012 12:18:10 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 3 Jul 2012 12:18:10 +0300 From: Konstantin Belousov To: Pawel Jakub Dawidek Message-ID: <20120703091810.GX2337@deviant.kiev.zoral.com.ua> References: <201207022101.q62L13Vh099286@svn.freebsd.org> <20120703090736.GD1350@garage.freebsd.pl> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="rV+UTsayrc9+iYKY" Content-Disposition: inline In-Reply-To: <20120703090736.GD1350@garage.freebsd.pl> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r238029 - in head/sys: compat/linux fs/devfs kern sys ufs/ffs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jul 2012 09:18:25 -0000 --rV+UTsayrc9+iYKY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jul 03, 2012 at 11:07:36AM +0200, Pawel Jakub Dawidek wrote: > On Mon, Jul 02, 2012 at 09:01:03PM +0000, Konstantin Belousov wrote: > > The already broken ABI emulations, including iBCS and SysV, are not > > converted (yet). >=20 > Do people really use that? Why can't we axe those? Apparently, they do. See e.g. r224613 which was based on real report from a user. More, I got a request to port iBCS2 support to amd64 kernels, but I have more interesting ways to spend my free time. --rV+UTsayrc9+iYKY Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAk/yuNIACgkQC3+MBN1Mb4g4uQCg2SBJeanlDfG0LtyXLLM3JPnY iDcAoKlpKDOvg3/mGo5Z3oK6wqgJnR1M =k/DH -----END PGP SIGNATURE----- --rV+UTsayrc9+iYKY-- From owner-svn-src-all@FreeBSD.ORG Tue Jul 3 11:53:47 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 769A2106564A; Tue, 3 Jul 2012 11:53:47 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 64A7C8FC0C; Tue, 3 Jul 2012 11:53:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q63Brl5Z042344; Tue, 3 Jul 2012 11:53:47 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q63Brlm5042342; Tue, 3 Jul 2012 11:53:47 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <201207031153.q63Brlm5042342@svn.freebsd.org> From: Ken Smith Date: Tue, 3 Jul 2012 11:53:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238070 - svnadmin/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jul 2012 11:53:47 -0000 Author: kensmith Date: Tue Jul 3 11:53:46 2012 New Revision: 238070 URL: http://svn.freebsd.org/changeset/base/238070 Log: Turn on approval checking for stable/9 and, preemptively, releng/9.1 as part of the 9.1-RELEASE release cycle starting. Approved by: core (implicit) Modified: svnadmin/conf/approvers Modified: svnadmin/conf/approvers ============================================================================== --- svnadmin/conf/approvers Tue Jul 3 11:41:12 2012 (r238069) +++ svnadmin/conf/approvers Tue Jul 3 11:53:46 2012 (r238070) @@ -17,9 +17,10 @@ # $FreeBSD$ # #^head/ re -#^stable/9/ re +^stable/9/ re #^stable/8/ re #^stable/7/ re +^releng/9.1/ (re) ^releng/9.0/ (security-officer|so) ^releng/8.[0-3]/ (security-officer|so) ^releng/7.[0-4]/ (security-officer|so) From owner-svn-src-all@FreeBSD.ORG Tue Jul 3 12:08:56 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5CCD8106564A; Tue, 3 Jul 2012 12:08:56 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4A8F98FC1F; Tue, 3 Jul 2012 12:08:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q63C8uxd042979; Tue, 3 Jul 2012 12:08:56 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q63C8ubu042977; Tue, 3 Jul 2012 12:08:56 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201207031208.q63C8ubu042977@svn.freebsd.org> From: Dimitry Andric Date: Tue, 3 Jul 2012 12:08:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238071 - head/cddl/contrib/opensolaris/lib/libdtrace/common X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jul 2012 12:08:56 -0000 Author: dim Date: Tue Jul 3 12:08:55 2012 New Revision: 238071 URL: http://svn.freebsd.org/changeset/base/238071 Log: Fix clang warning, introduced in the recent dtrace import. MFC after: 3 days Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c Tue Jul 3 11:53:46 2012 (r238070) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c Tue Jul 3 12:08:55 2012 (r238071) @@ -796,7 +796,7 @@ dt_print_llquantize(dtrace_hdl_t *dtp, F return (0); assert(last_bin == bin); - (void) snprintf(c, sizeof (c), ">= %lld", value); + (void) snprintf(c, sizeof (c), ">= %lld", (long long)value); if (dt_printf(dtp, fp, "%16s ", c) < 0) return (-1); From owner-svn-src-all@FreeBSD.ORG Tue Jul 3 15:15:42 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B3324106566C; Tue, 3 Jul 2012 15:15:42 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9E32F8FC1D; Tue, 3 Jul 2012 15:15:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q63FFgPx051443; Tue, 3 Jul 2012 15:15:42 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q63FFgBe051436; Tue, 3 Jul 2012 15:15:42 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201207031515.q63FFgBe051436@svn.freebsd.org> From: "David E. O'Brien" Date: Tue, 3 Jul 2012 15:15:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238072 - in head/sys/dev/virtio: . balloon block network X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jul 2012 15:15:42 -0000 Author: obrien Date: Tue Jul 3 15:15:41 2012 New Revision: 238072 URL: http://svn.freebsd.org/changeset/base/238072 Log: Do not include in the local headers. The .c files including them have already included before these headers are included. Modified: head/sys/dev/virtio/balloon/virtio_balloon.h head/sys/dev/virtio/block/virtio_blk.h head/sys/dev/virtio/network/virtio_net.h head/sys/dev/virtio/virtio.h head/sys/dev/virtio/virtio_ring.h head/sys/dev/virtio/virtqueue.h Modified: head/sys/dev/virtio/balloon/virtio_balloon.h ============================================================================== --- head/sys/dev/virtio/balloon/virtio_balloon.h Tue Jul 3 12:08:55 2012 (r238071) +++ head/sys/dev/virtio/balloon/virtio_balloon.h Tue Jul 3 15:15:41 2012 (r238072) @@ -31,8 +31,6 @@ #ifndef _VIRTIO_BALLOON_H #define _VIRTIO_BALLOON_H -#include - /* Feature bits. */ #define VIRTIO_BALLOON_F_MUST_TELL_HOST 0x1 /* Tell before reclaiming pages */ #define VIRTIO_BALLOON_F_STATS_VQ 0x2 /* Memory stats virtqueue */ Modified: head/sys/dev/virtio/block/virtio_blk.h ============================================================================== --- head/sys/dev/virtio/block/virtio_blk.h Tue Jul 3 12:08:55 2012 (r238071) +++ head/sys/dev/virtio/block/virtio_blk.h Tue Jul 3 15:15:41 2012 (r238072) @@ -31,8 +31,6 @@ #ifndef _VIRTIO_BLK_H #define _VIRTIO_BLK_H -#include - /* Feature bits */ #define VIRTIO_BLK_F_BARRIER 0x0001 /* Does host support barriers? */ #define VIRTIO_BLK_F_SIZE_MAX 0x0002 /* Indicates maximum segment size */ Modified: head/sys/dev/virtio/network/virtio_net.h ============================================================================== --- head/sys/dev/virtio/network/virtio_net.h Tue Jul 3 12:08:55 2012 (r238071) +++ head/sys/dev/virtio/network/virtio_net.h Tue Jul 3 15:15:41 2012 (r238072) @@ -31,8 +31,6 @@ #ifndef _VIRTIO_NET_H #define _VIRTIO_NET_H -#include - /* The feature bitmap for virtio net */ #define VIRTIO_NET_F_CSUM 0x00001 /* Host handles pkts w/ partial csum */ #define VIRTIO_NET_F_GUEST_CSUM 0x00002 /* Guest handles pkts w/ partial csum*/ Modified: head/sys/dev/virtio/virtio.h ============================================================================== --- head/sys/dev/virtio/virtio.h Tue Jul 3 12:08:55 2012 (r238071) +++ head/sys/dev/virtio/virtio.h Tue Jul 3 15:15:41 2012 (r238072) @@ -31,8 +31,6 @@ #ifndef _VIRTIO_H_ #define _VIRTIO_H_ -#include - struct vq_alloc_info; /* VirtIO device IDs. */ Modified: head/sys/dev/virtio/virtio_ring.h ============================================================================== --- head/sys/dev/virtio/virtio_ring.h Tue Jul 3 12:08:55 2012 (r238071) +++ head/sys/dev/virtio/virtio_ring.h Tue Jul 3 15:15:41 2012 (r238072) @@ -33,8 +33,6 @@ #ifndef VIRTIO_RING_H #define VIRTIO_RING_H -#include - /* This marks a buffer as continuing via the next field. */ #define VRING_DESC_F_NEXT 1 /* This marks a buffer as write-only (otherwise read-only). */ Modified: head/sys/dev/virtio/virtqueue.h ============================================================================== --- head/sys/dev/virtio/virtqueue.h Tue Jul 3 12:08:55 2012 (r238071) +++ head/sys/dev/virtio/virtqueue.h Tue Jul 3 15:15:41 2012 (r238072) @@ -29,8 +29,6 @@ #ifndef _VIRTIO_VIRTQUEUE_H #define _VIRTIO_VIRTQUEUE_H -#include - struct virtqueue; struct sglist; From owner-svn-src-all@FreeBSD.ORG Tue Jul 3 15:37:37 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8FDE51065672; Tue, 3 Jul 2012 15:37:37 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7DC128FC1C; Tue, 3 Jul 2012 15:37:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q63FbbXE053469; Tue, 3 Jul 2012 15:37:37 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q63FbbRY053467; Tue, 3 Jul 2012 15:37:37 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <201207031537.q63FbbRY053467@svn.freebsd.org> From: "Kenneth D. Merry" Date: Tue, 3 Jul 2012 15:37:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238073 - stable/9/sys/powerpc/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jul 2012 15:37:37 -0000 Author: ken Date: Tue Jul 3 15:37:36 2012 New Revision: 238073 URL: http://svn.freebsd.org/changeset/base/238073 Log: MFC 237878: r237878 | ken | 2012-06-30 23:32:26 -0600 (Sat, 30 Jun 2012) | 6 lines Now that the mps(4) driver is endian-safe, add it to the powerpc 32-bit GENERIC config file. Requested by: nwhitehorn Approved by: re (kensmith) Modified: stable/9/sys/powerpc/conf/GENERIC Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/powerpc/conf/GENERIC ============================================================================== --- stable/9/sys/powerpc/conf/GENERIC Tue Jul 3 15:15:41 2012 (r238072) +++ stable/9/sys/powerpc/conf/GENERIC Tue Jul 3 15:37:36 2012 (r238073) @@ -94,6 +94,7 @@ options AHC_REG_PRETTY_PRINT # Print re device isp # Qlogic family device ispfw # Firmware module for Qlogic host adapters device mpt # LSI-Logic MPT-Fusion +device mps # LSI-Logic MPT-Fusion 2 device sym # NCR/Symbios/LSI Logic 53C8XX/53C1010/53C1510D # ATA/SCSI peripherals From owner-svn-src-all@FreeBSD.ORG Tue Jul 3 15:39:00 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A83B31065679; Tue, 3 Jul 2012 15:39:00 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9552F8FC22; Tue, 3 Jul 2012 15:39:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q63Fd0M7053557; Tue, 3 Jul 2012 15:39:00 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q63Fd0M7053555; Tue, 3 Jul 2012 15:39:00 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <201207031539.q63Fd0M7053555@svn.freebsd.org> From: "Kenneth D. Merry" Date: Tue, 3 Jul 2012 15:39:00 +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: r238074 - stable/8/sys/powerpc/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jul 2012 15:39:00 -0000 Author: ken Date: Tue Jul 3 15:39:00 2012 New Revision: 238074 URL: http://svn.freebsd.org/changeset/base/238074 Log: MFC 237878: r237878 | ken | 2012-06-30 23:32:26 -0600 (Sat, 30 Jun 2012) | 6 lines Now that the mps(4) driver is endian-safe, add it to the powerpc 32-bit GENERIC config file. Requested by: nwhitehorn Modified: stable/8/sys/powerpc/conf/GENERIC Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/powerpc/conf/GENERIC ============================================================================== --- stable/8/sys/powerpc/conf/GENERIC Tue Jul 3 15:37:36 2012 (r238073) +++ stable/8/sys/powerpc/conf/GENERIC Tue Jul 3 15:39:00 2012 (r238074) @@ -95,6 +95,7 @@ options AHC_REG_PRETTY_PRINT # Print re device isp # Qlogic family device ispfw # Firmware module for Qlogic host adapters device mpt # LSI-Logic MPT-Fusion +device mps # LSI-Logic MPT-Fusion 2 device sym # NCR/Symbios/LSI Logic 53C8XX/53C1010/53C1510D # SCSI peripherals From owner-svn-src-all@FreeBSD.ORG Tue Jul 3 15:53:48 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2A43B106564A; Tue, 3 Jul 2012 15:53:48 +0000 (UTC) (envelope-from wblock@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1656A8FC08; Tue, 3 Jul 2012 15:53:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q63Frlrb054236; Tue, 3 Jul 2012 15:53:47 GMT (envelope-from wblock@svn.freebsd.org) Received: (from wblock@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q63FrlYg054234; Tue, 3 Jul 2012 15:53:47 GMT (envelope-from wblock@svn.freebsd.org) Message-Id: <201207031553.q63FrlYg054234@svn.freebsd.org> From: Warren Block Date: Tue, 3 Jul 2012 15:53: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: r238075 - stable/8/share/man/man7 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jul 2012 15:53:48 -0000 Author: wblock (doc committer) Date: Tue Jul 3 15:53:47 2012 New Revision: 238075 URL: http://svn.freebsd.org/changeset/base/238075 Log: MFC r238008: Add reference to portsnap(8). Submitted by: Tim Kientzle Modified: stable/8/share/man/man7/build.7 Directory Properties: stable/8/share/man/man7/ (props changed) Modified: stable/8/share/man/man7/build.7 ============================================================================== --- stable/8/share/man/man7/build.7 Tue Jul 3 15:39:00 2012 (r238074) +++ stable/8/share/man/man7/build.7 Tue Jul 3 15:53:47 2012 (r238075) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 27, 2012 +.Dd July 2, 2012 .Dt BUILD 7 .Os .Sh NAME @@ -40,9 +40,10 @@ normally and .Pa /usr/ports . These directories may be initially empty or non-existent until updated with -.Xr csup 1 +.Xr csup 1 , +.Xr svn 1 , or -.Xr svn 1 . +.Xr portsnap 8 . Directory .Pa /usr/src contains the @@ -570,6 +571,7 @@ make TARGET=sparc64 DESTDIR=/clients/spa .Xr release 7 , .Xr config 8 , .Xr mergemaster 8 , +.Xr portsnap 8 , .Xr reboot 8 , .Xr shutdown 8 .Sh AUTHORS From owner-svn-src-all@FreeBSD.ORG Tue Jul 3 15:54:20 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DCFB710657D1; Tue, 3 Jul 2012 15:54:20 +0000 (UTC) (envelope-from wblock@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CABB18FC18; Tue, 3 Jul 2012 15:54:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q63FsKnd054298; Tue, 3 Jul 2012 15:54:20 GMT (envelope-from wblock@svn.freebsd.org) Received: (from wblock@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q63FsK7X054296; Tue, 3 Jul 2012 15:54:20 GMT (envelope-from wblock@svn.freebsd.org) Message-Id: <201207031554.q63FsK7X054296@svn.freebsd.org> From: Warren Block Date: Tue, 3 Jul 2012 15:54: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: r238076 - stable/7/share/man/man7 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jul 2012 15:54:21 -0000 Author: wblock (doc committer) Date: Tue Jul 3 15:54:20 2012 New Revision: 238076 URL: http://svn.freebsd.org/changeset/base/238076 Log: MFC r238008: Add reference to portsnap(8). Submitted by: Tim Kientzle Modified: stable/7/share/man/man7/build.7 Directory Properties: stable/7/share/man/man7/ (props changed) Modified: stable/7/share/man/man7/build.7 ============================================================================== --- stable/7/share/man/man7/build.7 Tue Jul 3 15:53:47 2012 (r238075) +++ stable/7/share/man/man7/build.7 Tue Jul 3 15:54:20 2012 (r238076) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 27, 2012 +.Dd July 2, 2012 .Dt BUILD 7 .Os .Sh NAME @@ -40,9 +40,10 @@ normally and .Pa /usr/ports . These directories may be initially empty or non-existent until updated with -.Xr csup 1 +.Xr csup 1 , +.Xr svn 1 , or -.Xr svn 1 . +.Xr portsnap 8 . Directory .Pa /usr/src contains the @@ -508,6 +509,7 @@ make TARGET_ARCH=sparc64 DESTDIR=/client .Xr release 7 , .Xr config 8 , .Xr mergemaster 8 , +.Xr portsnap 8 , .Xr reboot 8 , .Xr shutdown 8 .Sh AUTHORS From owner-svn-src-all@FreeBSD.ORG Tue Jul 3 16:12:58 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 77D3D1065672; Tue, 3 Jul 2012 16:12:58 +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 4BD358FC17; Tue, 3 Jul 2012 16:12:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q63GCwgX055474; Tue, 3 Jul 2012 16:12:58 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q63GCwKv055472; Tue, 3 Jul 2012 16:12:58 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201207031612.q63GCwKv055472@svn.freebsd.org> From: John Baldwin Date: Tue, 3 Jul 2012 16:12:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238077 - head/sys/dev/mfi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jul 2012 16:12:58 -0000 Author: jhb Date: Tue Jul 3 16:12:57 2012 New Revision: 238077 URL: http://svn.freebsd.org/changeset/base/238077 Log: Fix panics triggered by older mfiutil binaries run on the new mfi(4) driver. The new driver changed the size of the mfi_dcmd_frame structure in such a way that a MFI_IOC_PASSTHRU ioctl from an old amd64 binary is treated as an MFI_IOC_PASSTHRU32 ioctl in the new driver. As a result, the user pointer is treated as the buffer length. mfi_user_command() doesn't have a bounds check on the buffer length, so it passes a really big value to malloc() which panics when it tries to exhaust the kmem_map. Fix this two ways: - Only honor MFI_IOC_PASSTHRU32 if the binary has the SV_ILP32 flag set, otherwise treat it as an unknown ioctl. - Add a bounds check on the buffer length passed by the user. For now it fails any user attempts to use a buffer larger than 1MB. While here, fix a few other nits: - Remove an unnecessary check for a NULL return from malloc(M_WAITOK). - Use the ENOTTY errno for invalid ioctl commands instead of ENOENT. MFC after: 3 days Modified: head/sys/dev/mfi/mfi.c Modified: head/sys/dev/mfi/mfi.c ============================================================================== --- head/sys/dev/mfi/mfi.c Tue Jul 3 15:54:20 2012 (r238076) +++ head/sys/dev/mfi/mfi.c Tue Jul 3 16:12:57 2012 (r238077) @@ -73,6 +73,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -2832,10 +2833,9 @@ mfi_user_command(struct mfi_softc *sc, s if (ioc->buf_size > 0) { - ioc_buf = malloc(ioc->buf_size, M_MFIBUF, M_WAITOK); - if (ioc_buf == NULL) { + if (ioc->buf_size > 1024 * 1024) return (ENOMEM); - } + ioc_buf = malloc(ioc->buf_size, M_MFIBUF, M_WAITOK); error = copyin(ioc->buf, ioc_buf, ioc->buf_size); if (error) { device_printf(sc->mfi_dev, "failed to copyin\n"); @@ -3244,6 +3244,10 @@ out: } #ifdef COMPAT_FREEBSD32 case MFIIO_PASSTHRU32: + if (!SV_CURPROC_FLAG(SV_ILP32)) { + error = ENOTTY; + break; + } iop_swab.ioc_frame = iop32->ioc_frame; iop_swab.buf_size = iop32->buf_size; iop_swab.buf = PTRIN(iop32->buf); @@ -3259,7 +3263,7 @@ out: break; default: device_printf(sc->mfi_dev, "IOCTL 0x%lx not handled\n", cmd); - error = ENOENT; + error = ENOTTY; break; } From owner-svn-src-all@FreeBSD.ORG Tue Jul 3 16:29:42 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0EF961065678; Tue, 3 Jul 2012 16:29:42 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D752B8FC1C; Tue, 3 Jul 2012 16:29:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q63GTf7P057349; Tue, 3 Jul 2012 16:29:41 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q63GTfYq057346; Tue, 3 Jul 2012 16:29:41 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201207031629.q63GTfYq057346@svn.freebsd.org> From: Hans Petter Selasky Date: Tue, 3 Jul 2012 16:29:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238078 - in head/sys/dev/usb: . quirk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jul 2012 16:29:42 -0000 Author: hselasky Date: Tue Jul 3 16:29:41 2012 New Revision: 238078 URL: http://svn.freebsd.org/changeset/base/238078 Log: Add more quirks for USB mass storage adapters. Submitted by: Erich Dollansky MFC after: 1 week Modified: head/sys/dev/usb/quirk/usb_quirk.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/quirk/usb_quirk.c ============================================================================== --- head/sys/dev/usb/quirk/usb_quirk.c Tue Jul 3 16:12:57 2012 (r238077) +++ head/sys/dev/usb/quirk/usb_quirk.c Tue Jul 3 16:29:41 2012 (r238078) @@ -437,6 +437,9 @@ static struct usb_quirk_entry usb_quirks USB_QUIRK(MEIZU, M6_SL, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_INQUIRY, UQ_MSC_NO_SYNC_CACHE), + USB_QUIRK(TOSHIBA, TRANSMEMORY, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), + USB_QUIRK(VIALABS, USB30SATABRIDGE, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), + /* Non-standard USB MIDI devices */ USB_QUIRK(ROLAND, UM1, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS), USB_QUIRK(ROLAND, SC8850, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS), Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Tue Jul 3 16:12:57 2012 (r238077) +++ head/sys/dev/usb/usbdevs Tue Jul 3 16:29:41 2012 (r238078) @@ -691,6 +691,7 @@ vendor TLAYTECH 0x20b9 Tlay Tech vendor ENCORE 0x203d Encore vendor PARA 0x20b8 PARA Industrial vendor SIMTEC 0x20df Simtec Electronics +vendor VIALABS 0x2109 VIA Labs vendor ERICSSON 0x2282 Ericsson vendor MOTOROLA2 0x22b8 Motorola vendor TRIPPLITE 0x2478 Tripp-Lite @@ -3345,6 +3346,7 @@ product TOSHIBA POCKETPC_E740 0x0706 Poc product TOSHIBA RT3070 0x0a07 RT3070 product TOSHIBA G450 0x0d45 G450 modem product TOSHIBA HSDPA 0x1302 G450 modem +product TOSHIBA TRANSMEMORY 0x6545 USB ThumbDrive /* Trek Technology products */ product TREK THUMBDRIVE 0x1111 ThumbDrive @@ -3401,6 +3403,9 @@ product USR USR5423 0x0121 USR5423 WLAN /* VIA Technologies products */ product VIA USB2IDEBRIDGE 0x6204 USB 2.0 IDE Bridge +/* VIA Labs */ +product VIALABS USB30SATABRIDGE 0x0700 USB 3.0 SATA Bridge + /* Vaisala products */ product VAISALA CABLE 0x0200 USB Interface cable From owner-svn-src-all@FreeBSD.ORG Tue Jul 3 16:32:47 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D1833106566C; Tue, 3 Jul 2012 16:32:47 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BE8058FC12; Tue, 3 Jul 2012 16:32:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q63GWl0r057800; Tue, 3 Jul 2012 16:32:47 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q63GWl8W057797; Tue, 3 Jul 2012 16:32:47 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201207031632.q63GWl8W057797@svn.freebsd.org> From: Hans Petter Selasky Date: Tue, 3 Jul 2012 16:32:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238079 - in head/sys/dev/usb: . serial X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jul 2012 16:32:47 -0000 Author: hselasky Date: Tue Jul 3 16:32:47 2012 New Revision: 238079 URL: http://svn.freebsd.org/changeset/base/238079 Log: Add new USB device ID. Submitted by: Erich Dollansky MFC after: 1 week Modified: head/sys/dev/usb/serial/u3g.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/serial/u3g.c ============================================================================== --- head/sys/dev/usb/serial/u3g.c Tue Jul 3 16:29:41 2012 (r238078) +++ head/sys/dev/usb/serial/u3g.c Tue Jul 3 16:32:47 2012 (r238079) @@ -290,6 +290,7 @@ static const STRUCT_USB_HOST_ID u3g_devs U3G_DEV(HUAWEI, E1820, U3GINIT_HUAWEISCSI), U3G_DEV(HUAWEI, K3765, U3GINIT_HUAWEI), U3G_DEV(HUAWEI, K3765_INIT, U3GINIT_HUAWEISCSI), + U3G_DEV(HUAWEI, ETS2055, U3GINIT_HUAWEI), U3G_DEV(KYOCERA2, CDMA_MSM_K, 0), U3G_DEV(KYOCERA2, KPC680, 0), U3G_DEV(LONGCHEER, WM66, U3GINIT_HUAWEI), Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Tue Jul 3 16:29:41 2012 (r238078) +++ head/sys/dev/usb/usbdevs Tue Jul 3 16:32:47 2012 (r238079) @@ -1895,6 +1895,7 @@ product HUAWEI E1752 0x1446 3G modem product HUAWEI K3765 0x1465 3G modem product HUAWEI E1820 0x14ac E1820 HSPA+ USB Slider product HUAWEI K3765_INIT 0x1520 K3765 Initial +product HUAWEI ETS2055 0x1803 CDMA modem product HUAWEI E173 0x1c05 3G modem product HUAWEI E173_INIT 0x1c0b 3G modem initial From owner-svn-src-all@FreeBSD.ORG Tue Jul 3 16:49:39 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 02B3F106566C; Tue, 3 Jul 2012 16:49:39 +0000 (UTC) (envelope-from wblock@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E42FD8FC0A; Tue, 3 Jul 2012 16:49:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q63Gncji059615; Tue, 3 Jul 2012 16:49:38 GMT (envelope-from wblock@svn.freebsd.org) Received: (from wblock@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q63GncV8059613; Tue, 3 Jul 2012 16:49:38 GMT (envelope-from wblock@svn.freebsd.org) Message-Id: <201207031649.q63GncV8059613@svn.freebsd.org> From: Warren Block Date: Tue, 3 Jul 2012 16:49:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238080 - stable/9/share/man/man7 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jul 2012 16:49:39 -0000 Author: wblock (doc committer) Date: Tue Jul 3 16:49:38 2012 New Revision: 238080 URL: http://svn.freebsd.org/changeset/base/238080 Log: MFC r238008: Add reference to portsnap(8). Submitted by: Tim Kientzle Approved by: re Modified: stable/9/share/man/man7/build.7 Directory Properties: stable/9/share/man/man7/ (props changed) Modified: stable/9/share/man/man7/build.7 ============================================================================== --- stable/9/share/man/man7/build.7 Tue Jul 3 16:32:47 2012 (r238079) +++ stable/9/share/man/man7/build.7 Tue Jul 3 16:49:38 2012 (r238080) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 27, 2012 +.Dd July 2, 2012 .Dt BUILD 7 .Os .Sh NAME @@ -40,9 +40,10 @@ normally and .Pa /usr/ports . These directories may be initially empty or non-existent until updated with -.Xr csup 1 +.Xr csup 1 , +.Xr svn 1 , or -.Xr svn 1 . +.Xr portsnap 8 . Directory .Pa /usr/src contains the @@ -608,6 +609,7 @@ make TARGET=sparc64 DESTDIR=/clients/spa .Xr release 7 , .Xr config 8 , .Xr mergemaster 8 , +.Xr portsnap 8 , .Xr reboot 8 , .Xr shutdown 8 .Sh AUTHORS From owner-svn-src-all@FreeBSD.ORG Tue Jul 3 17:50:45 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 64112106566B; Tue, 3 Jul 2012 17:50:45 +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 5181C8FC08; Tue, 3 Jul 2012 17:50:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q63Hoj5M062069; Tue, 3 Jul 2012 17:50:45 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q63HojGK062067; Tue, 3 Jul 2012 17:50:45 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201207031750.q63HojGK062067@svn.freebsd.org> From: Ed Maste Date: Tue, 3 Jul 2012 17:50:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238081 - head/tools/tools/netmap X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jul 2012 17:50:45 -0000 Author: emaste Date: Tue Jul 3 17:50:44 2012 New Revision: 238081 URL: http://svn.freebsd.org/changeset/base/238081 Log: Update comment to reflect function's actual operation Modified: head/tools/tools/netmap/pkt-gen.c Modified: head/tools/tools/netmap/pkt-gen.c ============================================================================== --- head/tools/tools/netmap/pkt-gen.c Tue Jul 3 16:49:38 2012 (r238080) +++ head/tools/tools/netmap/pkt-gen.c Tue Jul 3 17:50:44 2012 (r238081) @@ -95,7 +95,7 @@ inline void prefetch (const void *x) __asm volatile("prefetcht0 %0" :: "m" (*(const unsigned long *)x)); } -// XXX only for multiples of 32 bytes, non overlapped. +// XXX only for multiples of 64 bytes, non overlapped. static inline void pkt_copy(void *_src, void *_dst, int l) { From owner-svn-src-all@FreeBSD.ORG Tue Jul 3 18:59:14 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 92210106564A; Tue, 3 Jul 2012 18:59:14 +0000 (UTC) (envelope-from trociny@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7F5E38FC08; Tue, 3 Jul 2012 18:59:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q63IxESS064964; Tue, 3 Jul 2012 18:59:14 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q63IxEgb064962; Tue, 3 Jul 2012 18:59:14 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201207031859.q63IxEgb064962@svn.freebsd.org> From: Mikolaj Golub Date: Tue, 3 Jul 2012 18:59:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238083 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jul 2012 18:59:14 -0000 Author: trociny Date: Tue Jul 3 18:59:13 2012 New Revision: 238083 URL: http://svn.freebsd.org/changeset/base/238083 Log: Fix RTTVAR scale in net.inet.tcp.hostcache.list sysctl. Reviewed by: andre MFC after: 3 days Modified: head/sys/netinet/tcp_hostcache.c Modified: head/sys/netinet/tcp_hostcache.c ============================================================================== --- head/sys/netinet/tcp_hostcache.c Tue Jul 3 18:54:21 2012 (r238082) +++ head/sys/netinet/tcp_hostcache.c Tue Jul 3 18:59:13 2012 (r238083) @@ -624,7 +624,7 @@ sysctl_tcp_hc_list(SYSCTL_HANDLER_ARGS) msec(hc_entry->rmx_rtt * (RTM_RTTUNIT / (hz * TCP_RTT_SCALE))), msec(hc_entry->rmx_rttvar * - (RTM_RTTUNIT / (hz * TCP_RTT_SCALE))), + (RTM_RTTUNIT / (hz * TCP_RTTVAR_SCALE))), hc_entry->rmx_bandwidth * 8, hc_entry->rmx_cwnd, hc_entry->rmx_sendpipe, From owner-svn-src-all@FreeBSD.ORG Tue Jul 3 19:04:19 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 84009106564A; Tue, 3 Jul 2012 19:04:19 +0000 (UTC) (envelope-from trociny@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 71B748FC08; Tue, 3 Jul 2012 19:04:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q63J4Jd1065218; Tue, 3 Jul 2012 19:04:19 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q63J4JnR065216; Tue, 3 Jul 2012 19:04:19 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201207031904.q63J4JnR065216@svn.freebsd.org> From: Mikolaj Golub Date: Tue, 3 Jul 2012 19:04:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238084 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jul 2012 19:04:19 -0000 Author: trociny Date: Tue Jul 3 19:04:18 2012 New Revision: 238084 URL: http://svn.freebsd.org/changeset/base/238084 Log: Don't check for ifp != NULL before KASSERT, as ifp may not be NULL here (it is dereferenced below). Discussed with: jhb MFC after: 1 week Modified: head/sys/netinet/igmp.c Modified: head/sys/netinet/igmp.c ============================================================================== --- head/sys/netinet/igmp.c Tue Jul 3 18:59:13 2012 (r238083) +++ head/sys/netinet/igmp.c Tue Jul 3 19:04:18 2012 (r238084) @@ -2285,13 +2285,11 @@ igmp_change_state(struct in_multi *inm) */ KASSERT(inm->inm_ifma != NULL, ("%s: no ifma", __func__)); ifp = inm->inm_ifma->ifma_ifp; - if (ifp != NULL) { - /* - * Sanity check that netinet's notion of ifp is the - * same as net's. - */ - KASSERT(inm->inm_ifp == ifp, ("%s: bad ifp", __func__)); - } + /* + * Sanity check that netinet's notion of ifp is the + * same as net's. + */ + KASSERT(inm->inm_ifp == ifp, ("%s: bad ifp", __func__)); IGMP_LOCK(); From owner-svn-src-all@FreeBSD.ORG Tue Jul 3 19:08:03 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7F2D2106564A; Tue, 3 Jul 2012 19:08:03 +0000 (UTC) (envelope-from trociny@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6BE3A8FC19; Tue, 3 Jul 2012 19:08:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q63J83id065401; Tue, 3 Jul 2012 19:08:03 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q63J83eX065399; Tue, 3 Jul 2012 19:08:03 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201207031908.q63J83eX065399@svn.freebsd.org> From: Mikolaj Golub Date: Tue, 3 Jul 2012 19:08:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238085 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jul 2012 19:08:03 -0000 Author: trociny Date: Tue Jul 3 19:08:02 2012 New Revision: 238085 URL: http://svn.freebsd.org/changeset/base/238085 Log: Fix KASSERT message. MFC after: 3 days Modified: head/sys/kern/uipc_socket.c Modified: head/sys/kern/uipc_socket.c ============================================================================== --- head/sys/kern/uipc_socket.c Tue Jul 3 19:04:18 2012 (r238084) +++ head/sys/kern/uipc_socket.c Tue Jul 3 19:08:02 2012 (r238085) @@ -635,7 +635,7 @@ sofree(struct socket *so) so->so_qstate & SQ_COMP, so->so_qstate & SQ_INCOMP)); if (so->so_options & SO_ACCEPTCONN) { KASSERT((TAILQ_EMPTY(&so->so_comp)), ("sofree: so_comp populated")); - KASSERT((TAILQ_EMPTY(&so->so_incomp)), ("sofree: so_comp populated")); + KASSERT((TAILQ_EMPTY(&so->so_incomp)), ("sofree: so_incomp populated")); } SOCK_UNLOCK(so); ACCEPT_UNLOCK(); From owner-svn-src-all@FreeBSD.ORG Tue Jul 3 19:11:39 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7D1641065670; Tue, 3 Jul 2012 19:11:39 +0000 (UTC) (envelope-from trociny@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6B11B8FC0A; Tue, 3 Jul 2012 19:11:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q63JBdwL065587; Tue, 3 Jul 2012 19:11:39 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q63JBdeu065585; Tue, 3 Jul 2012 19:11:39 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201207031911.q63JBdeu065585@svn.freebsd.org> From: Mikolaj Golub Date: Tue, 3 Jul 2012 19:11:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238086 - head/usr.bin/procstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jul 2012 19:11:39 -0000 Author: trociny Date: Tue Jul 3 19:11:38 2012 New Revision: 238086 URL: http://svn.freebsd.org/changeset/base/238086 Log: Fix style. MFC after: 3 days Modified: head/usr.bin/procstat/procstat_rlimit.c Modified: head/usr.bin/procstat/procstat_rlimit.c ============================================================================== --- head/usr.bin/procstat/procstat_rlimit.c Tue Jul 3 19:08:02 2012 (r238085) +++ head/usr.bin/procstat/procstat_rlimit.c Tue Jul 3 19:11:38 2012 (r238086) @@ -66,8 +66,8 @@ static struct { #error "Resource limits have grown. Add new entries to rlimit_param[]." #endif -static -const char *humanize_rlimit(int indx, rlim_t limit) +static const char * +humanize_rlimit(int indx, rlim_t limit) { static char buf[14]; int scale; From owner-svn-src-all@FreeBSD.ORG Tue Jul 3 21:41:20 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 959211065672; Tue, 3 Jul 2012 21:41:20 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7EE948FC17; Tue, 3 Jul 2012 21:41:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q63LfKv4071609; Tue, 3 Jul 2012 21:41:20 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q63LfKna071607; Tue, 3 Jul 2012 21:41:20 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201207032141.q63LfKna071607@svn.freebsd.org> From: Michael Tuexen Date: Tue, 3 Jul 2012 21:41:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238087 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jul 2012 21:41:20 -0000 Author: tuexen Date: Tue Jul 3 21:41:19 2012 New Revision: 238087 URL: http://svn.freebsd.org/changeset/base/238087 Log: Iniitialize a variable. MFC after: 3 days Modified: head/sys/netinet/sctp_input.c Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Tue Jul 3 19:11:38 2012 (r238086) +++ head/sys/netinet/sctp_input.c Tue Jul 3 21:41:19 2012 (r238087) @@ -5604,7 +5604,7 @@ sctp_common_input_processing(struct mbuf int cnt_ctrl_ready = 0; struct sctp_inpcb *inp, *inp_decr = NULL; struct sctp_tcb *stcb = NULL; - struct sctp_nets *net; + struct sctp_nets *net = NULL; SCTP_STAT_INCR(sctps_recvdatagrams); #ifdef SCTP_AUDITING_ENABLED From owner-svn-src-all@FreeBSD.ORG Tue Jul 3 22:17:36 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D388A1065672; Tue, 3 Jul 2012 22:17:36 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B93158FC15; Tue, 3 Jul 2012 22:17:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q63MHa28073131; Tue, 3 Jul 2012 22:17:36 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q63MHaYP073128; Tue, 3 Jul 2012 22:17:36 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201207032217.q63MHaYP073128@svn.freebsd.org> From: Navdeep Parhar Date: Tue, 3 Jul 2012 22:17:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238088 - in stable/9/sys/dev: cxgb cxgbe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jul 2012 22:17:36 -0000 Author: np Date: Tue Jul 3 22:17:36 2012 New Revision: 238088 URL: http://svn.freebsd.org/changeset/base/238088 Log: Do not enable IFCAP_TSO6 in cxgb(4) and cxgbe(4) in stable/9. The kernel code in 9 isn't quite ready for TSO6 yet. This is a direct commit to stable/9. IFCAP_TSO6 works properly in head and there is no need to disable it over there. Approved by: re (kib) Modified: stable/9/sys/dev/cxgb/cxgb_main.c stable/9/sys/dev/cxgbe/t4_main.c Modified: stable/9/sys/dev/cxgb/cxgb_main.c ============================================================================== --- stable/9/sys/dev/cxgb/cxgb_main.c Tue Jul 3 21:41:19 2012 (r238087) +++ stable/9/sys/dev/cxgb/cxgb_main.c Tue Jul 3 22:17:36 2012 (r238088) @@ -987,7 +987,7 @@ cxgb_makedev(struct port_info *pi) #define CXGB_CAP (IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU | IFCAP_HWCSUM | \ IFCAP_VLAN_HWCSUM | IFCAP_TSO | IFCAP_JUMBO_MTU | IFCAP_LRO | \ IFCAP_VLAN_HWTSO | IFCAP_LINKSTATE | IFCAP_HWCSUM_IPV6) -#define CXGB_CAP_ENABLE CXGB_CAP +#define CXGB_CAP_ENABLE (CXGB_CAP & ~IFCAP_TSO6) static int cxgb_port_attach(device_t dev) Modified: stable/9/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/9/sys/dev/cxgbe/t4_main.c Tue Jul 3 21:41:19 2012 (r238087) +++ stable/9/sys/dev/cxgbe/t4_main.c Tue Jul 3 22:17:36 2012 (r238088) @@ -824,7 +824,7 @@ cxgbe_probe(device_t dev) #define T4_CAP (IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU | IFCAP_HWCSUM | \ IFCAP_VLAN_HWCSUM | IFCAP_TSO | IFCAP_JUMBO_MTU | IFCAP_LRO | \ IFCAP_VLAN_HWTSO | IFCAP_LINKSTATE | IFCAP_HWCSUM_IPV6) -#define T4_CAP_ENABLE (T4_CAP) +#define T4_CAP_ENABLE (T4_CAP & ~IFCAP_TSO6) static int cxgbe_attach(device_t dev) From owner-svn-src-all@FreeBSD.ORG Wed Jul 4 00:54:16 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D8212106566B; Wed, 4 Jul 2012 00:54:16 +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 C37BA8FC08; Wed, 4 Jul 2012 00:54:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q640sGaS079459; Wed, 4 Jul 2012 00:54:16 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q640sGVh079457; Wed, 4 Jul 2012 00:54:16 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201207040054.q640sGVh079457@svn.freebsd.org> From: Xin LI Date: Wed, 4 Jul 2012 00:54:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238090 - stable/9/sys/amd64/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jul 2012 00:54:17 -0000 Author: delphij Date: Wed Jul 4 00:54:16 2012 New Revision: 238090 URL: http://svn.freebsd.org/changeset/base/238090 Log: MFC r237901: tws(4) is interfaced with CAM so move it to the same section. Reported by: joel Approved by: re (kib) Modified: stable/9/sys/amd64/conf/GENERIC Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/amd64/conf/GENERIC ============================================================================== --- stable/9/sys/amd64/conf/GENERIC Tue Jul 3 23:26:08 2012 (r238089) +++ stable/9/sys/amd64/conf/GENERIC Wed Jul 4 00:54:16 2012 (r238090) @@ -135,6 +135,7 @@ device iir # Intel Integrated RAID device ips # IBM (Adaptec) ServeRAID device mly # Mylex AcceleRAID/eXtremeRAID device twa # 3ware 9000 series PATA/SATA RAID +device tws # LSI 3ware 9750 SATA+SAS 6Gb/s RAID controller # RAID controllers device aac # Adaptec FSA RAID @@ -145,7 +146,6 @@ device mlx # Mylex DAC960 family #XXX pointer/int warnings #device pst # Promise Supertrak SX6000 device twe # 3ware ATA RAID -device tws # LSI 3ware 9750 SATA+SAS 6Gb/s RAID controller # atkbdc0 controls both the keyboard and the PS/2 mouse device atkbdc # AT keyboard controller From owner-svn-src-all@FreeBSD.ORG Wed Jul 4 07:37:54 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EDA49106566B; Wed, 4 Jul 2012 07:37:53 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D7FAE8FC15; Wed, 4 Jul 2012 07:37:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q647brTq096043; Wed, 4 Jul 2012 07:37:53 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q647br5k096035; Wed, 4 Jul 2012 07:37:53 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201207040737.q647br5k096035@svn.freebsd.org> From: Gleb Smirnoff Date: Wed, 4 Jul 2012 07:37:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238092 - in head/sys: net netinet netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jul 2012 07:37:54 -0000 Author: glebius Date: Wed Jul 4 07:37:53 2012 New Revision: 238092 URL: http://svn.freebsd.org/changeset/base/238092 Log: When ip_output()/ip6_output() is supplied a struct route *ro argument, it skips FLOWTABLE lookup. However, the non-NULL ro has dual meaning here: it may be supplied to provide route, and it may be supplied to store and return to caller the route that ip_output()/ip6_output() finds. In the latter case skipping FLOWTABLE lookup is pessimisation. The difference between struct route filled by FLOWTABLE and filled by rtalloc() family is that the former doesn't hold a reference on its rtentry. Reference is hold by flow entry, and it is about to be released in future. Thus, route filled by FLOWTABLE shouldn't be passed to RTFREE() macro. - Introduce new flag for struct route/route_in6, that marks route not holding a reference on rtentry. - Introduce new macro RO_RTFREE() that cleans up a struct route depending on its kind. - All callers to ip_output()/ip6_output() that do supply non-NULL but empty route should use RO_RTFREE() to free results of lookup. - ip_output()/ip6_output() now do FLOWTABLE lookup always when ro->ro_rt == NULL. Tested by: tuexen (SCTP part) Modified: head/sys/net/flowtable.c head/sys/net/route.h head/sys/netinet/ip_input.c head/sys/netinet/ip_output.c head/sys/netinet/sctp_output.c head/sys/netinet6/ip6_output.c head/sys/netinet6/nd6_nbr.c Modified: head/sys/net/flowtable.c ============================================================================== --- head/sys/net/flowtable.c Wed Jul 4 06:29:56 2012 (r238091) +++ head/sys/net/flowtable.c Wed Jul 4 07:37:53 2012 (r238092) @@ -619,6 +619,7 @@ flow_to_route(struct flentry *fle, struc sin->sin_addr.s_addr = hashkey[2]; ro->ro_rt = __DEVOLATILE(struct rtentry *, fle->f_rt); ro->ro_lle = __DEVOLATILE(struct llentry *, fle->f_lle); + ro->ro_flags |= RT_NORTREF; } #endif /* INET */ @@ -826,7 +827,7 @@ flow_to_route_in6(struct flentry *fle, s memcpy(&sin6->sin6_addr, &hashkey[5], sizeof (struct in6_addr)); ro->ro_rt = __DEVOLATILE(struct rtentry *, fle->f_rt); ro->ro_lle = __DEVOLATILE(struct llentry *, fle->f_lle); - + ro->ro_flags |= RT_NORTREF; } #endif /* INET6 */ Modified: head/sys/net/route.h ============================================================================== --- head/sys/net/route.h Wed Jul 4 06:29:56 2012 (r238091) +++ head/sys/net/route.h Wed Jul 4 07:37:53 2012 (r238092) @@ -54,7 +54,8 @@ struct route { struct sockaddr ro_dst; }; -#define RT_CACHING_CONTEXT 0x1 +#define RT_CACHING_CONTEXT 0x1 /* XXX: not used anywhere */ +#define RT_NORTREF 0x2 /* doesn't hold reference on ro_rt */ /* * These numbers are used by reliable protocols for determining @@ -341,6 +342,18 @@ struct rt_addrinfo { RTFREE_LOCKED(_rt); \ } while (0) +#define RO_RTFREE(_ro) do { \ + if ((_ro)->ro_rt) { \ + if ((_ro)->ro_flags & RT_NORTREF) { \ + (_ro)->ro_flags &= ~RT_NORTREF; \ + (_ro)->ro_rt = NULL; \ + } else { \ + RT_LOCK((_ro)->ro_rt); \ + RTFREE_LOCKED((_ro)->ro_rt); \ + } \ + } \ +} while (0) + struct radix_node_head *rt_tables_get_rnh(int, int); struct ifmultiaddr; Modified: head/sys/netinet/ip_input.c ============================================================================== --- head/sys/netinet/ip_input.c Wed Jul 4 06:29:56 2012 (r238091) +++ head/sys/netinet/ip_input.c Wed Jul 4 07:37:53 2012 (r238092) @@ -1495,8 +1495,7 @@ ip_forward(struct mbuf *m, int srcrt) if (error == EMSGSIZE && ro.ro_rt) mtu = ro.ro_rt->rt_rmx.rmx_mtu; - if (ro.ro_rt) - RTFREE(ro.ro_rt); + RO_RTFREE(&ro); if (error) IPSTAT_INC(ips_cantforward); Modified: head/sys/netinet/ip_output.c ============================================================================== --- head/sys/netinet/ip_output.c Wed Jul 4 06:29:56 2012 (r238091) +++ head/sys/netinet/ip_output.c Wed Jul 4 07:37:53 2012 (r238092) @@ -105,6 +105,10 @@ extern struct protosw inetsw[]; * ip_len and ip_off are in host format. * The mbuf chain containing the packet will be freed. * The mbuf opt, if present, will not be freed. + * If route ro is present and has ro_rt initialized, route lookup would be + * skipped and ro->ro_rt would be used. If ro is present but ro->ro_rt is NULL, + * then result of route lookup is stored in ro->ro_rt. + * * In the IP forwarding case, the packet will arrive with options already * inserted, so must have a NULL opt pointer. */ @@ -119,7 +123,6 @@ ip_output(struct mbuf *m, struct mbuf *o int mtu; int n; /* scratchpad */ int error = 0; - int nortfree = 0; struct sockaddr_in *dst; struct in_ifaddr *ia = NULL; int isbroadcast, sw_csum; @@ -146,24 +149,23 @@ ip_output(struct mbuf *m, struct mbuf *o if (ro == NULL) { ro = &iproute; bzero(ro, sizeof (*ro)); + } #ifdef FLOWTABLE - { - struct flentry *fle; + if (ro->ro_rt == NULL) { + struct flentry *fle; - /* - * The flow table returns route entries valid for up to 30 - * seconds; we rely on the remainder of ip_output() taking no - * longer than that long for the stability of ro_rt. The - * flow ID assignment must have happened before this point. - */ - if ((fle = flowtable_lookup_mbuf(V_ip_ft, m, AF_INET)) != NULL) { - flow_to_route(fle, ro); - nortfree = 1; - } - } -#endif + /* + * The flow table returns route entries valid for up to 30 + * seconds; we rely on the remainder of ip_output() taking no + * longer than that long for the stability of ro_rt. The + * flow ID assignment must have happened before this point. + */ + fle = flowtable_lookup_mbuf(V_ip_ft, m, AF_INET); + if (fle != NULL) + flow_to_route(fle, ro); } +#endif if (opt) { int len = 0; @@ -209,10 +211,9 @@ again: !RT_LINK_IS_UP(rte->rt_ifp) || dst->sin_family != AF_INET || dst->sin_addr.s_addr != ip->ip_dst.s_addr)) { - if (!nortfree) - RTFREE(rte); - rte = ro->ro_rt = (struct rtentry *)NULL; - ro->ro_lle = (struct llentry *)NULL; + RO_RTFREE(ro); + ro->ro_lle = NULL; + rte = NULL; } #ifdef IPFIREWALL_FORWARD if (rte == NULL && fwd_tag == NULL) { @@ -672,9 +673,8 @@ passout: IPSTAT_INC(ips_fragmented); done: - if (ro == &iproute && ro->ro_rt && !nortfree) { - RTFREE(ro->ro_rt); - } + if (ro == &iproute) + RO_RTFREE(ro); if (ia != NULL) ifa_free(&ia->ia_ifa); return (error); Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Wed Jul 4 06:29:56 2012 (r238091) +++ head/sys/netinet/sctp_output.c Wed Jul 4 07:37:53 2012 (r238092) @@ -4156,10 +4156,7 @@ sctp_lowlevel_chunk_output(struct sctp_i SCTPDBG(SCTP_DEBUG_OUTPUT3, "IP output returns %d\n", ret); if (net == NULL) { /* free tempy routes */ - if (ro->ro_rt) { - RTFREE(ro->ro_rt); - ro->ro_rt = NULL; - } + RO_RTFREE(ro); } else { /* * PMTU check versus smallest asoc MTU goes @@ -4513,9 +4510,7 @@ sctp_lowlevel_chunk_output(struct sctp_i } if (net == NULL) { /* Now if we had a temp route free it */ - if (ro->ro_rt) { - RTFREE(ro->ro_rt); - } + RO_RTFREE(ro); } else { /* * PMTU check versus smallest asoc MTU goes Modified: head/sys/netinet6/ip6_output.c ============================================================================== --- head/sys/netinet6/ip6_output.c Wed Jul 4 06:29:56 2012 (r238091) +++ head/sys/netinet6/ip6_output.c Wed Jul 4 07:37:53 2012 (r238092) @@ -213,6 +213,9 @@ in6_delayed_cksum(struct mbuf *m, uint32 * This function may modify ver and hlim only. * The mbuf chain containing the packet will be freed. * The mbuf opt, if present, will not be freed. + * If route_in6 ro is present and has ro_rt initialized, route lookup would be + * skipped and ro->ro_rt would be used. If ro is present but ro->ro_rt is NULL, + * then result of route lookup is stored in ro->ro_rt. * * type of "mtu": rt_rmx.rmx_mtu is u_long, ifnet.ifr_mtu is int, and * nd_ifinfo.linkmtu is u_int32_t. so we use u_long to hold largest one, @@ -243,7 +246,6 @@ ip6_output(struct mbuf *m0, struct ip6_p struct in6_addr finaldst, src0, dst0; u_int32_t zone; struct route_in6 *ro_pmtu = NULL; - int flevalid = 0; int hdrsplit = 0; int needipsec = 0; int sw_csum, tso; @@ -506,7 +508,7 @@ skip_ipsec2:; ro = &opt->ip6po_route; dst = (struct sockaddr_in6 *)&ro->ro_dst; #ifdef FLOWTABLE - if (ro == &ip6route) { + if (ro->ro_rt == NULL) { struct flentry *fle; /* @@ -515,11 +517,9 @@ skip_ipsec2:; * longer than that long for the stability of ro_rt. The * flow ID assignment must have happened before this point. */ - if ((fle = flowtable_lookup_mbuf(V_ip6_ft, m, AF_INET6)) != NULL) { + fle = flowtable_lookup_mbuf(V_ip6_ft, m, AF_INET6); + if (fle != NULL) flow_to_route_in6(fle, ro); - if (ro->ro_rt != NULL && ro->ro_lle != NULL) - flevalid = 1; - } } #endif again: @@ -627,7 +627,7 @@ again: dst_sa.sin6_family = AF_INET6; dst_sa.sin6_len = sizeof(dst_sa); dst_sa.sin6_addr = ip6->ip6_dst; - if (flevalid) { + if (ro->ro_rt) { rt = ro->ro_rt; ifp = ro->ro_rt->rt_ifp; } else if ((error = in6_selectroute_fib(&dst_sa, opt, im6o, ro, @@ -1182,13 +1182,10 @@ sendorfree: V_ip6stat.ip6s_fragmented++; done: - if (ro == &ip6route && ro->ro_rt && flevalid == 0) { - /* brace necessary for RTFREE */ - RTFREE(ro->ro_rt); - } else if (ro_pmtu == &ip6route && ro_pmtu->ro_rt && - ((flevalid == 0) || (ro_pmtu != ro))) { - RTFREE(ro_pmtu->ro_rt); - } + if (ro == &ip6route) + RO_RTFREE(ro); + if (ro_pmtu == &ip6route) + RO_RTFREE(ro_pmtu); #ifdef IPSEC if (sp != NULL) KEY_FREESP(&sp); Modified: head/sys/netinet6/nd6_nbr.c ============================================================================== --- head/sys/netinet6/nd6_nbr.c Wed Jul 4 06:29:56 2012 (r238091) +++ head/sys/netinet6/nd6_nbr.c Wed Jul 4 07:37:53 2012 (r238092) @@ -595,9 +595,9 @@ nd6_ns_output(struct ifnet *ifp, const s icmp6_ifstat_inc(ifp, ifs6_out_neighborsolicit); ICMP6STAT_INC(icp6s_outhist[ND_NEIGHBOR_SOLICIT]); - if (ro.ro_rt) { /* we don't cache this route. */ - RTFREE(ro.ro_rt); - } + /* We don't cache this route. */ + RO_RTFREE(&ro); + return; bad: @@ -1124,9 +1124,9 @@ nd6_na_output_fib(struct ifnet *ifp, con icmp6_ifstat_inc(ifp, ifs6_out_neighboradvert); ICMP6STAT_INC(icp6s_outhist[ND_NEIGHBOR_ADVERT]); - if (ro.ro_rt) { /* we don't cache this route. */ - RTFREE(ro.ro_rt); - } + /* We don't cache this route. */ + RO_RTFREE(&ro); + return; bad: From owner-svn-src-all@FreeBSD.ORG Wed Jul 4 07:42:12 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C2FD7106566C; Wed, 4 Jul 2012 07:42:12 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ADF828FC0A; Wed, 4 Jul 2012 07:42:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q647gCtk096243; Wed, 4 Jul 2012 07:42:12 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q647gC7k096241; Wed, 4 Jul 2012 07:42:12 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201207040742.q647gC7k096241@svn.freebsd.org> From: Gleb Smirnoff Date: Wed, 4 Jul 2012 07:42:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238093 - head/share/man/man9 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jul 2012 07:42:12 -0000 Author: glebius Date: Wed Jul 4 07:42:12 2012 New Revision: 238093 URL: http://svn.freebsd.org/changeset/base/238093 Log: Document RO_RTFREE() macro. Modified: head/share/man/man9/rtalloc.9 Modified: head/share/man/man9/rtalloc.9 ============================================================================== --- head/share/man/man9/rtalloc.9 Wed Jul 4 07:37:53 2012 (r238092) +++ head/share/man/man9/rtalloc.9 Wed Jul 4 07:42:12 2012 (r238093) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 14, 2011 +.Dd July 4, 2012 .Dt RTALLOC 9 .Os .Sh NAME @@ -52,6 +52,7 @@ .Fn RT_UNLOCK "struct rt_entry *rt" .Fn RT_ADDREF "struct rt_entry *rt" .Fn RT_REMREF "struct rt_entry *rt" +.Fn RO_RTFREE "struct route *ro" .Ft void .Fn rtfree "struct rt_entry *rt" .Ft "struct rtentry *" @@ -203,6 +204,14 @@ Its usage is contrary to .Fn RT_ADDREF . .Pp The +.Fn RO_RTFREE +macro is used to free route entry that is referenced by struct route. +At certain circumstances the latter may not hold a reference on rtentry, +and +.Fn RO_RTFREE +treats such routes correctly. +.Pp +The .Fn rtfree function does the actual free of the routing table entry, and shouldn't be called directly by facilities, that just perform routing table lookups. From owner-svn-src-all@FreeBSD.ORG Wed Jul 4 09:02:13 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 668FC1065702; Wed, 4 Jul 2012 09:02:13 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4E86A8FC12; Wed, 4 Jul 2012 09:02:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6492DkV099533; Wed, 4 Jul 2012 09:02:13 GMT (envelope-from se@svn.freebsd.org) Received: (from se@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6492DqL099526; Wed, 4 Jul 2012 09:02:13 GMT (envelope-from se@svn.freebsd.org) Message-Id: <201207040902.q6492DqL099526@svn.freebsd.org> From: Stefan Esser Date: Wed, 4 Jul 2012 09:02:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238094 - head/usr.sbin/nscd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jul 2012 09:02:13 -0000 Author: se Date: Wed Jul 4 09:02:12 2012 New Revision: 238094 URL: http://svn.freebsd.org/changeset/base/238094 Log: Add the possibility to specify a threshold for the number of negative cache results required to have the cache return lookup failure. A new configuration parameter is introduced, which must be set to a value greater than 1 to activate this feature. The default behavior is unchanged. The purpose of this change is to allow probes for the existence of an entry (which are expected to fail), before that entry is added to one of the queried databases, without the cache returning the stale information from the probe query until that cache entry expires. If, for example, a new user account is created after checking that the new account name is available, the negative cache entry would prevent immediate access to the account. For that example, the new configuration option negative-confidence-threshold passwd 2 will require a second negative query result to consider the negative cache entry for a passwd entry valid, but if the user account has been created between the queries, then the positive query result from the second query will be cached and returned. Modified: head/usr.sbin/nscd/cachelib.c head/usr.sbin/nscd/cachelib.h head/usr.sbin/nscd/config.c head/usr.sbin/nscd/config.h head/usr.sbin/nscd/nscd.conf.5 head/usr.sbin/nscd/parser.c Modified: head/usr.sbin/nscd/cachelib.c ============================================================================== --- head/usr.sbin/nscd/cachelib.c Wed Jul 4 07:42:12 2012 (r238093) +++ head/usr.sbin/nscd/cachelib.c Wed Jul 4 09:02:12 2012 (r238094) @@ -726,6 +726,12 @@ cache_read(struct cache_entry_ *entry, c TRACE_OUT(cache_read); return (-1); } + /* pretend that entry was not found if confidence is below threshold*/ + if (find_res->confidence < + common_entry->common_params.confidence_threshold) { + TRACE_OUT(cache_read); + return (-1); + } if ((common_entry->common_params.max_lifetime.tv_sec != 0) || (common_entry->common_params.max_lifetime.tv_usec != 0)) { @@ -826,6 +832,24 @@ cache_write(struct cache_entry_ *entry, item = HASHTABLE_GET_ENTRY(&(common_entry->items), hash); find_res = HASHTABLE_ENTRY_FIND(cache_ht_, item, &item_data); if (find_res != NULL) { + if (find_res->confidence < common_entry->common_params.confidence_threshold) { + /* duplicate entry is no error, if confidence is low */ + if ((find_res->value_size == value_size) && + (memcmp(find_res->value, value, value_size) == 0)) { + /* increase confidence on exact match (key and values) */ + find_res->confidence++; + } else { + /* create new entry with low confidence, if value changed */ + free(item_data.value); + item_data.value = malloc(value_size); + assert(item_data.value != NULL); + memcpy(item_data.value, value, value_size); + item_data.value_size = value_size; + find_res->confidence = 1; + } + TRACE_OUT(cache_write); + return (0); + } TRACE_OUT(cache_write); return (-1); } @@ -839,6 +863,8 @@ cache_write(struct cache_entry_ *entry, memcpy(item_data.value, value, value_size); item_data.value_size = value_size; + item_data.confidence = 1; + policy_item = common_entry->policies[0]->create_item_func(); policy_item->key = item_data.key; policy_item->key_size = item_data.key_size; Modified: head/usr.sbin/nscd/cachelib.h ============================================================================== --- head/usr.sbin/nscd/cachelib.h Wed Jul 4 07:42:12 2012 (r238093) +++ head/usr.sbin/nscd/cachelib.h Wed Jul 4 09:02:12 2012 (r238094) @@ -92,6 +92,7 @@ struct common_cache_entry_params { size_t satisf_elemsize; /* if entry size is exceeded, * this number of elements will be left, * others will be deleted */ + int confidence_threshold; /* number matching replies required */ struct timeval max_lifetime; /* if 0 then no check is made */ enum cache_policy_t policy; /* policy used for transformations */ }; @@ -116,6 +117,7 @@ struct cache_ht_item_data_ { size_t value_size; struct cache_policy_item_ *fifo_policy_item; + int confidence; /* incremented for each verification */ }; struct cache_ht_item_ { Modified: head/usr.sbin/nscd/config.c ============================================================================== --- head/usr.sbin/nscd/config.c Wed Jul 4 07:42:12 2012 (r238093) +++ head/usr.sbin/nscd/config.c Wed Jul 4 09:02:12 2012 (r238094) @@ -209,6 +209,7 @@ create_def_configuration_entry(const cha positive_params.max_elemsize = DEFAULT_POSITIVE_ELEMENTS_SIZE; positive_params.satisf_elemsize = DEFAULT_POSITIVE_ELEMENTS_SIZE / 2; positive_params.max_lifetime.tv_sec = DEFAULT_POSITIVE_LIFETIME; + positive_params.confidence_threshold = DEFAULT_POSITIVE_CONF_THRESH; positive_params.policy = CPT_LRU; memcpy(&negative_params, &positive_params, @@ -216,6 +217,7 @@ create_def_configuration_entry(const cha negative_params.max_elemsize = DEFAULT_NEGATIVE_ELEMENTS_SIZE; negative_params.satisf_elemsize = DEFAULT_NEGATIVE_ELEMENTS_SIZE / 2; negative_params.max_lifetime.tv_sec = DEFAULT_NEGATIVE_LIFETIME; + negative_params.confidence_threshold = DEFAULT_NEGATIVE_CONF_THRESH; negative_params.policy = CPT_FIFO; memset(&default_common_timeout, 0, sizeof(struct timeval)); Modified: head/usr.sbin/nscd/config.h ============================================================================== --- head/usr.sbin/nscd/config.h Wed Jul 4 07:42:12 2012 (r238093) +++ head/usr.sbin/nscd/config.h Wed Jul 4 09:02:12 2012 (r238094) @@ -44,9 +44,11 @@ #define DEFAULT_POSITIVE_ELEMENTS_SIZE (2048) #define DEFAULT_POSITIVE_LIFETIME (3600) +#define DEFAULT_POSITIVE_CONF_THRESH (1) #define DEFAULT_NEGATIVE_ELEMENTS_SIZE (2048) #define DEFAULT_NEGATIVE_LIFETIME (60) +#define DEFAULT_NEGATIVE_CONF_THRESH (1) /* (2) ??? */ #define DEFAULT_MULTIPART_ELEMENTS_SIZE (1024 * 8) #define DEFAULT_MULITPART_SESSIONS_SIZE (1024) Modified: head/usr.sbin/nscd/nscd.conf.5 ============================================================================== --- head/usr.sbin/nscd/nscd.conf.5 Wed Jul 4 07:42:12 2012 (r238093) +++ head/usr.sbin/nscd/nscd.conf.5 Wed Jul 4 09:02:12 2012 (r238094) @@ -102,6 +102,17 @@ The same as the positive-policy, but thi elements of the given .Ar cachename . The default policy is fifo. +.It Va negative-confidence-threshold Oo Ar cachename Oc Op Ar value +The number of times a query must have failed before the cache accepts +that the element can not be found. +At the default value of 1 each negative query result is cached and +immediately returned from the cache on further queries. +Higher numbers cause queries to be retried at the configured data +sources the given number of times, before the negative result is +returned from the cache on further queries. +This allows to probe for the existence of an entry, and then to create +it if it did not exist, without the negative probe result preventing +access to the new entry for the duration of the negative TTL. .It Va suggested-size Oo Ar cachename Oc Op Ar value This is the internal hash table size. The value should be a prime number for optimum performance. Modified: head/usr.sbin/nscd/parser.c ============================================================================== --- head/usr.sbin/nscd/parser.c Wed Jul 4 07:42:12 2012 (r238093) +++ head/usr.sbin/nscd/parser.c Wed Jul 4 09:02:12 2012 (r238094) @@ -167,6 +167,38 @@ set_negative_time_to_live(struct configu TRACE_OUT(set_negative_time_to_live); } +static void +set_positive_confidence_threshold(struct configuration *config, + const char *entry_name, int conf_thresh) +{ + struct configuration_entry *entry; + + TRACE_IN(set_positive_conf_thresh); + assert(conf_thresh > 0); + assert(entry_name != NULL); + + entry = find_create_entry(config, entry_name); + assert(entry != NULL); + entry->positive_cache_params.confidence_threshold = conf_thresh; + + TRACE_OUT(set_positive_conf_thresh); +} + +static void +set_negative_confidence_threshold(struct configuration *config, + const char *entry_name, int conf_thresh) +{ + struct configuration_entry *entry; + + TRACE_IN(set_negative_conf_thresh); + assert(conf_thresh > 0); + assert(entry_name != NULL); + entry = find_create_entry(config, entry_name); + assert(entry != NULL); + entry->negative_cache_params.confidence_threshold = conf_thresh; + TRACE_OUT(set_negative_conf_thresh); +} + /* * Hot count is actually the elements size limit. */ @@ -393,6 +425,12 @@ parse_config_file(struct configuration * fields[1], value); continue; } else if ((field_count == 3) && + (strcmp(fields[0], "positive-confidence-threshold") == 0) && + ((value = get_number(fields[2], 1, -1)) != -1)) { + set_positive_confidence_threshold(config, + fields[1], value); + continue; + } else if ((field_count == 3) && (strcmp(fields[0], "positive-policy") == 0) && (check_cachename(fields[1]) == 0) && ((value = get_policy(fields[2])) != -1)) { @@ -416,6 +454,12 @@ parse_config_file(struct configuration * fields[1], value); continue; } else if ((field_count == 3) && + (strcmp(fields[0], "negative-confidence-threshold") == 0) && + ((value = get_number(fields[2], 1, -1)) != -1)) { + set_negative_confidence_threshold(config, + fields[1], value); + continue; + } else if ((field_count == 3) && (strcmp(fields[0], "negative-policy") == 0) && (check_cachename(fields[1]) == 0) && ((value = get_policy(fields[2])) != -1)) { From owner-svn-src-all@FreeBSD.ORG Wed Jul 4 10:17:03 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 899FD1065670; Wed, 4 Jul 2012 10:17:03 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 721B28FC12; Wed, 4 Jul 2012 10:17:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q64AH31O002742; Wed, 4 Jul 2012 10:17:03 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q64AH3lo002740; Wed, 4 Jul 2012 10:17:03 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201207041017.q64AH3lo002740@svn.freebsd.org> From: Joel Dahl Date: Wed, 4 Jul 2012 10:17:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238095 - head/usr.sbin/nscd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jul 2012 10:17:03 -0000 Author: joel (doc committer) Date: Wed Jul 4 10:17:02 2012 New Revision: 238095 URL: http://svn.freebsd.org/changeset/base/238095 Log: Remove end of line whitespace. Modified: head/usr.sbin/nscd/nscd.conf.5 Modified: head/usr.sbin/nscd/nscd.conf.5 ============================================================================== --- head/usr.sbin/nscd/nscd.conf.5 Wed Jul 4 09:02:12 2012 (r238094) +++ head/usr.sbin/nscd/nscd.conf.5 Wed Jul 4 10:17:02 2012 (r238095) @@ -105,13 +105,13 @@ The default policy is fifo. .It Va negative-confidence-threshold Oo Ar cachename Oc Op Ar value The number of times a query must have failed before the cache accepts that the element can not be found. -At the default value of 1 each negative query result is cached and +At the default value of 1 each negative query result is cached and immediately returned from the cache on further queries. -Higher numbers cause queries to be retried at the configured data -sources the given number of times, before the negative result is +Higher numbers cause queries to be retried at the configured data +sources the given number of times, before the negative result is returned from the cache on further queries. -This allows to probe for the existence of an entry, and then to create -it if it did not exist, without the negative probe result preventing +This allows to probe for the existence of an entry, and then to create +it if it did not exist, without the negative probe result preventing access to the new entry for the duration of the negative TTL. .It Va suggested-size Oo Ar cachename Oc Op Ar value This is the internal hash table size. From owner-svn-src-all@FreeBSD.ORG Wed Jul 4 13:37:44 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D1313106564A; Wed, 4 Jul 2012 13:37:44 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BEC1E8FC17; Wed, 4 Jul 2012 13:37:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q64Dbi1a013383; Wed, 4 Jul 2012 13:37:44 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q64Dbiip013381; Wed, 4 Jul 2012 13:37:44 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201207041337.q64Dbiip013381@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Wed, 4 Jul 2012 13:37:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238102 - head/etc/rc.d X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jul 2012 13:37:44 -0000 Author: des Date: Wed Jul 4 13:37:44 2012 New Revision: 238102 URL: http://svn.freebsd.org/changeset/base/238102 Log: Name jails automatically. MFC after: 1 week Modified: head/etc/rc.d/jail Modified: head/etc/rc.d/jail ============================================================================== --- head/etc/rc.d/jail Wed Jul 4 13:00:48 2012 (r238101) +++ head/etc/rc.d/jail Wed Jul 4 13:37:44 2012 (r238102) @@ -641,7 +641,7 @@ jail_start() i=$((i + 1)) done - eval ${_setfib} jail ${_flags} -i ${_rootdir} ${_hostname} \ + eval ${_setfib} jail ${_flags} -n ${_jail} -i ${_rootdir} ${_hostname} \ \"${_addrl}\" ${_exec_start} > ${_tmp_jail} 2>&1 \ Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 47AF2106564A; Wed, 4 Jul 2012 14:21:41 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1AD1A8FC0A; Wed, 4 Jul 2012 14:21:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q64ELeH2015185; Wed, 4 Jul 2012 14:21:40 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q64ELe8a015184; Wed, 4 Jul 2012 14:21:40 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201207041421.q64ELe8a015184@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Wed, 4 Jul 2012 14:21:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238103 - in vendor: ldns ldns/dist unbound unbound/dist X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jul 2012 14:21:41 -0000 Author: des Date: Wed Jul 4 14:21:40 2012 New Revision: 238103 URL: http://svn.freebsd.org/changeset/base/238103 Log: Create vendor trees for ldns and unbound. Added: vendor/ldns/ vendor/ldns/dist/ vendor/unbound/ vendor/unbound/dist/ From owner-svn-src-all@FreeBSD.ORG Wed Jul 4 14:22:30 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2118A106566C; Wed, 4 Jul 2012 14:22:30 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 09C6B8FC08; Wed, 4 Jul 2012 14:22:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q64EMT0e015267; Wed, 4 Jul 2012 14:22:29 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q64EMThr015262; Wed, 4 Jul 2012 14:22:29 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201207041422.q64EMThr015262@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Wed, 4 Jul 2012 14:22:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238104 - in vendor/ldns/dist: . compat contrib contrib/ldnsx contrib/ldnsx/examples contrib/ldnsx/source contrib/ldnsx/source/api contrib/ldnsx/source/examples contrib/python contrib/p... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jul 2012 14:22:30 -0000 Author: des Date: Wed Jul 4 14:22:28 2012 New Revision: 238104 URL: http://svn.freebsd.org/changeset/base/238104 Log: import ldns 1.6.13 Added: vendor/ldns/dist/Changelog vendor/ldns/dist/LICENSE vendor/ldns/dist/Makefile.in vendor/ldns/dist/README vendor/ldns/dist/README.snapshots vendor/ldns/dist/README.svn vendor/ldns/dist/aclocal.m4 vendor/ldns/dist/acx_nlnetlabs.m4 vendor/ldns/dist/ax_pkg_swig.m4 vendor/ldns/dist/ax_python_devel.m4 vendor/ldns/dist/buffer.c vendor/ldns/dist/compat/ vendor/ldns/dist/compat/b32_ntop.c vendor/ldns/dist/compat/b32_pton.c vendor/ldns/dist/compat/b64_ntop.c vendor/ldns/dist/compat/b64_pton.c vendor/ldns/dist/compat/calloc.c vendor/ldns/dist/compat/ctime_r.c vendor/ldns/dist/compat/fake-rfc2553.c vendor/ldns/dist/compat/fake-rfc2553.h vendor/ldns/dist/compat/gmtime_r.c vendor/ldns/dist/compat/inet_aton.c vendor/ldns/dist/compat/inet_ntop.c vendor/ldns/dist/compat/inet_pton.c vendor/ldns/dist/compat/isascii.c vendor/ldns/dist/compat/isblank.c vendor/ldns/dist/compat/localtime_r.c vendor/ldns/dist/compat/malloc.c vendor/ldns/dist/compat/memmove.c vendor/ldns/dist/compat/realloc.c vendor/ldns/dist/compat/snprintf.c vendor/ldns/dist/compat/strlcpy.c vendor/ldns/dist/compat/timegm.c vendor/ldns/dist/config.guess (contents, props changed) vendor/ldns/dist/config.sub (contents, props changed) vendor/ldns/dist/configure (contents, props changed) vendor/ldns/dist/configure.ac vendor/ldns/dist/contrib/ vendor/ldns/dist/contrib/NETLDNS.readme.txt vendor/ldns/dist/contrib/NETLDNS.tar.gz (contents, props changed) vendor/ldns/dist/contrib/build-solaris.sh (contents, props changed) vendor/ldns/dist/contrib/ldnsx/ vendor/ldns/dist/contrib/ldnsx/LICENSE vendor/ldns/dist/contrib/ldnsx/Makefile vendor/ldns/dist/contrib/ldnsx/README vendor/ldns/dist/contrib/ldnsx/examples/ vendor/ldns/dist/contrib/ldnsx/examples/ldnsx-axfr.py vendor/ldns/dist/contrib/ldnsx/examples/ldnsx-dnssec.py vendor/ldns/dist/contrib/ldnsx/examples/ldnsx-mx1.py vendor/ldns/dist/contrib/ldnsx/examples/ldnsx-mx2.py vendor/ldns/dist/contrib/ldnsx/examples/ldnsx-walk.py (contents, props changed) vendor/ldns/dist/contrib/ldnsx/ldnsx.py vendor/ldns/dist/contrib/ldnsx/source/ vendor/ldns/dist/contrib/ldnsx/source/api/ vendor/ldns/dist/contrib/ldnsx/source/api/ldnsx.rst vendor/ldns/dist/contrib/ldnsx/source/api/packet.rst vendor/ldns/dist/contrib/ldnsx/source/api/resolver.rst vendor/ldns/dist/contrib/ldnsx/source/api/resource_record.rst vendor/ldns/dist/contrib/ldnsx/source/conf.py vendor/ldns/dist/contrib/ldnsx/source/examples/ vendor/ldns/dist/contrib/ldnsx/source/examples/ldnsx-axfr.rst vendor/ldns/dist/contrib/ldnsx/source/examples/ldnsx-dnssec.rst vendor/ldns/dist/contrib/ldnsx/source/examples/ldnsx-mx1.rst vendor/ldns/dist/contrib/ldnsx/source/examples/ldnsx-mx2.rst vendor/ldns/dist/contrib/ldnsx/source/examples/ldnsx-walk.rst vendor/ldns/dist/contrib/ldnsx/source/index.rst vendor/ldns/dist/contrib/python/ vendor/ldns/dist/contrib/python/LICENSE vendor/ldns/dist/contrib/python/Makefile vendor/ldns/dist/contrib/python/docs/ vendor/ldns/dist/contrib/python/docs/Makefile vendor/ldns/dist/contrib/python/docs/source/ vendor/ldns/dist/contrib/python/docs/source/_static/ vendor/ldns/dist/contrib/python/docs/source/conf.py vendor/ldns/dist/contrib/python/docs/source/examples/ vendor/ldns/dist/contrib/python/docs/source/examples/example1.rst vendor/ldns/dist/contrib/python/docs/source/examples/example2.py (contents, props changed) vendor/ldns/dist/contrib/python/docs/source/examples/example2.rst vendor/ldns/dist/contrib/python/docs/source/examples/example3.rst vendor/ldns/dist/contrib/python/docs/source/examples/example4.rst vendor/ldns/dist/contrib/python/docs/source/examples/example5.rst vendor/ldns/dist/contrib/python/docs/source/examples/example6.rst vendor/ldns/dist/contrib/python/docs/source/examples/example7.rst vendor/ldns/dist/contrib/python/docs/source/examples/example8.rst vendor/ldns/dist/contrib/python/docs/source/examples/index.rst vendor/ldns/dist/contrib/python/docs/source/index.rst vendor/ldns/dist/contrib/python/docs/source/install.rst vendor/ldns/dist/contrib/python/docs/source/modules/ vendor/ldns/dist/contrib/python/docs/source/modules/ldns.rst vendor/ldns/dist/contrib/python/docs/source/modules/ldns_buffer.rst vendor/ldns/dist/contrib/python/docs/source/modules/ldns_dname.rst vendor/ldns/dist/contrib/python/docs/source/modules/ldns_dnssec.rst vendor/ldns/dist/contrib/python/docs/source/modules/ldns_func.rst vendor/ldns/dist/contrib/python/docs/source/modules/ldns_key.rst vendor/ldns/dist/contrib/python/docs/source/modules/ldns_key_list.rst vendor/ldns/dist/contrib/python/docs/source/modules/ldns_pkt.rst vendor/ldns/dist/contrib/python/docs/source/modules/ldns_rdf.rst vendor/ldns/dist/contrib/python/docs/source/modules/ldns_resolver.rst vendor/ldns/dist/contrib/python/docs/source/modules/ldns_rr.rst vendor/ldns/dist/contrib/python/docs/source/modules/ldns_rr_list.rst vendor/ldns/dist/contrib/python/docs/source/modules/ldns_zone.rst vendor/ldns/dist/contrib/python/examples/ vendor/ldns/dist/contrib/python/examples/ldns-axfr.py (contents, props changed) vendor/ldns/dist/contrib/python/examples/ldns-buf.py (contents, props changed) vendor/ldns/dist/contrib/python/examples/ldns-dnssec.py (contents, props changed) vendor/ldns/dist/contrib/python/examples/ldns-higher.py (contents, props changed) vendor/ldns/dist/contrib/python/examples/ldns-keygen.py (contents, props changed) vendor/ldns/dist/contrib/python/examples/ldns-mx.py (contents, props changed) vendor/ldns/dist/contrib/python/examples/ldns-mx1.py (contents, props changed) vendor/ldns/dist/contrib/python/examples/ldns-mx2.py (contents, props changed) vendor/ldns/dist/contrib/python/examples/ldns-newpkt.py (contents, props changed) vendor/ldns/dist/contrib/python/examples/ldns-signzone.py (contents, props changed) vendor/ldns/dist/contrib/python/examples/ldns-zone.py (contents, props changed) vendor/ldns/dist/contrib/python/examples/ldns_rr_iter_frm_fp_l.demo.py vendor/ldns/dist/contrib/python/examples/ldns_rr_new_frm_fp_l.demo.py vendor/ldns/dist/contrib/python/examples/python3/ vendor/ldns/dist/contrib/python/examples/python3/ldns-axfr.py (contents, props changed) vendor/ldns/dist/contrib/python/examples/python3/ldns-buf.py (contents, props changed) vendor/ldns/dist/contrib/python/examples/python3/ldns-dnssec.py (contents, props changed) vendor/ldns/dist/contrib/python/examples/python3/ldns-higher.py (contents, props changed) vendor/ldns/dist/contrib/python/examples/python3/ldns-keygen.py (contents, props changed) vendor/ldns/dist/contrib/python/examples/python3/ldns-mx.py (contents, props changed) vendor/ldns/dist/contrib/python/examples/python3/ldns-mx1.py (contents, props changed) vendor/ldns/dist/contrib/python/examples/python3/ldns-mx2.py (contents, props changed) vendor/ldns/dist/contrib/python/examples/python3/ldns-newpkt.py (contents, props changed) vendor/ldns/dist/contrib/python/examples/python3/ldns-zone.py (contents, props changed) vendor/ldns/dist/contrib/python/examples/python3/ldns_rr_iter_frm_fp_l.demo.py vendor/ldns/dist/contrib/python/examples/python3/ldns_rr_new_frm_fp_l.demo.py vendor/ldns/dist/contrib/python/examples/zone.txt vendor/ldns/dist/contrib/python/file_py3.i vendor/ldns/dist/contrib/python/ldns.i vendor/ldns/dist/contrib/python/ldns_buffer.i vendor/ldns/dist/contrib/python/ldns_dname.i vendor/ldns/dist/contrib/python/ldns_dnssec.i vendor/ldns/dist/contrib/python/ldns_key.i vendor/ldns/dist/contrib/python/ldns_packet.i vendor/ldns/dist/contrib/python/ldns_rdf.i vendor/ldns/dist/contrib/python/ldns_resolver.i vendor/ldns/dist/contrib/python/ldns_rr.i vendor/ldns/dist/contrib/python/ldns_zone.i vendor/ldns/dist/dname.c vendor/ldns/dist/dnssec.c vendor/ldns/dist/dnssec_sign.c vendor/ldns/dist/dnssec_verify.c vendor/ldns/dist/dnssec_zone.c vendor/ldns/dist/doc/ vendor/ldns/dist/doc/API-header.xml (contents, props changed) vendor/ldns/dist/doc/API.xml (contents, props changed) vendor/ldns/dist/doc/CodingStyle vendor/ldns/dist/doc/TODO vendor/ldns/dist/doc/design.dox vendor/ldns/dist/doc/dns-lib-implementations vendor/ldns/dist/doc/doxyparse.pl (contents, props changed) vendor/ldns/dist/doc/function_manpages vendor/ldns/dist/doc/header.html vendor/ldns/dist/doc/images/ vendor/ldns/dist/doc/images/LogoInGradientBar2-y100.png (contents, props changed) vendor/ldns/dist/doc/images/libdnsoverview.png (contents, props changed) vendor/ldns/dist/doc/images/libdnsoverview.svg (contents, props changed) vendor/ldns/dist/doc/libdns.css vendor/ldns/dist/doc/tutorial1_mx.dox vendor/ldns/dist/doc/tutorial2_zone.dox vendor/ldns/dist/doc/tutorial3_signzone.dox vendor/ldns/dist/drill/ vendor/ldns/dist/drill/ChangeLog.22-nov-2005 vendor/ldns/dist/drill/Makefile.in vendor/ldns/dist/drill/README vendor/ldns/dist/drill/REGRESSIONS vendor/ldns/dist/drill/chasetrace.c vendor/ldns/dist/drill/config.h.in vendor/ldns/dist/drill/configure (contents, props changed) vendor/ldns/dist/drill/configure.ac vendor/ldns/dist/drill/dnssec.c vendor/ldns/dist/drill/drill.1 vendor/ldns/dist/drill/drill.c vendor/ldns/dist/drill/drill.h vendor/ldns/dist/drill/drill_util.c vendor/ldns/dist/drill/drill_util.h vendor/ldns/dist/drill/error.c vendor/ldns/dist/drill/install-sh (contents, props changed) vendor/ldns/dist/drill/root.c vendor/ldns/dist/drill/securetrace.c vendor/ldns/dist/drill/work.c vendor/ldns/dist/duration.c vendor/ldns/dist/error.c vendor/ldns/dist/examples/ vendor/ldns/dist/examples/Makefile.in vendor/ldns/dist/examples/README vendor/ldns/dist/examples/config.h.in vendor/ldns/dist/examples/configure (contents, props changed) vendor/ldns/dist/examples/configure.ac vendor/ldns/dist/examples/fake-rfc2553.h vendor/ldns/dist/examples/ldns-chaos.1 vendor/ldns/dist/examples/ldns-chaos.c vendor/ldns/dist/examples/ldns-compare-zones.1 vendor/ldns/dist/examples/ldns-compare-zones.c vendor/ldns/dist/examples/ldns-dpa.1 vendor/ldns/dist/examples/ldns-dpa.c vendor/ldns/dist/examples/ldns-dpa.h vendor/ldns/dist/examples/ldns-gen-zone.1 vendor/ldns/dist/examples/ldns-gen-zone.c vendor/ldns/dist/examples/ldns-key2ds.1 vendor/ldns/dist/examples/ldns-key2ds.c vendor/ldns/dist/examples/ldns-keyfetcher.1 vendor/ldns/dist/examples/ldns-keyfetcher.c vendor/ldns/dist/examples/ldns-keygen.1 vendor/ldns/dist/examples/ldns-keygen.c vendor/ldns/dist/examples/ldns-mx.1 vendor/ldns/dist/examples/ldns-mx.c vendor/ldns/dist/examples/ldns-notify.1 vendor/ldns/dist/examples/ldns-notify.c vendor/ldns/dist/examples/ldns-nsec3-hash.1 vendor/ldns/dist/examples/ldns-nsec3-hash.c vendor/ldns/dist/examples/ldns-read-zone.1 vendor/ldns/dist/examples/ldns-read-zone.c vendor/ldns/dist/examples/ldns-resolver.1 vendor/ldns/dist/examples/ldns-resolver.c vendor/ldns/dist/examples/ldns-revoke.1 vendor/ldns/dist/examples/ldns-revoke.c vendor/ldns/dist/examples/ldns-rrsig.1 vendor/ldns/dist/examples/ldns-rrsig.c vendor/ldns/dist/examples/ldns-signzone.1 vendor/ldns/dist/examples/ldns-signzone.c vendor/ldns/dist/examples/ldns-test-edns.1 vendor/ldns/dist/examples/ldns-test-edns.c vendor/ldns/dist/examples/ldns-testns.1 vendor/ldns/dist/examples/ldns-testns.c vendor/ldns/dist/examples/ldns-testpkts.c vendor/ldns/dist/examples/ldns-testpkts.h vendor/ldns/dist/examples/ldns-update.1 vendor/ldns/dist/examples/ldns-update.c vendor/ldns/dist/examples/ldns-verify-zone.1 vendor/ldns/dist/examples/ldns-verify-zone.c vendor/ldns/dist/examples/ldns-version.1 vendor/ldns/dist/examples/ldns-version.c vendor/ldns/dist/examples/ldns-walk.1 vendor/ldns/dist/examples/ldns-walk.c vendor/ldns/dist/examples/ldns-zcat.1 vendor/ldns/dist/examples/ldns-zcat.c vendor/ldns/dist/examples/ldns-zsplit.1 vendor/ldns/dist/examples/ldns-zsplit.c vendor/ldns/dist/examples/ldnsd.1 vendor/ldns/dist/examples/ldnsd.c vendor/ldns/dist/higher.c vendor/ldns/dist/host2str.c vendor/ldns/dist/host2wire.c vendor/ldns/dist/install-sh (contents, props changed) vendor/ldns/dist/keys.c vendor/ldns/dist/ldns/ vendor/ldns/dist/ldns/buffer.h vendor/ldns/dist/ldns/common.h.in vendor/ldns/dist/ldns/config.h.in vendor/ldns/dist/ldns/dname.h vendor/ldns/dist/ldns/dnssec.h vendor/ldns/dist/ldns/dnssec_sign.h vendor/ldns/dist/ldns/dnssec_verify.h vendor/ldns/dist/ldns/dnssec_zone.h vendor/ldns/dist/ldns/duration.h vendor/ldns/dist/ldns/error.h vendor/ldns/dist/ldns/higher.h vendor/ldns/dist/ldns/host2str.h vendor/ldns/dist/ldns/host2wire.h vendor/ldns/dist/ldns/keys.h vendor/ldns/dist/ldns/ldns.h vendor/ldns/dist/ldns/net.h.in vendor/ldns/dist/ldns/packet.h vendor/ldns/dist/ldns/parse.h vendor/ldns/dist/ldns/rbtree.h vendor/ldns/dist/ldns/rdata.h vendor/ldns/dist/ldns/resolver.h vendor/ldns/dist/ldns/rr.h vendor/ldns/dist/ldns/rr_functions.h vendor/ldns/dist/ldns/sha1.h vendor/ldns/dist/ldns/sha2.h vendor/ldns/dist/ldns/str2host.h vendor/ldns/dist/ldns/tsig.h vendor/ldns/dist/ldns/update.h vendor/ldns/dist/ldns/util.h.in vendor/ldns/dist/ldns/wire2host.h vendor/ldns/dist/ldns/zone.h vendor/ldns/dist/ldns_symbols.def vendor/ldns/dist/libdns.doxygen vendor/ldns/dist/libdns.vim vendor/ldns/dist/linktest.c vendor/ldns/dist/ltmain.sh (contents, props changed) vendor/ldns/dist/net.c vendor/ldns/dist/packaging/ vendor/ldns/dist/packaging/fedora/ vendor/ldns/dist/packaging/fedora/ldns.spec vendor/ldns/dist/packaging/ldns-config.1 vendor/ldns/dist/packaging/ldns-config.in (contents, props changed) vendor/ldns/dist/packaging/libldns.pc.in vendor/ldns/dist/packet.c vendor/ldns/dist/parse.c vendor/ldns/dist/rbtree.c vendor/ldns/dist/rdata.c vendor/ldns/dist/resolver.c vendor/ldns/dist/rr.c vendor/ldns/dist/rr_functions.c vendor/ldns/dist/sha1.c vendor/ldns/dist/sha2.c vendor/ldns/dist/str2host.c vendor/ldns/dist/tsig.c vendor/ldns/dist/update.c vendor/ldns/dist/util.c vendor/ldns/dist/wire2host.c vendor/ldns/dist/zone.c Added: vendor/ldns/dist/Changelog ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/ldns/dist/Changelog Wed Jul 4 14:22:28 2012 (r238104) @@ -0,0 +1,704 @@ +1.6.13 2012-05-21 + * New -S option for ldns-verify-zone to chase signatures online. + * New -k option for ldns-verify-zone to validate using a trusted key. + * New inception and expiration margin options (-i and -e) to + ldns-verify-zone. + * New ldns_dnssec_zone_new_frm_fp and ldns_dnssec_zone_new_frm_fp_l + functions. + * New ldns_duration* functions (copied from OpenDNSSEC source) + * fix ldns-verify-zone to allow NSEC3 signatures to come before + the NSEC3 RR in all cases. Thanks Wolfgang Nagele. + * Zero the correct flag (opt-out) when creating NSEC3PARAMS. + Thanks Peter van Dijk. + * Canonicalize RRSIG's Signer's name too when validating, because + bind and unbound do that too. Thanks Peter van Dijk. + * bugfix #433: Allocate rdf using ldns_rdf_new in ldns_dname_label + * bugfix #432: Use LDNS_MALLOC & LDNS_FREE i.s.o. malloc & free + * bugfix #431: Added error message for LDNS_STATUS_INVALID_B32_EXT + * bugfix #427: Explicitely link ssl with the programs that use it. + * Fix reading \DDD: Error on values that are outside range (>255). + * bugfix #429: fix doxyparse.pl fails on NetBSD because specified + path to perl. + * New ECDSA support (RFC 6605), use --disable-ecdsa for older openssl. + * fix verifying denial of existence for DS's in NSEC3 Opt-Out zones. + Thanks John Barnitz + +1.6.12 2012-01-11 + * bugfix #413: Fix manpage source for srcdir != builddir + * Canonicalize the signers name rdata field in RRSIGs when signing + * Ignore minor version of Private-key-format (so v1.3 may be used) + * Allow a check_time to be given in stead of always checking against + the current time. With ldns-verify-zone the check_time can be set + with the -t option. + * Added functions for updating and manipulating SOA serial numbers. + ldns-read-zone has an option -S for updating and manipulating the + serial numbers. + * The library Makefile is now GNU and BSD make compatible. + * bugfix #419: NSEC3 validation of a name covered by a wildcard with + no data. + * Two new options (--with-drill and --with-examples) to the main + configure script (in the root of the source tree) to build drill + and examples too. + * Fix days_since_epoch to year_yday calculation on 32bits systems. + +1.6.11 2011-09-29 + * bugfix #394: Fix socket leak on errors + * bugfix #392: Apex only and percentage checks for ldns-verify-zone + (thanks Miek Gieben) + * bugfix #398: Allow NSEC RRSIGs before the NSEC3 in ldns-verify-zone + * Fix python site package path from sitelib to sitearch for pyldns. + * Fix python api to support python2 and python3 (thanks Karel Slany). + * bugfix #401: Correction of date/time functions algorithm and + prevention of an infinite loop therein + * bugfix #402: Correct the minimum and maximum number of rdata fields + in TSIG. (thanks David Keeler) + * bugfix #403: Fix heap overflow (thanks David Keeler) + * bugfix #404: Make parsing APL strings more robust + (thanks David Keeler) + * bugfix #391: Complete library assessment to prevent assertion errors + through ldns_rdf_size usage. + * Slightly more specific error messaging on wrong number of rdata + fields with the LDNS_STATUS_MISSING_RDATA_FIELDS_RRSIG and + LDNS_STATUS_MISSING_RDATA_FIELDS_KEY result codes. + * bugfix #406: More rigorous openssl result code handling to prevent + future crashes within openssl. + * Fix ldns_fetch_valid_domain_keys to search deeper than just one level + for a DNSKEY that signed a DS RR. (this function was used in the + check_dnssec_trace nagios module) + * bugfix #407: Canonicalize TSIG dnames and algorithm fields + * A new output specifier to accommodate configuration of what to show + in comment texts when converting host and/or wire-format data to + string. All conversion to string and printing functions have a new + version that have such a format specifier as an extra argument. + The default is changed so that only DNSKEY RR's are annotated with + an comment show the Key Tag of the DNSKEY. + * Fixed the ldns resolver to not mark a nameserver unreachable when + edns0 is tried unsuccessfully with size 4096 (no return packet came), + but to still try TCP. A big UDP packet might have been corrupted by + fragments dropping firewalls. + * Update of libdns.vim (thanks Miek Gieben) + * Added the ldnsx Python module to our contrib section, which adds even + more pythonisticism to the usage of ldns with Python. (Many thanks + to Christpher Olah and Paul Wouters) + The ldnsx module is automatically installed when --with-pyldns is + used with configuring, but may explicitly be excluded with the + --without-pyldnsx option to configure. + * bugfix #410: Fix clearing out temporary data on stack in sha2.c + * bugfix #411: Don't let empty non-terminal NSEC3s cause assertion failure. + +1.6.10 2011-05-31 + * New example tool added: ldns-gen-zone. + * bugfix #359: Serial-arithmetic for the inception and expiration + fields of a RRSIG and correctly converting them to broken-out time + information. + * bugfix #364: Slight performance increase of ldns-verifyzone. + * bugfix #367: Fix to allow glue records with the same name as the + delegation. + * Fix ldns-verifyzone to allow NSEC3-less records for NS rrsets *and* + glue when the zone is opt-out. + * bugfix #376: Adapt ldns_nsec3_salt, ldns_nsec3_iterations, + ldns_nsec3_flags and ldns_nsec3_algorithm to work for NSEC3PARAMS too. + * pyldns memory leaks fixed by Bedrich Kosata (at the cost of a bit + performance) + * Better handling of reference variables in ldns_rr_new_frm_fp_l from + pyldns, with a very nice generator function by Bedrich Kosata. + * Decoupling of the rdfs in rrs in the python wrappers to enable + the python garbage collector by Bedrich Kosata. + * bugfix #380: Minimizing effect of discrepancies in sizeof(bool) at + build time and when used. + * bugfix #383: Fix detection of empty nonterminals of multiple labels. + * Fixed the ommission of rrsets in nsec(3)s and rrsigs to all occluded + names (in stead of just the ones that contain glue only) and all + occluded records on the delegation points (in stead of just the glue). + * Clarify the operation of ldns_dnssec_mark_glue and the usage of + ldns_dnssec_node_next_nonglue functions in the documentation. + * Added function ldns_dnssec_mark_and_get_glue as an real fast + alternative for ldns_zone_glue_rr_list. + * Fix parse buffer overflow for max length domain names. + * Fix Makefile for U in environment, since wrong U is more common than + deansification necessity. + +1.6.9 2011-03-16 + * Fix creating NSEC(3) bitmaps: make array size 65536, + don't add doubles. + * Fix printout of escaped binary in TXT records. + * Parsing TXT records: don't skip starting whitespace that is quoted. + * bugfix #358: Check if memory was successfully allocated in + ldns_rdf2str(). + * Added more memory allocation checks in host2str.c + * python wrapper for ldns_fetch_valid_domain_keys by Bedrich Kosata. + * fix to compile python wrapper with swig 2.0.2. + * Don't fallback to SHA-1 when creating NSEC3 hash with another + algorithm identifier, fail instead (no other algorithm identifiers + are assigned yet). + +1.6.8 2011-01-24 + * Fix ldns zone, so that $TTL definition match RFC 2308. + * Fix lots of missing checks on allocation failures and parse of + NSEC with many types and max parse length in hosts_frm_fp routine + and off by one in read_anchor_file routine (thanks Dan Kaminsky and + Justin Ferguson). + * bugfix #335: Drill: Print both SHA-1 and SHA-256 corresponding DS + records. + * Print correct WHEN in query packet (is not always 1-1-1970) + * ldns-test-edns: new example tool that detects EDNS support. + * fix ldns_resolver_send without openssl. + * bugfix #342: patch for support for more CERT key types (RFC4398). + * bugfix #351: fix udp_send hang if UDP checksum error. + * fix set_bit (from NSEC3 sign) patch from Jan Komissar. + +1.6.7 2010-11-08 + * EXPERIMENTAL ecdsa implementation, please do not enable on real + servers. + * GOST code enabled by default (RFC 5933). + * bugfix #326: ignore whitespace between directives and their values. + * Header comment to advertise ldns_axfr_complete to check for + successfully completed zone transfers. + * read resolv.conf skips interface labels, e.g. %eth0. + * Fix drill verify NSEC3 denials. + * Use closesocket() on windows. + * Add ldns_get_signing_algorithm_by_name that understand aliases, + names changed to RFC names and aliases for compatibility added. + * bugfix: don't print final dot if the domain is relative. + * bugfix: resolver search continue when packet rcode != NOERROR. + * bugfix: resolver push all domains in search directive to list. + * bugfix: resolver search by default includes the root domain. + * bugfix: tcp read could fail on single octet recv. + * bugfix: read of RR in unknown syntax with missing fields. + * added ldns_pkt_tsig_sign_next() and ldns_pkt_tsig_verify_next() + to sign and verify TSIG RRs on subsequent messages + (section 4.4, RFC 2845, thanks to Michael Sheldon). + * bugfix: signer sigs nsecs with zsks only. + * bugfix #333: fix ldns_dname_absolute for name ending with backslash. + +1.6.6 2010-08-09 + * Fix ldns_rr_clone to copy question rrs properly. + * Fix ldns_sign_zone(_nsec3) to clone the soa for the new zone. + * Fix ldns_wire2dname size check from reading 1 byte beyond buffer end. + * Fix ldns_wire2dname from reading 1 byte beyond end for pointer. + * Fix crash using GOST for particular platform configurations. + * extern C declarations used in the header file. + * Removed debug fprintf from resolver.c. + * ldns-signzone checks if public key file is for the right zone. + * NETLDNS, .NET port of ldns functionality, by Alex Nicoll, in contrib. + * Fix handling of comments in resolv.conf parse. + * GOST code enabled if SSL recent, RFC 5933. + * bugfix #317: segfault util.c ldns_init_random() fixed. + * Fix ldns_tsig_mac_new: allocate enough memory for the hash, fix use of + b64_pton_calculate_size. + * Fix ldns_dname_cat: size calculation and handling of realloc(). + * Fix ldns_rr_pop_rdf: fix handling of realloc(). + * Fix ldns-signzone for single type key scheme: sign whole zone if there + are only KSKs. + * Fix ldns_resolver: also close socket if AXFR failed (if you don't, + it would block subsequent transfers (thanks Roland van Rijswijk). + * Fix drill: allow for a secure trace if you use DS records as trust + anchors (thanks Jan Komissar). + +1.6.5 2010-06-15 + * Catch \X where X is a digit as an error. + * Fix segfault when ip6 ldns resolver only has ip4 servers. + * Fix NSEC record after DNSKEY at zone apex not properly signed. + * Fix syntax error if last label too long and no dot at end of domain. + * Fix parse of \# syntax with space for type LOC. + * Fix ldns_dname_absolute for escape sequences, fixes some parse errs. + * bugfix #297: linking ssl, bug due to patch submitted as #296. + * bugfix #299: added missing declarations to host2str.h + * ldns-compare-zones -s to not exclude SOA record from comparison. + * --disable-rpath fix + * fix ldns_pkt_empty(), reported by Alex Nicoll. + * fix ldns_resolver_new_frm_fp not ignore lines after a comment. + * python code for ldns_rr.new_question_frm_str() + * Fix ldns_dnssec_verify_denial: the signature selection routine. + * Type TALINK parsed (draft-ietf-dnsop-trust-history). + * bugfix #304: fixed dead loop in ldns_tcp_read_wire() and + ldns_tcp_read_wire_timeout(). + * GOST support with correct algorithm numbers. The plan is to make it + enabled if openssl support is detected, but it is disabled by + default in this release because the RFC is not ready. + * Fixed comment in rbtree.h about being first member and data ptr. + * Fixed possibly leak in case of out of memory in ldns_native2rdf... + * ldns_dname_is_wildcard added. + * Fixed: signatures over wildcards had the wrong labelcount. + * Fixed ldns_verify() inconsistent return values. + * Fixed ldns_resolver to copy and free tsig name, data and algorithm. + * Fixed ldns_resolver to push search onto searchlist. + * A ldns resolver now defaults to a non-recursive resolver that handles + the TC bit. + * ldns_resolver_print() prints more details. + * Fixed ldns_rdf2buffer_str_time(), which did not print timestamps + on 64bit systems. + * Make ldns_resolver_nameservers_randomize() more random. + * bugfix #310: POSIX specifies NULL second argument of gettimeofday. + * fix compiler warnings from llvm clang compiler. + * bugfix #309: ldns_pkt_clone did not clone the tsig_rr. + * Fix gentoo ebuild for drill, 'no m4 directory'. + * bugfix #313: drill trace on an empty nonterminal continuation. + +1.6.4 2010-01-20 + * Imported pyldns contribution by Zdenek Vasicek and Karel Slany. + Changed its configure and Makefile to fit into ldns. + Added its dname_* methods to the rdf_* class (as is the ldns API). + Changed swig destroy of ldns_buffer class to ldns_buffer_free. + Declared ldns_pkt_all and ldns_pkt_all_noquestion so swig sees them. + * Bugfix: parse PTR target of .tomhendrikx.nl with error not crash. + * Bugfix: handle escaped characters in TXT rdata. + * bug292: no longer crash on malformed domain names where a label is + on position 255, which was a buffer overflow by one. + * Fix ldns_get_rr_list_hosts_frm_fp_l (strncpy to strlcpy change), + which fixes resolv.conf reading badly terminated string buffers. + * Fix ldns_pkt_set_random_id to be more random, and a little faster, + it did not do value 0 statistically correctly. + * Fix ldns_rdf2native_sockaddr_storage to set sockaddr type to zeroes, + for portability. + * bug295: nsec3-hash routine no longer case sensitive. + * bug298: drill failed nsec3 denial of existence proof. + +1.6.3 2009-12-04 + * Bugfix: allow for unknown resource records in zonefile with rdlen=0. + * Bugfix: also mark an RR as question if it comes from the wire + * Bugfix: NSEC3 bitmap contained NSEC + * Bugfix: Inherit class when creating signatures + +1.6.2 2009-11-12 + * Fix Makefile patch from Havard Eidnes, better install.sh usage. + * Fix parse error on SOA serial of 2910532839. + Fix print of ';' and readback of '\;' in names, also for '\\'. + Fix parse of '\(' and '\)' in names. Also for file read. Also '\.' + * Fix signature creation when TTLs are different for RRs in RRset. + * bug273: fix so EDNS rdata is included in pkt to wire conversion. + * bug274: fix use of c++ keyword 'class' for RR class in the code. + * bug275: fix memory leak of packet edns rdata. + * Fix timeout procedure for TCP and AXFR on Solaris. + * Fix occasional NSEC bitmap bogus + * Fix rr comparing (was in reversed order since 1.6.0) + * bug278: fix parsing HINFO rdata (and other cases). + * Fix previous owner name: also pick up if owner name is @. + * RFC5702: enabled sha2 functions by default. This requires OpenSSL 0.9.8 or higher. + Reason for this default is the root to be signed with RSASHA256. + * Fix various LDNS RR parsing issues: IPSECKEY, WKS, NSAP, very long lines + * Fix: Make ldns_dname_is_subdomain case insensitive. + * Fix ldns-verify-zone so that address records at zone NS set are not considered glue + (Or glue records fall below delegation) + * Fix LOC RR altitude printing. + * Feature: Added period (e.g. '3m6d') support at explicit TTLs. + * Feature: DNSKEY rrset by default signed with minimal signatures + but -A option for ldns-signzone to sign it with all keys. + This makes the DNSKEY responses smaller for signed domains. + +1.6.1 2009-09-14 + * --enable-gost : use the GOST algorithm (experimental). + * Added some missing options to drill manpage + * Some fixes to --without-ssl option + * Fixed quote parsing withing strings + * Bitmask fix in EDNS handling + * Fixed non-fqdn domain name completion for rdata field domain + names of length 1 + * Fixed chain validation with SHA256 DS records + +1.6.0 + Additions: + * Addition of an ldns-config script which gives cflags and libs + values, for use in configure scripts for applications that use + use ldns. Can be disabled with ./configure --disable-ldns-config + * Added direct sha1, sha256, and sha512 support in ldns. + With these functions, all NSEC3 functionality can still be + used, even if ldns is built without OpenSSL. Thanks to OpenBSD, + Steve Reid, and Aaron D. Gifford for the code. + * Added reading/writing support for the SPF Resource Record + * Base32 functions are now exported + Bugfixes: + * ldns_is_rrset did not go through the complete rrset, but + only compared the first two records. Thanks to Olafur + Gudmundsson for report and patch + * Fixed a small memory bug in ldns_rr_list_subtype_by_rdf(), + thanks to Marius Rieder for finding an patching this. + * --without-ssl should now work. Make sure that examples/ and + drill also get the --without-ssl flag on their configure, if + this is used. + * Some malloc() return value checks have been added + * NSEC3 creation has been improved wrt to empty nonterminals, + and opt-out. + * Fixed a bug in the parser when reading large NSEC3 salt + values. + * Made the allowed length for domain names on wire + and presentation format the same. + Example tools: + * ldns-key2ds can now also generate DS records for keys without + the SEP flag + * ldns-signzone now equalizes the TTL of the DNSKEY RRset (to + the first non-default DNSKEY TTL value it sees) + +1.5.1 + Example tools: + * ldns-signzone was broken in 1.5.0 for multiple keys, this + has been repaired + + Build system: + * Removed a small erroneous output warning in + examples/configure and drill/configure + +1.5.0 + Bug fixes: + * fixed a possible memory overflow in the RR parser + * build flag fix for Sun Studio + * fixed a building race condition in the copying of header + files + * EDNS0 extended rcode; the correct assembled code number + is now printed (still in the EDNS0 field, though) + * ldns_pkt_rr no longer leaks memory (in fact, it no longer + copies anything all) + + API addition: + * ldns_key now has support for 'external' data, in which + case the OpenSSL EVP structures are not used; + ldns_key_set_external_key() and ldns_key_external_key() + * added ldns_key_get_file_base_name() which creates a + 'default' filename base string for key storage, of the + form "K++" + * the ldns_dnssec_* family of structures now have deep_free() + functions, which also free the ldns_rr's contained in them + * there is now an ldns_match_wildcard() function, which checks + whether a domain name matches a wildcard name + * ldns_sign_public has been split up; this resulted in the + addition of ldns_create_empty_rrsig() and + ldns_sign_public_buffer() + + Examples: + * ldns-signzone can now automatically add DNSKEY records when + using an OpenSSL engine, as it already did when using key + files + * added new example tool: ldns-nsec3-hash + * ldns-dpa can now filter on specific query name and types + * ldnsd has fixes for the zone name, a fix for the return + value of recvfrom(), and an memory initialization fix + (Thanks to Colm MacCárthaigh for the patch) + * Fixed memory leaks in ldnsd + + + +1.4.1 + Bug fixes: + * fixed a build issue where ldns lib existence was done too early + * removed unnecessary check for pcap.h + * NSEC3 optout flag now correctly printed in string output + * inttypes.h moved to configured inclusion + * fixed NSEC3 type bitmaps for empty nonterminals and unsigned + delegations + + API addition: + * for that last fix, we added a new function + ldns_dname_add_from() that can clone parts of a dname + +1.4.0 + Bug fixes: + * sig chase return code fix (patch from Rafael Justo, bug id 189) + * rdata.c memory leaks on error and allocation checks fixed (patch + from Shane Kerr, bug id 188) + * zone.c memory leaks on error and allocation checks fixed (patch + from Shane Kerr, bug id 189) + * ldns-zplit output and error messages fixed (patch from Shane Kerr, + bug id 190) + * Fixed potential buffer overflow in ldns_str2rdf_dname + * Signing code no longer signs delegation NS rrsets + * Some minor configure/makefile updates + * Fixed a bug in the randomness initialization + * Fixed a bug in the reading of resolv.conf + * Fixed a bug concerning whitespace in zone data (with patch from Ondrej + Sury, bug 213) + * Fixed a small fallback problem in axfr client code + + API CHANGES: + * added 2str convenience functions: + - ldns_rr_type2str + - ldns_rr_class2str + - ldns_rr_type2buffer_str + - ldns_rr_class2buffer_str + * buffer2str() is now called ldns_buffer2str + * base32 and base64 function names are now also prepended with ldns_ + * ldns_rr_new_frm_str() now returns an error on missing RDATA fields. + Since you cannot read QUESTION section RRs with this anymore, + there is now a function called ldns_rr_new_question_frm_str() + + LIBRARY FEATURES: + * DS RRs string representation now add bubblebabble in a comment + (patch from Jakob Schlyter) + * DLV RR type added + * TCP fallback system has been improved + * HMAC-SHA256 TSIG support has been added. + * TTLS are now correcly set in NSEC(3) records when signing zones + + EXAMPLE TOOLS: + * New example: ldns-revoke to revoke DNSKEYs according to RFC5011 + * ldns-testpkts has been fixed and updated + * ldns-signzone now has the option to not add the DNSKEY + * ldns-signzone now has an (full zone only) opt-out option for + NSEC3 + * ldns-keygen can create HMAC-SHA1 and HMAC-SHA256 symmetric keys + * ldns-walk output has been fixed + * ldns-compare-zones has been fixed, and now has an option + to show all differences (-a) + * ldns-read-zone now has an option to print DNSSEC records only + +1.3 + Base library: + + * Added a new family of functions based around ldns_dnssec_zone, + which is a new structure that keeps a zone sorted through an + rbtree and links signatures and NSEC(3) records directly to their + RRset. These functions all start with ldns_dnssec_ + + * ldns_zone_sign and ldns_zone_sign_nsec3 are now deprecated, but + have been changed to internally use the new + ldns_dnssec_zone_sign(_nsec3) + + * Moved some ldns_buffer functions inline, so a clean rebuild of + applications relying on those is needed (otherwise you'll get + linker errors) + * ldns_dname_label now returns one extra (zero) + byte, so it can be seen as an fqdn. + * NSEC3 type code update for signing algorithms. + * DSA key generation of DNSKEY RRs fixed (one byte too small). + + * Added support for RSA/SHA256 and RSA/SHA512, as specified in + draft-ietf-dnsext-dnssec-rsasha256-04. The typecodes are not + final, and this feature is not enabled by default. It can be + enabled at compilation time with the flag --with-sha2 + + * Added 2wire_canonical family of functions that lowercase dnames + in rdata fields in resource records of the types in the list in + rfc3597 + + * Added base32 conversion functions. + + * Fixed DSA RRSIG conversion when calling OpenSSL + + Drill: + + * Chase output is completely different, it shows, in ascii, the + relations in the trust hierarchy. + + Examples: + * Added ldns-verify-zone, that can verify the internal DNSSEC records + of a signed BIND-style zone file + + * ldns-keygen now takes an -a argument specifying the algorithm, + instead of -R or -D. -a list show a list of supported algorithms + + * ldns-keygen now defaults to the exponent RSA_F4 instead of RSA_3 + for RSA key generation + + * ldns-signzone now has support for HSMs + * ldns-signzone uses the new ldns_dnssec_ structures and functions + which improves its speed, and output; RRSIGS are now placed + directly after their RRset, NSEC(3) records directly after the + name they handle + + Contrib: + * new contrib/ dir with user contributions + * added compilation script for solaris (thanks to Jakob Schlyter) + +28 Nov 2007 1.2.2: + * Added support for HMAC-MD5 keys in generator + * Added a new example tool (written by Ondrej Sury): ldns-compare-zones + * ldns-keygen now checks key sizes for rfc conformancy + * ldns-signzone outputs SSL error if present + * Fixed manpages (thanks to Ondrej Sury) + * Fixed Makefile for -j + * Fixed a $ORIGIN error when reading zones + * Fixed another off-by-one error + +03 Oct 2007 1.2.1: + * Fixed an offset error in rr comparison + * Fixed ldns-read-zone exit code + * Added check for availability of SHA256 hashing algorithm + * Fixed ldns-key2ds -2 argument + * Fixed $ORIGIN bug in .key files + * Output algorithms as an integer instead of their mnemonic + * Fixed a memory leak in dnssec code when SHA256 is not available + * Updated fedora .spec file + +11 Apr 2007 1.2.0: + * canonicalization of rdata in DNSSEC functions now adheres to the + rr type list in rfc3597, not rfc4035, which will be updated + (see http://www.ops.ietf.org/lists/namedroppers/namedroppers.2007/msg00183.html) + * ldns-walk now support dnames with maximum label length + * ldnsd now takes an extra argument containing the address to listen on + * signing no longer signs every rrset with KSK's, but only the DNSKEY rrset + * ported to Solaris 10 + * added ldns_send_buffer() function + * added ldns-testpkts fake packet server + * added ldns-notify to send NOTIFY packets + * ldns-dpa can now accurately calculate the number of matches per + second + * libtool is now used for compilation too (still gcc, but not directly) + * Bugfixes: + - TSIG signing buffer size + - resolv.conf reading (comments) + - dname comparison off by one error + - typo in keyfetchers output file name fixed (a . too much) + - fixed zone file parser when comments contain ( or ) + - fixed LOC RR type + - fixed CERT RR type + + Drill: + * drill prints error on failed axfr. + * drill now accepts mangled packets with -f + * old -c option (use tcp) changed to -t + * -c option to specify alternative resolv.conf file added + * feedback of signature chase improved + * chaser now stops at root when no trusted keys are found + instead of looping forever trying to find the DS for . + * Fixed bugs: + - wildcard on multiple labels signature verification + - error in -f packet writing for malformed packets + - made KSK check more resilient + +7 Jul 2006: 1.1.0: ldns-team + * Added tutorials and an introduction to the documentation + * Added include/ and lib/ dirs so that you can compile against ldns + without installing ldns on your system + * Makefile updates + * Starting usage of assert throughout the library to catch illegal calls + * Solaris 9 testing was carried out. Ldns now compiles on that + platform; some gnuism were identified and fixed. + * The ldns_zone structure was stress tested. The current setup + (ie. just a list of rrs) can scale to zone file in order of + megabytes. Sorting such zone is still difficult. + * Reading multiline b64 encoded rdata works. + * OpenSSL was made optional, configure --without-ssl. + Ofcourse all dnssec/tsig related functions are disabled + * Building of examples and drill now happens with the same + defines as the building of ldns itself. + * Preliminary sha-256 support was added. Currently is your + OpenSSL supports it, it is supported in the DS creation. + * ldns_resolver_search was implemented + * Fixed a lot of bugs + + Drill: + * -r was killed in favor of -o
which + allows for a header bits setting (and maybe more in the + future) + * DNSSEC is never automaticaly set, even when you query + for DNSKEY/RRSIG or DS. + * Implement a crude RTT check, it now distinguishes between + reachable and unreachable. + * A form of secure tracing was added + * Secure Chasing has been improved + * -x does a reverse lookup for the given IP address + + Examples: + * ldns-dpa was added to the examples - this is the Dns Packet + Analyzer tool. + * ldnsd - as very, very simple nameserver impl. + * ldns-zsplit - split zones for parrallel signing + * ldns-zcat - cat split zones back together + * ldns-keyfetcher - Fetches DNSKEY records with a few (non-strong, + non-DNSSEC) anti-spoofing techniques. + * ldns-walk - 'Walks' a DNSSEC signed zone + * Added an all-static target to the makefile so you can use examples + without installing the library + * When building in the source tree or in a direct subdirectory of + the build dir, configure does not need --with-ldns=../ anymore + + Code: + * All networking code was moved to net.c + * rdata.c: added asserts to the rdf set/get functions + * const keyword was added to pointer arguments that + aren't changed + + API: + Changed: + * renamed ldns/dns.h to ldns/ldns.h + * ldns_rr_new_frm_str() is extented with an extra variable which + in common use may be NULL. This trickles through to: + o ldns_rr_new_frm_fp + o ldns_rr_new_frm_fp_l + Which also get an extra variable + Also the function has been changed to return a status message. + The compiled RR is returned in the first argument. + * ldns_zone_new_frm_fp_l() and ldns_zone_new_frm_fp() are + changed to return a status msg. + * ldns_key_new_frm_fp is changed to return ldns_status and + the actual key list in the first argument + * ldns_rdata_new_frm_fp[_l]() are changed to return a status. + the rdf is return in the first argument + * ldns_resolver_new_frm_fp: same treatment: return status and + the new resolver in the first argument + * ldns_pkt_query_new_frm_str(): same: return status and the + packet in the first arg + * tsig.h: internal used functions are now static: + ldns_digest_name and ldns_tsig_mac_new + * ldns_key_rr2ds has an extra argument to specify the hash to + use. + * ldns_pkt_rcode() is renamed to ldns_pkt_get_rcode, ldns_pkt_rcode + is now the rcode type, like ldns_pkt_opcode + New: + * ldns_resolver_searchlist_count: return the searchlist counter + * ldns_zone_sort: Sort a zone + * ldns_bgsend(): background send, returns a socket. + * ldns_pkt_empty(): check is a packet is empty + * ldns_rr_list_pop_rr_list(): pop multiple rr's from another rr_list + * ldns_rr_list_push_rr_list(): push multiple rr's to an rr_list + * ldns_rr_list_compare(): compare 2 ldns_rr_lists + * ldns_pkt_push_rr_list: rr_list equiv for rr + * ldns_pkt_safe_push_rr_list: rr_list equiv for rr + Removed: + * ldns_resolver_bgsend(): was not used in 1.0.0 and is not used now + * ldns_udp_server_connect(): was faulty and isn't really part of + the core ldns idea any how. + * ldns_rr_list_insert_rr(): obsoleted, because not used. + * char *_when was removed from the ldns_pkt structure + +18 Oct 2005: 1.0.0: ldns-team + * Commited a patch from HÃ¥kan Olsson + * Added UPDATE support (Jakob Schlyter and HÃ¥kan Olsson) + * License change: ldns is now BSD licensed + * ldns now depends on SSL + * Networking code cleanup, added (some) server udp/tcp support + * A zone type is introduced. Currently this is a list + of RRs, so it will not scale well. + * [beta] Zonefile parsing was added + * [tools] Drill was added to ldns - see drill/ + * [tools] experimental signer was added + * [building] better check for ssl + * [building] major revision of build system + * [building] added rpm .spec in packaging/ (thanks to Paul Wouters) + * [building] A lot of cleanup in the build scripts (thanks to Jakob Schlyter + and Paul Wouters) + +28 Jul 2005: 0.70: ldns-team + * [func] ldns_pkt_get_section now returns copies from the rrlists + in the packet. This can be freed by the user program + * [code] added ldns_ prefixes to function from util.h + * [inst] removed documentation from default make install + * Usual fixes in documentation and code + +20 Jun 2005: 0.66: ldns-team + Rel. Focus: drill-pre2 uses some functions which are + not in 0.65 + * dnssec_cd bit function was added + * Zone infrastructure was added + * Usual fixes in documentation and code + +13 Jun 2005: 0.65: ldns-team + * Repository is online at: + http://www.nlnetlabs.nl/ldns/svn/ + * Apply reference copying throuhgout ldns, except in 2 + places in the ldns_resolver structure (._domain and + ._nameservers) + * Usual array of bugfixes + * Documentation added + * keygen.c added as an example for DNSSEC programming + +23 May 2005: 0.60: ldns-team + * Removed config.h from the header installed files + (you're not supposed to include that in a libary) + * Further tweaking + - DNSSEC signing/verification works + - Assorted bug fixes and tweaks (memory management) + +May 2005: 0.50: ldns-team + * First usable release + * Basic DNS functionality works + * DNSSEC validation works Added: vendor/ldns/dist/LICENSE ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/ldns/dist/LICENSE Wed Jul 4 14:22:28 2012 (r238104) @@ -0,0 +1,26 @@ +Copyright (c) 2005,2006, NLnetLabs +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * 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. + * Neither the name of NLnetLabs nor the names of its + contributors may be used to endorse or promote products derived from this + software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. Added: vendor/ldns/dist/Makefile.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/ldns/dist/Makefile.in Wed Jul 4 14:22:28 2012 (r238104) @@ -0,0 +1,1098 @@ +# Standard installation pathnames +# See the file LICENSE for the license +SHELL = @SHELL@ +VERSION = @PACKAGE_VERSION@ +version_info = @LIBTOOL_VERSION_INFO@ +srcdir = @srcdir@ +prefix = @prefix@ +exec_prefix = @exec_prefix@ +bindir = @bindir@ +mandir = @mandir@ +datarootdir = @datarootdir@ +datadir = @datadir@ +libdir = @libdir@ +includedir = @includedir@ +doxygen = @doxygen@ +pywrapdir = ${srcdir}/contrib/python +pyldnsxwrapdir = ${srcdir}/contrib/ldnsx +swig = @swig@ +swigpy_flags = -python @SWIGPY3@ +python_site = @PYTHON_SITE_PKG@ +pyldns_inst = @PYLDNSINST@ +pyldns_uninst = @PYLDNSUNINST@ +pyldnsx_inst = @PYLDNSXINST@ +pyldnsx_uninst = @PYLDNSXUNINST@ +libtool = @libtool@ + +# override $U variable which is used by autotools for deansification (for +# K&R C compilers), but causes problems if $U is defined in the env). +U= + +CC = @CC@ +CFLAGS = @CFLAGS@ +CPPFLAGS = -I. -I$(srcdir) @CPPFLAGS@ @DEFS@ +LDFLAGS = @LDFLAGS@ +LIBS = @LIBS@ +LIBOBJDIR = compat/ +LIBOBJS = @LIBOBJS@ +PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ +PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ +PYTHON_X_CFLAGS = @PYTHON_X_CFLAGS@ +LIBSSL_CPPFLAGS = @LIBSSL_CPPFLAGS@ +LIBSSL_LDFLAGS = @LIBSSL_LDFLAGS@ +LIBSSL_LIBS = @LIBSSL_LIBS@ +LIBPCAP_LIBS = @LIBPCAP_LIBS@ +RUNTIME_PATH = @RUNTIME_PATH@ +LIBTOOL = $(libtool) --tag=CC --quiet +LINT = splint +LINTFLAGS = +quiet -weak -warnposix -unrecog -Din_addr_t=uint32_t -Du_int=unsigned -Du_char=uint8_t -preproc -Drlimit=rlimit64 -D__gnuc_va_list=va_list +# Extra flags from configure +LINTFLAGS += @LINTFLAGS@ +LINTFLAGS += "-DBN_ULONG=unsigned long" -Dkrb5_int32=int "-Dkrb5_ui_4=unsigned int" -DPQ_64BIT=uint64_t -DRC4_INT=unsigned -fixedformalarray -D"ENGINE=unsigned" -D"RSA=unsigned" -D"DSA=unsigned" -D"EVP_PKEY=unsigned" -D"EVP_MD=unsigned" -D"SSL=unsigned" -D"SSL_CTX=unsigned" -D"X509=unsigned" -D"RC4_KEY=unsigned" -D"EVP_MD_CTX=unsigned" -D"EC_KEY=unsigned" -D"EC_POINT=unsigned" -D"EC_GROUP=unsigned" -D"EVP_PKEY_ASN1_METHOD=struct evp_pkey_asn1_method_st" -D"EVP_PKEY_CTX=struct evp_pkey_ctx_st" +# compat with OpenBSD +LINTFLAGS += "-Dsigset_t=long" +# FreeBSD8 +LINTFLAGS += "-D__uint16_t=uint16_t" -D"__pure2=" -D"__wchar_t=wchar_t" -D"__packed=" -D"__aligned(x)=" +# Ubuntu oneiric" +LINTFLAGS += -D"__BEGIN_DECLS=" -D"__ssize_t=ssize_t" -D"__intptr_t=intptr_t" -D"__nonnull(x)=" -D"__THROW=" -D"__wur=" -D"__off_t=unsigned" -D"__off64_t=unsigned" -D"__useconds_t=unsigned" -D"__uid_t=unsigned" -D"__gid_t=unsigned" -D"__attribute_deprecated__=" -D"__pid_t=unsigned" -D"__restrict=" -D"__END_DECLS=" -D"__BEGIN_NAMESPACE_STD=" -D"__END_NAMESPACE_STD=" -D"__BEGIN_NAMESPACE_C99=" -D"__END_NAMESPACE_C99=" -D"__socklen_t=unsigned" -D"sa_family_t=unsigned " -D"__mode_t=unsigned" -D"u_int16_t=uint16_t" -D"u_int32_t=uint32_t" -D"u_int8_t=uint8_t" -D"u_short=unsigned short" -D"__u16=uint16_t" -D"__u32=uint32_t" -D"__u64=uint64_t" +DEPFLAG = @DEPFLAG@ + +INSTALL = $(srcdir)/install-sh + +LIBLOBJS = $(LIBOBJS:.o=.lo) +LDNS_LOBJS = buffer.lo dname.lo dnssec.lo dnssec_sign.lo dnssec_verify.lo dnssec_zone.lo duration.lo error.lo higher.lo host2str.lo host2wire.lo keys.lo net.lo packet.lo parse.lo rbtree.lo rdata.lo resolver.lo rr.lo rr_functions.lo sha1.lo sha2.lo str2host.lo tsig.lo update.lo util.lo wire2host.lo zone.lo +LDNS_LOBJS_EX = ^linktest\.c$$ +LDNS_ALL_LOBJS = $(LDNS_LOBJS) $(LIBLOBJS) +LIB = libldns.la + +LDNS_HEADERS = buffer.h dname.h dnssec.h dnssec_sign.h dnssec_verify.h dnssec_zone.h duration.h error.h higher.h host2str.h host2wire.h keys.h ldns.h packet.h parse.h rbtree.h rdata.h resolver.h rr_functions.h rr.h sha1.h sha2.h str2host.h tsig.h update.h wire2host.h zone.h +LDNS_HEADERS_EX = ^config\.h|common\.h|util\.h|net\.h$$ +LDNS_HEADERS_GEN= common.h util.h net.h + +PYLDNS_I_FILES = $(pywrapdir)/file_py3.i $(pywrapdir)/ldns_buffer.i $(pywrapdir)/ldns_dname.i $(pywrapdir)/ldns_dnssec.i $(pywrapdir)/ldns.i $(pywrapdir)/ldns_key.i $(pywrapdir)/ldns_packet.i $(pywrapdir)/ldns_rdf.i $(pywrapdir)/ldns_resolver.i $(pywrapdir)/ldns_rr.i $(pywrapdir)/ldns_zone.i + +DRILL_LOBJS = drill/chasetrace.lo drill/dnssec.lo drill/drill.lo drill/drill_util.lo drill/error.lo drill/root.lo drill/securetrace.lo drill/work.lo + +EXAMPLE_LOBJS = examples/ldns-chaos.lo examples/ldns-compare-zones.lo examples/ldnsd.lo examples/ldns-dpa.lo examples/ldns-gen-zone.lo examples/ldns-key2ds.lo examples/ldns-keyfetcher.lo examples/ldns-keygen.lo examples/ldns-mx.lo examples/ldns-notify.lo examples/ldns-nsec3-hash.lo examples/ldns-read-zone.lo examples/ldns-resolver.lo examples/ldns-revoke.lo examples/ldns-rrsig.lo examples/ldns-signzone.lo examples/ldns-test-edns.lo examples/ldns-testns.lo examples/ldns-testpkts.lo examples/ldns-update.lo examples/ldns-verify-zone.lo examples/ldns-version.lo examples/ldns-walk.lo examples/ldns-zcat.lo examples/ldns-zsplit.lo +EXAMPLE_PROGS = examples/ldns-chaos examples/ldns-compare-zones examples/ldnsd examples/ldns-gen-zone examples/ldns-key2ds examples/ldns-keyfetcher examples/ldns-keygen examples/ldns-mx examples/ldns-notify examples/ldns-read-zone examples/ldns-resolver examples/ldns-rrsig examples/ldns-test-edns examples/ldns-update examples/ldns-version examples/ldns-walk examples/ldns-zcat examples/ldns-zsplit +EX_PROGS_BASENM = ldns-chaos ldns-compare-zones ldnsd ldns-dpa ldns-gen-zone ldns-key2ds ldns-keyfetcher ldns-keygen ldns-mx ldns-notify ldns-nsec3-hash ldns-read-zone ldns-resolver ldns-revoke ldns-rrsig ldns-signzone ldns-test-edns ldns-testns ldns-testpkts ldns-update ldns-verify-zone ldns-version ldns-walk ldns-zcat ldns-zsplit +EXAMPLE_PROGS_EX= ^examples/ldns-testpkts\.c|examples/ldns-testns\.c|examples/ldns-dpa\.c|examples/ldns-nsec3-hash\.c|examples/ldns-revoke\.c|examples/ldns-signzone\.c|examples/ldns-verify-zone\.c$$ +TESTNS = examples/ldns-testns +TESTNS_LOBJS = examples/ldns-testns.lo examples/ldns-testpkts.lo +LDNS_DPA = examples/ldns-dpa +LDNS_DPA_LOBJS = examples/ldns-dpa.lo +EX_SSL_PROGS = examples/ldns-nsec3-hash examples/ldns-revoke examples/ldns-signzone examples/ldns-verify-zone +EX_SSL_LOBJS = examples/ldns-nsec3-hash.lo examples/ldns-revoke.lo examples/ldns-signzone.lo examples/ldns-verify-zone.lo + + +COMPILE = $(CC) $(CPPFLAGS) $(CFLAGS) +COMP_LIB = $(LIBTOOL) --mode=compile $(CC) $(CPPFLAGS) $(CFLAGS) +LINK = $(CC) $(CFLAGS) $(LDFLAGS) $(LIBS) +LINK_LIB = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) \ + $(LIBS) -version-number $(version_info) -no-undefined +LINK_EXE = $(LIBTOOL) --mode=link $(CC) $(CPPFLAGS) \ + $(LIBSSL_CPPFLAGS) $(CFLAGS) $(LDFLAGS) + +.PHONY: clean realclean docclean manpages doc lint all lib pyldns test +.PHONY: install uninstall install-doc uninstall-doc uninstall-pyldns +.PHONY: install-h uninstall-h install-lib uninstall-lib install-pyldns + +all: setup-builddir lib linktest manpages @PYLDNS@ @DRILL@ @EXAMPLES@ + +.SUFFIXES: .c .o .a .lo .h .i + +.c.lo: + $(COMP_LIB) $(LIBSSL_CPPFLAGS) -c $< -o $@ + +$(LDNS_LOBJS) $(LIBLOBJS) $(DRILL_LOBJS) $(EXAMPLE_LOBJS): + $(COMP_LIB) $(LIBSSL_CPPFLAGS) -c $(srcdir)/$(@:.lo=.c) -o $@ + +setup-builddir: + @if test ! -d compat ; then mkdir compat ; fi + @if test ! -d drill ; then mkdir drill ; fi + @if test ! -d examples ; then mkdir examples ; fi + @if test ! -h config.h ; then ln -s ldns/config.h . ; fi + @if test ! -h lib ; then ln -s .libs lib ; fi ; + @if test ! -d include ; then $(INSTALL) -d include; fi + @if test ! -h include/ldns ; then ln -s ../ldns include/ldns || echo "include/ldns exists"; fi + +putdown-builddir: + rm -f include/ldns lib config.h + test ! -d include || rmdir include || : + if test -d examples -a ! -f examples/README; then rmdir examples || : ; fi + if test -d drill -a ! -f drill/README ; then rmdir drill || : ; fi + if test -d compat -a ! -f compat/malloc.c; then rmdir compat || : ; fi + +drill: no-drill-config-h drill/drill +no-drill-config-h: + @if test -e $(srcdir)/drill/config.h -o -e drill/config.h ; \ + then echo "A config.h was detected in the drill subdirectory." ; \ + echo "This does not work when building drill from here." ; \ + echo "Either remove the config.h from the subdirectory" ; \ + echo "or build drill there." ; \ + exit -1 ; \ + fi +drill/drill: $(DRILL_LOBJS) $(LIB) + $(LINK_EXE) $(DRILL_LOBJS) $(LIBS) $(LIBSSL_LIBS) -lldns -o drill/drill + +install-drill: drill/drill + $(INSTALL) -m 755 -d $(DESTDIR)$(bindir) + $(INSTALL) -m 755 -d $(DESTDIR)$(mandir) + $(INSTALL) -m 755 -d $(DESTDIR)$(mandir)/man1 + $(LIBTOOL) --mode=install cp drill/drill $(DESTDIR)$(bindir) + $(INSTALL) -m 644 $(srcdir)/drill/drill.1 $(DESTDIR)$(mandir)/man1/drill.1 + +uninstall-drill: + rm -f $(DESTDIR)$(bindir)/drill $(DESTDIR)$(mandir)/man1/drill.1 + test ! -d $(DESTDIR)$(mandir) || rmdir -p $(DESTDIR)$(mandir)/man1 || :; + test ! -d $(DESTDIR)$(bindir) || rmdir -p $(DESTDIR)$(bindir) || : ; + +clean-drill: + $(LIBTOOL) --mode clean rm -f $(DRILL_LOBJS) drill/drill + +examples: no-examples-config-h $(EXAMPLE_PROGS) $(TESTNS) $(LDNS_DPA) $(EX_SSL_PROGS) +no-examples-config-h: + @if test -e $(srcdir)/examples/config.h -o -e examples/config.h ; \ + then echo "A config.h was detected in the examples subdirectory." ; \ + echo "This does not work when building examples from here." ; \ + echo "Either remove the config.h from the subdirectory" ; \ + echo "or build examples there." ; \ + exit -1 ; \ + fi +$(EXAMPLE_PROGS): + $(LINK_EXE) $@.lo $(LIBS) -lldns -o $@ + +$(TESTNS): + $(LINK_EXE) $(TESTNS_LOBJS) $(LIBS) -lldns -o $(TESTNS) + +$(LDNS_DPA): + $(LINK_EXE) $(LDNS_DPA_LOBJS) $(LIBS) $(LIBPCAP_LIBS) -lldns \ + -o $(LDNS_DPA) + +$(EX_SSL_PROGS): + $(LINK_EXE) $@.lo $(LIBS) $(LIBSSL_LIBS) -lldns -o $@ + +install-examples: $(EXAMPLE_PROGS) $(TESTNS) $(LDNS_DPA) $(EX_SSL_PROGS) + $(INSTALL) -m 755 -d $(DESTDIR)$(bindir) + $(INSTALL) -m 755 -d $(DESTDIR)$(mandir) + $(INSTALL) -m 755 -d $(DESTDIR)$(mandir)/man1 + for p in $(EXAMPLE_PROGS) $(TESTNS) $(LDNS_DPA) $(EX_SSL_PROGS) ; do \ + $(LIBTOOL) --mode=install cp $$p $(DESTDIR)$(bindir) ; \ + $(INSTALL) -m 644 $(srcdir)/$$p.1 $(DESTDIR)$(mandir)/man1 ; \ + done + +uninstall-examples: + for p in $(EX_PROGS_BASENM) ; do \ + rm -f $(DESTDIR)$(bindir)/$$p $(DESTDIR)$(mandir)/man1/$$p.1 ;\ + done + test ! -d $(DESTDIR)$(mandir) || rmdir -p $(DESTDIR)$(mandir)/man1 || :; + test ! -d $(DESTDIR)$(bindir) || rmdir -p $(DESTDIR)$(bindir) || : ; + +clean-examples: + $(LIBTOOL) --mode clean rm -f $(EXAMPLE_PROGS) + $(LIBTOOL) --mode clean rm -f $(TESTNS) $(LDNS_DPA) $(EX_SSL_PROGS) + $(LIBTOOL) --mode clean rm -f $(EXAMPLE_LOBJS) + +linktest: $(srcdir)/linktest.c libldns.la + $(LIBTOOL) --mode=link $(CC) $(srcdir)/linktest.c $(CPPFLAGS) $(LIBSSL_CPPFLAGS) $(CFLAGS) -lldns $(LIBS) -o linktest + +lib: libldns.la + +lib-export-all: libldns.la-export-all + +libldns.la: $(LDNS_ALL_LOBJS) + $(LINK_LIB) $(LIBSSL_LDFLAGS) $(LIBSSL_LIBS) --export-symbols $(srcdir)/ldns_symbols.def -o libldns.la $(LDNS_ALL_LOBJS) -rpath $(libdir) $(RUNTIME_PATH) + +libldns.la-export-all: $(LDNS_ALL_LOBJS) + $(LINK_LIB) -o libldns.la $(LDNS_ALL_LOBJS) -rpath $(libdir) $(RUNTIME_PATH) + +mancheck: + sh -c 'find . -name \*.\[13\] -exec troff -z {} \;' 2>&1 | sed "s/^\.\///" | sed "s/\(:[0\-9]\+:\)/\1 warning:/g" + +doxygen: manpages + if test ! -e doc/header.html ; then \ + $(INSTALL) -c -m 644 $(srcdir)/doc/header.html doc/ ; \ + fi ; + $(doxygen) $(srcdir)/libdns.doxygen + +doc: manpages $(doxygen) + @$(INSTALL) -d doc + +manpages: $(srcdir)/doc/function_manpages + @$(INSTALL) -d doc + @cat $(srcdir)/ldns/*.h \ + | $(srcdir)/doc/doxyparse.pl \ + -m $(srcdir)/doc/function_manpages 2>&1 \ + | grep -v ^doxygen | grep -v ^cat > doc/ldns_manpages + +pyldns: _ldns.la + +$(pywrapdir)/ldns_wrapper.c: $(PYLDNS_I_FILES) ldns/config.h + $(swig) $(swigpy_flags) -o $@ $(CPPFLAGS) $(PYTHON_CPPFLAGS) $(pywrapdir)/ldns.i + +ldns_wrapper.lo: $(pywrapdir)/ldns_wrapper.c ldns/config.h + $(COMP_LIB) -I./include/ldns $(PYTHON_CPPFLAGS) $(PYTHON_X_CFLAGS) -c $< -o $@ + +_ldns.la: ldns_wrapper.lo libldns.la + $(LIBTOOL) --tag=CC --mode=link $(CC) $(CFLAGS) $(PYTHON_CFLAGS) $(LDFLAGS) $(PYTHON_LDFLAGS) -module -version-number $(version_info) -no-undefined -o $@ $< -rpath $(python_site) -L. -L.libs -lldns $(LIBS) + +install: install-h install-lib @INSTALL_CONFIG@ install-manpages $(pyldns_inst) $(pyldnsx_inst) @INSTALL_DRILL@ @INSTALL_EXAMPLES@ + +uninstall: uninstall-manpages @UNINSTALL_CONFIG@ uninstall-h uninstall-lib $(pyldns_uninst) $(pyldnsx_uninst) @UNINSTALL_DRILL@ @UNINSTALL_EXAMPLES@ + +destclean: uninstall + +install-config: + $(INSTALL) -d $(DESTDIR)$(bindir) + $(INSTALL) -c -m 755 packaging/ldns-config $(DESTDIR)$(bindir) + +uninstall-config: + rm -f $(DESTDIR)$(bindir)/ldns-config + test ! -d $(DESTDIR)$(bindir) || rmdir -p $(DESTDIR)$(bindir) || echo "ok, dir already gone" + +install-config-manpage: + ${INSTALL} -d $(DESTDIR)$(mandir)/man1 + ${INSTALL} -c -m 444 $(srcdir)/packaging/ldns-config.1 $(DESTDIR)$(mandir)/man1/ + + +uninstall-config-manpage: + rm -f $(DESTDIR)$(mandir)/man1/ldns-config.1 + test ! -d $(DESTDIR)$(mandir)/man1 || rmdir -p $(DESTDIR)$(mandir)/man1 || echo "ok, dir already gone" + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Jul 4 14:23:28 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D8F041065677; Wed, 4 Jul 2012 14:23:28 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AD9618FC1E; Wed, 4 Jul 2012 14:23:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q64ENS2T015334; Wed, 4 Jul 2012 14:23:28 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q64ENS42015333; Wed, 4 Jul 2012 14:23:28 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201207041423.q64ENS42015333@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Wed, 4 Jul 2012 14:23:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238105 - vendor/ldns/1.6.13 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jul 2012 14:23:29 -0000 Author: des Date: Wed Jul 4 14:23:28 2012 New Revision: 238105 URL: http://svn.freebsd.org/changeset/base/238105 Log: tag ldns 1.6.13 Added: vendor/ldns/1.6.13/ - copied from r238104, vendor/ldns/dist/ From owner-svn-src-all@FreeBSD.ORG Wed Jul 4 14:24:28 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 521F3106566C; Wed, 4 Jul 2012 14:24:28 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 397378FC19; Wed, 4 Jul 2012 14:24:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q64EOS2k015410; Wed, 4 Jul 2012 14:24:28 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q64EOSqv015406; Wed, 4 Jul 2012 14:24:28 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201207041424.q64EOSqv015406@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Wed, 4 Jul 2012 14:24:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238106 - in vendor/unbound/dist: . compat contrib contrib/selinux daemon doc iterator libunbound libunbound/python libunbound/python/doc libunbound/python/doc/_static libunbound/python... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jul 2012 14:24:28 -0000 Author: des Date: Wed Jul 4 14:24:26 2012 New Revision: 238106 URL: http://svn.freebsd.org/changeset/base/238106 Log: import unbound 1.4.17 Added: vendor/unbound/dist/LICENSE vendor/unbound/dist/Makefile.in vendor/unbound/dist/README vendor/unbound/dist/ac_pkg_swig.m4 vendor/unbound/dist/aclocal.m4 vendor/unbound/dist/acx_nlnetlabs.m4 vendor/unbound/dist/acx_pthread.m4 vendor/unbound/dist/acx_python.m4 vendor/unbound/dist/compat/ vendor/unbound/dist/compat/ctime_r.c vendor/unbound/dist/compat/fake-rfc2553.c vendor/unbound/dist/compat/fake-rfc2553.h vendor/unbound/dist/compat/gmtime_r.c vendor/unbound/dist/compat/inet_aton.c vendor/unbound/dist/compat/inet_ntop.c vendor/unbound/dist/compat/inet_pton.c vendor/unbound/dist/compat/malloc.c vendor/unbound/dist/compat/memcmp.c vendor/unbound/dist/compat/memcmp.h vendor/unbound/dist/compat/memmove.c vendor/unbound/dist/compat/snprintf.c vendor/unbound/dist/compat/strlcpy.c vendor/unbound/dist/compat/strptime.c vendor/unbound/dist/config.guess (contents, props changed) vendor/unbound/dist/config.h.in vendor/unbound/dist/config.sub (contents, props changed) vendor/unbound/dist/configure (contents, props changed) vendor/unbound/dist/configure.ac vendor/unbound/dist/contrib/ vendor/unbound/dist/contrib/README vendor/unbound/dist/contrib/build-unbound-localzone-from-hosts.pl (contents, props changed) vendor/unbound/dist/contrib/parseunbound.pl (contents, props changed) vendor/unbound/dist/contrib/rc_d_unbound (contents, props changed) vendor/unbound/dist/contrib/selinux/ vendor/unbound/dist/contrib/selinux/unbound.fc vendor/unbound/dist/contrib/selinux/unbound.te vendor/unbound/dist/contrib/unbound-host.nagios.patch vendor/unbound/dist/contrib/unbound.init vendor/unbound/dist/contrib/unbound.init_fedora vendor/unbound/dist/contrib/unbound.plist (contents, props changed) vendor/unbound/dist/contrib/unbound.spec vendor/unbound/dist/contrib/unbound.spec_fedora vendor/unbound/dist/contrib/unbound_cacti.tar.gz (contents, props changed) vendor/unbound/dist/contrib/unbound_munin_ (contents, props changed) vendor/unbound/dist/contrib/update-anchor.sh (contents, props changed) vendor/unbound/dist/contrib/validation-reporter.sh (contents, props changed) vendor/unbound/dist/daemon/ vendor/unbound/dist/daemon/acl_list.c vendor/unbound/dist/daemon/acl_list.h vendor/unbound/dist/daemon/cachedump.c vendor/unbound/dist/daemon/cachedump.h vendor/unbound/dist/daemon/daemon.c vendor/unbound/dist/daemon/daemon.h vendor/unbound/dist/daemon/remote.c vendor/unbound/dist/daemon/remote.h vendor/unbound/dist/daemon/stats.c vendor/unbound/dist/daemon/stats.h vendor/unbound/dist/daemon/unbound.c vendor/unbound/dist/daemon/worker.c vendor/unbound/dist/daemon/worker.h vendor/unbound/dist/doc/ vendor/unbound/dist/doc/CREDITS vendor/unbound/dist/doc/Changelog vendor/unbound/dist/doc/FEATURES vendor/unbound/dist/doc/LICENSE vendor/unbound/dist/doc/README vendor/unbound/dist/doc/README.svn vendor/unbound/dist/doc/README.tests vendor/unbound/dist/doc/TODO vendor/unbound/dist/doc/control_proto_spec.txt vendor/unbound/dist/doc/example.conf.in vendor/unbound/dist/doc/ietf67-design-02.odp (contents, props changed) vendor/unbound/dist/doc/ietf67-design-02.pdf (contents, props changed) vendor/unbound/dist/doc/libunbound.3.in vendor/unbound/dist/doc/requirements.txt vendor/unbound/dist/doc/unbound-anchor.8.in vendor/unbound/dist/doc/unbound-checkconf.8.in vendor/unbound/dist/doc/unbound-control.8.in vendor/unbound/dist/doc/unbound-host.1 vendor/unbound/dist/doc/unbound.8.in vendor/unbound/dist/doc/unbound.conf.5.in vendor/unbound/dist/doc/unbound.doxygen vendor/unbound/dist/install-sh (contents, props changed) vendor/unbound/dist/iterator/ vendor/unbound/dist/iterator/iter_delegpt.c vendor/unbound/dist/iterator/iter_delegpt.h vendor/unbound/dist/iterator/iter_donotq.c vendor/unbound/dist/iterator/iter_donotq.h vendor/unbound/dist/iterator/iter_fwd.c vendor/unbound/dist/iterator/iter_fwd.h vendor/unbound/dist/iterator/iter_hints.c vendor/unbound/dist/iterator/iter_hints.h vendor/unbound/dist/iterator/iter_priv.c vendor/unbound/dist/iterator/iter_priv.h vendor/unbound/dist/iterator/iter_resptype.c vendor/unbound/dist/iterator/iter_resptype.h vendor/unbound/dist/iterator/iter_scrub.c vendor/unbound/dist/iterator/iter_scrub.h vendor/unbound/dist/iterator/iter_utils.c vendor/unbound/dist/iterator/iter_utils.h vendor/unbound/dist/iterator/iterator.c vendor/unbound/dist/iterator/iterator.h vendor/unbound/dist/libunbound/ vendor/unbound/dist/libunbound/context.c vendor/unbound/dist/libunbound/context.h vendor/unbound/dist/libunbound/libunbound.c vendor/unbound/dist/libunbound/libworker.c vendor/unbound/dist/libunbound/libworker.h vendor/unbound/dist/libunbound/python/ vendor/unbound/dist/libunbound/python/LICENSE vendor/unbound/dist/libunbound/python/Makefile vendor/unbound/dist/libunbound/python/doc/ vendor/unbound/dist/libunbound/python/doc/_static/ vendor/unbound/dist/libunbound/python/doc/_static/readme vendor/unbound/dist/libunbound/python/doc/conf.py vendor/unbound/dist/libunbound/python/doc/examples/ vendor/unbound/dist/libunbound/python/doc/examples/example1a.rst vendor/unbound/dist/libunbound/python/doc/examples/example1b.rst vendor/unbound/dist/libunbound/python/doc/examples/example2.rst vendor/unbound/dist/libunbound/python/doc/examples/example3.rst vendor/unbound/dist/libunbound/python/doc/examples/example4.rst vendor/unbound/dist/libunbound/python/doc/examples/example5.rst vendor/unbound/dist/libunbound/python/doc/examples/example6-1.py vendor/unbound/dist/libunbound/python/doc/examples/example6.rst vendor/unbound/dist/libunbound/python/doc/examples/example7-1.py vendor/unbound/dist/libunbound/python/doc/examples/example7-2.py vendor/unbound/dist/libunbound/python/doc/examples/example7.rst vendor/unbound/dist/libunbound/python/doc/examples/example8-1.py vendor/unbound/dist/libunbound/python/doc/examples/example8.rst vendor/unbound/dist/libunbound/python/doc/examples/index.rst vendor/unbound/dist/libunbound/python/doc/index.rst vendor/unbound/dist/libunbound/python/doc/install.rst vendor/unbound/dist/libunbound/python/doc/intro.rst vendor/unbound/dist/libunbound/python/doc/modules/ vendor/unbound/dist/libunbound/python/doc/modules/unbound.rst vendor/unbound/dist/libunbound/python/examples/ vendor/unbound/dist/libunbound/python/examples/async-lookup.py vendor/unbound/dist/libunbound/python/examples/dns-lookup.py vendor/unbound/dist/libunbound/python/examples/dnssec-valid.py vendor/unbound/dist/libunbound/python/examples/dnssec_test.py vendor/unbound/dist/libunbound/python/examples/example8-1.py vendor/unbound/dist/libunbound/python/examples/idn-lookup.py vendor/unbound/dist/libunbound/python/examples/mx-lookup.py vendor/unbound/dist/libunbound/python/examples/ns-lookup.py vendor/unbound/dist/libunbound/python/examples/reverse-lookup.py vendor/unbound/dist/libunbound/python/libunbound.i vendor/unbound/dist/libunbound/ubsyms.def vendor/unbound/dist/libunbound/unbound.h vendor/unbound/dist/ltmain.sh (contents, props changed) vendor/unbound/dist/pythonmod/ vendor/unbound/dist/pythonmod/LICENSE vendor/unbound/dist/pythonmod/Makefile vendor/unbound/dist/pythonmod/doc/ vendor/unbound/dist/pythonmod/doc/_static/ vendor/unbound/dist/pythonmod/doc/_static/readme vendor/unbound/dist/pythonmod/doc/conf.py vendor/unbound/dist/pythonmod/doc/examples/ vendor/unbound/dist/pythonmod/doc/examples/example0-1.py vendor/unbound/dist/pythonmod/doc/examples/example0.rst vendor/unbound/dist/pythonmod/doc/examples/example1.rst vendor/unbound/dist/pythonmod/doc/examples/example2.rst vendor/unbound/dist/pythonmod/doc/examples/example3.rst vendor/unbound/dist/pythonmod/doc/examples/example4.rst vendor/unbound/dist/pythonmod/doc/examples/index.rst vendor/unbound/dist/pythonmod/doc/index.rst vendor/unbound/dist/pythonmod/doc/install.rst vendor/unbound/dist/pythonmod/doc/modules/ vendor/unbound/dist/pythonmod/doc/modules/config.rst vendor/unbound/dist/pythonmod/doc/modules/env.rst vendor/unbound/dist/pythonmod/doc/modules/functions.rst vendor/unbound/dist/pythonmod/doc/modules/index.rst vendor/unbound/dist/pythonmod/doc/modules/struct.rst vendor/unbound/dist/pythonmod/doc/usecase.rst vendor/unbound/dist/pythonmod/examples/ vendor/unbound/dist/pythonmod/examples/calc.py vendor/unbound/dist/pythonmod/examples/dict.py vendor/unbound/dist/pythonmod/examples/dict_data.txt vendor/unbound/dist/pythonmod/examples/log.py vendor/unbound/dist/pythonmod/examples/resgen.py vendor/unbound/dist/pythonmod/examples/resip.py vendor/unbound/dist/pythonmod/examples/resmod.py vendor/unbound/dist/pythonmod/interface.i vendor/unbound/dist/pythonmod/pythonmod.c vendor/unbound/dist/pythonmod/pythonmod.h vendor/unbound/dist/pythonmod/pythonmod_utils.c vendor/unbound/dist/pythonmod/pythonmod_utils.h vendor/unbound/dist/pythonmod/test-calc.conf vendor/unbound/dist/pythonmod/test-dict.conf vendor/unbound/dist/pythonmod/test-log.conf vendor/unbound/dist/pythonmod/test-resgen.conf vendor/unbound/dist/pythonmod/test-resip.conf vendor/unbound/dist/pythonmod/test-resmod.conf vendor/unbound/dist/pythonmod/ubmodule-msg.py vendor/unbound/dist/pythonmod/ubmodule-tst.py vendor/unbound/dist/services/ vendor/unbound/dist/services/cache/ vendor/unbound/dist/services/cache/dns.c vendor/unbound/dist/services/cache/dns.h vendor/unbound/dist/services/cache/infra.c vendor/unbound/dist/services/cache/infra.h vendor/unbound/dist/services/cache/rrset.c vendor/unbound/dist/services/cache/rrset.h vendor/unbound/dist/services/listen_dnsport.c vendor/unbound/dist/services/listen_dnsport.h vendor/unbound/dist/services/localzone.c vendor/unbound/dist/services/localzone.h vendor/unbound/dist/services/mesh.c vendor/unbound/dist/services/mesh.h vendor/unbound/dist/services/modstack.c vendor/unbound/dist/services/modstack.h vendor/unbound/dist/services/outbound_list.c vendor/unbound/dist/services/outbound_list.h vendor/unbound/dist/services/outside_network.c vendor/unbound/dist/services/outside_network.h vendor/unbound/dist/smallapp/ vendor/unbound/dist/smallapp/unbound-anchor.c vendor/unbound/dist/smallapp/unbound-checkconf.c vendor/unbound/dist/smallapp/unbound-control-setup.sh (contents, props changed) vendor/unbound/dist/smallapp/unbound-control.c vendor/unbound/dist/smallapp/unbound-host.c vendor/unbound/dist/smallapp/worker_cb.c vendor/unbound/dist/testcode/ vendor/unbound/dist/testcode/asynclook.c vendor/unbound/dist/testcode/checklocks.c vendor/unbound/dist/testcode/checklocks.h vendor/unbound/dist/testcode/delayer.c vendor/unbound/dist/testcode/do-tests.sh (contents, props changed) vendor/unbound/dist/testcode/fake_event.c vendor/unbound/dist/testcode/fake_event.h vendor/unbound/dist/testcode/harvest.c vendor/unbound/dist/testcode/ldns-testpkts.c vendor/unbound/dist/testcode/ldns-testpkts.h vendor/unbound/dist/testcode/lock_verify.c vendor/unbound/dist/testcode/memstats.c vendor/unbound/dist/testcode/mini_tpkg.sh (contents, props changed) vendor/unbound/dist/testcode/perf.c vendor/unbound/dist/testcode/petal.c vendor/unbound/dist/testcode/pktview.c vendor/unbound/dist/testcode/readhex.c vendor/unbound/dist/testcode/readhex.h vendor/unbound/dist/testcode/replay.c vendor/unbound/dist/testcode/replay.h vendor/unbound/dist/testcode/signit.c vendor/unbound/dist/testcode/streamtcp.c vendor/unbound/dist/testcode/testbed.sh (contents, props changed) vendor/unbound/dist/testcode/testbed.txt vendor/unbound/dist/testcode/testbound.c vendor/unbound/dist/testcode/unitanchor.c vendor/unbound/dist/testcode/unitdname.c vendor/unbound/dist/testcode/unitlruhash.c vendor/unbound/dist/testcode/unitmain.c vendor/unbound/dist/testcode/unitmain.h vendor/unbound/dist/testcode/unitmsgparse.c vendor/unbound/dist/testcode/unitneg.c vendor/unbound/dist/testcode/unitregional.c vendor/unbound/dist/testcode/unitslabhash.c vendor/unbound/dist/testcode/unitverify.c vendor/unbound/dist/testdata/ vendor/unbound/dist/testdata/00-lint.tpkg (contents, props changed) vendor/unbound/dist/testdata/01-doc.tpkg (contents, props changed) vendor/unbound/dist/testdata/02-unittest.tpkg (contents, props changed) vendor/unbound/dist/testdata/03-testbound.tpkg (contents, props changed) vendor/unbound/dist/testdata/04-checkconf.tpkg (contents, props changed) vendor/unbound/dist/testdata/05-asynclook.tpkg (contents, props changed) vendor/unbound/dist/testdata/06-ianaports.tpkg (contents, props changed) vendor/unbound/dist/testdata/07-confroot.tpkg (contents, props changed) vendor/unbound/dist/testdata/08-host-lib.tpkg (contents, props changed) vendor/unbound/dist/testdata/09-unbound-control.tpkg (contents, props changed) vendor/unbound/dist/testdata/10-unbound-anchor.tpkg (contents, props changed) vendor/unbound/dist/testdata/Kexample.com.+003+02854.ds vendor/unbound/dist/testdata/Kexample.com.+003+02854.key vendor/unbound/dist/testdata/Kexample.com.+003+02854.private vendor/unbound/dist/testdata/Kexample.com.+005+16486.ds vendor/unbound/dist/testdata/Kexample.com.+005+16486.key vendor/unbound/dist/testdata/Kexample.com.+005+16486.private vendor/unbound/dist/testdata/Kexample.com.+005+30899.ds vendor/unbound/dist/testdata/Kexample.com.+005+30899.key vendor/unbound/dist/testdata/Kexample.com.+005+30899.private vendor/unbound/dist/testdata/Kexample.com.+005+55582.ds vendor/unbound/dist/testdata/Kexample.com.+005+55582.key vendor/unbound/dist/testdata/Kexample.com.+005+55582.private vendor/unbound/dist/testdata/Kexample.com.+005+60946.ds vendor/unbound/dist/testdata/Kexample.com.+005+60946.key vendor/unbound/dist/testdata/Kexample.com.+005+60946.private vendor/unbound/dist/testdata/Kexample.com.+007+57024.ds vendor/unbound/dist/testdata/Kexample.com.+007+57024.key vendor/unbound/dist/testdata/Kexample.com.+007+57024.private vendor/unbound/dist/testdata/Kexample.com.+008+01443.ds vendor/unbound/dist/testdata/Kexample.com.+008+01443.key vendor/unbound/dist/testdata/Kexample.com.+008+01443.private vendor/unbound/dist/testdata/Kexample.com.+009+48886.ds vendor/unbound/dist/testdata/Kexample.com.+009+48886.key vendor/unbound/dist/testdata/Kexample.com.+009+48886.private vendor/unbound/dist/testdata/Kexample.com.+012+60385.ds vendor/unbound/dist/testdata/Kexample.com.+012+60385.key vendor/unbound/dist/testdata/Kexample.com.+012+60385.private vendor/unbound/dist/testdata/acl.rpl vendor/unbound/dist/testdata/autotrust_10key.rpl vendor/unbound/dist/testdata/autotrust_addpend_2exceed.rpl vendor/unbound/dist/testdata/autotrust_addpend_early.rpl vendor/unbound/dist/testdata/autotrust_addpend_nosign.rpl vendor/unbound/dist/testdata/autotrust_addpend_nosignnew.rpl vendor/unbound/dist/testdata/autotrust_addpend_once.rpl vendor/unbound/dist/testdata/autotrust_addpend_twice.rpl vendor/unbound/dist/testdata/autotrust_init.rpl vendor/unbound/dist/testdata/autotrust_init_ds.rpl vendor/unbound/dist/testdata/autotrust_init_fail.rpl vendor/unbound/dist/testdata/autotrust_init_failsig.rpl vendor/unbound/dist/testdata/autotrust_init_legacy.rpl vendor/unbound/dist/testdata/autotrust_init_sigs.rpl vendor/unbound/dist/testdata/autotrust_init_zsk.rpl vendor/unbound/dist/testdata/autotrust_missing.rpl vendor/unbound/dist/testdata/autotrust_missing_all.rpl vendor/unbound/dist/testdata/autotrust_missing_returns.rpl vendor/unbound/dist/testdata/autotrust_probefail.rpl vendor/unbound/dist/testdata/autotrust_probefailsig.rpl vendor/unbound/dist/testdata/autotrust_revoked_use.rpl vendor/unbound/dist/testdata/autotrust_revoked_with_invalid.rpl vendor/unbound/dist/testdata/autotrust_revtp.rpl vendor/unbound/dist/testdata/autotrust_revtp_read.rpl vendor/unbound/dist/testdata/autotrust_revtp_use.rpl vendor/unbound/dist/testdata/autotrust_rollalgo.rpl vendor/unbound/dist/testdata/autotrust_rollalgo_unknown.rpl vendor/unbound/dist/testdata/autotrust_rollover.rpl vendor/unbound/dist/testdata/autotrust_valid_use.rpl vendor/unbound/dist/testdata/black_data.rpl vendor/unbound/dist/testdata/black_dnskey.rpl vendor/unbound/dist/testdata/black_ds.rpl vendor/unbound/dist/testdata/black_ds_entry.rpl vendor/unbound/dist/testdata/black_ent.rpl vendor/unbound/dist/testdata/black_key_entry.rpl vendor/unbound/dist/testdata/black_prime.rpl vendor/unbound/dist/testdata/black_prime_entry.rpl vendor/unbound/dist/testdata/common.sh (contents, props changed) vendor/unbound/dist/testdata/dlv_anchor.rpl vendor/unbound/dist/testdata/dlv_ask_higher.rpl vendor/unbound/dist/testdata/dlv_below_ta.rpl vendor/unbound/dist/testdata/dlv_delegation.rpl vendor/unbound/dist/testdata/dlv_ds_lookup.rpl vendor/unbound/dist/testdata/dlv_insecure.rpl vendor/unbound/dist/testdata/dlv_insecure_negcache.rpl vendor/unbound/dist/testdata/dlv_keyretry.rpl vendor/unbound/dist/testdata/dlv_negnx.rpl vendor/unbound/dist/testdata/dlv_optout.rpl vendor/unbound/dist/testdata/dlv_unused.rpl vendor/unbound/dist/testdata/domain_insec_dlv.rpl vendor/unbound/dist/testdata/domain_insec_ds.rpl vendor/unbound/dist/testdata/edns_cache.tpkg (contents, props changed) vendor/unbound/dist/testdata/edns_lame.tpkg (contents, props changed) vendor/unbound/dist/testdata/fetch_glue.rpl vendor/unbound/dist/testdata/fetch_glue_cname.rpl vendor/unbound/dist/testdata/fwd.rpl vendor/unbound/dist/testdata/fwd_ancil.tpkg (contents, props changed) vendor/unbound/dist/testdata/fwd_bogus.tpkg (contents, props changed) vendor/unbound/dist/testdata/fwd_cached.rpl vendor/unbound/dist/testdata/fwd_capsid.tpkg (contents, props changed) vendor/unbound/dist/testdata/fwd_capsid_fallback.tpkg (contents, props changed) vendor/unbound/dist/testdata/fwd_compress_c00c.tpkg (contents, props changed) vendor/unbound/dist/testdata/fwd_droptoomany.rpl vendor/unbound/dist/testdata/fwd_edns_bksec.tpkg (contents, props changed) vendor/unbound/dist/testdata/fwd_edns_probe.tpkg (contents, props changed) vendor/unbound/dist/testdata/fwd_error.rpl vendor/unbound/dist/testdata/fwd_jostle.rpl vendor/unbound/dist/testdata/fwd_jostle_out.rpl vendor/unbound/dist/testdata/fwd_lrudrop.rpl vendor/unbound/dist/testdata/fwd_no_edns.tpkg (contents, props changed) vendor/unbound/dist/testdata/fwd_notcached.rpl vendor/unbound/dist/testdata/fwd_oneport.tpkg (contents, props changed) vendor/unbound/dist/testdata/fwd_tcp.tpkg (contents, props changed) vendor/unbound/dist/testdata/fwd_tcp_tc.tpkg (contents, props changed) vendor/unbound/dist/testdata/fwd_tcp_tc6.tpkg (contents, props changed) vendor/unbound/dist/testdata/fwd_three.tpkg (contents, props changed) vendor/unbound/dist/testdata/fwd_three_service.tpkg (contents, props changed) vendor/unbound/dist/testdata/fwd_timeout.rpl vendor/unbound/dist/testdata/fwd_ttlexpire.tpkg (contents, props changed) vendor/unbound/dist/testdata/fwd_two.rpl vendor/unbound/dist/testdata/fwd_udp.tpkg (contents, props changed) vendor/unbound/dist/testdata/fwd_udptmout.tpkg (contents, props changed) vendor/unbound/dist/testdata/fwd_waitudp.tpkg (contents, props changed) vendor/unbound/dist/testdata/fwd_zero.tpkg (contents, props changed) vendor/unbound/dist/testdata/fwddlv_parse.rpl vendor/unbound/dist/testdata/host_file.template vendor/unbound/dist/testdata/hostsfileosx.tpkg (contents, props changed) vendor/unbound/dist/testdata/iter_class_any.rpl vendor/unbound/dist/testdata/iter_cname_cache.rpl vendor/unbound/dist/testdata/iter_cname_double.rpl vendor/unbound/dist/testdata/iter_cname_nx.rpl vendor/unbound/dist/testdata/iter_cname_qnamecopy.rpl vendor/unbound/dist/testdata/iter_cycle.rpl vendor/unbound/dist/testdata/iter_cycle_noh.rpl vendor/unbound/dist/testdata/iter_dnsseclame_bug.rpl vendor/unbound/dist/testdata/iter_dnsseclame_ds.rpl vendor/unbound/dist/testdata/iter_dnsseclame_ds_ok.rpl vendor/unbound/dist/testdata/iter_dnsseclame_ta.rpl vendor/unbound/dist/testdata/iter_dnsseclame_ta_ok.rpl vendor/unbound/dist/testdata/iter_domain_sale.rpl vendor/unbound/dist/testdata/iter_domain_sale_nschange.rpl vendor/unbound/dist/testdata/iter_donotq127.rpl vendor/unbound/dist/testdata/iter_dp_turnsuseless.rpl vendor/unbound/dist/testdata/iter_ds_locate_ns.rpl vendor/unbound/dist/testdata/iter_ds_locate_ns_cname.rpl vendor/unbound/dist/testdata/iter_ds_locate_ns_nosoa.rpl vendor/unbound/dist/testdata/iter_emptydp.rpl vendor/unbound/dist/testdata/iter_emptydp_for_glue.rpl vendor/unbound/dist/testdata/iter_fwdfirst.rpl vendor/unbound/dist/testdata/iter_fwdstub.rpl vendor/unbound/dist/testdata/iter_fwdstubroot.rpl vendor/unbound/dist/testdata/iter_got6only.rpl vendor/unbound/dist/testdata/iter_hint_lame.rpl vendor/unbound/dist/testdata/iter_lame_aaaa.rpl vendor/unbound/dist/testdata/iter_lame_noaa.rpl vendor/unbound/dist/testdata/iter_lame_nosoa.rpl vendor/unbound/dist/testdata/iter_lamescrub.rpl vendor/unbound/dist/testdata/iter_mod.rpl vendor/unbound/dist/testdata/iter_ns_badip.rpl vendor/unbound/dist/testdata/iter_ns_spoof.rpl vendor/unbound/dist/testdata/iter_pc_a.rpl vendor/unbound/dist/testdata/iter_pc_aaaa.rpl vendor/unbound/dist/testdata/iter_pcdiff.rpl vendor/unbound/dist/testdata/iter_pcdirect.rpl vendor/unbound/dist/testdata/iter_pclame.rpl vendor/unbound/dist/testdata/iter_pcname.rpl vendor/unbound/dist/testdata/iter_pcnamech.rpl vendor/unbound/dist/testdata/iter_pcnamechrec.rpl vendor/unbound/dist/testdata/iter_pcnamerec.rpl vendor/unbound/dist/testdata/iter_pcttl.rpl vendor/unbound/dist/testdata/iter_prefetch.rpl vendor/unbound/dist/testdata/iter_prefetch_change.rpl vendor/unbound/dist/testdata/iter_prefetch_change2.rpl vendor/unbound/dist/testdata/iter_prefetch_childns.rpl vendor/unbound/dist/testdata/iter_prefetch_ns.rpl vendor/unbound/dist/testdata/iter_primenoglue.rpl vendor/unbound/dist/testdata/iter_privaddr.rpl vendor/unbound/dist/testdata/iter_ranoaa_lame.rpl vendor/unbound/dist/testdata/iter_reclame_one.rpl vendor/unbound/dist/testdata/iter_reclame_two.rpl vendor/unbound/dist/testdata/iter_recurse.rpl vendor/unbound/dist/testdata/iter_req_qname.rpl vendor/unbound/dist/testdata/iter_resolve.rpl vendor/unbound/dist/testdata/iter_scrub_cname_an.rpl vendor/unbound/dist/testdata/iter_scrub_dname_insec.rpl vendor/unbound/dist/testdata/iter_scrub_dname_sec.rpl vendor/unbound/dist/testdata/iter_scrub_ns.rpl vendor/unbound/dist/testdata/iter_scrub_ns_fwd.rpl vendor/unbound/dist/testdata/iter_scrub_ns_side.rpl vendor/unbound/dist/testdata/iter_soamin.rpl vendor/unbound/dist/testdata/iter_stub_noroot.rpl vendor/unbound/dist/testdata/iter_stubfirst.rpl vendor/unbound/dist/testdata/iter_timeout_ra_aaaa.rpl vendor/unbound/dist/testdata/local_nodefault.rpl vendor/unbound/dist/testdata/local_nodefault.tpkg (contents, props changed) vendor/unbound/dist/testdata/local_norec.tpkg (contents, props changed) vendor/unbound/dist/testdata/local_nosnoop.tpkg (contents, props changed) vendor/unbound/dist/testdata/local_transparent_sametype.rpl vendor/unbound/dist/testdata/local_typetransparent.rpl vendor/unbound/dist/testdata/localdata.rpl vendor/unbound/dist/testdata/net_signed_servfail.rpl vendor/unbound/dist/testdata/nomem_cnametopos.rpl vendor/unbound/dist/testdata/pylib.tpkg (contents, props changed) vendor/unbound/dist/testdata/pymod.tpkg (contents, props changed) vendor/unbound/dist/testdata/pymod_thread.tpkg (contents, props changed) vendor/unbound/dist/testdata/refuse_xfr.rpl vendor/unbound/dist/testdata/remote-threaded.tpkg (contents, props changed) vendor/unbound/dist/testdata/root_anchor.tpkg (contents, props changed) vendor/unbound/dist/testdata/root_hints.tpkg (contents, props changed) vendor/unbound/dist/testdata/rrset_rettl.rpl vendor/unbound/dist/testdata/rrset_untrusted.rpl vendor/unbound/dist/testdata/rrset_updated.rpl vendor/unbound/dist/testdata/speed_cache.tpkg (contents, props changed) vendor/unbound/dist/testdata/speed_local.tpkg (contents, props changed) vendor/unbound/dist/testdata/stat_timer.tpkg (contents, props changed) vendor/unbound/dist/testdata/stop_nxdomain.rpl vendor/unbound/dist/testdata/stream_ssl.tpkg (contents, props changed) vendor/unbound/dist/testdata/stream_tcp.tpkg (contents, props changed) vendor/unbound/dist/testdata/stub_udp.tpkg (contents, props changed) vendor/unbound/dist/testdata/stub_udp6.tpkg (contents, props changed) vendor/unbound/dist/testdata/tcp_sigpipe.tpkg (contents, props changed) vendor/unbound/dist/testdata/test_ds.sha1 vendor/unbound/dist/testdata/test_ds.sha384 vendor/unbound/dist/testdata/test_nsec3_hash.1 vendor/unbound/dist/testdata/test_packets.1 vendor/unbound/dist/testdata/test_packets.2 vendor/unbound/dist/testdata/test_packets.3 vendor/unbound/dist/testdata/test_packets.4 vendor/unbound/dist/testdata/test_packets.5 vendor/unbound/dist/testdata/test_packets.6 vendor/unbound/dist/testdata/test_packets.7 vendor/unbound/dist/testdata/test_packets.8 vendor/unbound/dist/testdata/test_packets.9 vendor/unbound/dist/testdata/test_signatures.1 vendor/unbound/dist/testdata/test_signatures.2 vendor/unbound/dist/testdata/test_signatures.3 vendor/unbound/dist/testdata/test_signatures.4 vendor/unbound/dist/testdata/test_signatures.5 vendor/unbound/dist/testdata/test_signatures.6 vendor/unbound/dist/testdata/test_signatures.7 vendor/unbound/dist/testdata/test_signatures.8 vendor/unbound/dist/testdata/test_sigs.ecdsa_p256 vendor/unbound/dist/testdata/test_sigs.ecdsa_p384 vendor/unbound/dist/testdata/test_sigs.gost vendor/unbound/dist/testdata/test_sigs.hinfo vendor/unbound/dist/testdata/test_sigs.revoked vendor/unbound/dist/testdata/test_sigs.rsasha256 vendor/unbound/dist/testdata/test_sigs.rsasha256_draft vendor/unbound/dist/testdata/test_sigs.rsasha512_draft vendor/unbound/dist/testdata/test_sigs.sha1_and_256 vendor/unbound/dist/testdata/trust_cname_chain.rpl vendor/unbound/dist/testdata/ttl_max.rpl vendor/unbound/dist/testdata/ttl_min.rpl vendor/unbound/dist/testdata/ttl_msg.rpl vendor/unbound/dist/testdata/val_adbit.rpl vendor/unbound/dist/testdata/val_adcopy.rpl vendor/unbound/dist/testdata/val_anchor_nx.rpl vendor/unbound/dist/testdata/val_anchor_nx_nosig.rpl vendor/unbound/dist/testdata/val_ans_dsent.rpl vendor/unbound/dist/testdata/val_ans_nx.rpl vendor/unbound/dist/testdata/val_any.rpl vendor/unbound/dist/testdata/val_any_cname.rpl vendor/unbound/dist/testdata/val_any_dname.rpl vendor/unbound/dist/testdata/val_cname_loop1.rpl vendor/unbound/dist/testdata/val_cname_loop2.rpl vendor/unbound/dist/testdata/val_cname_loop3.rpl vendor/unbound/dist/testdata/val_cnameinsectopos.rpl vendor/unbound/dist/testdata/val_cnamenx_dblnsec.rpl vendor/unbound/dist/testdata/val_cnamenx_rcodenx.rpl vendor/unbound/dist/testdata/val_cnameqtype.rpl vendor/unbound/dist/testdata/val_cnametocloser.rpl vendor/unbound/dist/testdata/val_cnametocloser_nosig.rpl vendor/unbound/dist/testdata/val_cnametodname.rpl vendor/unbound/dist/testdata/val_cnametodnametocnametopos.rpl vendor/unbound/dist/testdata/val_cnametoinsecure.rpl vendor/unbound/dist/testdata/val_cnametonodata.rpl vendor/unbound/dist/testdata/val_cnametonsec.rpl vendor/unbound/dist/testdata/val_cnametonx.rpl vendor/unbound/dist/testdata/val_cnametooptin.rpl vendor/unbound/dist/testdata/val_cnametooptout.rpl vendor/unbound/dist/testdata/val_cnametopos.rpl vendor/unbound/dist/testdata/val_cnametoposnowc.rpl vendor/unbound/dist/testdata/val_cnametoposwc.rpl vendor/unbound/dist/testdata/val_cnamewctonodata.rpl vendor/unbound/dist/testdata/val_cnamewctonx.rpl vendor/unbound/dist/testdata/val_cnamewctoposwc.rpl vendor/unbound/dist/testdata/val_dnametoolong.rpl vendor/unbound/dist/testdata/val_dnametopos.rpl vendor/unbound/dist/testdata/val_dnametoposwc.rpl vendor/unbound/dist/testdata/val_dnamewc.rpl vendor/unbound/dist/testdata/val_ds_afterprime.rpl vendor/unbound/dist/testdata/val_ds_cname.rpl vendor/unbound/dist/testdata/val_ds_gost.crpl vendor/unbound/dist/testdata/val_ds_gost_downgrade.crpl vendor/unbound/dist/testdata/val_ds_sha2.crpl vendor/unbound/dist/testdata/val_ds_sha2_downgrade.crpl vendor/unbound/dist/testdata/val_dsnsec.rpl vendor/unbound/dist/testdata/val_entds.rpl vendor/unbound/dist/testdata/val_faildnskey.rpl vendor/unbound/dist/testdata/val_faildnskey_ok.rpl vendor/unbound/dist/testdata/val_fwdds.rpl vendor/unbound/dist/testdata/val_keyprefetch.rpl vendor/unbound/dist/testdata/val_keyprefetch_verify.rpl vendor/unbound/dist/testdata/val_mal_wc.rpl vendor/unbound/dist/testdata/val_negcache_ds.rpl vendor/unbound/dist/testdata/val_negcache_dssoa.rpl vendor/unbound/dist/testdata/val_noadwhennodo.rpl vendor/unbound/dist/testdata/val_nodata.rpl vendor/unbound/dist/testdata/val_nodata_ent.rpl vendor/unbound/dist/testdata/val_nodata_entwc.rpl vendor/unbound/dist/testdata/val_nodata_failsig.rpl vendor/unbound/dist/testdata/val_nodata_hasdata.rpl vendor/unbound/dist/testdata/val_nodata_zonecut.rpl vendor/unbound/dist/testdata/val_nodatawc.rpl vendor/unbound/dist/testdata/val_nodatawc_badce.rpl vendor/unbound/dist/testdata/val_nodatawc_nodeny.rpl vendor/unbound/dist/testdata/val_nodatawc_one.rpl vendor/unbound/dist/testdata/val_nokeyprime.rpl vendor/unbound/dist/testdata/val_nsec3_b1_nameerror.rpl vendor/unbound/dist/testdata/val_nsec3_b1_nameerror_noce.rpl vendor/unbound/dist/testdata/val_nsec3_b1_nameerror_nonc.rpl vendor/unbound/dist/testdata/val_nsec3_b1_nameerror_nowc.rpl vendor/unbound/dist/testdata/val_nsec3_b21_nodataent.rpl vendor/unbound/dist/testdata/val_nsec3_b21_nodataent_wr.rpl vendor/unbound/dist/testdata/val_nsec3_b2_nodata.rpl vendor/unbound/dist/testdata/val_nsec3_b2_nodata_nons.rpl vendor/unbound/dist/testdata/val_nsec3_b3_optout.rpl vendor/unbound/dist/testdata/val_nsec3_b3_optout_negcache.rpl vendor/unbound/dist/testdata/val_nsec3_b3_optout_noce.rpl vendor/unbound/dist/testdata/val_nsec3_b3_optout_nonc.rpl vendor/unbound/dist/testdata/val_nsec3_b4_wild.rpl vendor/unbound/dist/testdata/val_nsec3_b4_wild_wr.rpl vendor/unbound/dist/testdata/val_nsec3_b5_wcnodata.rpl vendor/unbound/dist/testdata/val_nsec3_b5_wcnodata_noce.rpl vendor/unbound/dist/testdata/val_nsec3_b5_wcnodata_nonc.rpl vendor/unbound/dist/testdata/val_nsec3_b5_wcnodata_nowc.rpl vendor/unbound/dist/testdata/val_nsec3_cname_ds.rpl vendor/unbound/dist/testdata/val_nsec3_cname_par.rpl vendor/unbound/dist/testdata/val_nsec3_cname_sub.rpl vendor/unbound/dist/testdata/val_nsec3_iter_high.rpl vendor/unbound/dist/testdata/val_nsec3_nodatawccname.rpl vendor/unbound/dist/testdata/val_nsec3_nods.rpl vendor/unbound/dist/testdata/val_nsec3_nods_badopt.rpl vendor/unbound/dist/testdata/val_nsec3_nods_badsig.rpl vendor/unbound/dist/testdata/val_nsec3_nods_negcache.rpl vendor/unbound/dist/testdata/val_nsec3_nods_soa.rpl vendor/unbound/dist/testdata/val_nsec3_optout_ad.rpl vendor/unbound/dist/testdata/val_nsec3_optout_cache.rpl vendor/unbound/dist/testdata/val_nsec3_wcany.rpl vendor/unbound/dist/testdata/val_nsec3_wcany_nodeny.rpl vendor/unbound/dist/testdata/val_nx.rpl vendor/unbound/dist/testdata/val_nx_nodeny.rpl vendor/unbound/dist/testdata/val_nx_nowc.rpl vendor/unbound/dist/testdata/val_nx_nsec3_collision.rpl vendor/unbound/dist/testdata/val_nx_nsec3_params.rpl vendor/unbound/dist/testdata/val_nx_overreach.rpl vendor/unbound/dist/testdata/val_pos_truncns.rpl vendor/unbound/dist/testdata/val_positive.rpl vendor/unbound/dist/testdata/val_positive_nosigs.rpl vendor/unbound/dist/testdata/val_positive_wc.rpl vendor/unbound/dist/testdata/val_positive_wc_nodeny.rpl vendor/unbound/dist/testdata/val_qds_badanc.rpl vendor/unbound/dist/testdata/val_qds_oneanc.rpl vendor/unbound/dist/testdata/val_qds_twoanc.rpl vendor/unbound/dist/testdata/val_refer_unsignadd.rpl vendor/unbound/dist/testdata/val_referd.rpl vendor/unbound/dist/testdata/val_referglue.rpl vendor/unbound/dist/testdata/val_rrsig.rpl vendor/unbound/dist/testdata/val_secds.rpl vendor/unbound/dist/testdata/val_secds_nosig.rpl vendor/unbound/dist/testdata/val_stub_noroot.rpl vendor/unbound/dist/testdata/val_stubds.rpl vendor/unbound/dist/testdata/val_ta_algo_dnskey.rpl vendor/unbound/dist/testdata/val_ta_algo_missing.rpl vendor/unbound/dist/testdata/val_twocname.rpl vendor/unbound/dist/testdata/val_unalgo_anchor.rpl vendor/unbound/dist/testdata/val_unalgo_dlv.rpl vendor/unbound/dist/testdata/val_unalgo_ds.rpl vendor/unbound/dist/testdata/val_unsec_cname.rpl vendor/unbound/dist/testdata/val_unsecds.rpl vendor/unbound/dist/testdata/val_unsecds_negcache.rpl vendor/unbound/dist/testdata/val_unsecds_qtypeds.rpl vendor/unbound/dist/testdata/val_wild_pos.rpl vendor/unbound/dist/testdata/version_bind.rpl vendor/unbound/dist/testdata/version_bind_hide.rpl vendor/unbound/dist/util/ vendor/unbound/dist/util/alloc.c vendor/unbound/dist/util/alloc.h vendor/unbound/dist/util/config_file.c vendor/unbound/dist/util/config_file.h vendor/unbound/dist/util/configlexer.c vendor/unbound/dist/util/configlexer.lex vendor/unbound/dist/util/configparser.c vendor/unbound/dist/util/configparser.h vendor/unbound/dist/util/configparser.y vendor/unbound/dist/util/configyyrename.h vendor/unbound/dist/util/data/ vendor/unbound/dist/util/data/dname.c vendor/unbound/dist/util/data/dname.h vendor/unbound/dist/util/data/msgencode.c vendor/unbound/dist/util/data/msgencode.h vendor/unbound/dist/util/data/msgparse.c vendor/unbound/dist/util/data/msgparse.h vendor/unbound/dist/util/data/msgreply.c vendor/unbound/dist/util/data/msgreply.h vendor/unbound/dist/util/data/packed_rrset.c vendor/unbound/dist/util/data/packed_rrset.h vendor/unbound/dist/util/fptr_wlist.c vendor/unbound/dist/util/fptr_wlist.h vendor/unbound/dist/util/iana_ports.inc vendor/unbound/dist/util/locks.c vendor/unbound/dist/util/locks.h vendor/unbound/dist/util/log.c vendor/unbound/dist/util/log.h vendor/unbound/dist/util/mini_event.c vendor/unbound/dist/util/mini_event.h vendor/unbound/dist/util/module.c vendor/unbound/dist/util/module.h vendor/unbound/dist/util/net_help.c vendor/unbound/dist/util/net_help.h vendor/unbound/dist/util/netevent.c vendor/unbound/dist/util/netevent.h vendor/unbound/dist/util/random.c vendor/unbound/dist/util/random.h vendor/unbound/dist/util/rbtree.c vendor/unbound/dist/util/rbtree.h vendor/unbound/dist/util/regional.c vendor/unbound/dist/util/regional.h vendor/unbound/dist/util/rtt.c vendor/unbound/dist/util/rtt.h vendor/unbound/dist/util/storage/ vendor/unbound/dist/util/storage/dnstree.c vendor/unbound/dist/util/storage/dnstree.h vendor/unbound/dist/util/storage/lookup3.c vendor/unbound/dist/util/storage/lookup3.h vendor/unbound/dist/util/storage/lruhash.c vendor/unbound/dist/util/storage/lruhash.h vendor/unbound/dist/util/storage/slabhash.c vendor/unbound/dist/util/storage/slabhash.h vendor/unbound/dist/util/timehist.c vendor/unbound/dist/util/timehist.h vendor/unbound/dist/util/tube.c vendor/unbound/dist/util/tube.h vendor/unbound/dist/util/winsock_event.c vendor/unbound/dist/util/winsock_event.h vendor/unbound/dist/validator/ vendor/unbound/dist/validator/autotrust.c vendor/unbound/dist/validator/autotrust.h vendor/unbound/dist/validator/val_anchor.c vendor/unbound/dist/validator/val_anchor.h vendor/unbound/dist/validator/val_kcache.c vendor/unbound/dist/validator/val_kcache.h vendor/unbound/dist/validator/val_kentry.c vendor/unbound/dist/validator/val_kentry.h vendor/unbound/dist/validator/val_neg.c vendor/unbound/dist/validator/val_neg.h vendor/unbound/dist/validator/val_nsec.c vendor/unbound/dist/validator/val_nsec.h vendor/unbound/dist/validator/val_nsec3.c vendor/unbound/dist/validator/val_nsec3.h vendor/unbound/dist/validator/val_sigcrypt.c vendor/unbound/dist/validator/val_sigcrypt.h vendor/unbound/dist/validator/val_utils.c vendor/unbound/dist/validator/val_utils.h vendor/unbound/dist/validator/validator.c vendor/unbound/dist/validator/validator.h vendor/unbound/dist/winrc/ vendor/unbound/dist/winrc/README.txt vendor/unbound/dist/winrc/anchor-update.c vendor/unbound/dist/winrc/combined.ico (contents, props changed) vendor/unbound/dist/winrc/gen_msg.bin (contents, props changed) vendor/unbound/dist/winrc/gen_msg.mc vendor/unbound/dist/winrc/rsrc_anchorupd.rc vendor/unbound/dist/winrc/rsrc_svcinst.rc vendor/unbound/dist/winrc/rsrc_svcuninst.rc vendor/unbound/dist/winrc/rsrc_unbound.rc vendor/unbound/dist/winrc/rsrc_unbound_anchor.rc vendor/unbound/dist/winrc/rsrc_unbound_checkconf.rc vendor/unbound/dist/winrc/rsrc_unbound_control.rc vendor/unbound/dist/winrc/rsrc_unbound_host.rc vendor/unbound/dist/winrc/service.conf vendor/unbound/dist/winrc/setup.nsi vendor/unbound/dist/winrc/setup_left.bmp (contents, props changed) vendor/unbound/dist/winrc/setup_top.bmp (contents, props changed) vendor/unbound/dist/winrc/unbound-service-install.c vendor/unbound/dist/winrc/unbound-service-remove.c vendor/unbound/dist/winrc/unbound-website.url vendor/unbound/dist/winrc/unbound16.ico (contents, props changed) vendor/unbound/dist/winrc/unbound32.ico (contents, props changed) vendor/unbound/dist/winrc/unbound48.ico (contents, props changed) vendor/unbound/dist/winrc/unbound64.ico (contents, props changed) vendor/unbound/dist/winrc/unbound64.png (contents, props changed) vendor/unbound/dist/winrc/vista_admin.manifest (contents, props changed) vendor/unbound/dist/winrc/vista_user.manifest (contents, props changed) vendor/unbound/dist/winrc/w_inst.c vendor/unbound/dist/winrc/w_inst.h vendor/unbound/dist/winrc/win_svc.c vendor/unbound/dist/winrc/win_svc.h Added: vendor/unbound/dist/LICENSE ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/unbound/dist/LICENSE Wed Jul 4 14:24:26 2012 (r238106) @@ -0,0 +1,30 @@ +Copyright (c) 2007, NLnet Labs. All rights reserved. + +This software is open source. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + +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. + +Neither the name of the NLNET LABS nor the names of its contributors may +be used to endorse or promote products derived from this software without +specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. Added: vendor/unbound/dist/Makefile.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/unbound/dist/Makefile.in Wed Jul 4 14:24:26 2012 (r238106) @@ -0,0 +1,1193 @@ +# Copyright 2007 NLnet Labs +# See the file LICENSE for the license + +SHELL=@SHELL@ +VERSION=@PACKAGE_VERSION@ +srcdir=@srcdir@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +bindir=@bindir@ +sbindir=@sbindir@ +mandir=@mandir@ +libdir=@libdir@ +# datarootdir is here to please some checkers, use datadir. +datarootdir=@datarootdir@ +datadir=@datadir@ +includedir=@includedir@ +doxygen=@doxygen@ +libtool=@libtool@ +ldnsdir=@ldnsdir@ +staticexe=@staticexe@ +EXEEXT=@EXEEXT@ +configfile=@ub_conf_file@ +UNBOUND_RUN_DIR=@UNBOUND_RUN_DIR@ +CHECKLOCK_SRC=testcode/checklocks.c +CHECKLOCK_OBJ=@CHECKLOCK_OBJ@ +WITH_PYTHONMODULE=@WITH_PYTHONMODULE@ +WITH_PYUNBOUND=@WITH_PYUNBOUND@ +PYTHON_SITE_PKG=@PYTHON_SITE_PKG@ +PYTHONMOD_INSTALL=@PYTHONMOD_INSTALL@ +PYTHONMOD_UNINSTALL=@PYTHONMOD_UNINSTALL@ +PYUNBOUND_INSTALL=@PYUNBOUND_INSTALL@ +PYUNBOUND_UNINSTALL=@PYUNBOUND_UNINSTALL@ + +# _unbound.la if pyunbound enabled. +PYUNBOUND_TARGET=@PYUNBOUND_TARGET@ + +# override $U variable which is used by autotools for deansification (for +# K&R C compilers), but causes problems if $U is defined in the env). +U= + +SWIG=@SWIG@ +YACC=@YACC@ +LEX=@LEX@ +STRIP=@STRIP@ +CC=@CC@ +CPPFLAGS=-I. @CPPFLAGS@ +CFLAGS=@CFLAGS@ +LDFLAGS=@LDFLAGS@ +LIBS=@LIBS@ +LIBOBJS=@LIBOBJS@ +# filter out ctime_r from compat obj. +LIBOBJ_WITHOUT_CTIME=@LIBOBJ_WITHOUT_CTIME@ +RUNTIME_PATH=@RUNTIME_PATH@ +DEPFLAG=@DEPFLAG@ +DATE=@CONFIG_DATE@ +LIBTOOL=$(libtool) +BUILD=build/ +UBSYMS=@UBSYMS@ +EXTRALINK=@EXTRALINK@ + +WINDRES=@WINDRES@ +LINT=splint +LINTFLAGS=+quiet -weak -warnposix -unrecog -Din_addr_t=uint32_t -Du_int=unsigned -Du_char=uint8_t -preproc -Drlimit=rlimit64 -D__gnuc_va_list=va_list +#-Dglob64=glob -Dglobfree64=globfree +# compat with openssl linux edition. +LINTFLAGS+="-DBN_ULONG=unsigned long" -Dkrb5_int32=int "-Dkrb5_ui_4=unsigned int" -DPQ_64BIT=uint64_t -DRC4_INT=unsigned -fixedformalarray -D"ENGINE=unsigned" -D"RSA=unsigned" -D"DSA=unsigned" -D"EVP_PKEY=unsigned" -D"EVP_MD=unsigned" -D"SSL=unsigned" -D"SSL_CTX=unsigned" -D"X509=unsigned" -D"RC4_KEY=unsigned" -D"EVP_MD_CTX=unsigned" -D"ECDSA_SIG=DSA_SIG" +# compat with NetBSD +LINTFLAGS+=@NETBSD_LINTFLAGS@ +# compat with OpenBSD +LINTFLAGS+="-Dsigset_t=long" +# FreeBSD8 +LINTFLAGS+="-D__uint16_t=uint16_t" + +INSTALL=$(srcdir)/install-sh + +#pythonmod.c is not here, it is mentioned by itself in its own rules, +#makedepend fails on missing interface.h otherwise. +PYTHONMOD_SRC=pythonmod/pythonmod_utils.c +# pythonmod.lo pythonmod_utils.lo if python mod enabled. +PYTHONMOD_OBJ=@PYTHONMOD_OBJ@ +PYTHONMOD_HEADER=@PYTHONMOD_HEADER@ +# libunbound/python/libunbound_wrap.c is dealt with by its own rules. +PYUNBOUND_SRC= +# libunbound_wrap.lo if python libunbound wrapper enabled. +PYUNBOUND_OBJ=@PYUNBOUND_OBJ@ +COMMON_SRC=services/cache/dns.c services/cache/infra.c services/cache/rrset.c \ +util/data/dname.c util/data/msgencode.c util/data/msgparse.c \ +util/data/msgreply.c util/data/packed_rrset.c iterator/iterator.c \ +iterator/iter_delegpt.c iterator/iter_donotq.c iterator/iter_fwd.c \ +iterator/iter_hints.c iterator/iter_priv.c iterator/iter_resptype.c \ +iterator/iter_scrub.c iterator/iter_utils.c services/listen_dnsport.c \ +services/localzone.c services/mesh.c services/modstack.c \ +services/outbound_list.c services/outside_network.c util/alloc.c \ +util/config_file.c util/configlexer.c util/configparser.c \ +util/fptr_wlist.c util/locks.c util/log.c util/mini_event.c util/module.c \ +util/netevent.c util/net_help.c util/random.c util/rbtree.c util/regional.c \ +util/rtt.c util/storage/dnstree.c util/storage/lookup3.c \ +util/storage/lruhash.c util/storage/slabhash.c util/timehist.c util/tube.c \ +util/winsock_event.c validator/autotrust.c validator/val_anchor.c \ +validator/validator.c validator/val_kcache.c validator/val_kentry.c \ +validator/val_neg.c validator/val_nsec3.c validator/val_nsec.c \ +validator/val_sigcrypt.c validator/val_utils.c $(CHECKLOCK_SRC) +COMMON_OBJ_WITHOUT_NETCALL=dns.lo infra.lo rrset.lo dname.lo msgencode.lo \ +msgparse.lo msgreply.lo packed_rrset.lo iterator.lo iter_delegpt.lo \ +iter_donotq.lo iter_fwd.lo iter_hints.lo iter_priv.lo iter_resptype.lo \ +iter_scrub.lo iter_utils.lo localzone.lo mesh.lo modstack.lo \ +outbound_list.lo alloc.lo config_file.lo configlexer.lo configparser.lo \ +fptr_wlist.lo locks.lo log.lo mini_event.lo module.lo net_help.lo \ +random.lo rbtree.lo regional.lo rtt.lo dnstree.lo lookup3.lo lruhash.lo \ +slabhash.lo timehist.lo tube.lo winsock_event.lo autotrust.lo val_anchor.lo \ +validator.lo val_kcache.lo val_kentry.lo val_neg.lo val_nsec3.lo val_nsec.lo \ +val_sigcrypt.lo val_utils.lo $(PYTHONMOD_OBJ) $(CHECKLOCK_OBJ) +COMMON_OBJ=$(COMMON_OBJ_WITHOUT_NETCALL) netevent.lo listen_dnsport.lo \ +outside_network.lo +# set to $COMMON_OBJ or to "" if --enableallsymbols +COMMON_OBJ_ALL_SYMBOLS=@COMMON_OBJ_ALL_SYMBOLS@ +COMPAT_SRC=compat/ctime_r.c compat/fake-rfc2553.c compat/gmtime_r.c \ +compat/inet_aton.c compat/inet_ntop.c compat/inet_pton.c compat/malloc.c \ +compat/memcmp.c compat/memmove.c compat/snprintf.c compat/strlcpy.c \ +compat/strptime.c +COMPAT_OBJ=$(LIBOBJS:.o=.lo) +COMPAT_OBJ_WITHOUT_CTIME=$(LIBOBJ_WITHOUT_CTIME:.o=.lo) +UNITTEST_SRC=testcode/unitanchor.c testcode/unitdname.c \ +testcode/unitlruhash.c testcode/unitmain.c testcode/unitmsgparse.c \ +testcode/unitneg.c testcode/unitregional.c testcode/unitslabhash.c \ +testcode/unitverify.c testcode/readhex.c testcode/ldns-testpkts.c +UNITTEST_OBJ=unitanchor.lo unitdname.lo unitlruhash.lo unitmain.lo \ +unitmsgparse.lo unitneg.lo unitregional.lo unitslabhash.lo unitverify.lo \ +readhex.lo ldns-testpkts.lo +UNITTEST_OBJ_LINK=$(UNITTEST_OBJ) worker_cb.lo $(COMMON_OBJ) $(COMPAT_OBJ) +DAEMON_SRC=daemon/acl_list.c daemon/cachedump.c daemon/daemon.c \ +daemon/remote.c daemon/stats.c daemon/unbound.c daemon/worker.c @WIN_DAEMON_SRC@ +DAEMON_OBJ=acl_list.lo cachedump.lo daemon.lo remote.lo stats.lo unbound.lo \ +worker.lo @WIN_DAEMON_OBJ@ +DAEMON_OBJ_LINK=$(DAEMON_OBJ) $(COMMON_OBJ_ALL_SYMBOLS) \ +$(COMPAT_OBJ) @WIN_DAEMON_OBJ_LINK@ +CHECKCONF_SRC=smallapp/unbound-checkconf.c smallapp/worker_cb.c +CHECKCONF_OBJ=unbound-checkconf.lo worker_cb.lo +CHECKCONF_OBJ_LINK=$(CHECKCONF_OBJ) $(COMMON_OBJ_ALL_SYMBOLS) \ +$(COMPAT_OBJ) @WIN_CHECKCONF_OBJ_LINK@ +CONTROL_SRC=smallapp/unbound-control.c +CONTROL_OBJ=unbound-control.lo +CONTROL_OBJ_LINK=$(CONTROL_OBJ) worker_cb.lo $(COMMON_OBJ_ALL_SYMBOLS) \ +$(COMPAT_OBJ) @WIN_CONTROL_OBJ_LINK@ +HOST_SRC=smallapp/unbound-host.c +HOST_OBJ=unbound-host.lo +HOST_OBJ_LINK=$(HOST_OBJ) $(COMPAT_OBJ_WITHOUT_CTIME) @WIN_HOST_OBJ_LINK@ +UBANCHOR_SRC=smallapp/unbound-anchor.c +UBANCHOR_OBJ=unbound-anchor.lo +UBANCHOR_OBJ_LINK=$(UBANCHOR_OBJ) \ +$(COMPAT_OBJ_WITHOUT_CTIME) @WIN_UBANCHOR_OBJ_LINK@ +TESTBOUND_SRC=testcode/testbound.c testcode/ldns-testpkts.c \ +daemon/worker.c daemon/acl_list.c daemon/daemon.c daemon/stats.c \ +testcode/replay.c testcode/fake_event.c +TESTBOUND_OBJ=testbound.lo replay.lo fake_event.lo +TESTBOUND_OBJ_LINK=$(TESTBOUND_OBJ) ldns-testpkts.lo worker.lo acl_list.lo \ +daemon.lo stats.lo $(COMMON_OBJ_WITHOUT_NETCALL) $(COMPAT_OBJ) +LOCKVERIFY_SRC=testcode/lock_verify.c +LOCKVERIFY_OBJ=lock_verify.lo +LOCKVERIFY_OBJ_LINK=$(LOCKVERIFY_OBJ) worker_cb.lo $(COMMON_OBJ) $(COMPAT_OBJ) +PETAL_SRC=testcode/petal.c +PETAL_OBJ=petal.lo +PETAL_OBJ_LINK=$(PETAL_OBJ) $(COMPAT_OBJ_WITHOUT_CTIME) +PKTVIEW_SRC=testcode/pktview.c testcode/readhex.c +PKTVIEW_OBJ=pktview.lo +PKTVIEW_OBJ_LINK=$(PKTVIEW_OBJ) worker_cb.lo readhex.lo $(COMMON_OBJ) \ +$(COMPAT_OBJ) +SIGNIT_SRC=testcode/signit.c +SIGNIT_OBJ=signit.lo +SIGNIT_OBJ_LINK=$(SIGNIT_OBJ) worker_cb.lo $(COMMON_OBJ) $(COMPAT_OBJ) +MEMSTATS_SRC=testcode/memstats.c +MEMSTATS_OBJ=memstats.lo +MEMSTATS_OBJ_LINK=$(MEMSTATS_OBJ) worker_cb.lo $(COMMON_OBJ) $(COMPAT_OBJ) +ASYNCLOOK_SRC=testcode/asynclook.c +ASYNCLOOK_OBJ=asynclook.lo +ASYNCLOOK_OBJ_LINK=$(ASYNCLOOK_OBJ) log.lo locks.lo $(COMPAT_OBJ) +STREAMTCP_SRC=testcode/streamtcp.c +STREAMTCP_OBJ=streamtcp.lo +STREAMTCP_OBJ_LINK=$(STREAMTCP_OBJ) worker_cb.lo $(COMMON_OBJ) $(COMPAT_OBJ) +PERF_SRC=testcode/perf.c +PERF_OBJ=perf.lo +PERF_OBJ_LINK=$(PERF_OBJ) worker_cb.lo $(COMMON_OBJ) $(COMPAT_OBJ) +DELAYER_SRC=testcode/delayer.c +DELAYER_OBJ=delayer.lo +DELAYER_OBJ_LINK=$(DELAYER_OBJ) worker_cb.lo $(COMMON_OBJ) $(COMPAT_OBJ) +HARVEST_SRC=testcode/harvest.c +HARVEST_OBJ=harvest.lo +HARVEST_OBJ_LINK=$(HARVEST_OBJ) $(COMPAT_OBJ_WITHOUT_CTIME) +LIBUNBOUND_SRC=libunbound/context.c libunbound/libunbound.c \ +libunbound/libworker.c +LIBUNBOUND_OBJ=context.lo libunbound.lo libworker.lo +LIBUNBOUND_OBJ_LINK=$(LIBUNBOUND_OBJ) $(COMMON_OBJ) $(COMPAT_OBJ) + +# win apps or "" if not on windows +WINAPPS=@WINAPPS@ +WIN_DAEMON_THE_SRC=winrc/win_svc.c winrc/w_inst.c +SVCINST_SRC=winrc/unbound-service-install.c +SVCINST_OBJ=unbound-service-install.lo +SVCINST_OBJ_LINK=$(SVCINST_OBJ) w_inst.lo rsrc_svcinst.o $(COMPAT_OBJ_WITHOUT_CTIME) +SVCUNINST_SRC=winrc/unbound-service-remove.c +SVCUNINST_OBJ=unbound-service-remove.lo +SVCUNINST_OBJ_LINK=$(SVCUNINST_OBJ) w_inst.lo rsrc_svcuninst.o \ +$(COMPAT_OBJ_WITHOUT_CTIME) +ANCHORUPD_SRC=winrc/anchor-update.c +ANCHORUPD_OBJ=anchor-update.lo +ANCHORUPD_OBJ_LINK=$(ANCHORUPD_OBJ) rsrc_anchorupd.o $(COMPAT_OBJ_WITHOUT_CTIME) +RSRC_OBJ=rsrc_svcinst.o rsrc_svcuninst.o rsrc_anchorupd.o rsrc_unbound.o \ + rsrc_unbound_host.o rsrc_unbound_anchor.o rsrc_unbound_control.o \ + rsrc_unbound_checkconf.o + +ALL_SRC=$(COMMON_SRC) $(UNITTEST_SRC) $(DAEMON_SRC) \ + $(TESTBOUND_SRC) $(LOCKVERIFY_SRC) $(PKTVIEW_SRC) $(SIGNIT_SRC) \ + $(MEMSTATS_SRC) $(CHECKCONF_SRC) $(LIBUNBOUND_SRC) $(HOST_SRC) \ + $(ASYNCLOOK_SRC) $(STREAMTCP_SRC) $(PERF_SRC) $(DELAYER_SRC) \ + $(HARVEST_SRC) $(CONTROL_SRC) $(UBANCHOR_SRC) $(PETAL_SRC) \ + $(PYTHONMOD_SRC) $(PYUNBOUND_SRC) $(WIN_DAEMON_THE_SRC)\ + $(SVCINST_SRC) $(SVCUNINST_SRC) $(ANCHORUPD_SRC) +ALL_OBJ=$(COMMON_OBJ) $(UNITTEST_OBJ) $(DAEMON_OBJ) \ + $(TESTBOUND_OBJ) $(LOCKVERIFY_OBJ) $(PKTVIEW_OBJ) $(SIGNIT_OBJ) \ + $(MEMSTATS_OBJ) $(CHECKCONF_OBJ) $(LIBUNBOUND_OBJ) $(HOST_OBJ) \ + $(ASYNCLOOK_OBJ) $(STREAMTCP_OBJ) $(PERF_OBJ) $(DELAYER_OBJ) \ + $(HARVEST_OBJ) $(CONTROL_OBJ) $(UBANCHOR_OBJ) $(PETAL_OBJ) \ + $(COMPAT_OBJ) $(PYUNBOUND_OBJ) \ + $(SVCINST_OBJ) $(SVCUNINST_OBJ) $(ANCHORUPD_OBJ) + +COMPILE=$(LIBTOOL) --tag=CC --mode=compile $(CC) $(CPPFLAGS) $(CFLAGS) +LINK=$(LIBTOOL) --tag=CC --mode=link $(CC) $(staticexe) $(RUNTIME_PATH) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) +LINK_LIB=$(LIBTOOL) --tag=CC --mode=link $(CC) $(RUNTIME_PATH) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(staticexe) -version-info @LIBUNBOUND_CURRENT@:@LIBUNBOUND_REVISION@:@LIBUNBOUND_AGE@ -no-undefined + +.PHONY: clean realclean doc lint all install uninstall tests test strip lib longtest longcheck check + +all: $(COMMON_OBJ) unbound$(EXEEXT) unbound-checkconf$(EXEEXT) lib unbound-host$(EXEEXT) unbound-control$(EXEEXT) unbound-anchor$(EXEEXT) unbound-control-setup $(WINAPPS) $(PYUNBOUND_TARGET) + +# compat with BSD make, register suffix, and an implicit rule to actualise it. +.SUFFIXES: .lo +.c.lo: + $(COMPILE) -o $@ -c $< + +$(ALL_OBJ): + @@SOURCEDETERMINE@ + $(COMPILE) -o $@ -c @SOURCEFILE@ + +$(RSRC_OBJ): + @@SOURCEDETERMINE@ + $(WINDRES) $(CPPFLAGS) @SOURCEFILE@ $@ + +rsrc_svcinst.o: $(srcdir)/winrc/rsrc_svcinst.rc config.h +rsrc_svcuninst.o: $(srcdir)/winrc/rsrc_svcuninst.rc config.h +rsrc_anchorupd.o: $(srcdir)/winrc/rsrc_anchorupd.rc config.h +rsrc_unbound.o: $(srcdir)/winrc/rsrc_unbound.rc config.h +rsrc_unbound_host.o: $(srcdir)/winrc/rsrc_unbound_host.rc config.h +rsrc_unbound_anchor.o: $(srcdir)/winrc/rsrc_unbound_anchor.rc config.h +rsrc_unbound_control.o: $(srcdir)/winrc/rsrc_unbound_control.rc config.h +rsrc_unbound_checkconf.o: $(srcdir)/winrc/rsrc_unbound_checkconf.rc config.h + +TEST_BIN=asynclook$(EXEEXT) delayer$(EXEEXT) harvest$(EXEEXT) \ + lock-verify$(EXEEXT) memstats$(EXEEXT) perf$(EXEEXT) \ + petal$(EXEEXT) pktview$(EXEEXT) signit$(EXEEXT) streamtcp$(EXEEXT) \ + testbound$(EXEEXT) unittest$(EXEEXT) +tests: all $(TEST_BIN) + +check: test +longcheck: longtest + +test: unittest$(EXEEXT) testbound$(EXEEXT) + ./unittest$(EXEEXT) + ./testbound$(EXEEXT) -s + for x in testdata/*.rpl; do echo -n "$$x "; if ./testbound$(EXEEXT) -p $$x >/dev/null 2>&1; then echo OK; else echo failed; exit 1; fi done + @echo test OK + +longtest: tests + if test -x "`which bash`"; then bash testcode/do-tests.sh; else sh testcode/do-tests.sh; fi + +lib: libunbound.la + +libunbound.la: $(LIBUNBOUND_OBJ_LINK) + $(LINK_LIB) $(UBSYMS) -o $@ $(LIBUNBOUND_OBJ_LINK) -rpath $(libdir) -lssl $(LIBS) + +unbound$(EXEEXT): $(DAEMON_OBJ_LINK) libunbound.la + $(LINK) -o $@ $(DAEMON_OBJ_LINK) $(EXTRALINK) -lssl $(LIBS) + +unbound-checkconf$(EXEEXT): $(CHECKCONF_OBJ_LINK) libunbound.la + $(LINK) -o $@ $(CHECKCONF_OBJ_LINK) $(EXTRALINK) -lssl $(LIBS) + +unbound-control$(EXEEXT): $(CONTROL_OBJ_LINK) libunbound.la + $(LINK) -o $@ $(CONTROL_OBJ_LINK) $(EXTRALINK) -lssl $(LIBS) + +unbound-host$(EXEEXT): $(HOST_OBJ_LINK) libunbound.la + $(LINK) -o $@ $(HOST_OBJ_LINK) -L. -L.libs -lunbound $(LIBS) + +unbound-anchor$(EXEEXT): $(UBANCHOR_OBJ_LINK) libunbound.la + $(LINK) -o $@ $(UBANCHOR_OBJ_LINK) -L. -L.libs -lunbound -lexpat -lssl $(LIBS) + +unbound-service-install$(EXEEXT): $(SVCINST_OBJ_LINK) + $(LINK) -o $@ $(SVCINST_OBJ_LINK) $(LIBS) + +unbound-service-remove$(EXEEXT): $(SVCUNINST_OBJ_LINK) + $(LINK) -o $@ $(SVCUNINST_OBJ_LINK) $(LIBS) + +anchor-update$(EXEEXT): $(ANCHORUPD_OBJ_LINK) libunbound.la + $(LINK) -o $@ $(ANCHORUPD_OBJ_LINK) -L. -L.libs -lunbound $(LIBS) + +unittest$(EXEEXT): $(UNITTEST_OBJ_LINK) + $(LINK) -o $@ $(UNITTEST_OBJ_LINK) -lssl $(LIBS) + +testbound$(EXEEXT): $(TESTBOUND_OBJ_LINK) + $(LINK) -o $@ $(TESTBOUND_OBJ_LINK) -lssl $(LIBS) + +lock-verify$(EXEEXT): $(LOCKVERIFY_OBJ_LINK) + $(LINK) -o $@ $(LOCKVERIFY_OBJ_LINK) -lssl $(LIBS) + +petal$(EXEEXT): $(PETAL_OBJ_LINK) + $(LINK) -o $@ $(PETAL_OBJ_LINK) -lssl $(LIBS) + +pktview$(EXEEXT): $(PKTVIEW_OBJ_LINK) + $(LINK) -o $@ $(PKTVIEW_OBJ_LINK) -lssl $(LIBS) + +signit$(EXEEXT): $(SIGNIT_OBJ_LINK) + $(LINK) -o $@ $(SIGNIT_OBJ_LINK) -lssl $(LIBS) + +memstats$(EXEEXT): $(MEMSTATS_OBJ_LINK) + $(LINK) -o $@ $(MEMSTATS_OBJ_LINK) -lssl $(LIBS) + +asynclook$(EXEEXT): $(ASYNCLOOK_OBJ_LINK) libunbound.la + $(LINK) -o $@ $(ASYNCLOOK_OBJ_LINK) $(LIBS) -L. -L.libs -lunbound + +streamtcp$(EXEEXT): $(STREAMTCP_OBJ_LINK) + $(LINK) -o $@ $(STREAMTCP_OBJ_LINK) -lssl $(LIBS) + +perf$(EXEEXT): $(PERF_OBJ_LINK) + $(LINK) -o $@ $(PERF_OBJ_LINK) -lssl $(LIBS) + +delayer$(EXEEXT): $(DELAYER_OBJ_LINK) + $(LINK) -o $@ $(DELAYER_OBJ_LINK) -lssl $(LIBS) + +harvest$(EXEEXT): $(HARVEST_OBJ_LINK) libunbound.la + $(LINK) -o $@ $(HARVEST_OBJ_LINK) $(LIBS) -L. -L.libs -lunbound + +unbound-control-setup: $(srcdir)/smallapp/unbound-control-setup.sh + sed -e 's:^DESTDIR=.*$$:DESTDIR=$(UNBOUND_RUN_DIR):' < $(srcdir)/smallapp/unbound-control-setup.sh > $@ + -chmod +x $@ + +#testcode/ldns-testpkts.c: $(ldnsdir)/examples/ldns-testpkts.c \ +# $(ldnsdir)/examples/ldns-testpkts.h +# cp $(ldnsdir)/examples/ldns-testpkts.c testcode/ldns-testpkts.c +# cp $(ldnsdir)/examples/ldns-testpkts.h testcode/ldns-testpkts.h + +# Python Module +pythonmod.lo pythonmod.o: $(srcdir)/pythonmod/pythonmod.c config.h \ + pythonmod/interface.h \ + $(srcdir)/pythonmod/pythonmod.h $(srcdir)/util/module.h \ + $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ + $(srcdir)/util/log.h $(srcdir)/util/data/msgreply.h \ + $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h \ + $(srcdir)/services/outbound_list.h $(srcdir)/util/config_file.h \ + $(srcdir)/pythonmod/pythonmod_utils.h $(srcdir)/util/netevent.h \ + $(srcdir)/util/regional.h $(srcdir)/util/data/dname.h \ + $(srcdir)/services/cache/dns.h $(srcdir)/services/mesh.h \ + $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h + +pythonmod/interface.h: $(srcdir)/pythonmod/interface.i $(srcdir)/config.h + @-if test ! -d pythonmod; then $(INSTALL) -d pythonmod; fi + $(SWIG) $(CPPFLAGS) -o $@ -python $(srcdir)/pythonmod/interface.i + +libunbound_wrap.lo libunbound_wrap.o: libunbound/python/libunbound_wrap.c \ + $(srcdir)/libunbound/unbound.h +libunbound/python/libunbound_wrap.c: $(srcdir)/libunbound/python/libunbound.i $(srcdir)/libunbound/unbound.h + @-if test ! -d libunbound/python; then $(INSTALL) -d libunbound/python; fi + $(SWIG) -python -o $@ $(CPPFLAGS) $(srcdir)/libunbound/python/libunbound.i + +# Pyunbound python unbound wrapper +_unbound.la: libunbound_wrap.lo libunbound.la + $(LIBTOOL) --tag=CC --mode=link $(CC) $(RUNTIME_PATH) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -module -version-info @LIBUNBOUND_CURRENT@:@LIBUNBOUND_REVISION@:@LIBUNBOUND_AGE@ -no-undefined -o $@ libunbound_wrap.lo -rpath $(PYTHON_SITE_PKG) L. -L.libs -lunbound $(LIBS) + +util/config_file.c: util/configparser.h +util/configlexer.c: $(srcdir)/util/configlexer.lex util/configparser.h + @-if test ! -d util; then $(INSTALL) -d util; fi + if test "$(LEX)" != ":"; then \ + echo "#include \"config.h\"" > $@ ;\ + echo "#include \"util/configyyrename.h\"" >> $@ ;\ + $(LEX) -t $(srcdir)/util/configlexer.lex >> $@ ;\ + fi + +util/configparser.c util/configparser.h: $(srcdir)/util/configparser.y + @-if test ! -d util; then $(INSTALL) -d util; fi + $(YACC) -d -o util/configparser.c $(srcdir)/util/configparser.y + +clean: + rm -f *.o *.d *.lo *~ tags + rm -f unbound$(EXEEXT) unbound-checkconf$(EXEEXT) unbound-host$(EXEEXT) unbound-control$(EXEEXT) unbound-anchor$(EXEEXT) unbound-control-setup libunbound.la + rm -f $(ALL_SRC:.c=.lint) + rm -rf autom4te.cache .libs build doc/html doc/xml + +realclean: clean + rm -f config.status config.log config.h.in config.h + rm -f configure config.sub config.guess ltmain.sh aclocal.m4 libtool + rm -f util/configlexer.c util/configparser.c util/configparser.h + rm -f $(TEST_BIN) + rm -f Makefile + +.SUFFIXES: .lint +.c.lint: + $(LINT) $(LINTFLAGS) -I. -I$(srcdir) -I$(ldnsdir)/include $< + touch $@ + +util/configparser.lint util/configlexer.lint pythonmod/pythonmod.lint libunbound/python/libunbound_wrap.lint: + # skip lint for generated code + touch $@ + +winrc/win_svc.lint winrc/w_inst.lint winrc/unbound-service-install.lint winrc/unbound-service-remove.lint: + # skip lint for windows types + touch $@ + +lint: $(ALL_SRC:.c=.lint) + +tags: $(srcdir)/*.[ch] $(srcdir)/*/*.[ch] + ctags -f $(srcdir)/tags $(srcdir)/*.[ch] $(srcdir)/*/*.[ch] + +doc: + if test -n "$(doxygen)"; then \ + $(doxygen) $(srcdir)/doc/unbound.doxygen; fi + if test "$(WITH_PYUNBOUND)" = "yes" -o "$(WITH_PYTHONMODULE)" = "yes"; \ + then if test -x "`which sphinx-build 2>&1`"; then \ + sphinx-build -b html pythonmod/doc doc/html/pythonmod; \ + sphinx-build -b html libunbound/python/doc doc/html/pyunbound;\ + fi ;\ + fi + +strip: + $(STRIP) unbound$(EXEEXT) + $(STRIP) unbound-checkconf$(EXEEXT) + $(STRIP) unbound-control$(EXEEXT) + $(STRIP) unbound-host$(EXEEXT) + $(STRIP) unbound-anchor$(EXEEXT) + +pythonmod-install: + $(INSTALL) -m 755 -d $(DESTDIR)$(PYTHON_SITE_PKG) + $(INSTALL) -c -m 644 pythonmod/unboundmodule.py $(DESTDIR)$(PYTHON_SITE_PKG)/unboundmodule.py + +pyunbound-install: + $(INSTALL) -m 755 -d $(DESTDIR)$(PYTHON_SITE_PKG) + $(INSTALL) -c -m 644 libunbound/python/unbound.py $(DESTDIR)$(PYTHON_SITE_PKG)/unbound.py + $(LIBTOOL) --mode=install cp _unbound.la $(DESTDIR)$(PYTHON_SITE_PKG) + $(LIBTOOL) --mode=finish $(DESTDIR)$(PYTHON_SITE_PKG) + +install: all $(PYTHONMOD_INSTALL) $(PYUNBOUND_INSTALL) + $(INSTALL) -m 755 -d $(DESTDIR)$(sbindir) + $(INSTALL) -m 755 -d $(DESTDIR)$(mandir) + $(INSTALL) -m 755 -d $(DESTDIR)$(mandir)/man8 + $(INSTALL) -m 755 -d $(DESTDIR)$(mandir)/man5 + $(INSTALL) -m 755 -d $(DESTDIR)$(mandir)/man3 + $(INSTALL) -m 755 -d $(DESTDIR)$(mandir)/man1 + $(INSTALL) -m 755 -d $(DESTDIR)$(libdir) + $(INSTALL) -m 755 -d $(DESTDIR)$(includedir) + $(LIBTOOL) --mode=install cp unbound$(EXEEXT) $(DESTDIR)$(sbindir)/unbound$(EXEEXT) + $(LIBTOOL) --mode=install cp unbound-checkconf$(EXEEXT) $(DESTDIR)$(sbindir)/unbound-checkconf$(EXEEXT) + $(LIBTOOL) --mode=install cp unbound-control$(EXEEXT) $(DESTDIR)$(sbindir)/unbound-control$(EXEEXT) + $(LIBTOOL) --mode=install cp unbound-host$(EXEEXT) $(DESTDIR)$(sbindir)/unbound-host$(EXEEXT) + $(LIBTOOL) --mode=install cp unbound-anchor$(EXEEXT) $(DESTDIR)$(sbindir)/unbound-anchor$(EXEEXT) + $(INSTALL) -c -m 644 doc/unbound.8 $(DESTDIR)$(mandir)/man8 + $(INSTALL) -c -m 644 doc/unbound-checkconf.8 $(DESTDIR)$(mandir)/man8 + $(INSTALL) -c -m 644 doc/unbound-control.8 $(DESTDIR)$(mandir)/man8 + $(INSTALL) -c -m 644 doc/unbound-anchor.8 $(DESTDIR)$(mandir)/man8 + $(INSTALL) -c -m 644 doc/unbound.conf.5 $(DESTDIR)$(mandir)/man5 + $(INSTALL) -c -m 644 $(srcdir)/doc/unbound-host.1 $(DESTDIR)$(mandir)/man1 + $(INSTALL) -c -m 644 doc/libunbound.3 $(DESTDIR)$(mandir)/man3 + $(INSTALL) -c -m 755 unbound-control-setup $(DESTDIR)$(sbindir)/unbound-control-setup + if test ! -e $(DESTDIR)$(configfile); then $(INSTALL) -d `dirname $(DESTDIR)$(configfile)`; $(INSTALL) -c -m 644 doc/example.conf $(DESTDIR)$(configfile); fi + $(LIBTOOL) --mode=install cp $(srcdir)/libunbound/unbound.h $(DESTDIR)$(includedir)/unbound.h + $(LIBTOOL) --mode=install cp libunbound.la $(DESTDIR)$(libdir) + $(LIBTOOL) --mode=finish $(DESTDIR)$(libdir) + +pythonmod-uninstall: + rm -f -- $(DESTDIR)$(PYTHON_SITE_PKG)/unboundmodule.py + +pyunbound-uninstall: + rm -f -- $(DESTDIR)$(PYTHON_SITE_PKG)/unbound.py + $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(PYTHON_SITE_PKG)/_unbound.la + +uninstall: $(PYTHONMOD_UNINSTALL) $(PYUNBOUND_UNINSTALL) + rm -f -- $(DESTDIR)$(sbindir)/unbound$(EXEEXT) $(DESTDIR)$(sbindir)/unbound-checkconf$(EXEEXT) $(DESTDIR)$(sbindir)/unbound-host$(EXEEXT) $(DESTDIR)$(sbindir)/unbound-control$(EXEEXT) $(DESTDIR)$(sbindir)/unbound-anchor$(EXEEXT) $(DESTDIR)$(sbindir)/unbound-control-setup + rm -f -- $(DESTDIR)$(mandir)/man8/unbound.8 $(DESTDIR)$(mandir)/man8/unbound-checkconf.8 $(DESTDIR)$(mandir)/man5/unbound.conf.5 $(DESTDIR)$(mandir)/man8/unbound-control.8 $(DESTDIR)$(mandir)/man8/unbound-anchor.8 + rm -f -- $(DESTDIR)$(mandir)/man1/unbound-host.1 $(DESTDIR)$(mandir)/man3/libunbound.3 + rm -f -- $(DESTDIR)$(includedir)/unbound.h + $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/libunbound.la + @echo + @echo "You still need to remove "`dirname $(DESTDIR)$(configfile)`" , $(DESTDIR)$(configfile) by hand" + +iana_update: + curl -o port-numbers.tmp http://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xml --compressed + if file port-numbers.tmp | grep 'gzip' >/dev/null; then zcat port-numbers.tmp; else cat port-numbers.tmp; fi | awk '// {p=0;} /udp/ {p=1;} /[^u]/ {p=0;} /Decomissioned|Decommissioned|Removed|De-registered|unassigned|Unassigned|Reserved/ {u=1;} // { if(u==1) {u=0;} else { if(p==1) { match($$0,/[0-9]+/); print substr($$0, RSTART, RLENGTH) ","}}}' | sort -nu > util/iana_ports.inc + rm -f port-numbers.tmp + +# dependency generation +DEPEND_TMP=depend1073.tmp +DEPEND_TMP2=depend1074.tmp +DEPEND_TARGET=Makefile +DEPEND_TARGET2=Makefile.in +# actions: generate deplines from gcc, +# then, filter out home/xx, /usr/xx and /opt/xx lines (some cc already do this) +# then, remove empty " \" lines +# then, add srcdir before .c and .h in deps. +# then, remove srcdir from the (generated) parser and lexer. +# and mention the .lo +depend: + (cd $(srcdir) ; $(CC) $(DEPFLAG) $(CPPFLAGS) $(CFLAGS) $(ALL_SRC) $(COMPAT_SRC)) | \ + sed -e 's!'$$HOME'[^ ]* !!g' -e 's!'$$HOME'[^ ]*$$!!g' \ + -e 's!/usr[^ ]* !!g' -e 's!/usr[^ ]*$$!!g' \ + -e 's!/opt[^ ]* !!g' -e 's!/opt[^ ]*$$!!g' | \ + sed -e '/^ \\$$/d' | \ + sed -e 's? *\([^ ]*\.[ch]\)? $$(srcdir)/\1?g' | \ + sed -e 's? *\([^ ]*\.inc\)? $$(srcdir)/\1?g' | \ + sed -e 's?$$(srcdir)/config.h?config.h?g' \ + -e 's?$$(srcdir)/util/configlexer.c?util/configlexer.c?g' \ + -e 's?$$(srcdir)/util/configparser.c?util/configparser.c?g' \ + -e 's?$$(srcdir)/util/configparser.h?util/configparser.h?g' \ + -e 's?$$(srcdir)/pythonmod/pythonmod.h?$$(PYTHONMOD_HEADER)?g' \ + -e 's!\(.*\)\.o[ :]*!\1.lo \1.o: !g' \ + > $(DEPEND_TMP) + cp $(DEPEND_TARGET) $(DEPEND_TMP2) + head -`egrep -n "# Dependencies" $(DEPEND_TARGET) | tail -1 | sed -e 's/:.*$$//'` $(DEPEND_TMP2) > $(DEPEND_TARGET) + cat $(DEPEND_TMP) >> $(DEPEND_TARGET) + @if diff $(DEPEND_TARGET) $(DEPEND_TMP2); then echo " $(DEPEND_TARGET) unchanged"; else echo " Updated $(DEPEND_TARGET))"; fi + @if test -f $(DEPEND_TARGET2); then \ + cp $(DEPEND_TARGET2) $(DEPEND_TMP2); \ + head -`egrep -n "# Dependencies" $(DEPEND_TARGET2) | tail -1 | sed -e 's/:.*$$//'` $(DEPEND_TMP2) > $(DEPEND_TARGET2); \ + cat $(DEPEND_TMP) >> $(DEPEND_TARGET2); \ + if diff $(DEPEND_TARGET2) $(DEPEND_TMP2); then echo " $(DEPEND_TARGET2) unchanged"; else echo " Updated $(DEPEND_TARGET2))"; fi; \ + fi + rm -f $(DEPEND_TMP) $(DEPEND_TMP2) + +# Dependencies +dns.lo dns.o: $(srcdir)/services/cache/dns.c config.h $(srcdir)/iterator/iter_delegpt.h $(srcdir)/util/log.h \ + $(srcdir)/validator/val_nsec.h \ + $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ + $(srcdir)/services/cache/dns.h \ + $(srcdir)/util/data/msgreply.h $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h \ + $(srcdir)/util/data/dname.h $(srcdir)/util/module.h $(srcdir)/util/data/msgparse.h \ + $(srcdir)/util/net_help.h \ + $(srcdir)/util/regional.h $(srcdir)/util/config_file.h +infra.lo infra.o: $(srcdir)/services/cache/infra.c config.h \ + $(srcdir)/services/cache/infra.h \ + $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/rtt.h \ + $(srcdir)/util/storage/slabhash.h $(srcdir)/util/storage/lookup3.h $(srcdir)/util/data/dname.h \ + $(srcdir)/util/net_help.h $(srcdir)/util/config_file.h $(srcdir)/iterator/iterator.h \ + $(srcdir)/services/outbound_list.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ + $(srcdir)/util/module.h $(srcdir)/util/data/msgparse.h \ + +rrset.lo rrset.o: $(srcdir)/services/cache/rrset.c config.h $(srcdir)/services/cache/rrset.h \ + $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ + $(srcdir)/util/storage/slabhash.h $(srcdir)/util/data/packed_rrset.h \ + $(srcdir)/util/config_file.h \ + $(srcdir)/util/data/msgreply.h $(srcdir)/util/regional.h $(srcdir)/util/alloc.h +dname.lo dname.o: $(srcdir)/util/data/dname.c config.h $(srcdir)/util/data/dname.h \ + $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ + $(srcdir)/util/data/msgparse.h \ + $(srcdir)/util/storage/lookup3.h +msgencode.lo msgencode.o: $(srcdir)/util/data/msgencode.c config.h \ + $(srcdir)/util/data/msgencode.h \ + $(srcdir)/util/data/msgreply.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ + $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h $(srcdir)/util/data/dname.h \ + $(srcdir)/util/regional.h $(srcdir)/util/net_help.h +msgparse.lo msgparse.o: $(srcdir)/util/data/msgparse.c config.h \ + $(srcdir)/util/data/msgparse.h \ + $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/net_help.h \ + $(srcdir)/util/data/dname.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lookup3.h \ + $(srcdir)/util/regional.h +msgreply.lo msgreply.o: $(srcdir)/util/data/msgreply.c config.h \ + $(srcdir)/util/data/msgreply.h \ + $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/data/packed_rrset.h \ + $(srcdir)/util/storage/lookup3.h $(srcdir)/util/alloc.h $(srcdir)/util/netevent.h $(srcdir)/util/net_help.h \ + $(srcdir)/util/data/dname.h $(srcdir)/util/regional.h $(srcdir)/util/data/msgparse.h \ + $(srcdir)/util/data/msgencode.h +packed_rrset.lo packed_rrset.o: $(srcdir)/util/data/packed_rrset.c config.h \ + $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ + $(srcdir)/util/data/dname.h $(srcdir)/util/storage/lookup3.h $(srcdir)/util/alloc.h $(srcdir)/util/regional.h \ + $(srcdir)/util/net_help.h +iterator.lo iterator.o: $(srcdir)/iterator/iterator.c config.h \ + $(srcdir)/iterator/iterator.h \ + $(srcdir)/services/outbound_list.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/storage/lruhash.h \ + $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/module.h \ + $(srcdir)/util/data/msgparse.h $(srcdir)/iterator/iter_utils.h $(srcdir)/iterator/iter_resptype.h \ + $(srcdir)/iterator/iter_hints.h $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h \ + $(srcdir)/iterator/iter_fwd.h $(srcdir)/iterator/iter_donotq.h $(srcdir)/iterator/iter_delegpt.h \ + $(srcdir)/iterator/iter_scrub.h $(srcdir)/iterator/iter_priv.h $(srcdir)/validator/val_neg.h \ + $(srcdir)/services/cache/dns.h $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h $(srcdir)/util/netevent.h \ + $(srcdir)/util/net_help.h $(srcdir)/util/regional.h $(srcdir)/util/data/dname.h $(srcdir)/util/data/msgencode.h \ + $(srcdir)/util/fptr_wlist.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/services/modstack.h \ + $(srcdir)/util/config_file.h +iter_delegpt.lo iter_delegpt.o: $(srcdir)/iterator/iter_delegpt.c config.h $(srcdir)/iterator/iter_delegpt.h \ + $(srcdir)/util/log.h \ + $(srcdir)/services/cache/dns.h \ + $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/data/msgreply.h \ + $(srcdir)/util/data/packed_rrset.h \ + $(srcdir)/util/regional.h \ + $(srcdir)/util/data/dname.h $(srcdir)/util/net_help.h +iter_donotq.lo iter_donotq.o: $(srcdir)/iterator/iter_donotq.c config.h $(srcdir)/iterator/iter_donotq.h \ + $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/util/regional.h $(srcdir)/util/log.h \ + $(srcdir)/util/config_file.h \ + $(srcdir)/util/net_help.h +iter_fwd.lo iter_fwd.o: $(srcdir)/iterator/iter_fwd.c config.h \ + $(srcdir)/iterator/iter_fwd.h \ + $(srcdir)/util/rbtree.h $(srcdir)/iterator/iter_delegpt.h $(srcdir)/util/log.h $(srcdir)/util/config_file.h \ + $(srcdir)/util/net_help.h $(srcdir)/util/data/dname.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h +iter_hints.lo iter_hints.o: $(srcdir)/iterator/iter_hints.c config.h \ + $(srcdir)/iterator/iter_hints.h \ + $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/iterator/iter_delegpt.h $(srcdir)/util/log.h \ + $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h $(srcdir)/util/data/dname.h \ + $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h +iter_priv.lo iter_priv.o: $(srcdir)/iterator/iter_priv.c config.h \ + $(srcdir)/iterator/iter_priv.h \ + $(srcdir)/util/rbtree.h \ + $(srcdir)/util/regional.h $(srcdir)/util/log.h $(srcdir)/util/config_file.h $(srcdir)/util/data/dname.h \ + $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/data/msgparse.h \ + $(srcdir)/util/net_help.h \ + $(srcdir)/util/storage/dnstree.h +iter_resptype.lo iter_resptype.o: $(srcdir)/iterator/iter_resptype.c config.h \ + $(srcdir)/iterator/iter_resptype.h $(srcdir)/iterator/iter_delegpt.h $(srcdir)/util/log.h \ + $(srcdir)/services/cache/dns.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ + $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/net_help.h \ + $(srcdir)/util/data/dname.h +iter_scrub.lo iter_scrub.o: $(srcdir)/iterator/iter_scrub.c config.h $(srcdir)/iterator/iter_scrub.h \ + $(srcdir)/iterator/iterator.h \ + $(srcdir)/services/outbound_list.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/storage/lruhash.h \ + $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/data/packed_rrset.h \ + $(srcdir)/util/module.h \ + $(srcdir)/util/data/msgparse.h \ + $(srcdir)/iterator/iter_priv.h $(srcdir)/util/rbtree.h $(srcdir)/services/cache/rrset.h \ + $(srcdir)/util/storage/slabhash.h $(srcdir)/util/net_help.h $(srcdir)/util/regional.h \ + $(srcdir)/util/config_file.h $(srcdir)/util/data/dname.h $(srcdir)/util/alloc.h +iter_utils.lo iter_utils.o: $(srcdir)/iterator/iter_utils.c config.h $(srcdir)/iterator/iter_utils.h \ + $(srcdir)/iterator/iter_resptype.h \ + $(srcdir)/iterator/iterator.h \ + $(srcdir)/services/outbound_list.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/storage/lruhash.h \ + $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/data/packed_rrset.h \ + $(srcdir)/util/module.h \ + $(srcdir)/util/data/msgparse.h \ + $(srcdir)/iterator/iter_hints.h $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h \ + $(srcdir)/iterator/iter_fwd.h $(srcdir)/iterator/iter_donotq.h $(srcdir)/iterator/iter_delegpt.h \ + $(srcdir)/iterator/iter_priv.h $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h \ + $(srcdir)/services/cache/dns.h $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h \ + $(srcdir)/util/net_help.h $(srcdir)/util/config_file.h $(srcdir)/util/regional.h $(srcdir)/util/data/dname.h \ + $(srcdir)/util/random.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/netevent.h $(srcdir)/util/tube.h \ + $(srcdir)/services/mesh.h $(srcdir)/services/modstack.h $(srcdir)/validator/val_anchor.h \ + $(srcdir)/validator/val_kcache.h $(srcdir)/validator/val_kentry.h $(srcdir)/validator/val_utils.h +listen_dnsport.lo listen_dnsport.o: $(srcdir)/services/listen_dnsport.c config.h \ + $(srcdir)/services/listen_dnsport.h $(srcdir)/util/netevent.h \ + $(srcdir)/services/outside_network.h $(srcdir)/util/rbtree.h $(srcdir)/util/log.h $(srcdir)/util/config_file.h \ + $(srcdir)/util/net_help.h +localzone.lo localzone.o: $(srcdir)/services/localzone.c config.h \ + $(srcdir)/services/localzone.h \ + $(srcdir)/util/rbtree.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/regional.h $(srcdir)/util/config_file.h \ + $(srcdir)/util/data/dname.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/data/packed_rrset.h \ + $(srcdir)/util/data/msgencode.h $(srcdir)/util/net_help.h $(srcdir)/util/data/msgreply.h \ + $(srcdir)/util/data/msgparse.h +mesh.lo mesh.o: $(srcdir)/services/mesh.c config.h \ + $(srcdir)/services/mesh.h \ + $(srcdir)/util/rbtree.h $(srcdir)/util/netevent.h $(srcdir)/util/data/msgparse.h \ + $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/module.h \ + $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/services/modstack.h \ + $(srcdir)/services/outbound_list.h $(srcdir)/services/cache/dns.h $(srcdir)/util/net_help.h \ + $(srcdir)/util/regional.h $(srcdir)/util/data/msgencode.h $(srcdir)/util/timehist.h $(srcdir)/util/fptr_wlist.h \ + $(srcdir)/util/tube.h $(srcdir)/util/alloc.h $(srcdir)/util/config_file.h +modstack.lo modstack.o: $(srcdir)/services/modstack.c config.h $(srcdir)/services/modstack.h \ + $(srcdir)/util/module.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ + $(srcdir)/util/data/msgreply.h \ + $(srcdir)/util/data/packed_rrset.h \ + $(srcdir)/util/data/msgparse.h \ + $(srcdir)/util/fptr_wlist.h \ + $(srcdir)/util/netevent.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h \ + $(srcdir)/iterator/iterator.h $(srcdir)/services/outbound_list.h $(srcdir)/validator/validator.h \ + $(srcdir)/validator/val_utils.h $(PYTHONMOD_HEADER) +outbound_list.lo outbound_list.o: $(srcdir)/services/outbound_list.c config.h \ + $(srcdir)/services/outbound_list.h $(srcdir)/services/outside_network.h $(srcdir)/util/rbtree.h \ + $(srcdir)/util/netevent.h \ + +outside_network.lo outside_network.o: $(srcdir)/services/outside_network.c config.h \ + $(srcdir)/services/outside_network.h $(srcdir)/util/rbtree.h $(srcdir)/util/netevent.h \ + $(srcdir)/services/listen_dnsport.h $(srcdir)/services/cache/infra.h $(srcdir)/util/storage/lruhash.h \ + $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/rtt.h $(srcdir)/util/data/msgparse.h \ + $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgencode.h \ + $(srcdir)/util/data/dname.h $(srcdir)/util/net_help.h $(srcdir)/util/random.h $(srcdir)/util/fptr_wlist.h \ + $(srcdir)/util/module.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/services/modstack.h \ + +alloc.lo alloc.o: $(srcdir)/util/alloc.c config.h $(srcdir)/util/alloc.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ + $(srcdir)/util/regional.h \ + $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h \ + $(srcdir)/util/fptr_wlist.h \ + $(srcdir)/util/netevent.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h \ + $(srcdir)/util/tube.h \ + $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h +config_file.lo config_file.o: $(srcdir)/util/config_file.c config.h \ + $(srcdir)/util/log.h \ + $(srcdir)/util/configyyrename.h $(srcdir)/util/config_file.h util/configparser.h \ + $(srcdir)/util/net_help.h $(srcdir)/util/data/msgparse.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ + $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ + $(srcdir)/util/regional.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/netevent.h $(srcdir)/util/tube.h \ + $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h $(srcdir)/util/data/dname.h \ + $(srcdir)/util/iana_ports.inc +configlexer.lo configlexer.o: util/configlexer.c config.h $(srcdir)/util/configyyrename.h \ + $(srcdir)/util/config_file.h util/configparser.h +configparser.lo configparser.o: util/configparser.c config.h $(srcdir)/util/configyyrename.h \ + $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h $(srcdir)/util/log.h \ + +fptr_wlist.lo fptr_wlist.o: $(srcdir)/util/fptr_wlist.c config.h $(srcdir)/util/fptr_wlist.h \ + $(srcdir)/util/netevent.h \ + $(srcdir)/util/storage/lruhash.h \ + $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h \ + $(srcdir)/util/data/packed_rrset.h \ + $(srcdir)/util/data/msgparse.h \ + $(srcdir)/util/tube.h \ + $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h $(srcdir)/util/mini_event.h \ + $(srcdir)/util/rbtree.h $(srcdir)/daemon/worker.h $(srcdir)/util/alloc.h $(srcdir)/daemon/stats.h \ + $(srcdir)/util/timehist.h $(srcdir)/daemon/remote.h \ + $(srcdir)/services/outside_network.h $(srcdir)/services/localzone.h $(srcdir)/services/cache/infra.h \ + $(srcdir)/util/rtt.h $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h \ + $(srcdir)/iterator/iterator.h $(srcdir)/services/outbound_list.h $(srcdir)/iterator/iter_fwd.h \ + $(srcdir)/validator/validator.h $(srcdir)/validator/val_utils.h $(srcdir)/validator/val_anchor.h \ + $(srcdir)/validator/val_nsec3.h $(srcdir)/validator/val_sigcrypt.h $(srcdir)/validator/val_kentry.h \ + $(srcdir)/validator/val_neg.h $(srcdir)/validator/autotrust.h $(srcdir)/util/storage/dnstree.h \ + $(srcdir)/libunbound/libworker.h $(srcdir)/libunbound/context.h $(srcdir)/libunbound/unbound.h \ + $(srcdir)/util/config_file.h $(PYTHONMOD_HEADER) +locks.lo locks.o: $(srcdir)/util/locks.c config.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ + +log.lo log.o: $(srcdir)/util/log.c config.h $(srcdir)/util/log.h \ + $(srcdir)/util/locks.h +mini_event.lo mini_event.o: $(srcdir)/util/mini_event.c config.h $(srcdir)/util/mini_event.h $(srcdir)/util/rbtree.h \ + $(srcdir)/util/fptr_wlist.h $(srcdir)/util/netevent.h \ + $(srcdir)/util/storage/lruhash.h \ + $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h \ + $(srcdir)/util/data/packed_rrset.h \ + $(srcdir)/util/data/msgparse.h \ + $(srcdir)/util/tube.h \ + $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h +module.lo module.o: $(srcdir)/util/module.c config.h $(srcdir)/util/module.h $(srcdir)/util/storage/lruhash.h \ + $(srcdir)/util/locks.h $(srcdir)/util/log.h \ + $(srcdir)/util/data/msgreply.h \ + $(srcdir)/util/data/packed_rrset.h \ + $(srcdir)/util/data/msgparse.h \ + +netevent.lo netevent.o: $(srcdir)/util/netevent.c config.h \ + $(srcdir)/util/netevent.h \ + $(srcdir)/util/log.h $(srcdir)/util/net_help.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/storage/lruhash.h \ + $(srcdir)/util/locks.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ + $(srcdir)/util/data/msgparse.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h \ + $(srcdir)/services/modstack.h \ + $(srcdir)/util/mini_event.h $(srcdir)/util/rbtree.h +net_help.lo net_help.o: $(srcdir)/util/net_help.c config.h \ + $(srcdir)/util/net_help.h \ + $(srcdir)/util/log.h $(srcdir)/util/data/dname.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ + $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ + $(srcdir)/util/data/msgparse.h $(srcdir)/util/regional.h \ + +random.lo random.o: $(srcdir)/util/random.c config.h $(srcdir)/util/random.h $(srcdir)/util/log.h \ + +rbtree.lo rbtree.o: $(srcdir)/util/rbtree.c config.h $(srcdir)/util/log.h \ + $(srcdir)/util/fptr_wlist.h \ + $(srcdir)/util/netevent.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ + $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ + $(srcdir)/util/data/msgparse.h \ + $(srcdir)/util/tube.h \ + $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h +regional.lo regional.o: $(srcdir)/util/regional.c config.h $(srcdir)/util/log.h \ + $(srcdir)/util/regional.h +rtt.lo rtt.o: $(srcdir)/util/rtt.c config.h $(srcdir)/util/rtt.h $(srcdir)/util/log.h \ + +dnstree.lo dnstree.o: $(srcdir)/util/storage/dnstree.c config.h $(srcdir)/util/storage/dnstree.h \ + $(srcdir)/util/rbtree.h $(srcdir)/util/data/dname.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ + $(srcdir)/util/log.h \ + $(srcdir)/util/net_help.h +lookup3.lo lookup3.o: $(srcdir)/util/storage/lookup3.c config.h $(srcdir)/util/storage/lookup3.h +lruhash.lo lruhash.o: $(srcdir)/util/storage/lruhash.c config.h $(srcdir)/util/storage/lruhash.h \ + $(srcdir)/util/locks.h $(srcdir)/util/log.h \ + $(srcdir)/util/fptr_wlist.h \ + $(srcdir)/util/netevent.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h \ + $(srcdir)/util/data/packed_rrset.h \ + $(srcdir)/util/data/msgparse.h \ + $(srcdir)/util/tube.h \ + $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h +slabhash.lo slabhash.o: $(srcdir)/util/storage/slabhash.c config.h $(srcdir)/util/storage/slabhash.h \ + $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ + +timehist.lo timehist.o: $(srcdir)/util/timehist.c config.h $(srcdir)/util/timehist.h $(srcdir)/util/log.h \ + +tube.lo tube.o: $(srcdir)/util/tube.c config.h $(srcdir)/util/tube.h $(srcdir)/util/log.h \ + $(srcdir)/util/net_help.h \ + $(srcdir)/util/netevent.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ + $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ + $(srcdir)/util/data/msgparse.h \ + $(srcdir)/services/mesh.h \ + $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h +winsock_event.lo winsock_event.o: $(srcdir)/util/winsock_event.c config.h +autotrust.lo autotrust.o: $(srcdir)/validator/autotrust.c config.h \ + $(srcdir)/validator/autotrust.h \ + $(srcdir)/util/rbtree.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h \ + $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/validator/val_anchor.h $(srcdir)/validator/val_utils.h \ + $(srcdir)/validator/val_sigcrypt.h $(srcdir)/util/data/dname.h $(srcdir)/util/module.h \ + $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/util/net_help.h \ + $(srcdir)/util/config_file.h $(srcdir)/util/regional.h $(srcdir)/util/random.h $(srcdir)/services/mesh.h \ + $(srcdir)/util/netevent.h $(srcdir)/services/modstack.h $(srcdir)/services/cache/rrset.h \ + $(srcdir)/util/storage/slabhash.h $(srcdir)/validator/val_kcache.h +val_anchor.lo val_anchor.o: $(srcdir)/validator/val_anchor.c config.h \ + $(srcdir)/validator/val_anchor.h \ + $(srcdir)/util/rbtree.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/validator/val_sigcrypt.h \ + $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/validator/autotrust.h \ + $(srcdir)/util/data/dname.h $(srcdir)/util/net_help.h $(srcdir)/util/config_file.h +validator.lo validator.o: $(srcdir)/validator/validator.c config.h \ + $(srcdir)/validator/validator.h \ + $(srcdir)/util/module.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ + $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h \ + $(srcdir)/validator/val_utils.h $(srcdir)/validator/val_anchor.h $(srcdir)/util/rbtree.h \ + $(srcdir)/validator/val_kcache.h $(srcdir)/util/storage/slabhash.h $(srcdir)/validator/val_kentry.h \ + $(srcdir)/validator/val_nsec.h $(srcdir)/validator/val_nsec3.h $(srcdir)/validator/val_neg.h \ + $(srcdir)/validator/val_sigcrypt.h $(srcdir)/validator/autotrust.h $(srcdir)/services/cache/dns.h \ + $(srcdir)/util/data/dname.h $(srcdir)/util/net_help.h $(srcdir)/util/regional.h $(srcdir)/util/config_file.h \ + $(srcdir)/util/fptr_wlist.h $(srcdir)/util/netevent.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h \ + $(srcdir)/services/modstack.h +val_kcache.lo val_kcache.o: $(srcdir)/validator/val_kcache.c config.h $(srcdir)/validator/val_kcache.h \ + $(srcdir)/util/storage/slabhash.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ + $(srcdir)/validator/val_kentry.h \ + $(srcdir)/util/config_file.h $(srcdir)/util/data/dname.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h \ + $(srcdir)/util/data/packed_rrset.h \ + $(srcdir)/util/data/msgparse.h \ + +val_kentry.lo val_kentry.o: $(srcdir)/validator/val_kentry.c config.h \ + $(srcdir)/validator/val_kentry.h \ + $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/data/packed_rrset.h \ + $(srcdir)/util/data/dname.h $(srcdir)/util/storage/lookup3.h $(srcdir)/util/regional.h $(srcdir)/util/net_help.h +val_neg.lo val_neg.o: $(srcdir)/validator/val_neg.c config.h \ + $(srcdir)/validator/val_neg.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ + $(srcdir)/util/rbtree.h \ + $(srcdir)/validator/val_nsec.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h \ + $(srcdir)/validator/val_nsec3.h \ + $(srcdir)/validator/val_utils.h $(srcdir)/util/data/dname.h $(srcdir)/util/data/msgreply.h \ + $(srcdir)/util/net_help.h $(srcdir)/util/config_file.h $(srcdir)/services/cache/rrset.h \ + $(srcdir)/util/storage/slabhash.h $(srcdir)/services/cache/dns.h +val_nsec3.lo val_nsec3.o: $(srcdir)/validator/val_nsec3.c config.h \ + $(srcdir)/validator/val_nsec3.h $(srcdir)/util/rbtree.h $(srcdir)/util/data/packed_rrset.h \ + $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ + $(srcdir)/validator/validator.h \ + $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h \ + $(srcdir)/validator/val_utils.h \ + $(srcdir)/validator/val_kentry.h $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h \ + $(srcdir)/util/regional.h $(srcdir)/util/net_help.h $(srcdir)/util/data/dname.h $(srcdir)/validator/val_nsec.h +val_nsec.lo val_nsec.o: $(srcdir)/validator/val_nsec.c config.h \ + $(srcdir)/validator/val_nsec.h \ + $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ + $(srcdir)/validator/val_utils.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/dname.h \ + $(srcdir)/util/net_help.h $(srcdir)/util/module.h $(srcdir)/util/data/msgparse.h \ + $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h +val_sigcrypt.lo val_sigcrypt.o: $(srcdir)/validator/val_sigcrypt.c config.h \ + $(srcdir)/validator/val_sigcrypt.h \ + $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ + $(srcdir)/validator/validator.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h \ + $(srcdir)/util/data/msgparse.h $(srcdir)/validator/val_utils.h $(srcdir)/util/data/dname.h \ + $(srcdir)/util/rbtree.h $(srcdir)/util/net_help.h $(srcdir)/util/regional.h \ + +val_utils.lo val_utils.o: $(srcdir)/validator/val_utils.c config.h $(srcdir)/validator/val_utils.h \ + $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ + $(srcdir)/validator/validator.h \ + $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h \ + $(srcdir)/validator/val_kentry.h \ + $(srcdir)/validator/val_sigcrypt.h $(srcdir)/validator/val_anchor.h $(srcdir)/util/rbtree.h \ + $(srcdir)/validator/val_nsec.h $(srcdir)/validator/val_neg.h $(srcdir)/services/cache/rrset.h \ + $(srcdir)/util/storage/slabhash.h $(srcdir)/services/cache/dns.h $(srcdir)/util/data/dname.h \ + $(srcdir)/util/net_help.h $(srcdir)/util/regional.h $(srcdir)/util/config_file.h +checklocks.lo checklocks.o: $(srcdir)/testcode/checklocks.c config.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ + $(srcdir)/testcode/checklocks.h +unitanchor.lo unitanchor.o: $(srcdir)/testcode/unitanchor.c config.h \ + $(srcdir)/util/log.h \ + $(srcdir)/util/data/dname.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ + $(srcdir)/testcode/unitmain.h $(srcdir)/validator/val_anchor.h $(srcdir)/util/rbtree.h +unitdname.lo unitdname.o: $(srcdir)/testcode/unitdname.c config.h \ + $(srcdir)/util/log.h \ + $(srcdir)/testcode/unitmain.h $(srcdir)/util/data/dname.h $(srcdir)/util/storage/lruhash.h \ + $(srcdir)/util/locks.h +unitlruhash.lo unitlruhash.o: $(srcdir)/testcode/unitlruhash.c config.h $(srcdir)/testcode/unitmain.h \ + $(srcdir)/util/log.h \ + $(srcdir)/util/storage/lruhash.h \ + $(srcdir)/util/locks.h $(srcdir)/util/storage/slabhash.h +unitmain.lo unitmain.o: $(srcdir)/testcode/unitmain.c config.h \ + $(srcdir)/util/log.h \ + $(srcdir)/testcode/unitmain.h $(srcdir)/util/alloc.h $(srcdir)/util/locks.h $(srcdir)/util/net_help.h \ + $(srcdir)/util/config_file.h $(srcdir)/util/rtt.h $(srcdir)/services/cache/infra.h \ + $(srcdir)/util/storage/lruhash.h $(srcdir)/util/random.h +unitmsgparse.lo unitmsgparse.o: $(srcdir)/testcode/unitmsgparse.c config.h \ + $(srcdir)/util/log.h \ + $(srcdir)/testcode/unitmain.h $(srcdir)/util/data/msgparse.h $(srcdir)/util/storage/lruhash.h \ + $(srcdir)/util/locks.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ + $(srcdir)/util/data/msgencode.h $(srcdir)/util/data/dname.h $(srcdir)/util/alloc.h $(srcdir)/util/regional.h \ + $(srcdir)/util/net_help.h $(srcdir)/testcode/readhex.h +unitneg.lo unitneg.o: $(srcdir)/testcode/unitneg.c config.h $(srcdir)/util/log.h \ + $(srcdir)/util/net_help.h \ + $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ + $(srcdir)/util/data/dname.h \ + $(srcdir)/testcode/unitmain.h $(srcdir)/validator/val_neg.h $(srcdir)/util/rbtree.h +unitregional.lo unitregional.o: $(srcdir)/testcode/unitregional.c config.h $(srcdir)/testcode/unitmain.h \ + $(srcdir)/util/log.h \ + $(srcdir)/util/regional.h +unitslabhash.lo unitslabhash.o: $(srcdir)/testcode/unitslabhash.c config.h $(srcdir)/testcode/unitmain.h \ + $(srcdir)/util/log.h \ + $(srcdir)/util/storage/slabhash.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h +unitverify.lo unitverify.o: $(srcdir)/testcode/unitverify.c config.h $(srcdir)/util/log.h \ + $(srcdir)/testcode/unitmain.h \ + $(srcdir)/validator/val_sigcrypt.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h \ + $(srcdir)/util/locks.h \ + $(srcdir)/validator/val_nsec.h \ + $(srcdir)/validator/val_nsec3.h $(srcdir)/util/rbtree.h $(srcdir)/validator/validator.h $(srcdir)/util/module.h \ + $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h \ + $(srcdir)/validator/val_utils.h \ + $(srcdir)/testcode/ldns-testpkts.h \ + $(srcdir)/util/data/dname.h \ + $(srcdir)/util/regional.h $(srcdir)/util/alloc.h $(srcdir)/util/net_help.h $(srcdir)/util/config_file.h +readhex.lo readhex.o: $(srcdir)/testcode/readhex.c config.h $(srcdir)/testcode/readhex.h \ + $(srcdir)/util/log.h +ldns-testpkts.lo ldns-testpkts.o: $(srcdir)/testcode/ldns-testpkts.c config.h \ + $(srcdir)/testcode/ldns-testpkts.h +acl_list.lo acl_list.o: $(srcdir)/daemon/acl_list.c config.h $(srcdir)/daemon/acl_list.h \ + $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/util/regional.h $(srcdir)/util/log.h \ + $(srcdir)/util/config_file.h \ + $(srcdir)/util/net_help.h +cachedump.lo cachedump.o: $(srcdir)/daemon/cachedump.c config.h \ + $(srcdir)/daemon/cachedump.h \ + $(srcdir)/daemon/remote.h $(srcdir)/daemon/worker.h $(srcdir)/util/netevent.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ + $(srcdir)/util/alloc.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/storage/lruhash.h \ + $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h $(srcdir)/daemon/stats.h \ + $(srcdir)/util/timehist.h $(srcdir)/util/module.h $(srcdir)/daemon/daemon.h $(srcdir)/services/modstack.h \ + $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h $(srcdir)/services/cache/dns.h \ + $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h $(srcdir)/util/regional.h $(srcdir)/util/net_help.h \ + $(srcdir)/util/data/dname.h $(srcdir)/iterator/iterator.h $(srcdir)/services/outbound_list.h \ + $(srcdir)/iterator/iter_delegpt.h $(srcdir)/iterator/iter_utils.h $(srcdir)/iterator/iter_resptype.h \ + $(srcdir)/iterator/iter_fwd.h $(srcdir)/util/rbtree.h $(srcdir)/iterator/iter_hints.h \ + $(srcdir)/util/storage/dnstree.h +daemon.lo daemon.o: $(srcdir)/daemon/daemon.c config.h \ + $(srcdir)/daemon/daemon.h \ + $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/alloc.h $(srcdir)/services/modstack.h $(srcdir)/daemon/worker.h \ + $(srcdir)/util/netevent.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/storage/lruhash.h \ + $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h $(srcdir)/daemon/stats.h \ + $(srcdir)/util/timehist.h $(srcdir)/util/module.h $(srcdir)/daemon/remote.h $(srcdir)/daemon/acl_list.h \ + $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/util/config_file.h \ + $(srcdir)/util/storage/lookup3.h $(srcdir)/util/storage/slabhash.h $(srcdir)/services/listen_dnsport.h \ + $(srcdir)/services/cache/rrset.h $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h \ + $(srcdir)/services/localzone.h $(srcdir)/util/random.h $(srcdir)/util/tube.h +remote.lo remote.o: $(srcdir)/daemon/remote.c config.h \ + $(srcdir)/daemon/remote.h \ + $(srcdir)/daemon/worker.h $(srcdir)/util/netevent.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/alloc.h \ + $(srcdir)/util/data/msgreply.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/data/packed_rrset.h \ + $(srcdir)/util/data/msgparse.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/util/module.h \ + $(srcdir)/daemon/daemon.h $(srcdir)/services/modstack.h $(srcdir)/daemon/cachedump.h \ + $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h $(srcdir)/services/listen_dnsport.h \ + $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h $(srcdir)/services/cache/infra.h \ + $(srcdir)/util/rtt.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/services/localzone.h \ + $(srcdir)/util/fptr_wlist.h $(srcdir)/util/tube.h $(srcdir)/util/data/dname.h $(srcdir)/validator/validator.h \ + $(srcdir)/validator/val_utils.h $(srcdir)/validator/val_kcache.h $(srcdir)/validator/val_kentry.h \ + $(srcdir)/validator/val_anchor.h $(srcdir)/iterator/iterator.h $(srcdir)/services/outbound_list.h \ + $(srcdir)/iterator/iter_fwd.h $(srcdir)/iterator/iter_hints.h $(srcdir)/util/storage/dnstree.h \ + $(srcdir)/iterator/iter_delegpt.h $(srcdir)/services/outside_network.h +stats.lo stats.o: $(srcdir)/daemon/stats.c config.h \ + $(srcdir)/daemon/stats.h \ + $(srcdir)/util/timehist.h $(srcdir)/daemon/worker.h $(srcdir)/util/netevent.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ + $(srcdir)/util/alloc.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/storage/lruhash.h \ + $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h $(srcdir)/util/module.h \ + $(srcdir)/daemon/daemon.h $(srcdir)/services/modstack.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h \ + $(srcdir)/services/outside_network.h $(srcdir)/util/config_file.h $(srcdir)/util/tube.h \ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Jul 4 14:25:14 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A478B106567D; Wed, 4 Jul 2012 14:25:14 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 78ED68FC15; Wed, 4 Jul 2012 14:25:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q64EPEps015474; Wed, 4 Jul 2012 14:25:14 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q64EPEmY015473; Wed, 4 Jul 2012 14:25:14 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201207041425.q64EPEmY015473@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Wed, 4 Jul 2012 14:25:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238107 - vendor/unbound/1.4.17 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jul 2012 14:25:14 -0000 Author: des Date: Wed Jul 4 14:25:14 2012 New Revision: 238107 URL: http://svn.freebsd.org/changeset/base/238107 Log: tag unbound 1.4.17 Added: vendor/unbound/1.4.17/ - copied from r238106, vendor/unbound/dist/ From owner-svn-src-all@FreeBSD.ORG Wed Jul 4 16:25:12 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 59E8A106564A; Wed, 4 Jul 2012 16:25:12 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 292478FC14; Wed, 4 Jul 2012 16:25:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q64GPCU8020464; Wed, 4 Jul 2012 16:25:12 GMT (envelope-from gabor@svn.freebsd.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q64GPBf4020457; Wed, 4 Jul 2012 16:25:11 GMT (envelope-from gabor@svn.freebsd.org) Message-Id: <201207041625.q64GPBf4020457@svn.freebsd.org> From: Gabor Kovesdan Date: Wed, 4 Jul 2012 16:25:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238108 - head/usr.bin/sort X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jul 2012 16:25:12 -0000 Author: gabor Date: Wed Jul 4 16:25:11 2012 New Revision: 238108 URL: http://svn.freebsd.org/changeset/base/238108 Log: - Change --nthreads parameter to --parallel for GNU compatibility - Change default sort method to mergesort, which has a better worst case performance than qsort Submitted by: Oleg Moskalenko Modified: head/usr.bin/sort/file.c head/usr.bin/sort/file.h head/usr.bin/sort/radixsort.c head/usr.bin/sort/sort.1.in head/usr.bin/sort/sort.c Modified: head/usr.bin/sort/file.c ============================================================================== --- head/usr.bin/sort/file.c Wed Jul 4 14:25:14 2012 (r238107) +++ head/usr.bin/sort/file.c Wed Jul 4 16:25:11 2012 (r238108) @@ -1297,7 +1297,7 @@ sort_list_to_file(struct sort_list *list } if (sort_opts_vals.sort_method == SORT_DEFAULT) - sort_opts_vals.sort_method = SORT_QSORT; + sort_opts_vals.sort_method = DEFAULT_SORT_ALGORITHM; if (debug_sort) printf("sort_method=%s\n", @@ -1314,9 +1314,12 @@ sort_list_to_file(struct sort_list *list case SORT_HEAPSORT: mt_sort(list, heapsort, outfile); break; - default: + case SORT_QSORT: mt_sort(list, sort_qsort, outfile); break; + default: + mt_sort(list, DEFAULT_SORT_FUNC, outfile); + break; } } Modified: head/usr.bin/sort/file.h ============================================================================== --- head/usr.bin/sort/file.h Wed Jul 4 14:25:14 2012 (r238107) +++ head/usr.bin/sort/file.h Wed Jul 4 16:25:11 2012 (r238108) @@ -39,6 +39,9 @@ #define SORT_HEAPSORT 3 #define SORT_RADIXSORT 4 +#define DEFAULT_SORT_ALGORITHM SORT_HEAPSORT +#define DEFAULT_SORT_FUNC heapsort + /* * List of data to be sorted. */ Modified: head/usr.bin/sort/radixsort.c ============================================================================== --- head/usr.bin/sort/radixsort.c Wed Jul 4 14:25:14 2012 (r238107) +++ head/usr.bin/sort/radixsort.c Wed Jul 4 16:25:11 2012 (r238108) @@ -45,6 +45,8 @@ __FBSDID("$FreeBSD$"); #include "coll.h" #include "radixsort.h" +#define DEFAULT_SORT_FUNC_RADIXSORT mergesort + #define TINY_NODE(sl) ((sl)->tosort_num < 65) #define SMALL_NODE(sl) ((sl)->tosort_num < 5) @@ -349,7 +351,7 @@ run_sort_level_next(struct sort_level *s /* NOTREACHED */ err(2, "Radix sort error 3"); } else - qsort(sl->leaves, sl->leaves_num, + DEFAULT_SORT_FUNC_RADIXSORT(sl->leaves, sl->leaves_num, sizeof(struct sort_list_item *), (int(*)(const void *, const void *)) func); @@ -389,12 +391,12 @@ run_sort_level_next(struct sort_level *s sizeof(struct sort_list_item *), (int(*)(const void *, const void *)) list_coll); } else { - qsort(sl->leaves, sl->leaves_num, + DEFAULT_SORT_FUNC_RADIXSORT(sl->leaves, sl->leaves_num, sizeof(struct sort_list_item *), (int(*)(const void *, const void *)) list_coll); } } else if (!sort_opts_vals.sflag && sort_opts_vals.complex_sort) { - qsort(sl->leaves, sl->leaves_num, + DEFAULT_SORT_FUNC_RADIXSORT(sl->leaves, sl->leaves_num, sizeof(struct sort_list_item *), (int(*)(const void *, const void *)) list_coll_by_str_only); } @@ -541,12 +543,12 @@ run_top_sort_level(struct sort_level *sl sizeof(struct sort_list_item *), (int(*)(const void *, const void *)) list_coll); } else { - qsort(sl->leaves, sl->leaves_num, + DEFAULT_SORT_FUNC_RADIXSORT(sl->leaves, sl->leaves_num, sizeof(struct sort_list_item *), (int(*)(const void *, const void *)) list_coll); } } else if (!sort_opts_vals.sflag && sort_opts_vals.complex_sort) { - qsort(sl->leaves, sl->leaves_num, + DEFAULT_SORT_FUNC_RADIXSORT(sl->leaves, sl->leaves_num, sizeof(struct sort_list_item *), (int(*)(const void *, const void *)) list_coll_by_str_only); } Modified: head/usr.bin/sort/sort.1.in ============================================================================== --- head/usr.bin/sort/sort.1.in Wed Jul 4 14:25:14 2012 (r238107) +++ head/usr.bin/sort/sort.1.in Wed Jul 4 16:25:11 2012 (r238108) @@ -33,7 +33,7 @@ .\" .\" @(#)sort.1 8.1 (Berkeley) 6/6/93 .\" -.Dd May 25, 2012 +.Dd July 3, 2012 .Dt SORT 1 .Os .Sh NAME @@ -329,7 +329,7 @@ is used. .It Fl Fl debug Print some extra information about the sorting process to the standard output. -%%THREADS%%.It Fl Fl nthreads +%%THREADS%%.It Fl Fl parallel %%THREADS%%Set the maximum number of execution threads. %%THREADS%%Default number equals to the number of CPUs. .It Fl Fl files0-from Ns = Ns Ar filename Modified: head/usr.bin/sort/sort.c ============================================================================== --- head/usr.bin/sort/sort.c Wed Jul 4 14:25:14 2012 (r238107) +++ head/usr.bin/sort/sort.c Wed Jul 4 16:25:11 2012 (r238108) @@ -91,7 +91,7 @@ const char *nlsstr[] = { "", "[--heapsort] [--mergesort] [--radixsort] [--qsort] " "[--mmap] " #if defined(SORT_THREADS) - "[--nthreads thread_no] " + "[--parallel thread_no] " #endif "[--human-numeric-sort] " "[--version-sort] [--random-sort [--random-source file]] " @@ -132,7 +132,7 @@ enum VERSION_OPT, DEBUG_OPT, #if defined(SORT_THREADS) - NTHREADS_OPT, + PARALLEL_OPT, #endif RANDOMSOURCE_OPT, COMPRESSPROGRAM_OPT, @@ -171,7 +171,7 @@ struct option long_options[] = { { "numeric-sort", no_argument, NULL, 'n' }, { "output", required_argument, NULL, 'o' }, #if defined(SORT_THREADS) - { "nthreads", required_argument, NULL, NTHREADS_OPT }, + { "parallel", required_argument, NULL, PARALLEL_OPT }, #endif { "qsort", no_argument, NULL, QSORT_OPT }, { "radixsort", no_argument, NULL, RADIXSORT_OPT }, @@ -1119,7 +1119,7 @@ main(int argc, char **argv) } break; #if defined(SORT_THREADS) - case NTHREADS_OPT: + case PARALLEL_OPT: nthreads = (size_t)(atoi(optarg)); if (nthreads < 1) nthreads = 1; From owner-svn-src-all@FreeBSD.ORG Wed Jul 4 16:47:39 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C4940106566B; Wed, 4 Jul 2012 16:47:39 +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 AEDBB8FC08; Wed, 4 Jul 2012 16:47:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q64GldVE021457; Wed, 4 Jul 2012 16:47:39 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q64GldrJ021455; Wed, 4 Jul 2012 16:47:39 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201207041647.q64GldrJ021455@svn.freebsd.org> From: John Baldwin Date: Wed, 4 Jul 2012 16:47:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238109 - head/sys/amd64/amd64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jul 2012 16:47:39 -0000 Author: jhb Date: Wed Jul 4 16:47:39 2012 New Revision: 238109 URL: http://svn.freebsd.org/changeset/base/238109 Log: Decode the 'xsave', 'xrstor', 'xsaveopt', 'xgetbv', 'xsetbv', and 'rdtscp' instructions. MFC after: 1 month Modified: head/sys/amd64/amd64/db_disasm.c Modified: head/sys/amd64/amd64/db_disasm.c ============================================================================== --- head/sys/amd64/amd64/db_disasm.c Wed Jul 4 16:25:11 2012 (r238108) +++ head/sys/amd64/amd64/db_disasm.c Wed Jul 4 16:47:39 2012 (r238109) @@ -169,9 +169,9 @@ static const char * const db_Grp15[] = { "fxrstor", "ldmxcsr", "stmxcsr", - "", - "", - "", + "xsave", + "xrstor", + "xsaveopt", "clflush" }; @@ -1279,11 +1279,26 @@ db_disasm(loc, altfmt) i_size = NONE; i_mode = 0; break; + case 0xd0: + i_name = "xgetbv"; + i_size = NONE; + i_mode = 0; + break; + case 0xd1: + i_name = "xsetbv"; + i_size = NONE; + i_mode = 0; + break; case 0xf8: i_name = "swapgs"; i_size = NONE; i_mode = 0; break; + case 0xf9: + i_name = "rdtscp"; + i_size = NONE; + i_mode = 0; + break; } } if (ip->i_extra == db_Grp15 && f_mod(rex, regmodrm) == 3) { From owner-svn-src-all@FreeBSD.ORG Wed Jul 4 17:31:53 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BB12E106564A; Wed, 4 Jul 2012 17:31:53 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A44D48FC17; Wed, 4 Jul 2012 17:31:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q64HVrGl023249; Wed, 4 Jul 2012 17:31:53 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q64HVrPH023247; Wed, 4 Jul 2012 17:31:53 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201207041731.q64HVrPH023247@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Wed, 4 Jul 2012 17:31:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238110 - head/tools/regression/pjdfstest X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jul 2012 17:31:53 -0000 Author: pjd Date: Wed Jul 4 17:31:53 2012 New Revision: 238110 URL: http://svn.freebsd.org/changeset/base/238110 Log: Recognize 'none' or '0' as no flags. Modified: head/tools/regression/pjdfstest/pjdfstest.c Modified: head/tools/regression/pjdfstest/pjdfstest.c ============================================================================== --- head/tools/regression/pjdfstest/pjdfstest.c Wed Jul 4 16:47:39 2012 (r238109) +++ head/tools/regression/pjdfstest/pjdfstest.c Wed Jul 4 17:31:53 2012 (r238110) @@ -350,10 +350,10 @@ str2flags(struct flag *tflags, char *sfl unsigned int i; char *f; - for (f = strtok(sflags, ","); f != NULL; f = strtok(NULL, ",")) { - /* Support magic 'none' flag which just reset all flags. */ - if (strcmp(f, "none") == 0) - return (0); + /* 'none' or '0' means no flags */ + if (strcmp(sflags, "none") == 0 || strcmp(sflags, "0") == 0) + return (0); + for (f = strtok(sflags, ",|"); f != NULL; f = strtok(NULL, ",|")) { for (i = 0; tflags[i].f_str != NULL; i++) { if (strcmp(tflags[i].f_str, f) == 0) break; From owner-svn-src-all@FreeBSD.ORG Wed Jul 4 17:35:08 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 56FF51065670; Wed, 4 Jul 2012 17:35:08 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 40F178FC16; Wed, 4 Jul 2012 17:35:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q64HZ8El023438; Wed, 4 Jul 2012 17:35:08 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q64HZ8UF023435; Wed, 4 Jul 2012 17:35:08 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201207041735.q64HZ8UF023435@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Wed, 4 Jul 2012 17:35:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238111 - in head: include lib/libc/stdio X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jul 2012 17:35:08 -0000 Author: pjd Date: Wed Jul 4 17:35:07 2012 New Revision: 238111 URL: http://svn.freebsd.org/changeset/base/238111 Log: The register_printf_render_std() function expects regular string. Change argument type from 'const unsigned char *' to 'const char *'. MFC after: 2 weeks Modified: head/include/printf.h head/lib/libc/stdio/xprintf.c Modified: head/include/printf.h ============================================================================== --- head/include/printf.h Wed Jul 4 17:31:53 2012 (r238110) +++ head/include/printf.h Wed Jul 4 17:35:07 2012 (r238111) @@ -123,7 +123,7 @@ int register_printf_function(int spec, p /* FreeBSD */ int register_printf_render(int spec, printf_render *render, printf_arginfo_function *arginfo); -int register_printf_render_std(const unsigned char *specs); +int register_printf_render_std(const char *specs); /* vprintf_errno.c */ printf_arginfo_function __printf_arginfo_errno; Modified: head/lib/libc/stdio/xprintf.c ============================================================================== --- head/lib/libc/stdio/xprintf.c Wed Jul 4 17:31:53 2012 (r238110) +++ head/lib/libc/stdio/xprintf.c Wed Jul 4 17:35:07 2012 (r238111) @@ -651,7 +651,7 @@ register_printf_render(int spec, printf_ } int -register_printf_render_std(const unsigned char *specs) +register_printf_render_std(const char *specs) { for (; *specs != '\0'; specs++) { From owner-svn-src-all@FreeBSD.ORG Wed Jul 4 17:36:26 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B3038106566C; Wed, 4 Jul 2012 17:36:26 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9CFF88FC1B; Wed, 4 Jul 2012 17:36:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q64HaQFR023535; Wed, 4 Jul 2012 17:36:26 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q64HaQuY023533; Wed, 4 Jul 2012 17:36:26 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201207041736.q64HaQuY023533@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Wed, 4 Jul 2012 17:36:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238112 - head/cddl/compat/opensolaris/misc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jul 2012 17:36:26 -0000 Author: pjd Date: Wed Jul 4 17:36:26 2012 New Revision: 238112 URL: http://svn.freebsd.org/changeset/base/238112 Log: Fix an obvious typo. MFC after: 3 days Modified: head/cddl/compat/opensolaris/misc/deviceid.c Modified: head/cddl/compat/opensolaris/misc/deviceid.c ============================================================================== --- head/cddl/compat/opensolaris/misc/deviceid.c Wed Jul 4 17:35:07 2012 (r238111) +++ head/cddl/compat/opensolaris/misc/deviceid.c Wed Jul 4 17:36:26 2012 (r238112) @@ -45,7 +45,7 @@ devid_str_decode(char *devidstr, ddi_dev return (EINVAL); } *retminor_name = strdup(""); - if (*retminor_name == NULL); + if (*retminor_name == NULL) return (ENOMEM); return (0); } From owner-svn-src-all@FreeBSD.ORG Wed Jul 4 17:39:30 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 91BE4106564A; Wed, 4 Jul 2012 17:39:30 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7ADAA8FC14; Wed, 4 Jul 2012 17:39:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q64HdUfa023701; Wed, 4 Jul 2012 17:39:30 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q64HdUZD023699; Wed, 4 Jul 2012 17:39:30 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201207041739.q64HdUZD023699@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Wed, 4 Jul 2012 17:39:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238113 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jul 2012 17:39:30 -0000 Author: pjd Date: Wed Jul 4 17:39:29 2012 New Revision: 238113 URL: http://svn.freebsd.org/changeset/base/238113 Log: vdev_io_done stage is not used for ioctls. MFC after: 1 week Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio_impl.h Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio_impl.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio_impl.h Wed Jul 4 17:36:26 2012 (r238112) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio_impl.h Wed Jul 4 17:39:29 2012 (r238113) @@ -61,7 +61,7 @@ enum zio_stage { ZIO_STAGE_READY = 1 << 15, /* RWFCI */ ZIO_STAGE_VDEV_IO_START = 1 << 16, /* RW--I */ - ZIO_STAGE_VDEV_IO_DONE = 1 << 17, /* RW--I */ + ZIO_STAGE_VDEV_IO_DONE = 1 << 17, /* RW--- */ ZIO_STAGE_VDEV_IO_ASSESS = 1 << 18, /* RW--I */ ZIO_STAGE_CHECKSUM_VERIFY = 1 << 19, /* R---- */ From owner-svn-src-all@FreeBSD.ORG Wed Jul 4 17:43:26 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 260321065672; Wed, 4 Jul 2012 17:43:26 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0F2F58FC1A; Wed, 4 Jul 2012 17:43:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q64HhPvh023890; Wed, 4 Jul 2012 17:43:25 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q64HhP7P023888; Wed, 4 Jul 2012 17:43:25 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201207041743.q64HhP7P023888@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Wed, 4 Jul 2012 17:43:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238114 - head/sys/geom/eli X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jul 2012 17:43:26 -0000 Author: pjd Date: Wed Jul 4 17:43:25 2012 New Revision: 238114 URL: http://svn.freebsd.org/changeset/base/238114 Log: Correct a comment and correct style of a flag check. MFC after: 3 days Modified: head/sys/geom/eli/g_eli_key.c Modified: head/sys/geom/eli/g_eli_key.c ============================================================================== --- head/sys/geom/eli/g_eli_key.c Wed Jul 4 17:39:29 2012 (r238113) +++ head/sys/geom/eli/g_eli_key.c Wed Jul 4 17:43:25 2012 (r238114) @@ -197,7 +197,7 @@ g_eli_mkey_propagate(struct g_eli_softc mkey += sizeof(sc->sc_ivkey); /* - * The authentication key is: akey = HMAC_SHA512(Master-Key, 0x11) + * The authentication key is: akey = HMAC_SHA512(Data-Key, 0x11) */ if ((sc->sc_flags & G_ELI_FLAG_AUTH) != 0) { g_eli_crypto_hmac(mkey, G_ELI_MAXKEYLEN, "\x11", 1, @@ -209,7 +209,7 @@ g_eli_mkey_propagate(struct g_eli_softc /* Initialize encryption keys. */ g_eli_key_init(sc); - if (sc->sc_flags & G_ELI_FLAG_AUTH) { + if ((sc->sc_flags & G_ELI_FLAG_AUTH) != 0) { /* * Precalculate SHA256 for HMAC key generation. * This is expensive operation and we can do it only once now or From owner-svn-src-all@FreeBSD.ORG Wed Jul 4 17:44:40 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 49065106566B; Wed, 4 Jul 2012 17:44:40 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 26CF98FC16; Wed, 4 Jul 2012 17:44:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q64HieHZ023989; Wed, 4 Jul 2012 17:44:40 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q64HidWl023987; Wed, 4 Jul 2012 17:44:39 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201207041744.q64HidWl023987@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Wed, 4 Jul 2012 17:44:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238115 - head/sys/geom/eli X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jul 2012 17:44:40 -0000 Author: pjd Date: Wed Jul 4 17:44:39 2012 New Revision: 238115 URL: http://svn.freebsd.org/changeset/base/238115 Log: Correct comment. MFC after: 3 days Modified: head/sys/geom/eli/g_eli_key_cache.c Modified: head/sys/geom/eli/g_eli_key_cache.c ============================================================================== --- head/sys/geom/eli/g_eli_key_cache.c Wed Jul 4 17:43:25 2012 (r238114) +++ head/sys/geom/eli/g_eli_key_cache.c Wed Jul 4 17:44:39 2012 (r238115) @@ -200,7 +200,7 @@ g_eli_key_init(struct g_eli_softc *sc) bcopy(mkey, sc->sc_ekey, G_ELI_DATAKEYLEN); else { /* - * The encryption key is: ekey = HMAC_SHA512(Master-Key, 0x10) + * The encryption key is: ekey = HMAC_SHA512(Data-Key, 0x10) */ g_eli_crypto_hmac(mkey, G_ELI_MAXKEYLEN, "\x10", 1, sc->sc_ekey, 0); From owner-svn-src-all@FreeBSD.ORG Wed Jul 4 17:54:18 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 13F3310656FF; Wed, 4 Jul 2012 17:54:18 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E65FB8FC0A; Wed, 4 Jul 2012 17:54:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q64HsHbd024426; Wed, 4 Jul 2012 17:54:17 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q64HsHWn024421; Wed, 4 Jul 2012 17:54:17 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201207041754.q64HsHWn024421@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Wed, 4 Jul 2012 17:54:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238116 - head/sys/geom/eli X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jul 2012 17:54:18 -0000 Author: pjd Date: Wed Jul 4 17:54:17 2012 New Revision: 238116 URL: http://svn.freebsd.org/changeset/base/238116 Log: Use correct part of the Master-Key for generating encryption keys. Before this change the IV-Key was used to generate encryption keys, which was incorrect, but safe - for the XTS mode this key was unused anyway and for CBC mode it was used differently to generate IV vectors, so there is no risk that IV vector collides with encryption key somehow. Bump version number and keep compatibility for older versions. MFC after: 2 weeks Modified: head/sys/geom/eli/g_eli.c head/sys/geom/eli/g_eli.h head/sys/geom/eli/g_eli_ctl.c head/sys/geom/eli/g_eli_key_cache.c Modified: head/sys/geom/eli/g_eli.c ============================================================================== --- head/sys/geom/eli/g_eli.c Wed Jul 4 17:44:39 2012 (r238115) +++ head/sys/geom/eli/g_eli.c Wed Jul 4 17:54:17 2012 (r238116) @@ -726,6 +726,8 @@ g_eli_create(struct gctl_req *req, struc (sc->sc_flags & G_ELI_FLAG_AUTH) != 0) { sc->sc_flags |= G_ELI_FLAG_FIRST_KEY; } + if (md->md_version < G_ELI_VERSION_07) + sc->sc_flags |= G_ELI_FLAG_ENC_IVKEY; sc->sc_ealgo = md->md_ealgo; sc->sc_nkey = nkey; Modified: head/sys/geom/eli/g_eli.h ============================================================================== --- head/sys/geom/eli/g_eli.h Wed Jul 4 17:44:39 2012 (r238115) +++ head/sys/geom/eli/g_eli.h Wed Jul 4 17:54:17 2012 (r238116) @@ -68,6 +68,8 @@ * 5 - Added multiple encrypton keys and AES-XTS support. * 6 - Fixed usage of multiple keys for authenticated providers (the * G_ELI_FLAG_FIRST_KEY flag will be set for older versions). + * 7 - Encryption keys are now generated from the Data Key and not from the + * IV Key (the G_ELI_FLAG_ENC_IVKEY flag will be set for older versions). */ #define G_ELI_VERSION_00 0 #define G_ELI_VERSION_01 1 @@ -76,7 +78,8 @@ #define G_ELI_VERSION_04 4 #define G_ELI_VERSION_05 5 #define G_ELI_VERSION_06 6 -#define G_ELI_VERSION G_ELI_VERSION_06 +#define G_ELI_VERSION_07 7 +#define G_ELI_VERSION G_ELI_VERSION_07 /* ON DISK FLAGS. */ /* Use random, onetime keys. */ @@ -104,6 +107,8 @@ #define G_ELI_FLAG_SUSPEND 0x00100000 /* Provider uses first encryption key. */ #define G_ELI_FLAG_FIRST_KEY 0x00200000 +/* Provider uses IV-Key for encryption key generation. */ +#define G_ELI_FLAG_ENC_IVKEY 0x00400000 #define G_ELI_NEW_BIO 255 @@ -237,7 +242,7 @@ eli_metadata_encode_v0(struct g_eli_meta *datap = p; } static __inline void -eli_metadata_encode_v1v2v3v4v5v6(struct g_eli_metadata *md, u_char **datap) +eli_metadata_encode_v1v2v3v4v5v6v7(struct g_eli_metadata *md, u_char **datap) { u_char *p; @@ -275,7 +280,8 @@ eli_metadata_encode(struct g_eli_metadat case G_ELI_VERSION_04: case G_ELI_VERSION_05: case G_ELI_VERSION_06: - eli_metadata_encode_v1v2v3v4v5v6(md, &p); + case G_ELI_VERSION_07: + eli_metadata_encode_v1v2v3v4v5v6v7(md, &p); break; default: #ifdef _KERNEL @@ -315,7 +321,7 @@ eli_metadata_decode_v0(const u_char *dat } static __inline int -eli_metadata_decode_v1v2v3v4v5v6(const u_char *data, struct g_eli_metadata *md) +eli_metadata_decode_v1v2v3v4v5v6v7(const u_char *data, struct g_eli_metadata *md) { MD5_CTX ctx; const u_char *p; @@ -357,7 +363,8 @@ eli_metadata_decode(const u_char *data, case G_ELI_VERSION_04: case G_ELI_VERSION_05: case G_ELI_VERSION_06: - error = eli_metadata_decode_v1v2v3v4v5v6(data, md); + case G_ELI_VERSION_07: + error = eli_metadata_decode_v1v2v3v4v5v6v7(data, md); break; default: error = EOPNOTSUPP; Modified: head/sys/geom/eli/g_eli_ctl.c ============================================================================== --- head/sys/geom/eli/g_eli_ctl.c Wed Jul 4 17:44:39 2012 (r238115) +++ head/sys/geom/eli/g_eli_ctl.c Wed Jul 4 17:54:17 2012 (r238116) @@ -1020,6 +1020,12 @@ g_eli_config(struct gctl_req *req, struc /* Compatible. */ break; } + if (G_ELI_VERSION == G_ELI_VERSION_07 && + (*version == G_ELI_VERSION_05 || + *version == G_ELI_VERSION_06)) { + /* Compatible. */ + break; + } gctl_error(req, "Userland and kernel parts are out of sync."); return; } Modified: head/sys/geom/eli/g_eli_key_cache.c ============================================================================== --- head/sys/geom/eli/g_eli_key_cache.c Wed Jul 4 17:44:39 2012 (r238115) +++ head/sys/geom/eli/g_eli_key_cache.c Wed Jul 4 17:54:17 2012 (r238116) @@ -91,14 +91,20 @@ RB_GENERATE(g_eli_key_tree, g_eli_key, g static void g_eli_key_fill(struct g_eli_softc *sc, struct g_eli_key *key, uint64_t keyno) { + const uint8_t *ekey; struct { char magic[4]; uint8_t keyno[8]; } __packed hmacdata; + if ((sc->sc_flags & G_ELI_FLAG_ENC_IVKEY) != 0) + ekey = sc->sc_mkey; + else + ekey = sc->sc_ekey; + bcopy("ekey", hmacdata.magic, 4); le64enc(hmacdata.keyno, keyno); - g_eli_crypto_hmac(sc->sc_mkey, G_ELI_MAXKEYLEN, (uint8_t *)&hmacdata, + g_eli_crypto_hmac(ekey, G_ELI_MAXKEYLEN, (uint8_t *)&hmacdata, sizeof(hmacdata), key->gek_key, 0); key->gek_keyno = keyno; key->gek_count = 0; From owner-svn-src-all@FreeBSD.ORG Wed Jul 4 17:59:26 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E9187106564A; Wed, 4 Jul 2012 17:59:26 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CFEFB8FC0A; Wed, 4 Jul 2012 17:59:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q64HxQYB024671; Wed, 4 Jul 2012 17:59:26 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q64HxQcR024669; Wed, 4 Jul 2012 17:59:26 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201207041759.q64HxQcR024669@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Wed, 4 Jul 2012 17:59:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238117 - head/sbin/geom/class/eli X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jul 2012 17:59:27 -0000 Author: pjd Date: Wed Jul 4 17:59:26 2012 New Revision: 238117 URL: http://svn.freebsd.org/changeset/base/238117 Log: Improve description of various key used by GELI. PR: docs/169089 Submitted by: John W. O'Brien MFC after: 3 days Modified: head/sbin/geom/class/eli/geli.8 Modified: head/sbin/geom/class/eli/geli.8 ============================================================================== --- head/sbin/geom/class/eli/geli.8 Wed Jul 4 17:54:17 2012 (r238116) +++ head/sbin/geom/class/eli/geli.8 Wed Jul 4 17:59:26 2012 (r238117) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 28, 2012 +.Dd June 18, 2012 .Dt GELI 8 .Os .Sh NAME @@ -186,14 +186,15 @@ one of the following algorithms: or .Nm HMAC/SHA512 . .It -Can create a key from a couple of components (user entered passphrase, random -bits from a file, etc.). +Can create a User Key from up to two, piecewise components: a passphrase +entered via prompt or read from one or more passfiles; a keyfile read from +one or more files. .It Allows encryption of the root partition. The user will be asked for the passphrase before the root file system is mounted. .It -The passphrase of the user is strengthened with: +Strengthens the passphrase component of the User Key with: .Rs .%A B. Kaliski .%T "PKCS #5: Password-Based Cryptography Specification, Version 2.0." @@ -201,7 +202,7 @@ The passphrase of the user is strengthen .%N 2898 .Re .It -Allows the use of two independent keys (e.g., a +Allows the use of two independent User Keys (e.g., a .Qq "user key" and a .Qq "company key" ) . @@ -210,8 +211,8 @@ It is fast - .Nm performs simple sector-to-sector encryption. .It -Allows Master Keys to be backed up and restored, -so that if a user has to quickly destroy his keys, +Allows the encrypted Master Key to be backed up and restored, +so that if a user has to quickly destroy key material, it is possible to get the data back by restoring keys from backup. .It @@ -219,8 +220,8 @@ Providers can be configured to automatic (so users do not have to remember to detach providers after unmounting the file systems). .It -Allows attaching a provider with a random, one-time key - useful for swap -partitions and temporary file systems. +Allows attaching a provider with a random, one-time Master Key - +useful for swap partitions and temporary file systems. .It Allows verification of data integrity (data authentication). .It @@ -233,7 +234,8 @@ indicates an action to be performed: .Bl -tag -width ".Cm configure" .It Cm init Initialize the provider which needs to be encrypted. -Here you can set up the cryptographic algorithm to use, key length, etc. +Here you can set up the cryptographic algorithm to use, Data Key length, +etc. The last sector of the provider is used to store metadata. The .Cm init @@ -289,37 +291,58 @@ and The default and recommended algorithm is .Nm AES-XTS . .It Fl i Ar iterations -Number of iterations to use with PKCS#5v2. +Number of iterations to use with PKCS#5v2 when processing User Key +passphrase component. If this option is not specified, .Nm will find the number of iterations which is equal to 2 seconds of crypto work. If 0 is given, PKCS#5v2 will not be used. +PKCS#5v2 processing is performed once, after all parts of the passphrase +component have been read. .It Fl J Ar newpassfile -Specifies a file which contains the passphrase or its part. +Specifies a file which contains the passphrase component of the User Key +(or part of it). If .Ar newpassfile is given as -, standard input will be used. Only the first line (excluding new-line character) is taken from the given file. -This argument can be specified multiple times. +This argument can be specified multiple times, which has the effect of +reassembling a single passphrase split across multiple files. +Cannot be combined with the +.Fl P +option. .It Fl K Ar newkeyfile -Specifies a file which contains part of the key. +Specifies a file which contains the keyfile component of the User Key +(or part of it). If .Ar newkeyfile is given as -, standard input will be used. -This argument can be specified multiple times. +This argument can be specified multiple times, which has the effect of +reassembling a single keyfile split across multiple keyfile parts. .It Fl l Ar keylen -Key length to use with the given cryptographic algorithm. -If not given, the default key length for the given algorithm is used, which is: -128 for -.Nm AES-XTS , -.Nm AES-CBC , -.Nm Blowfish-CBC -and -.Nm Camellia-CBC -and 192 for -.Nm 3DES-CBC . +Data Key length to use with the given cryptographic algorithm. +If the length is not specified, the selected algorithm uses its +.Em default +key length. +.Bl -ohang -offset indent +.It Nm AES-XTS +.Em 128 , +256 +.It Nm AES-CBC , Nm Camilla-CBC +.Em 128 , +192, +256 +.It Nm Blowfish-CBC +.Em 128 ++ n * 32, for n=[0..10] +.It Nm 3DES-CBC +.Em 192 +.El .It Fl P -Do not use passphrase as the key component. +Do not use a passphrase as a component of the User Key. +Cannot be combined with the +.Fl J +option. .It Fl s Ar sectorsize Change decrypted provider's sector size. Increasing the sector size allows increased performance, @@ -337,9 +360,9 @@ Note that using older metadata version m .El .It Cm attach Attach the given provider. -The master key will be decrypted using the given -passphrase/keyfile and a new GEOM provider will be created using the given -provider's name with an +The encrypted Master Key will be loaded from the metadata and decrypted +using the given passphrase/keyfile and a new GEOM provider will be created +using the given provider's name with an .Qq .eli suffix. .Pp @@ -357,28 +380,33 @@ option for the .Cm detach subcommand. .It Fl j Ar passfile -Specifies a file which contains the passphrase or its part. +Specifies a file which contains the passphrase component of the User Key +(or part of it). For more information see the description of the .Fl J option for the .Cm init subcommand. .It Fl k Ar keyfile -Specifies a file which contains part of the key. +Specifies a file which contains the keyfile component of the User Key +(or part of it). For more information see the description of the .Fl K option for the .Cm init subcommand. .It Fl p -Do not use passphrase as the key component. +Do not use a passphrase as a component of the User Key. +Cannot be combined with the +.Fl j +option. .It Fl r Attach read-only provider. It will not be opened for writing. .El .It Cm detach Detach the given providers, which means remove the devfs entry -and clear the keys from memory. +and clear the Master Key and Data Keys from memory. .Pp Additional options include: .Bl -tag -width ".Fl f" @@ -391,7 +419,7 @@ while it is open, but will be automatica last time even if it was only opened for reading. .El .It Cm onetime -Attach the given providers with random, one-time keys. +Attach the given providers with a random, one-time (ephemeral) Master Key. The command can be used to encrypt swap partitions or temporary file systems. .Pp Additional options include: @@ -415,7 +443,7 @@ For more information, see the descriptio .Cm attach subcommand. .It Fl l Ar keylen -Key length to use with the given cryptographic algorithm. +Data Key length to use with the given cryptographic algorithm. For more information, see the description of the .Cm init subcommand. @@ -439,15 +467,18 @@ subcommand. Remove the BOOT flag from the given providers. .El .It Cm setkey -Change or setup (if not yet initialized) selected key. -There is one master key, which can be encrypted with two independent user keys. +Install a copy of the Master Key into the selected slot, encrypted with +a new User Key. +If the selected slot is populated, replace the existing copy. +A provider has one Master Key, which can be stored in one or both slots, +each encrypted with an independent User Key. With the .Cm init subcommand, only key number 0 is initialized. -The key can always be changed: for an attached provider, +The User Key can be changed at any time: for an attached provider, for a detached provider, or on the backup file. When a provider is attached, the user does not have to provide -an old passphrase/keyfile. +an existing passphrase/keyfile. .Pp Additional options include: .Bl -tag -width ".Fl J Ar newpassfile" @@ -458,44 +489,54 @@ To be able to use this option with the .Cm setkey subcommand, only one key has to be defined and this key must be changed. .It Fl j Ar passfile -Specifies a file which contains the old passphrase or its part. +Specifies a file which contains the passphrase component of a current User Key +(or part of it). .It Fl J Ar newpassfile -Specifies a file which contains the new passphrase or its part. +Specifies a file which contains the passphrase component of the new User Key +(or part of it). .It Fl k Ar keyfile -Specifies a file which contains part of the old key. +Specifies a file which contains the keyfile component of a current User Key +(or part of it). .It Fl K Ar newkeyfile -Specifies a file which contains part of the new key. +Specifies a file which contains the keyfile component of the new User Key +(or part of it). .It Fl n Ar keyno -Specifies the number of the key to change (could be 0 or 1). +Specifies the index number of the Master Key copy to change (could be 0 or 1). If the provider is attached and no key number is given, the key used for attaching the provider will be changed. If the provider is detached (or we are operating on a backup file) -and no key number is given, the key decrypted with the passphrase/keyfile -will be changed. +and no key number is given, the first Master Key copy to be successfully +decrypted with the provided User Key passphrase/keyfile will be changed. .It Fl p -Do not use passphrase as the old key component. +Do not use a passphrase as a component of the current User Key. +Cannot be combined with the +.Fl j +option. .It Fl P -Do not use passphrase as the new key component. +Do not use a passphrase as a component of the new User Key. +Cannot be combined with the +.Fl J +option. .El .It Cm delkey -Destroy (overwrite with random data) the selected key. +Destroy (overwrite with random data) the selected Master Key copy. If one is destroying keys for an attached provider, the provider -will not be detached even if all keys are destroyed. +will not be detached even if all copies of the Master Key are destroyed. It can even be rescued with the .Cm setkey -subcommand. +subcommand because the Master Key is still in memory. .Pp Additional options include: .Bl -tag -width ".Fl a Ar keyno" .It Fl a -Destroy all keys (does not need +Destroy all copies of the Master Key (does not need .Fl f option). .It Fl f Force key destruction. -This option is needed to destroy the last key. +This option is needed to destroy the last copy of the Master Key. .It Fl n Ar keyno -Specifies the key number. +Specifies the index number of the Master Key copy. If the provider is attached and no key number is given, the key used for attaching the provider will be destroyed. If provider is detached (or we are operating on a backup file) the key number @@ -503,8 +544,8 @@ has to be given. .El .It Cm kill This command should be used only in emergency situations. -It will destroy all the keys on a given provider and will detach it forcibly -(if it is attached). +It will destroy all copies of the Master Key on a given provider and will +detach it forcibly (if it is attached). This is absolutely a one-way command - if you do not have a metadata backup, your data is gone for good. In case the provider was attached with the @@ -542,8 +583,8 @@ and .El .It Cm suspend Suspend device by waiting for all inflight requests to finish, clearing all -sensitive information (like keys) from kernel memory, and blocking all -further I/O requests until the +sensitive information (like the Master Key and Data Keys) from kernel memory, +and blocking all further I/O requests until the .Cm resume subcommand is executed. This functionality is useful for laptops: when one wants to suspend a @@ -553,8 +594,8 @@ on an encrypted device, unmounting the f the .Cm suspend subcommand can be used. -Any access to the encrypted device will be blocked until the keys are -recovered through the +Any access to the encrypted device will be blocked until the Master Key is +reloaded through the .Cm resume subcommand. Thus there is no need to close nor unmount anything. @@ -584,21 +625,26 @@ utility is stored is bad idea. Additional options include: .Bl -tag -width ".Fl j Ar passfile" .It Fl j Ar passfile -Specifies a file which contains the passphrase or its part. +Specifies a file which contains the passphrase component of the User Key +(or part of it). For more information see the description of the .Fl J option for the .Cm init subcommand. .It Fl k Ar keyfile -Specifies a file which contains part of the key. +Specifies a file which contains the keyfile component of the User Key +(or part of it). For more information see the description of the .Fl K option for the .Cm init subcommand. .It Fl p -Do not use passphrase as the key component. +Do not use a passphrase as a component of the User Key. +Cannot be combined with the +.Fl j +option. .El .It Cm resize Inform @@ -626,6 +672,9 @@ If GEOM providers are specified, the subcommand will print metadata version used by each of them. .It Cm clear Clear metadata from the given providers. +.Em WARNING : +This will erase with zeros the encrypted Master Key copies stored in the +metadata. .It Cm dump Dump metadata stored on the given providers. .It Cm list @@ -647,6 +696,36 @@ Additional options include: .It Fl v Be more verbose. .El +.Sh KEY SUMMARY +.Ss Master Key +Upon +.Cm init , +the +.Nm +utility generates a random Master Key for the provider. +The Master Key never changes during the lifetime of the provider. +Each copy of the provider metadata, active or backed up to a file, can store +up to two, independently-encrypted copies of the Master Key. +.Ss User Key +Each stored copy of the Master Key is encrypted with a User Key, which +is generated by the +.Nm +utility from a passphrase and/or a keyfile. +The +.Nm +utility first reads all parts of the keyfile in the order specified on the +command line, then reads all parts of the stored passphrase in the order +specified on the command line. +If no passphrase parts are specified, the system prompts the user to enter +the passphrase. +The passphrase is optionally strengthened by PKCS#5v2. +The User Key is a digest computed over the concatenated keyfile and passphrase. +.Ss Data Key +During operation, one or more Data Keys are deterministically derived by +the kernel from the Master Key and cached in memory. +The number of Data Keys used by a given provider, and the way they are +derived, depend on the GELI version and whether the provider is configured to +use data authentication. .Sh SYSCTL VARIABLES The following .Xr sysctl 8 @@ -677,7 +756,7 @@ If set to 0, attaching providers on boot This variable should be set in .Pa /boot/loader.conf . .It Va kern.geom.eli.overwrites : No 5 -Specifies how many times the Master-Key will be overwritten +Specifies how many times the Master Key will be overwritten with random values when it is destroyed. After this operation it is filled with zeros. .It Va kern.geom.eli.visible_passphrase : No 0 @@ -699,18 +778,19 @@ Batching reduces the number of interrupt crypto requests with one interrupt. The crypto card and the driver has to support this feature. .It Va kern.geom.eli.key_cache_limit : No 8192 -Specifies how many encryption keys to cache. +Specifies how many Data Keys to cache. The default limit (8192 keys) will allow caching of all keys for a 4TB provider with 512 byte sectors and will take around 1MB of memory. .It Va kern.geom.eli.key_cache_hits -Reports how many times we were looking up a key and it was already in cache. -This sysctl is not updated for providers that need less keys than the limit -specified in +Reports how many times we were looking up a Data Key and it was already in +cache. +This sysctl is not updated for providers that need fewer Data Keys than +the limit specified in .Va kern.geom.eli.key_cache_limit . .It Va kern.geom.eli.key_cache_misses -Reports how many times we were looking up a key and it was not in cache. -This sysctl is not updated for providers that need fewer keys than the limit +Reports how many times we were looking up a Data Key and it was not in cache. +This sysctl is not updated for providers that need fewer Data Keys than the limit specified in .Va kern.geom.eli.key_cache_limit . .El @@ -738,7 +818,7 @@ Enter passphrase: # geli detach da2.eli .Ed .Pp -Create an encrypted provider, but use two keys: +Create an encrypted provider, but use two User Keys: one for your employee and one for you as the company's security officer (so it's not a tragedy if the employee .Qq accidentally @@ -760,7 +840,7 @@ forget their passphrases, so backup the # dd if=/dev/random of=/mnt/pendrive/keys/`hostname` bs=64 count=1 # geli init -P -K /mnt/pendrive/keys/`hostname` /dev/ad0s1e # geli backup /dev/ad0s1e /mnt/pendrive/backups/`hostname` -(use key number 0, so the encrypted Master Key will be overwritten by this) +(use key number 0, so the encrypted Master Key will be re-encrypted by this) # geli setkey -n 0 -k /mnt/pendrive/keys/`hostname` /dev/ad0s1e (allow the user to enter his passphrase) Enter new passphrase: @@ -776,8 +856,8 @@ Encrypted swap partition setup: .Pp The example below shows how to configure two providers which will be attached on boot (before the root file system is mounted). -One of them is using passphrase and three keyfiles and the other is using only a -keyfile: +One of them is using passphrase and three keyfile parts and the other is +using only a keyfile in one part: .Bd -literal -offset indent # dd if=/dev/random of=/dev/da0 bs=1m # dd if=/dev/random of=/boot/keys/da0.key0 bs=32k count=1 From owner-svn-src-all@FreeBSD.ORG Wed Jul 4 19:51:26 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 18EEC106566C; Wed, 4 Jul 2012 19:51:26 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DB5B38FC1B; Wed, 4 Jul 2012 19:51:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q64JpPoq029312; Wed, 4 Jul 2012 19:51:25 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q64JpPXu029310; Wed, 4 Jul 2012 19:51:25 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201207041951.q64JpPXu029310@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Wed, 4 Jul 2012 19:51:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238118 - head/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jul 2012 19:51:26 -0000 Author: pjd Date: Wed Jul 4 19:51:25 2012 New Revision: 238118 URL: http://svn.freebsd.org/changeset/base/238118 Log: Prefer sysctl to open/read/close for obtaining random data. This method is more sandbox-friendly and also should be faster as only one syscall is needed instead of three. In case of an error fall back to the old method. Reviewed by: simon, gleb MFC after: 2 weeks Modified: head/lib/libc/gen/arc4random.c Modified: head/lib/libc/gen/arc4random.c ============================================================================== --- head/lib/libc/gen/arc4random.c Wed Jul 4 17:59:26 2012 (r238117) +++ head/lib/libc/gen/arc4random.c Wed Jul 4 19:51:25 2012 (r238118) @@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -78,6 +79,9 @@ static struct arc4_stream rs; static pid_t arc4_stir_pid; static int arc4_count; +extern int __sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp, + void *newp, size_t newlen); + static inline u_int8_t arc4_getbyte(void); static void arc4_stir(void); @@ -109,6 +113,28 @@ arc4_addrandom(u_char *dat, int datlen) rs.j = rs.i; } +static size_t +arc4_sysctl(u_char *buf, size_t size) +{ + int mib[2]; + size_t len, done; + + mib[0] = CTL_KERN; + mib[1] = KERN_ARND; + done = 0; + + do { + len = size; + if (__sysctl(mib, 2, buf, &len, NULL, 0) == -1) + return (done); + done += len; + buf += len; + size -= len; + } while (size > 0); + + return (done); +} + static void arc4_stir(void) { @@ -123,12 +149,16 @@ arc4_stir(void) arc4_init(); rs_initialized = 1; } - fd = _open(RANDOMDEV, O_RDONLY, 0); done = 0; - if (fd >= 0) { - if (_read(fd, &rdat, KEYSIZE) == KEYSIZE) - done = 1; - (void)_close(fd); + if (arc4_sysctl((u_char *)&rdat, KEYSIZE) == KEYSIZE) + done = 1; + if (!done) { + fd = _open(RANDOMDEV, O_RDONLY, 0); + if (fd >= 0) { + if (_read(fd, &rdat, KEYSIZE) == KEYSIZE) + done = 1; + (void)_close(fd); + } } if (!done) { (void)gettimeofday(&rdat.tv, NULL); From owner-svn-src-all@FreeBSD.ORG Wed Jul 4 20:02:25 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 185CA1065672; Wed, 4 Jul 2012 20:02:25 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 621428FC17; Wed, 4 Jul 2012 20:02:23 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q64K2XWo041214; Wed, 4 Jul 2012 23:02:33 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q64K2KAa015796; Wed, 4 Jul 2012 23:02:20 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q64K2K2Z015795; Wed, 4 Jul 2012 23:02:20 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 4 Jul 2012 23:02:20 +0300 From: Konstantin Belousov To: Pawel Jakub Dawidek Message-ID: <20120704200220.GM2337@deviant.kiev.zoral.com.ua> References: <201207041951.q64JpPXu029310@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="lU8AdyS7O1+iGTdG" Content-Disposition: inline In-Reply-To: <201207041951.q64JpPXu029310@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r238118 - head/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jul 2012 20:02:25 -0000 --lU8AdyS7O1+iGTdG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jul 04, 2012 at 07:51:25PM +0000, Pawel Jakub Dawidek wrote: > Author: pjd > Date: Wed Jul 4 19:51:25 2012 > New Revision: 238118 > URL: http://svn.freebsd.org/changeset/base/238118 >=20 > Log: > Prefer sysctl to open/read/close for obtaining random data. > This method is more sandbox-friendly and also should be faster as only > one syscall is needed instead of three. > In case of an error fall back to the old method. > =20 > Reviewed by: simon, gleb > MFC after: 2 weeks IMO it is weird and against a purpose of sysctl that kern.arand sysctl exists at all. I would prefer to not spread its usage more. We have to keep it to preserve ABI compatibility, but I do not think that the location for random data provider is right, not to mention higher overhead of sysctl machinery. I do think that /dev/random is the right approach, or (less preferable) you could consider adding syscall to get randomness. --lU8AdyS7O1+iGTdG Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAk/0oUwACgkQC3+MBN1Mb4gCVACg0/Qcm2I++ZedlrJt4wkCPjEX UoQAoKn67xRQuCeed+XdR7DL1c/tZcEF =sSVJ -----END PGP SIGNATURE----- --lU8AdyS7O1+iGTdG-- From owner-svn-src-all@FreeBSD.ORG Wed Jul 4 20:16:29 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4C5701065672; Wed, 4 Jul 2012 20:16:29 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 333BB8FC0A; Wed, 4 Jul 2012 20:16:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q64KGT6b030464; Wed, 4 Jul 2012 20:16:29 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q64KGTrr030461; Wed, 4 Jul 2012 20:16:29 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201207042016.q64KGTrr030461@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Wed, 4 Jul 2012 20:16:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238119 - head/sys/geom/gate X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jul 2012 20:16:29 -0000 Author: pjd Date: Wed Jul 4 20:16:28 2012 New Revision: 238119 URL: http://svn.freebsd.org/changeset/base/238119 Log: Extend GEOM Gate class to handle read I/O requests directly within the kernel. This will allow HAST to read directly from the local component without even communicating userland daemon. Sponsored by: Panzura, http://www.panzura.com MFC after: 1 month Modified: head/sys/geom/gate/g_gate.c head/sys/geom/gate/g_gate.h Modified: head/sys/geom/gate/g_gate.c ============================================================================== --- head/sys/geom/gate/g_gate.c Wed Jul 4 19:51:25 2012 (r238118) +++ head/sys/geom/gate/g_gate.c Wed Jul 4 20:16:28 2012 (r238119) @@ -60,7 +60,7 @@ static MALLOC_DEFINE(M_GATE, "gg_data", SYSCTL_DECL(_kern_geom); static SYSCTL_NODE(_kern_geom, OID_AUTO, gate, CTLFLAG_RW, 0, - "GEOM_GATE stuff"); + "GEOM_GATE configuration"); static int g_gate_debug = 0; TUNABLE_INT("kern.geom.gate.debug", &g_gate_debug); SYSCTL_INT(_kern_geom_gate, OID_AUTO, debug, CTLFLAG_RW, &g_gate_debug, 0, @@ -92,6 +92,7 @@ static int g_gate_destroy(struct g_gate_softc *sc, boolean_t force) { struct g_provider *pp; + struct g_consumer *cp; struct g_geom *gp; struct bio *bp; @@ -138,6 +139,12 @@ g_gate_destroy(struct g_gate_softc *sc, mtx_unlock(&g_gate_units_lock); mtx_destroy(&sc->sc_queue_mtx); g_topology_lock(); + if ((cp = sc->sc_readcons) != NULL) { + sc->sc_readcons = NULL; + (void)g_access(cp, -1, 0, 0); + g_detach(cp); + g_destroy_consumer(cp); + } G_GATE_DEBUG(1, "Device %s destroyed.", gp->name); gp->softc = NULL; g_wither_geom(gp, ENXIO); @@ -167,7 +174,7 @@ g_gate_access(struct g_provider *pp, int } static void -g_gate_start(struct bio *bp) +g_gate_queue_io(struct bio *bp) { struct g_gate_softc *sc; @@ -176,27 +183,9 @@ g_gate_start(struct bio *bp) g_io_deliver(bp, ENXIO); return; } - G_GATE_LOGREQ(2, bp, "Request received."); - switch (bp->bio_cmd) { - case BIO_READ: - break; - case BIO_DELETE: - case BIO_WRITE: - case BIO_FLUSH: - /* XXX: Hack to allow read-only mounts. */ - if ((sc->sc_flags & G_GATE_FLAG_READONLY) != 0) { - g_io_deliver(bp, EPERM); - return; - } - break; - case BIO_GETATTR: - default: - G_GATE_LOGREQ(2, bp, "Ignoring request."); - g_io_deliver(bp, EOPNOTSUPP); - return; - } mtx_lock(&sc->sc_queue_mtx); + if (sc->sc_queue_size > 0 && sc->sc_queue_count > sc->sc_queue_size) { mtx_unlock(&sc->sc_queue_mtx); G_GATE_LOGREQ(1, bp, "Queue full, request canceled."); @@ -214,6 +203,74 @@ g_gate_start(struct bio *bp) mtx_unlock(&sc->sc_queue_mtx); } +static void +g_gate_done(struct bio *cbp) +{ + struct bio *pbp; + + pbp = cbp->bio_parent; + if (cbp->bio_error == 0) { + pbp->bio_completed = cbp->bio_completed; + g_destroy_bio(cbp); + pbp->bio_inbed++; + g_io_deliver(pbp, 0); + } else { + /* If direct read failed, pass it through userland daemon. */ + g_destroy_bio(cbp); + pbp->bio_children--; + g_gate_queue_io(pbp); + } +} + +static void +g_gate_start(struct bio *pbp) +{ + struct g_gate_softc *sc; + + sc = pbp->bio_to->geom->softc; + if (sc == NULL || (sc->sc_flags & G_GATE_FLAG_DESTROY) != 0) { + g_io_deliver(pbp, ENXIO); + return; + } + G_GATE_LOGREQ(2, pbp, "Request received."); + switch (pbp->bio_cmd) { + case BIO_READ: + if (sc->sc_readcons != NULL) { + struct bio *cbp; + + cbp = g_clone_bio(pbp); + if (cbp == NULL) { + g_io_deliver(pbp, ENOMEM); + return; + } + cbp->bio_done = g_gate_done; + cbp->bio_offset = pbp->bio_offset + sc->sc_readoffset; + cbp->bio_data = pbp->bio_data; + cbp->bio_length = pbp->bio_length; + cbp->bio_to = sc->sc_readcons->provider; + g_io_request(cbp, sc->sc_readcons); + return; + } + break; + case BIO_DELETE: + case BIO_WRITE: + case BIO_FLUSH: + /* XXX: Hack to allow read-only mounts. */ + if ((sc->sc_flags & G_GATE_FLAG_READONLY) != 0) { + g_io_deliver(pbp, EPERM); + return; + } + break; + case BIO_GETATTR: + default: + G_GATE_LOGREQ(2, pbp, "Ignoring request."); + g_io_deliver(pbp, EOPNOTSUPP); + return; + } + + g_gate_queue_io(pbp); +} + static struct g_gate_softc * g_gate_hold(int unit, const char *name) { @@ -312,6 +369,27 @@ g_gate_guard(void *arg) } static void +g_gate_orphan(struct g_consumer *cp) +{ + struct g_gate_softc *sc; + struct g_geom *gp; + + g_topology_assert(); + gp = cp->geom; + sc = gp->softc; + if (sc == NULL) + return; + KASSERT(cp == sc->sc_readcons, ("cp=%p sc_readcons=%p", cp, + sc->sc_readcons)); + sc->sc_readcons = NULL; + G_GATE_DEBUG(1, "Destroying read consumer on provider %s orphan.", + cp->provider->name); + (void)g_access(cp, -1, 0, 0); + g_detach(cp); + g_destroy_consumer(cp); +} + +static void g_gate_dumpconf(struct sbuf *sb, const char *indent, struct g_geom *gp, struct g_consumer *cp, struct g_provider *pp) { @@ -330,6 +408,12 @@ g_gate_dumpconf(struct sbuf *sb, const c sbuf_printf(sb, "%s%s\n", indent, "read-write"); } + if (sc->sc_readcons != NULL) { + sbuf_printf(sb, "%s%jd\n", + indent, (intmax_t)sc->sc_readoffset); + sbuf_printf(sb, "%s%s\n", + indent, sc->sc_readcons->provider->name); + } sbuf_printf(sb, "%s%u\n", indent, sc->sc_timeout); sbuf_printf(sb, "%s%s\n", indent, sc->sc_info); sbuf_printf(sb, "%s%u\n", indent, @@ -348,15 +432,20 @@ g_gate_create(struct g_gate_ctl_create * { struct g_gate_softc *sc; struct g_geom *gp; - struct g_provider *pp; + struct g_provider *pp, *ropp; + struct g_consumer *cp; char name[NAME_MAX]; int error = 0, unit; - if (ggio->gctl_mediasize == 0) { + if (ggio->gctl_mediasize <= 0) { G_GATE_DEBUG(1, "Invalid media size."); return (EINVAL); } - if (ggio->gctl_sectorsize > 0 && !powerof2(ggio->gctl_sectorsize)) { + if (ggio->gctl_sectorsize <= 0) { + G_GATE_DEBUG(1, "Invalid sector size."); + return (EINVAL); + } + if (!powerof2(ggio->gctl_sectorsize)) { G_GATE_DEBUG(1, "Invalid sector size."); return (EINVAL); } @@ -381,6 +470,31 @@ g_gate_create(struct g_gate_ctl_create * return (EINVAL); } + g_topology_lock(); + + if (ggio->gctl_readprov[0] == '\0') { + ropp = NULL; + } else { + ropp = g_provider_by_name(ggio->gctl_readprov); + if (ropp == NULL) { + g_topology_unlock(); + G_GATE_DEBUG(1, "Provider %s doesn't exist.", + ggio->gctl_readprov); + return (EINVAL); + } + if ((ggio->gctl_readoffset % ggio->gctl_sectorsize) != 0) { + g_topology_unlock(); + G_GATE_DEBUG(1, "Invalid read offset."); + return (EINVAL); + } + if (ggio->gctl_mediasize + ggio->gctl_readoffset > + ropp->mediasize) { + g_topology_unlock(); + G_GATE_DEBUG(1, "Invalid read offset or media size."); + return (EINVAL); + } + } + sc = malloc(sizeof(*sc), M_GATE, M_WAITOK | M_ZERO); sc->sc_flags = (ggio->gctl_flags & G_GATE_USERFLAGS); strlcpy(sc->sc_info, ggio->gctl_info, sizeof(sc->sc_info)); @@ -394,10 +508,50 @@ g_gate_create(struct g_gate_ctl_create * sc->sc_queue_size = G_GATE_MAX_QUEUE_SIZE; sc->sc_timeout = ggio->gctl_timeout; callout_init(&sc->sc_callout, CALLOUT_MPSAFE); + + gp = g_new_geomf(&g_gate_class, "%s", name); + gp->start = g_gate_start; + gp->access = g_gate_access; + gp->orphan = g_gate_orphan; + gp->dumpconf = g_gate_dumpconf; + gp->softc = sc; + + if (ropp != NULL) { + cp = g_new_consumer(gp); + error = g_attach(cp, ropp); + if (error != 0) { + G_GATE_DEBUG(1, "Unable to attach to %s.", ropp->name); + } else { + error = g_access(cp, 1, 0, 0); + if (error != 0) { + G_GATE_DEBUG(1, "Unable to access %s.", + ropp->name); + g_detach(cp); + } + } + if (error != 0) { + g_destroy_consumer(cp); + g_destroy_geom(gp); + g_topology_unlock(); + mtx_destroy(&sc->sc_queue_mtx); + free(sc, M_GATE); + return (error); + } + sc->sc_readcons = cp; + sc->sc_readoffset = ggio->gctl_readoffset; + } + mtx_lock(&g_gate_units_lock); sc->sc_unit = g_gate_getunit(ggio->gctl_unit, &error); if (sc->sc_unit < 0) { mtx_unlock(&g_gate_units_lock); + if (sc->sc_readcons != NULL) { + (void)g_access(sc->sc_readcons, -1, 0, 0); + g_detach(sc->sc_readcons); + g_destroy_consumer(sc->sc_readcons); + } + g_destroy_geom(gp); + g_topology_unlock(); mtx_destroy(&sc->sc_queue_mtx); free(sc, M_GATE); return (error); @@ -415,6 +569,13 @@ g_gate_create(struct g_gate_ctl_create * if (strcmp(name, g_gate_units[unit]->sc_name) != 0) continue; mtx_unlock(&g_gate_units_lock); + if (sc->sc_readcons != NULL) { + (void)g_access(sc->sc_readcons, -1, 0, 0); + g_detach(sc->sc_readcons); + g_destroy_consumer(sc->sc_readcons); + } + g_destroy_geom(gp); + g_topology_unlock(); mtx_destroy(&sc->sc_queue_mtx); free(sc, M_GATE); return (EEXIST); @@ -426,17 +587,12 @@ g_gate_create(struct g_gate_ctl_create * ggio->gctl_unit = sc->sc_unit; - g_topology_lock(); - gp = g_new_geomf(&g_gate_class, "%s", name); - gp->start = g_gate_start; - gp->access = g_gate_access; - gp->dumpconf = g_gate_dumpconf; - gp->softc = sc; pp = g_new_providerf(gp, "%s", name); pp->mediasize = ggio->gctl_mediasize; pp->sectorsize = ggio->gctl_sectorsize; sc->sc_provider = pp; g_error_provider(pp, 0); + g_topology_unlock(); mtx_lock(&g_gate_units_lock); sc->sc_name = sc->sc_provider->name; @@ -450,6 +606,98 @@ g_gate_create(struct g_gate_ctl_create * return (0); } +static int +g_gate_modify(struct g_gate_softc *sc, struct g_gate_ctl_modify *ggio) +{ + struct g_provider *pp; + struct g_consumer *cp; + int error; + + if ((ggio->gctl_modify & GG_MODIFY_MEDIASIZE) != 0) { + if (ggio->gctl_mediasize <= 0) { + G_GATE_DEBUG(1, "Invalid media size."); + return (EINVAL); + } + pp = sc->sc_provider; + if ((ggio->gctl_mediasize % pp->sectorsize) != 0) { + G_GATE_DEBUG(1, "Invalid media size."); + return (EINVAL); + } + /* TODO */ + return (EOPNOTSUPP); + } + + if ((ggio->gctl_modify & GG_MODIFY_INFO) != 0) + (void)strlcpy(sc->sc_info, ggio->gctl_info, sizeof(sc->sc_info)); + + cp = NULL; + + if ((ggio->gctl_modify & GG_MODIFY_READPROV) != 0) { + g_topology_lock(); + if (sc->sc_readcons != NULL) { + cp = sc->sc_readcons; + sc->sc_readcons = NULL; + (void)g_access(cp, -1, 0, 0); + g_detach(cp); + g_destroy_consumer(cp); + } + if (ggio->gctl_readprov[0] != '\0') { + pp = g_provider_by_name(ggio->gctl_readprov); + if (pp == NULL) { + g_topology_unlock(); + G_GATE_DEBUG(1, "Provider %s doesn't exist.", + ggio->gctl_readprov); + return (EINVAL); + } + cp = g_new_consumer(sc->sc_provider->geom); + error = g_attach(cp, pp); + if (error != 0) { + G_GATE_DEBUG(1, "Unable to attach to %s.", + pp->name); + } else { + error = g_access(cp, 1, 0, 0); + if (error != 0) { + G_GATE_DEBUG(1, "Unable to access %s.", + pp->name); + g_detach(cp); + } + } + if (error != 0) { + g_destroy_consumer(cp); + g_topology_unlock(); + return (error); + } + } + } else { + cp = sc->sc_readcons; + } + + if ((ggio->gctl_modify & GG_MODIFY_READOFFSET) != 0) { + if (cp == NULL) { + G_GATE_DEBUG(1, "No read provider."); + return (EINVAL); + } + pp = sc->sc_provider; + if ((ggio->gctl_readoffset % pp->sectorsize) != 0) { + G_GATE_DEBUG(1, "Invalid read offset."); + return (EINVAL); + } + if (pp->mediasize + ggio->gctl_readoffset > + cp->provider->mediasize) { + G_GATE_DEBUG(1, "Invalid read offset or media size."); + return (EINVAL); + } + sc->sc_readoffset = ggio->gctl_readoffset; + } + + if ((ggio->gctl_modify & GG_MODIFY_READPROV) != 0) { + sc->sc_readcons = cp; + g_topology_unlock(); + } + + return (0); +} + #define G_GATE_CHECK_VERSION(ggio) do { \ if ((ggio)->gctl_version != G_GATE_VERSION) { \ printf("Version mismatch %d != %d.\n", \ @@ -483,6 +731,18 @@ g_gate_ioctl(struct cdev *dev, u_long cm td->td_pflags &= ~TDP_GEOM; return (error); } + case G_GATE_CMD_MODIFY: + { + struct g_gate_ctl_modify *ggio = (void *)addr; + + G_GATE_CHECK_VERSION(ggio); + sc = g_gate_hold(ggio->gctl_unit, NULL); + if (sc == NULL) + return (ENXIO); + error = g_gate_modify(sc, ggio); + g_gate_release(sc); + return (error); + } case G_GATE_CMD_DESTROY: { struct g_gate_ctl_destroy *ggio = (void *)addr; Modified: head/sys/geom/gate/g_gate.h ============================================================================== --- head/sys/geom/gate/g_gate.h Wed Jul 4 19:51:25 2012 (r238118) +++ head/sys/geom/gate/g_gate.h Wed Jul 4 20:16:28 2012 (r238119) @@ -41,7 +41,7 @@ #define G_GATE_MOD_NAME "ggate" #define G_GATE_CTL_NAME "ggctl" -#define G_GATE_VERSION 2 +#define G_GATE_VERSION 3 /* * Maximum number of request that can be stored in @@ -64,10 +64,11 @@ #define G_GATE_NAME_GIVEN (-2) #define G_GATE_CMD_CREATE _IOWR('m', 0, struct g_gate_ctl_create) -#define G_GATE_CMD_DESTROY _IOWR('m', 1, struct g_gate_ctl_destroy) -#define G_GATE_CMD_CANCEL _IOWR('m', 2, struct g_gate_ctl_cancel) -#define G_GATE_CMD_START _IOWR('m', 3, struct g_gate_ctl_io) -#define G_GATE_CMD_DONE _IOWR('m', 4, struct g_gate_ctl_io) +#define G_GATE_CMD_MODIFY _IOWR('m', 1, struct g_gate_ctl_modify) +#define G_GATE_CMD_DESTROY _IOWR('m', 2, struct g_gate_ctl_destroy) +#define G_GATE_CMD_CANCEL _IOWR('m', 3, struct g_gate_ctl_cancel) +#define G_GATE_CMD_START _IOWR('m', 4, struct g_gate_ctl_io) +#define G_GATE_CMD_DONE _IOWR('m', 5, struct g_gate_ctl_io) #define G_GATE_INFOSIZE 2048 @@ -88,6 +89,8 @@ struct g_gate_softc { uint32_t sc_queue_count; /* P: sc_queue_mtx */ uint32_t sc_queue_size; /* P: (read-only) */ u_int sc_timeout; /* P: (read-only) */ + struct g_consumer *sc_readcons; /* P: XXX */ + off_t sc_readoffset; /* P: XXX */ struct callout sc_callout; /* P: (modified only from callout thread) */ @@ -131,9 +134,25 @@ struct g_gate_ctl_create { u_int gctl_timeout; char gctl_name[NAME_MAX]; char gctl_info[G_GATE_INFOSIZE]; + char gctl_readprov[NAME_MAX]; + off_t gctl_readoffset; int gctl_unit; /* in/out */ }; +#define GG_MODIFY_MEDIASIZE 0x01 +#define GG_MODIFY_INFO 0x02 +#define GG_MODIFY_READPROV 0x04 +#define GG_MODIFY_READOFFSET 0x08 +struct g_gate_ctl_modify { + u_int gctl_version; + int gctl_unit; + uint32_t gctl_modify; + off_t gctl_mediasize; + char gctl_info[G_GATE_INFOSIZE]; + char gctl_readprov[NAME_MAX]; + off_t gctl_readoffset; +}; + struct g_gate_ctl_destroy { u_int gctl_version; int gctl_unit; From owner-svn-src-all@FreeBSD.ORG Wed Jul 4 20:20:49 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4530B1065670; Wed, 4 Jul 2012 20:20:49 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 231E48FC0A; Wed, 4 Jul 2012 20:20:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q64KKm9m030671; Wed, 4 Jul 2012 20:20:49 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q64KKmiI030669; Wed, 4 Jul 2012 20:20:48 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201207042020.q64KKmiI030669@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Wed, 4 Jul 2012 20:20:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238120 - head/sbin/hastd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jul 2012 20:20:49 -0000 Author: pjd Date: Wed Jul 4 20:20:48 2012 New Revision: 238120 URL: http://svn.freebsd.org/changeset/base/238120 Log: Make use of GEOM Gate direct reads feature. This allows HAST to serve reads with native speed of the underlying provider. There are three situations when direct reads are not used: 1. Data is being synchronized and synchronization source is the secondary node, which means secondary node has more recent data and we should read from it. 2. Local read failed and we have to try to read from the secondary node. 3. Local component is unavailable and all I/O requests are served from the secondary node. Sponsored by: Panzura, http://www.panzura.com MFC after: 1 month Modified: head/sbin/hastd/primary.c Modified: head/sbin/hastd/primary.c ============================================================================== --- head/sbin/hastd/primary.c Wed Jul 4 20:16:28 2012 (r238119) +++ head/sbin/hastd/primary.c Wed Jul 4 20:20:48 2012 (r238120) @@ -543,6 +543,27 @@ primary_connect(struct hast_resource *re return (0); } + +/* + * Function instructs GEOM_GATE to handle reads directly from within the kernel. + */ +static void +enable_direct_reads(struct hast_resource *res) +{ + struct g_gate_ctl_modify ggiomodify; + + bzero(&ggiomodify, sizeof(ggiomodify)); + ggiomodify.gctl_version = G_GATE_VERSION; + ggiomodify.gctl_unit = res->hr_ggateunit; + ggiomodify.gctl_modify = GG_MODIFY_READPROV | GG_MODIFY_READOFFSET; + strlcpy(ggiomodify.gctl_readprov, res->hr_localpath, + sizeof(ggiomodify.gctl_readprov)); + ggiomodify.gctl_readoffset = res->hr_localoff; + if (ioctl(res->hr_ggatefd, G_GATE_CMD_MODIFY, &ggiomodify) == 0) + pjdlog_debug(1, "Direct reads enabled."); + else + pjdlog_errno(LOG_WARNING, "Failed to enable direct reads"); +} static int init_remote(struct hast_resource *res, struct proto_conn **inp, @@ -692,6 +713,8 @@ init_remote(struct hast_resource *res, s res->hr_secondary_localcnt = nv_get_uint64(nvin, "localcnt"); res->hr_secondary_remotecnt = nv_get_uint64(nvin, "remotecnt"); res->hr_syncsrc = nv_get_uint8(nvin, "syncsrc"); + if (res->hr_syncsrc == HAST_SYNCSRC_PRIMARY) + enable_direct_reads(res); if (nv_exists(nvin, "virgin")) { /* * Secondary was reinitialized, bump localcnt if it is 0 as @@ -1789,13 +1812,14 @@ sync_thread(void *arg __unused) struct timeval tstart, tend, tdiff; unsigned int ii, ncomp, ncomps; off_t offset, length, synced; - bool dorewind; + bool dorewind, directreads; int syncext; ncomps = HAST_NCOMPONENTS; dorewind = true; synced = 0; offset = -1; + directreads = false; for (;;) { mtx_lock(&sync_lock); @@ -1867,6 +1891,8 @@ sync_thread(void *arg __unused) event_send(res, EVENT_SYNCDONE); } mtx_lock(&metadata_lock); + if (res->hr_syncsrc == HAST_SYNCSRC_SECONDARY) + directreads = true; res->hr_syncsrc = HAST_SYNCSRC_UNDEF; res->hr_primary_localcnt = res->hr_secondary_remotecnt; @@ -1880,6 +1906,10 @@ sync_thread(void *arg __unused) mtx_unlock(&metadata_lock); } rw_unlock(&hio_remote_lock[ncomp]); + if (directreads) { + directreads = false; + enable_direct_reads(res); + } continue; } pjdlog_debug(2, "sync: Taking free request."); From owner-svn-src-all@FreeBSD.ORG Wed Jul 4 20:29:17 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 90004106567F; Wed, 4 Jul 2012 20:29:17 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7828C8FC0A; Wed, 4 Jul 2012 20:29:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q64KTHr0031053; Wed, 4 Jul 2012 20:29:17 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q64KTHZt031051; Wed, 4 Jul 2012 20:29:17 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201207042029.q64KTHZt031051@svn.freebsd.org> From: Michael Tuexen Date: Wed, 4 Jul 2012 20:29:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238121 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jul 2012 20:29:17 -0000 Author: tuexen Date: Wed Jul 4 20:29:16 2012 New Revision: 238121 URL: http://svn.freebsd.org/changeset/base/238121 Log: Use CSUM_SCTP_IPV6 for IPv6. MFC after: 3 days Modified: head/sys/netinet/sctp_output.c Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Wed Jul 4 20:20:48 2012 (r238120) +++ head/sys/netinet/sctp_output.c Wed Jul 4 20:29:16 2012 (r238121) @@ -4471,7 +4471,7 @@ sctp_lowlevel_chunk_output(struct sctp_i #if defined(SCTP_WITH_NO_CSUM) SCTP_STAT_INCR(sctps_sendnocrc); #else - m->m_pkthdr.csum_flags = CSUM_SCTP; + m->m_pkthdr.csum_flags = CSUM_SCTP_IPV6; m->m_pkthdr.csum_data = 0; SCTP_STAT_INCR(sctps_sendhwcrc); #endif @@ -11025,7 +11025,7 @@ sctp_send_resp_msg(struct sockaddr *src, #if defined(SCTP_WITH_NO_CSUM) SCTP_STAT_INCR(sctps_sendnocrc); #else - mout->m_pkthdr.csum_flags = CSUM_SCTP; + mout->m_pkthdr.csum_flags = CSUM_SCTP_IPV6; mout->m_pkthdr.csum_data = 0; SCTP_STAT_INCR(sctps_sendhwcrc); #endif From owner-svn-src-all@FreeBSD.ORG Wed Jul 4 20:32:48 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2AAEC106566B; Wed, 4 Jul 2012 20:32:48 +0000 (UTC) (envelope-from ache@vniz.net) Received: from vniz.net (vniz.net [194.87.13.69]) by mx1.freebsd.org (Postfix) with ESMTP id 646F38FC17; Wed, 4 Jul 2012 20:32:47 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by vniz.net (8.14.5/8.14.5) with ESMTP id q64KWeDG042644; Thu, 5 Jul 2012 00:32:40 +0400 (MSK) (envelope-from ache@vniz.net) Received: (from ache@localhost) by localhost (8.14.5/8.14.5/Submit) id q64KWeGj042643; Thu, 5 Jul 2012 00:32:40 +0400 (MSK) (envelope-from ache) Date: Thu, 5 Jul 2012 00:32:40 +0400 From: Andrey Chernov To: Konstantin Belousov Message-ID: <20120704203239.GA42326@vniz.net> Mail-Followup-To: Andrey Chernov , Konstantin Belousov , Pawel Jakub Dawidek , src-committers@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, svn-src-head@FreeBSD.ORG, markm@freebsd.org References: <201207041951.q64JpPXu029310@svn.freebsd.org> <20120704200220.GM2337@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="rwEMma7ioTxnRzrJ" Content-Disposition: inline In-Reply-To: <20120704200220.GM2337@deviant.kiev.zoral.com.ua> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.ORG, markm@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, src-committers@FreeBSD.ORG, Pawel Jakub Dawidek Subject: Re: svn commit: r238118 - head/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jul 2012 20:32:48 -0000 --rwEMma7ioTxnRzrJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jul 04, 2012 at 11:02:20PM +0300, Konstantin Belousov wrote: > On Wed, Jul 04, 2012 at 07:51:25PM +0000, Pawel Jakub Dawidek wrote: > > Author: pjd > > Date: Wed Jul 4 19:51:25 2012 > > New Revision: 238118 > > URL: http://svn.freebsd.org/changeset/base/238118 > >=20 > > Log: > > Prefer sysctl to open/read/close for obtaining random data. > > This method is more sandbox-friendly and also should be faster as only > > one syscall is needed instead of three. > > In case of an error fall back to the old method. > > =20 > > Reviewed by: simon, gleb > > MFC after: 2 weeks > IMO it is weird and against a purpose of sysctl that kern.arand sysctl > exists at all. I would prefer to not spread its usage more. We have > to keep it to preserve ABI compatibility, but I do not think that the > location for random data provider is right, not to mention higher > overhead of sysctl machinery. 1) /dev/urandom may not exist in jails/sandboxes while sysctls (or old way= =20 initialization) always exists. 2) Current NetBSD code uses KERN_URND we don't have. 3) Current OpenBSD code uses KERN_ARND as in the change committed. 4) Our KERN_ARND initially is initialized only from from the weak value at= =20 the boot stage. 5) I already provide two working patches (one with atomic and another=20 one without) to bypass issue 4) but they are never committed by person=20 who promise to handle them (markm@ CCed) for the reason unknown and I=20 can't do it by myself due to stupid secteam@ 5 years old ban. 6) So, current KERN_ARND way gives weak randomness for just started after= =20 boot programs and should be fixed by either my patches mentioned in 5) or= =20 by implementing KERN_URND as in NetBSD. Note that the initial ARND seeding problem does not exist in OpenBSD since= =20 they use different KERN_ARND implementation. (besides usage in arc4random code I think KERN_ARND should be fixed in=20 anycase) --=20 http://ache.vniz.net/ --rwEMma7ioTxnRzrJ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAk/0qGcACgkQVg5YK5ZEdN1LPgCeLj0IGDbAOKc01hKYZg2+Vh2q tLIAn3+/VqmCURvuAytCw6qV4otUAtyP =s+Rp -----END PGP SIGNATURE----- --rwEMma7ioTxnRzrJ-- From owner-svn-src-all@FreeBSD.ORG Wed Jul 4 20:40:26 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CD5D8106564A; Wed, 4 Jul 2012 20:40:26 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from theravensnest.org (theraven.freebsd.your.org [216.14.102.27]) by mx1.freebsd.org (Postfix) with ESMTP id 8C0A28FC08; Wed, 4 Jul 2012 20:40:26 +0000 (UTC) Received: from [192.168.0.2] (cpc2-cmbg15-2-0-cust445.5-4.cable.virginmedia.com [86.26.13.190]) (authenticated bits=0) by theravensnest.org (8.14.5/8.14.5) with ESMTP id q64KeM2v023421 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Wed, 4 Jul 2012 20:40:25 GMT (envelope-from theraven@FreeBSD.org) Mime-Version: 1.0 (Apple Message framework v1278) Content-Type: text/plain; charset=us-ascii From: David Chisnall In-Reply-To: <20120704203239.GA42326@vniz.net> Date: Wed, 4 Jul 2012 21:40:17 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <8344944B-1CEE-4CAD-96FB-EC5A743F6909@FreeBSD.org> References: <201207041951.q64JpPXu029310@svn.freebsd.org> <20120704200220.GM2337@deviant.kiev.zoral.com.ua> <20120704203239.GA42326@vniz.net> To: Andrey Chernov X-Mailer: Apple Mail (2.1278) Cc: src-committers@FreeBSD.org, Pawel Jakub Dawidek , svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org, Konstantin Belousov , markm@FreeBSD.org Subject: Re: svn commit: r238118 - head/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jul 2012 20:40:26 -0000 On 4 Jul 2012, at 21:32, Andrey Chernov wrote: > 1) /dev/urandom may not exist in jails/sandboxes while sysctls (or old = way=20 > initialization) always exists. =46rom the perspective of Capsicum sandboxes, a device node is better = than a sysctl. The kernel must hard-code policy about which sysctls are = permitted, but access to file descriptors is decided on a per-sandbox = basis and is configurable by the user. The same applies to jails, = although it's slightly more effort to make device nodes appear inside a = jail. David= From owner-svn-src-all@FreeBSD.ORG Wed Jul 4 20:45:57 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 77000106564A; Wed, 4 Jul 2012 20:45:57 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com [209.85.217.182]) by mx1.freebsd.org (Postfix) with ESMTP id 8B4F18FC17; Wed, 4 Jul 2012 20:45:55 +0000 (UTC) Received: by lbon10 with SMTP id n10so13664899lbo.13 for ; Wed, 04 Jul 2012 13:45:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=bcWpk3OPPWyl+X5CeLf1AtEXLqbnsU+KwRYRiWzBKV0=; b=o4LaL1499fhoZqLRdv9FwagQmpFuwT4iSb9nmQwQpinH3C86AhjthKmge88ofq/D6v YcUpQZeLEvRv1ALRcy/OWlYD8oL4EXzFGVbXQjV31r53Les+VzVH/XDm+qxxbLTXRibb NeXmOKNlgOcejHiCTsysQ9eys1Boo1/8CRJ9J5hrEAO5MB/76z9xZ3fIJ4EhVvn2XMSS ZFOP6k3DHxtpH5BH+sMKxhO9jJQVsyi8xshRDKYuqFTk5XLEgy9RGzOyDgvtVzRCqGXk W4mnPmIKR6eFRrsccuUUvzVTooDwRL40pt94nmQZQPreB/59hvGAn0Luptqrgsk1trg+ Z6rA== MIME-Version: 1.0 Received: by 10.112.23.196 with SMTP id o4mr10720646lbf.49.1341434754402; Wed, 04 Jul 2012 13:45:54 -0700 (PDT) Sender: asmrookie@gmail.com Received: by 10.112.27.65 with HTTP; Wed, 4 Jul 2012 13:45:54 -0700 (PDT) In-Reply-To: <8344944B-1CEE-4CAD-96FB-EC5A743F6909@FreeBSD.org> References: <201207041951.q64JpPXu029310@svn.freebsd.org> <20120704200220.GM2337@deviant.kiev.zoral.com.ua> <20120704203239.GA42326@vniz.net> <8344944B-1CEE-4CAD-96FB-EC5A743F6909@FreeBSD.org> Date: Wed, 4 Jul 2012 21:45:54 +0100 X-Google-Sender-Auth: 1BDlpz4IoF7GvbbAv_uwj-HEotM Message-ID: From: Attilio Rao To: David Chisnall Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: src-committers@freebsd.org, Pawel Jakub Dawidek , svn-src-all@freebsd.org, Konstantin Belousov , svn-src-head@freebsd.org, Andrey Chernov , markm@freebsd.org Subject: Re: svn commit: r238118 - head/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jul 2012 20:45:57 -0000 2012/7/4 David Chisnall : > On 4 Jul 2012, at 21:32, Andrey Chernov wrote: > >> 1) /dev/urandom may not exist in jails/sandboxes while sysctls (or old w= ay >> initialization) always exists. > > From the perspective of Capsicum sandboxes, a device node is better than = a sysctl. The kernel must hard-code policy about which sysctls are permitt= ed, but access to file descriptors is decided on a per-sandbox basis and is= configurable by the user. The same applies to jails, although it's slight= ly more effort to make device nodes appear inside a jail. Also don't understimate the locking factor here. I recall that at some point /dev/random was introducing some scalability penalty on php (maybe related to the suhosin patch) until kib made shared lookups available on devfs. IIRC, sysctls are still Giant locked. Attilio --=20 Peace can only be achieved by understanding - A. Einstein From owner-svn-src-all@FreeBSD.ORG Wed Jul 4 20:50:04 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.ORG Received: from mx2.freebsd.org (mx2.freebsd.org [69.147.83.53]) by hub.freebsd.org (Postfix) with ESMTP id DD6F6106566C; Wed, 4 Jul 2012 20:50:03 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from opti.dougb.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 6DB361A48C1; Wed, 4 Jul 2012 20:49:02 +0000 (UTC) Message-ID: <4FF4AC3D.9070109@FreeBSD.org> Date: Wed, 04 Jul 2012 13:49:01 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:13.0) Gecko/20120624 Thunderbird/13.0.1 MIME-Version: 1.0 To: Andrey Chernov , Konstantin Belousov , Pawel Jakub Dawidek , src-committers@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, svn-src-head@FreeBSD.ORG, markm@freebsd.org References: <201207041951.q64JpPXu029310@svn.freebsd.org> <20120704200220.GM2337@deviant.kiev.zoral.com.ua> <20120704203239.GA42326@vniz.net> In-Reply-To: <20120704203239.GA42326@vniz.net> X-Enigmail-Version: 1.4.2 OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Subject: Re: svn commit: r238118 - head/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jul 2012 20:50:04 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 07/04/2012 13:32, Andrey Chernov wrote: > 1) /dev/urandom may not exist in jails/sandboxes That would be a pretty serious configuration error. - -- This .signature sanitized for your protection -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iQEcBAEBCAAGBQJP9Kw9AAoJEFzGhvEaGryEATEH/RbxtNiNYy+Ki/DL0JWVTTwq f+kEK8bASCfJGmA+Vb+1cjEGcMT64QOvV3n4ow0xjn9xctmWVtoA8Y4Q4dRomOh6 vOlJfu5aRsZsAxsf9sV3k1psuO5IXuYBfAeGVtGBjgNMnDG46PiNBE+4q5rVntHw sUsuyupxgRbYrCvTVbeET2wAZ+G9j8ceK56nA63KN3azAIpCktCDzSm3FlDrVWYh zk+LpIHdpE4pbpH8znxDQoRqF+V9n6pryGiFNzkzLODvtoiL7qgrJtNEdfu3GCQI J7tolXvMmxljYW+V3PUP5abO6RS1uCMiZi3wvo+HaZqhPVUVTw98tx+qRwBJ7zs= =1MvW -----END PGP SIGNATURE----- From owner-svn-src-all@FreeBSD.ORG Wed Jul 4 20:50:44 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 24E3F106566B; Wed, 4 Jul 2012 20:50:44 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 70D078FC18; Wed, 4 Jul 2012 20:50:43 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q64KoqVH043991; Wed, 4 Jul 2012 23:50:52 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q64KodfT016125; Wed, 4 Jul 2012 23:50:39 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q64Kod1A016124; Wed, 4 Jul 2012 23:50:39 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 4 Jul 2012 23:50:39 +0300 From: Konstantin Belousov To: Attilio Rao Message-ID: <20120704205039.GO2337@deviant.kiev.zoral.com.ua> References: <201207041951.q64JpPXu029310@svn.freebsd.org> <20120704200220.GM2337@deviant.kiev.zoral.com.ua> <20120704203239.GA42326@vniz.net> <8344944B-1CEE-4CAD-96FB-EC5A743F6909@FreeBSD.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="8F/57/tdqD1iFupr" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: src-committers@freebsd.org, Andrey Chernov , svn-src-all@freebsd.org, David Chisnall , svn-src-head@freebsd.org, Pawel Jakub Dawidek , markm@freebsd.org Subject: Re: svn commit: r238118 - head/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jul 2012 20:50:44 -0000 --8F/57/tdqD1iFupr Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jul 04, 2012 at 09:45:54PM +0100, Attilio Rao wrote: > 2012/7/4 David Chisnall : > > On 4 Jul 2012, at 21:32, Andrey Chernov wrote: > > > >> 1) /dev/urandom may not exist in jails/sandboxes while sysctls (or old= way > >> initialization) always exists. > > > > From the perspective of Capsicum sandboxes, a device node is better tha= n a sysctl. The kernel must hard-code policy about which sysctls are permi= tted, but access to file descriptors is decided on a per-sandbox basis and = is configurable by the user. The same applies to jails, although it's slig= htly more effort to make device nodes appear inside a jail. >=20 > Also don't understimate the locking factor here. > I recall that at some point /dev/random was introducing some > scalability penalty on php (maybe related to the suhosin patch) until > kib made shared lookups available on devfs. IIRC, sysctls are still > Giant locked. /dev/random has further optimizations which eliminate the dev_mtx aquisitions as well. KERN_ARND is mpsafe. --8F/57/tdqD1iFupr Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAk/0rJ8ACgkQC3+MBN1Mb4gZOwCZAeP3uUjdRcIxqyJMvUuTCFeY tlAAoI95/UY73VhFCesTtMcC7pnvAclL =/7S7 -----END PGP SIGNATURE----- --8F/57/tdqD1iFupr-- From owner-svn-src-all@FreeBSD.ORG Wed Jul 4 20:56:09 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 438A1106566B; Wed, 4 Jul 2012 20:56:09 +0000 (UTC) (envelope-from ache@vniz.net) Received: from vniz.net (vniz.net [194.87.13.69]) by mx1.freebsd.org (Postfix) with ESMTP id A82248FC16; Wed, 4 Jul 2012 20:56:08 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by vniz.net (8.14.5/8.14.5) with ESMTP id q64Ku7iO042958; Thu, 5 Jul 2012 00:56:07 +0400 (MSK) (envelope-from ache@vniz.net) Received: (from ache@localhost) by localhost (8.14.5/8.14.5/Submit) id q64Ku7MZ042957; Thu, 5 Jul 2012 00:56:07 +0400 (MSK) (envelope-from ache) Date: Thu, 5 Jul 2012 00:56:06 +0400 From: Andrey Chernov To: Doug Barton Message-ID: <20120704205606.GA42877@vniz.net> Mail-Followup-To: Andrey Chernov , Doug Barton , Konstantin Belousov , Pawel Jakub Dawidek , src-committers@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, svn-src-head@FreeBSD.ORG, markm@FreeBSD.ORG References: <201207041951.q64JpPXu029310@svn.freebsd.org> <20120704200220.GM2337@deviant.kiev.zoral.com.ua> <20120704203239.GA42326@vniz.net> <4FF4AC3D.9070109@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4FF4AC3D.9070109@FreeBSD.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: src-committers@FreeBSD.ORG, Pawel Jakub Dawidek , svn-src-all@FreeBSD.ORG, svn-src-head@FreeBSD.ORG, Konstantin Belousov , markm@FreeBSD.ORG Subject: Re: svn commit: r238118 - head/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jul 2012 20:56:09 -0000 On Wed, Jul 04, 2012 at 01:49:01PM -0700, Doug Barton wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA256 > > On 07/04/2012 13:32, Andrey Chernov wrote: > > 1) /dev/urandom may not exist in jails/sandboxes > > That would be a pretty serious configuration error. > It may be true, but old POLA is that *BSD arc4random() should works nice in such situations. -- http://ache.vniz.net/ From owner-svn-src-all@FreeBSD.ORG Wed Jul 4 20:58:53 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6AF09106564A for ; Wed, 4 Jul 2012 20:58:53 +0000 (UTC) (envelope-from bounces+73574-8822-svn-src-all=freebsd.org@sendgrid.me) Received: from o3.shared.sendgrid.net (o3.shared.sendgrid.net [208.117.48.85]) by mx1.freebsd.org (Postfix) with SMTP id 0E1BF8FC17 for ; Wed, 4 Jul 2012 20:58:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sendgrid.info; h= message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type:content-transfer-encoding; s=smtpapi; bh=RkSXblc+fAktEAm6qGXlSrZmabY=; b=ldiSAjQcumXzDtdSuGEAhrH0okpr jmpL4twA8NpRLWA/rrtF3od7QsaP5hkFUy5MoMo1OKjJ56JIcost3mH6ObY47BlN fX1VByW7S7VItoADurMRuJZzzc6g6bz3mynsUc28U9K8TBIR8So9exuK8jcioz+A oUqBswp5PD3/ckI= Received: by 10.4.35.220 with SMTP id mf8.19569.4FF4AE8C4 Wed, 04 Jul 2012 15:58:52 -0500 (CDT) Received: from mail.tarsnap.com (unknown [10.9.180.5]) by mi1 (SG) with ESMTP id 4ff4ae8c.1d4e.231ae1 for ; Wed, 04 Jul 2012 15:58:52 -0500 (CST) Received: (qmail 79272 invoked from network); 4 Jul 2012 20:57:29 -0000 Received: from unknown (HELO clamshell.daemonology.net) (127.0.0.1) by ec2-107-20-205-189.compute-1.amazonaws.com with ESMTP; 4 Jul 2012 20:57:29 -0000 Received: (qmail 5312 invoked from network); 4 Jul 2012 20:58:31 -0000 Received: from unknown (HELO clamshell.daemonology.net) (127.0.0.1) by clamshell.daemonology.net with SMTP; 4 Jul 2012 20:58:31 -0000 Message-ID: <4FF4AE77.6020809@freebsd.org> Date: Wed, 04 Jul 2012 13:58:31 -0700 From: Colin Percival User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:13.0) Gecko/20120627 Thunderbird/13.0.1 MIME-Version: 1.0 To: Attilio Rao References: <201207041951.q64JpPXu029310@svn.freebsd.org> <20120704200220.GM2337@deviant.kiev.zoral.com.ua> <20120704203239.GA42326@vniz.net> <8344944B-1CEE-4CAD-96FB-EC5A743F6909@FreeBSD.org> In-Reply-To: X-Enigmail-Version: 1.4.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Sendgrid-EID: A6W2xSVPHetogaU8rnzccWwgBYtN+QvIzXyjfe/10PGs79m3nkeuTRZ2zjqszWLCypW/v0NwVS/3dMLCvszQy18ekQei8xMOXHxo0ZQ41zTUS0ShffXYVrrpYUZB1t/ZqotFg1x4FkhIgr3cdDbWWA== Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r238118 - head/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jul 2012 20:58:53 -0000 On 07/04/12 13:45, Attilio Rao wrote: > I recall that at some point /dev/random was introducing some > scalability penalty on php [...] ... thus reinforcing the stereotype that PHP Does Stuff Wrong. Userland processes should get entropy from the kernel *once* at launch time and place it into an entropy pool which is *occasionally* reseeded later. If even a very slow /dev/random becomes a scalability problem, an application is doing something very very wrong. -- Colin Percival Security Officer Emeritus, FreeBSD | The power to serve Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid From owner-svn-src-all@FreeBSD.ORG Wed Jul 4 20:59:31 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6F83A106566B; Wed, 4 Jul 2012 20:59:31 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 581468FC1A; Wed, 4 Jul 2012 20:59:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q64KxVrr032422; Wed, 4 Jul 2012 20:59:31 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q64KxV4j032420; Wed, 4 Jul 2012 20:59:31 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201207042059.q64KxV4j032420@svn.freebsd.org> From: Michael Tuexen Date: Wed, 4 Jul 2012 20:59:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238122 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jul 2012 20:59:31 -0000 Author: tuexen Date: Wed Jul 4 20:59:30 2012 New Revision: 238122 URL: http://svn.freebsd.org/changeset/base/238122 Log: Use consistent method to determine IPV4_OUTPUT/IPV6_OUTPUT. MFC after: 3 days Modified: head/sys/netinet/sctp_output.c Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Wed Jul 4 20:29:16 2012 (r238121) +++ head/sys/netinet/sctp_output.c Wed Jul 4 20:59:30 2012 (r238122) @@ -10971,8 +10971,9 @@ sctp_send_resp_msg(struct sockaddr *src, return; } SCTP_ATTACH_CHAIN(o_pak, mout, len); + switch (dst->sa_family) { #ifdef INET - if (ip != NULL) { + case AF_INET: if (port) { if (V_udp_cksum) { udp->uh_sum = in_pseudo(ip->ip_src.s_addr, ip->ip_dst.s_addr, udp->uh_ulen + htons(IPPROTO_UDP)); @@ -11006,10 +11007,10 @@ sctp_send_resp_msg(struct sockaddr *src, } #endif SCTP_IP_OUTPUT(ret, o_pak, NULL, NULL, vrf_id); - } + break; #endif #ifdef INET6 - if (ip6 != NULL) { + case AF_INET6: ip6->ip6_plen = len - sizeof(struct ip6_hdr); if (port) { #if defined(SCTP_WITH_NO_CSUM) @@ -11036,8 +11037,15 @@ sctp_send_resp_msg(struct sockaddr *src, } #endif SCTP_IP6_OUTPUT(ret, o_pak, NULL, NULL, NULL, vrf_id); - } + break; #endif + default: + SCTPDBG(SCTP_DEBUG_OUTPUT1, "Unknown protocol (TSNH) type %d\n", + dst->sa_family); + sctp_m_freem(mout); + SCTP_LTRACE_ERR_RET_PKT(mout, NULL, NULL, NULL, SCTP_FROM_SCTP_OUTPUT, EFAULT); + return; + } SCTP_STAT_INCR(sctps_sendpackets); SCTP_STAT_INCR_COUNTER64(sctps_outpackets); SCTP_STAT_INCR_COUNTER64(sctps_outcontrolchunks); From owner-svn-src-all@FreeBSD.ORG Wed Jul 4 22:12:11 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1F6EF1065670; Wed, 4 Jul 2012 22:12:11 +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 09C358FC15; Wed, 4 Jul 2012 22:12:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q64MCAss035456; Wed, 4 Jul 2012 22:12:10 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q64MCAvI035450; Wed, 4 Jul 2012 22:12:10 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201207042212.q64MCAvI035450@svn.freebsd.org> From: John Baldwin Date: Wed, 4 Jul 2012 22:12:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238123 - in head/contrib/binutils: gas/config opcodes X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jul 2012 22:12:11 -0000 Author: jhb Date: Wed Jul 4 22:12:10 2012 New Revision: 238123 URL: http://svn.freebsd.org/changeset/base/238123 Log: Add support for the 'xsave', 'xrstor', 'xsaveopt', 'xgetbv', and 'xsetbv' instructions. I reimplemented this from scratch based on the Intel manuals and the existing support for handling the fxsave and fxrstor instructions. This will let us use these instructions natively with GCC rather than hardcoding the opcodes in hex. Reviewed by: kib MFC after: 1 month Modified: head/contrib/binutils/gas/config/tc-i386.c head/contrib/binutils/opcodes/i386-dis.c head/contrib/binutils/opcodes/i386-opc.h head/contrib/binutils/opcodes/i386-opc.tbl head/contrib/binutils/opcodes/i386-tbl.h Modified: head/contrib/binutils/gas/config/tc-i386.c ============================================================================== --- head/contrib/binutils/gas/config/tc-i386.c Wed Jul 4 20:59:30 2012 (r238122) +++ head/contrib/binutils/gas/config/tc-i386.c Wed Jul 4 22:12:10 2012 (r238123) @@ -517,7 +517,9 @@ static const arch_entry cpu_arch[] = {".sse4a", PROCESSOR_UNKNOWN, CpuMMX|CpuMMX2|CpuSSE|CpuSSE2|CpuSSE3|CpuSSE4a}, {".abm", PROCESSOR_UNKNOWN, - CpuABM} + CpuABM}, + {".xsave", PROCESSOR_UNKNOWN, + CpuXSAVE} }; const pseudo_typeS md_pseudo_table[] = Modified: head/contrib/binutils/opcodes/i386-dis.c ============================================================================== --- head/contrib/binutils/opcodes/i386-dis.c Wed Jul 4 20:59:30 2012 (r238122) +++ head/contrib/binutils/opcodes/i386-dis.c Wed Jul 4 22:12:10 2012 (r238123) @@ -93,6 +93,7 @@ static void OP_3DNowSuffix (int, int); static void OP_SIMD_Suffix (int, int); static void SIMD_Fixup (int, int); static void PNI_Fixup (int, int); +static void XCR_Fixup (int, int); static void SVME_Fixup (int, int); static void INVLPG_Fixup (int, int); static void BadOp (void); @@ -1693,7 +1694,7 @@ static const struct dis386 grps[][8] = { { { "sgdt{Q|IQ||}", { { VMX_Fixup, 0 } } }, { "sidt{Q|IQ||}", { { PNI_Fixup, 0 } } }, - { "lgdt{Q|Q||}", { M } }, + { "lgdt{Q|Q||}", { { XCR_Fixup, 0 } } }, { "lidt{Q|Q||}", { { SVME_Fixup, 0 } } }, { "smswD", { Sv } }, { "(bad)", { XX } }, @@ -1783,9 +1784,9 @@ static const struct dis386 grps[][8] = { { "fxrstor", { Ev } }, { "ldmxcsr", { Ev } }, { "stmxcsr", { Ev } }, - { "(bad)", { XX } }, - { "lfence", { { OP_0fae, 0 } } }, - { "mfence", { { OP_0fae, 0 } } }, + { "xsave", { Ev } }, + { "xrstor", { { OP_0fae, v_mode } } }, + { "xsaveopt", { { OP_0fae, v_mode } } }, { "clflush", { { OP_0fae, 0 } } }, }, /* GRP16 */ @@ -5905,17 +5906,17 @@ OP_0fae (int bytemode, int sizeflag) { if (modrm.reg == 7) strcpy (obuf + strlen (obuf) - sizeof ("clflush") + 1, "sfence"); + else if (modrm.reg == 6) + strcpy (obuf + strlen (obuf) - sizeof ("xsaveopt") + 1, "mfence"); + else if (modrm.reg == 5) + strcpy (obuf + strlen (obuf) - sizeof ("xrstor") + 1, "lfence"); if (modrm.reg < 5 || modrm.rm != 0) { BadOp (); /* bad sfence, mfence, or lfence */ return; } - } - else if (modrm.reg != 7) - { - BadOp (); /* bad clflush */ - return; + bytemode = 0; } OP_E (bytemode, sizeflag); @@ -6170,6 +6171,43 @@ PNI_Fixup (int extrachar ATTRIBUTE_UNUSE } static void +XCR_Fixup (int extrachar ATTRIBUTE_UNUSED, int sizeflag) +{ + if (modrm.mod == 3 && modrm.reg == 2 && modrm.rm <= 1) + { + /* Override "lgdt". */ + size_t olen = strlen (obuf); + char *p = obuf + olen - 4; + + /* We might have a suffix when disassembling with -Msuffix. */ + if (*p == 'i') + --p; + + /* Remove "addr16/addr32" if we aren't in Intel mode. */ + if (!intel_syntax + && (prefixes & PREFIX_ADDR) + && olen >= (4 + 7) + && *(p - 1) == ' ' + && CONST_STRNEQ (p - 7, "addr") + && (CONST_STRNEQ (p - 3, "16") + || CONST_STRNEQ (p - 3, "32"))) + p -= 7; + + if (modrm.rm) + { + strcpy (p, "xsetbv"); + } + else + { + strcpy (p, "xgetbv"); + } + + codep++; + } + else + OP_M (0, sizeflag); +} +static void SVME_Fixup (int bytemode, int sizeflag) { const char *alt; Modified: head/contrib/binutils/opcodes/i386-opc.h ============================================================================== --- head/contrib/binutils/opcodes/i386-opc.h Wed Jul 4 20:59:30 2012 (r238122) +++ head/contrib/binutils/opcodes/i386-opc.h Wed Jul 4 22:12:10 2012 (r238123) @@ -71,6 +71,7 @@ typedef struct template #define CpuABM 0x200000 /* ABM New Instructions required */ #define CpuSSE4_1 0x400000 /* SSE4.1 Instructions required */ #define CpuSSE4_2 0x800000 /* SSE4.2 Instructions required */ +#define CpuXSAVE 0x1000000 /* XSAVE Instructions required */ /* SSE4.1/4.2 Instructions required */ #define CpuSSE4 (CpuSSE4_1|CpuSSE4_2) @@ -83,7 +84,7 @@ typedef struct template #define CpuUnknownFlags (Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686 \ |CpuP4|CpuSledgehammer|CpuMMX|CpuMMX2|CpuSSE|CpuSSE2|CpuSSE3|CpuVMX \ |Cpu3dnow|Cpu3dnowA|CpuK6|CpuPadLock|CpuSVME|CpuSSSE3|CpuSSE4_1 \ - |CpuSSE4_2|CpuABM|CpuSSE4a) + |CpuSSE4_2|CpuABM|CpuSSE4a|CpuXSAVE) /* the bits in opcode_modifier are used to generate the final opcode from the base_opcode. These bits also are used to detect alternate forms of Modified: head/contrib/binutils/opcodes/i386-opc.tbl ============================================================================== --- head/contrib/binutils/opcodes/i386-opc.tbl Wed Jul 4 20:59:30 2012 (r238122) +++ head/contrib/binutils/opcodes/i386-opc.tbl Wed Jul 4 22:12:10 2012 (r238123) @@ -1487,3 +1487,10 @@ xcryptcfb, 0, 0xf30fa7, 0xe0, Cpu686|Cpu xcryptofb, 0, 0xf30fa7, 0xe8, Cpu686|CpuPadLock, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsString|ImmExt, { 0 } // Alias for xstore-rng. xstore, 0, 0xfa7, 0xc0, Cpu686|CpuPadLock, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsString|ImmExt, { 0 } + +// XSAVE/XRSTOR related instructions +xgetbv, 0, 0xf01, 0xd0, CpuXSAVE, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { 0 } +xsetbv, 0, 0xf01, 0xd1, CpuXSAVE, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { 0 } +xsave, 1, 0xfae, 0x4, CpuXSAVE, Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S } +xsaveopt, 1, 0xfae, 0x6, CpuXSAVE, Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S } +xrstor, 1, 0xfae, 0x5, CpuXSAVE, Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S } Modified: head/contrib/binutils/opcodes/i386-tbl.h ============================================================================== --- head/contrib/binutils/opcodes/i386-tbl.h Wed Jul 4 20:59:30 2012 (r238122) +++ head/contrib/binutils/opcodes/i386-tbl.h Wed Jul 4 22:12:10 2012 (r238123) @@ -4288,6 +4288,21 @@ const template i386_optab[] = { "xstore", 0, 0xfa7, 0xc0, Cpu686|CpuPadLock, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsString|ImmExt, { 0 } }, + { "xgetbv", 0, 0xf01, 0xd0, CpuXSAVE, + No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, + { 0 } }, + { "xsetbv", 0, 0xf01, 0xd1, CpuXSAVE, + No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, + { 0 } }, + { "xsave", 1, 0xfae, 0x4, CpuXSAVE, + Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf, + { BaseIndex|Disp8|Disp16|Disp32|Disp32S } }, + { "xsaveopt", 1, 0xfae, 0x6, CpuXSAVE, + Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf, + { BaseIndex|Disp8|Disp16|Disp32|Disp32S } }, + { "xrstor", 1, 0xfae, 0x5, CpuXSAVE, + Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf, + { BaseIndex|Disp8|Disp16|Disp32|Disp32S } }, { NULL, 0, 0, 0, 0, 0, { 0 } } }; From owner-svn-src-all@FreeBSD.ORG Wed Jul 4 22:21:47 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 325FD106566B; Wed, 4 Jul 2012 22:21:47 +0000 (UTC) (envelope-from peter@rulingia.com) Received: from vps.rulingia.com (host-122-100-2-194.octopus.com.au [122.100.2.194]) by mx1.freebsd.org (Postfix) with ESMTP id A66938FC1A; Wed, 4 Jul 2012 22:21:46 +0000 (UTC) Received: from server.rulingia.com (c220-239-248-69.belrs5.nsw.optusnet.com.au [220.239.248.69]) by vps.rulingia.com (8.14.5/8.14.5) with ESMTP id q64MLjU6030783 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 5 Jul 2012 08:21:45 +1000 (EST) (envelope-from peter@rulingia.com) X-Bogosity: Ham, spamicity=0.000000 Received: from server.rulingia.com (localhost.rulingia.com [127.0.0.1]) by server.rulingia.com (8.14.5/8.14.5) with ESMTP id q64MLeAn027865 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 5 Jul 2012 08:21:40 +1000 (EST) (envelope-from peter@server.rulingia.com) Received: (from peter@localhost) by server.rulingia.com (8.14.5/8.14.5/Submit) id q64MLeAN027864; Thu, 5 Jul 2012 08:21:40 +1000 (EST) (envelope-from peter) Date: Thu, 5 Jul 2012 08:21:40 +1000 From: Peter Jeremy To: "Pedro F. Giffuni" Message-ID: <20120704222140.GC27624@server.rulingia.com> References: <201206290301.q5T31d3S014661@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="yVhtmJPUSI46BTXb" Content-Disposition: inline In-Reply-To: <201206290301.q5T31d3S014661@svn.freebsd.org> X-PGP-Key: http://www.rulingia.com/keys/peter.pgp User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org Subject: Re: svn commit: r237738 - stable/9/lib/libedit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jul 2012 22:21:47 -0000 --yVhtmJPUSI46BTXb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2012-Jun-29 03:01:39 +0000, "Pedro F. Giffuni" wrote: >Author: pfg >Date: Fri Jun 29 03:01:38 2012 >New Revision: 237738 >URL: http://svn.freebsd.org/changeset/base/237738 > >Log: > MFC r237448: > =20 > Merge changes from upstream libedit. This breaks sh(1) resizing for me (and appears to be the problem underlying kern/169603). Reverting this commit makes the problem go away. I have added more details to that PR. --=20 Peter Jeremy --yVhtmJPUSI46BTXb Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAk/0wfQACgkQ/opHv/APuIezowCbBpFjrnKAXgJJgNmhi8B2W0fy ihkAn04p9kjNzntzQ+CLHHGV8ugDRGP4 =jCk1 -----END PGP SIGNATURE----- --yVhtmJPUSI46BTXb-- From owner-svn-src-all@FreeBSD.ORG Wed Jul 4 22:34:56 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4FCE5106566B for ; Wed, 4 Jul 2012 22:34:56 +0000 (UTC) (envelope-from pfg@freebsd.org) Received: from nm24.bullet.mail.sp2.yahoo.com (nm24.bullet.mail.sp2.yahoo.com [98.139.91.94]) by mx1.freebsd.org (Postfix) with SMTP id 0C10F8FC18 for ; Wed, 4 Jul 2012 22:34:56 +0000 (UTC) Received: from [98.139.91.62] by nm24.bullet.mail.sp2.yahoo.com with NNFMP; 04 Jul 2012 22:34:50 -0000 Received: from [98.139.91.43] by tm2.bullet.mail.sp2.yahoo.com with NNFMP; 04 Jul 2012 22:34:50 -0000 Received: from [127.0.0.1] by omp1043.mail.sp2.yahoo.com with NNFMP; 04 Jul 2012 22:34:50 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 681715.66069.bm@omp1043.mail.sp2.yahoo.com Received: (qmail 64222 invoked by uid 60001); 4 Jul 2012 22:34:50 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1341441290; bh=+vdmkm9v/R+hGJ62BHnngjGC3U6tNTYqs2SaJ0eiMrs=; h=X-YMail-OSG:Received:X-RocketYMMF:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=cU7jfvbvDoXIMqTuuzAzg0Wnpjq+3nPOy37Y2SXH25agQqbCnn6AqXlfF1QULWWzLjpW39bc5xJiFhQNLvLc+xBsC2cPK+buJ+ZnjvNOgUAYWiVHb7zN5nVef266SM4SF0iuZoO8ggyP4tBkn/QaI6Sa14Ca0x1g1xDMjE74RpA= X-YMail-OSG: VjUSZAkVM1lwvs0jr8SYqNwN6yl8820HD5qbfRoWm.ffdua 5HMwh9i1MMDBOz7GD8ewOSNkS39MBrGoU5dX0k8NxIXfSgYUHwc3vavZWoZu 0kuU686fjlkPE8.pR3BFBX..jP.a_g5YkZfBRVWTjVC8Dx8KBx9blm.wiqzL U_NVQFUa4JWBpfvH1JiryVui8YqwaP565Yj2SVoJm4OpyjetzsO_p9nmKTFK w6ySfVmCAJnbrNSyNfOmPWdikXlcNmnZA_loTPEy_.FrsYQBxTQYKju4VVMI mb7.YD_i1EIJ.T7i6uf0ORLVIvNO3fR1HnT_5LER3QKoLVMs2jRy5VHG4dWG XSFDDGuiV_28X1vZyiKQZ5e8RCc.mM1wZNJJrGZNO7mi5Wqbk51g8Ax_ZaqD 5JWcy6fzl96JTjIEuTfWnFSfbUGBllhN.adAFZT5IkhoDLE9sR2ftrBH8wkY FcxT1 Received: from [200.118.157.7] by web113515.mail.gq1.yahoo.com via HTTP; Wed, 04 Jul 2012 15:34:50 PDT X-RocketYMMF: giffunip X-Mailer: YahooMailClassic/15.0.8 YahooMailWebService/0.8.120.356233 Message-ID: <1341441290.47362.YahooMailClassic@web113515.mail.gq1.yahoo.com> Date: Wed, 4 Jul 2012 15:34:50 -0700 (PDT) From: Pedro Giffuni To: Peter Jeremy In-Reply-To: <20120704222140.GC27624@server.rulingia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org Subject: Re: svn commit: r237738 - stable/9/lib/libedit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pfg@freebsd.org List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jul 2012 22:34:56 -0000 =0A--- Mer 4/7/12, Peter Jeremy ha scritto:=0A...=0A> = On 2012-Jun-29 03:01:39 +0000, "Pedro=0A> F. Giffuni" =0A>= wrote:=0A> >Author: pfg=0A> >Date: Fri Jun 29 03:01:38 2012=0A> >New Revis= ion: 237738=0A> >URL: http://svn.freebsd.org/changeset/base/237738=0A> >=0A= > >Log:=0A> >=A0 MFC=A0=A0=A0 r237448:=0A> >=A0 =0A> >=A0 Merge changes fro= m upstream libedit.=0A> =0A> This breaks sh(1) resizing for me (and appears= to be the=0A> problem underlying kern/169603).=A0 Reverting this commit=0A= > makes the problem go away.=A0 I have added more details=0A> to that PR.= =0A>=0A=0AExcellent news (the find, not the breakage)!=0A=0AI will try to p= inpoint and revert the specific change=0Athat may be causing this.=0A=0ATha= nks!=0A=0APedro.=0A =0A From owner-svn-src-all@FreeBSD.ORG Thu Jul 5 00:08:47 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CB1A8106566C; Thu, 5 Jul 2012 00:08:47 +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 9C8658FC0C; Thu, 5 Jul 2012 00:08:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6508lki040209; Thu, 5 Jul 2012 00:08:47 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6508lE9040207; Thu, 5 Jul 2012 00:08:47 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201207050008.q6508lE9040207@svn.freebsd.org> From: Alan Cox Date: Thu, 5 Jul 2012 00:08:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238124 - head/sys/amd64/amd64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jul 2012 00:08:47 -0000 Author: alc Date: Thu Jul 5 00:08:47 2012 New Revision: 238124 URL: http://svn.freebsd.org/changeset/base/238124 Log: Correct an error in r237513. The call to reserve_pv_entries() must come before pmap_demote_pde() updates the PDE. Otherwise, pmap_pv_demote_pde() can crash. Crash reported by: kib Patch tested by: kib Modified: head/sys/amd64/amd64/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Wed Jul 4 22:12:10 2012 (r238123) +++ head/sys/amd64/amd64/pmap.c Thu Jul 5 00:08:47 2012 (r238124) @@ -2491,7 +2491,6 @@ pmap_pv_demote_pde(pmap_t pmap, vm_offse PMAP_LOCK_ASSERT(pmap, MA_OWNED); KASSERT((pa & PDRMASK) == 0, ("pmap_pv_demote_pde: pa is not 2mpage aligned")); - reserve_pv_entries(pmap, NPTEPG - 1, lockp); CHANGE_PV_LIST_LOCK_TO_PHYS(lockp, pa); /* @@ -2751,6 +2750,17 @@ pmap_demote_pde_locked(pmap_t pmap, pd_e pmap_fill_ptp(firstpte, newpte); /* + * The spare PV entries must be reserved prior to demoting the + * mapping, that is, prior to changing the PDE. Otherwise, the state + * of the PDE and the PV lists will be inconsistent, which can result + * in reclaim_pv_chunk() attempting to remove a PV entry from the + * wrong PV list and pmap_pv_demote_pde() failing to find the expected + * PV entry for the 2MB page mapping that is being demoted. + */ + if ((oldpde & PG_MANAGED) != 0) + reserve_pv_entries(pmap, NPTEPG - 1, lockp); + + /* * Demote the mapping. This pmap is locked. The old PDE has * PG_A set. If the old PDE has PG_RW set, it also has PG_M * set. Thus, there is no danger of a race with another @@ -2769,13 +2779,7 @@ pmap_demote_pde_locked(pmap_t pmap, pd_e pmap_invalidate_page(pmap, (vm_offset_t)vtopte(va)); /* - * Demote the pv entry. This depends on the earlier demotion - * of the mapping. Specifically, the (re)creation of a per- - * page pv entry might trigger the execution of reclaim_pv_chunk(), - * which might reclaim a newly (re)created per-page pv entry - * and destroy the associated mapping. In order to destroy - * the mapping, the PDE must have already changed from mapping - * the 2mpage to referencing the page table page. + * Demote the PV entry. */ if ((oldpde & PG_MANAGED) != 0) pmap_pv_demote_pde(pmap, va, oldpde & PG_PS_FRAME, lockp); From owner-svn-src-all@FreeBSD.ORG Thu Jul 5 00:52:24 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F328C106566C; Thu, 5 Jul 2012 00:52:23 +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 DF1DE8FC08; Thu, 5 Jul 2012 00:52:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q650qN39042020; Thu, 5 Jul 2012 00:52:23 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q650qNaa042018; Thu, 5 Jul 2012 00:52:23 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201207050052.q650qNaa042018@svn.freebsd.org> From: Ed Maste Date: Thu, 5 Jul 2012 00:52:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238125 - head/cddl/contrib/dtracetoolkit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jul 2012 00:52:24 -0000 Author: emaste Date: Thu Jul 5 00:52:23 2012 New Revision: 238125 URL: http://svn.freebsd.org/changeset/base/238125 Log: Restore r211786 by rpaulo: Port dtruss to FreeBSD. Sponsored by: The FreeBSD Foundation It appears the change was reverted by r235380. Modified: head/cddl/contrib/dtracetoolkit/dtruss Modified: head/cddl/contrib/dtracetoolkit/dtruss ============================================================================== --- head/cddl/contrib/dtracetoolkit/dtruss Thu Jul 5 00:08:47 2012 (r238124) +++ head/cddl/contrib/dtracetoolkit/dtruss Thu Jul 5 00:52:23 2012 (r238125) @@ -240,7 +240,7 @@ syscall:::entry */ /* print 3 args, return as hex */ -syscall::lwp_sigmask:return +syscall::sigprocmask:return /self->start/ { /* calculate elapsed time */ @@ -268,10 +268,11 @@ syscall::lwp_sigmask:return } /* print 3 args, arg0 as a string */ +syscall::access*:return, syscall::stat*:return, syscall::lstat*:return, -syscall::open*:return, -syscall::resolvepath:return +syscall::readlink*:return, +syscall::open*:return /self->start/ { /* calculate elapsed time */ @@ -329,7 +330,6 @@ syscall::*read*:return } /* print 0 arg output */ -syscall::gtime:return, syscall::*fork*:return /self->start/ { @@ -357,9 +357,6 @@ syscall::*fork*:return } /* print 1 arg output */ -syscall::brk:return, -syscall::times:return, -syscall::stime:return, syscall::close:return /self->start/ { @@ -387,7 +384,7 @@ syscall::close:return } /* print 2 arg output */ -syscall::utime:return, +syscall::utimes:return, syscall::munmap:return /self->start/ { From owner-svn-src-all@FreeBSD.ORG Thu Jul 5 01:48:00 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 30A971065674 for ; Thu, 5 Jul 2012 01:48:00 +0000 (UTC) (envelope-from pfg@freebsd.org) Received: from nm11.bullet.mail.sp2.yahoo.com (nm11.bullet.mail.sp2.yahoo.com [98.139.91.81]) by mx1.freebsd.org (Postfix) with SMTP id DEB738FC08 for ; Thu, 5 Jul 2012 01:47:59 +0000 (UTC) Received: from [98.139.91.62] by nm11.bullet.mail.sp2.yahoo.com with NNFMP; 05 Jul 2012 01:47:59 -0000 Received: from [98.139.91.4] by tm2.bullet.mail.sp2.yahoo.com with NNFMP; 05 Jul 2012 01:46:59 -0000 Received: from [127.0.0.1] by omp1004.mail.sp2.yahoo.com with NNFMP; 05 Jul 2012 01:46:59 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 627901.92682.bm@omp1004.mail.sp2.yahoo.com Received: (qmail 94027 invoked by uid 60001); 5 Jul 2012 01:46:59 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1341452819; bh=240gzakUCIwbVYYF4O/5irYYM6ZWxViNELZqQm77yqU=; h=X-YMail-OSG:Received:X-RocketYMMF:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=eomv0GUlowkSaNDUwpInE4vQb38F+Bi/lRxhTDTrHkE4XQU8fxSf9wP1eSDy52vKYy12FSkYVf0WlY3ePOgbDZvUao05mhlSoV+bsHDCmW0YYfGSuRsz+ljo19whEXQGUrnlNt1mtSjURmor/XHE9/jfn/dMjLbpmTqI850i6eA= X-YMail-OSG: iSHFjfcVM1kl3AcSP4lUpc6wMIIxFXj_9K2uGK19bynCblB DnIBWWOJlvjKCK4j1RdV5lHM5X_OypSTymQ5FcC357w0mr13z5afqSc0r50J QumIU5PM0pWcYOgwBERdrvJx6kQkxWV7M3ec_m49avRJpAolFiXCposlQ77r dXT79UcmY81QycvpyZCpAKVlQv2tJjiOA1A7IJTEejUz1lPBPe9ly0KsGwv1 BA50vFGKY8rPwO711AR48PlhudvAr5PGDn6.V5dWbf7741ghZbwcfL7JEIZn YCjSza95C21B.zZXMGj7cOlG0j61ZKOfPaWo3lNza.QZ5vZkTXIg9wz_mgD7 5di.YGhQPvQpQ2Ic8warbm.q9je0pFFD2dph7DUKQ8h8294UvsLMmP86EfJG E_CodFeRA5q4oKtWMCJMLPX0T7yBn4cUfzhPtHmRBXOm9j5IL7bc6iutue2t kzMTwtx34iaEYEmBLIxUVTXra1_4yIezcLuxgOiP5QtHs8nixLV1Bn3m2H1g DfKBXDFWBY6gC2D5UaJCgd4.XAnwvSZLu_VCQuTpepPZsHoW0RwxNmrX0ijJ N5zZENNZf7yPDH4wbKVB.PXGoFGG5vwya3b1gDlL4Efo6dYPG0cJXgKnq Received: from [200.118.157.7] by web113501.mail.gq1.yahoo.com via HTTP; Wed, 04 Jul 2012 18:46:59 PDT X-RocketYMMF: giffunip X-Mailer: YahooMailClassic/15.0.8 YahooMailWebService/0.8.120.356233 Message-ID: <1341452819.93258.YahooMailClassic@web113501.mail.gq1.yahoo.com> Date: Wed, 4 Jul 2012 18:46:59 -0700 (PDT) From: Pedro Giffuni To: Peter Jeremy , davshao@gmail.com In-Reply-To: <20120704222140.GC27624@server.rulingia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org Subject: Re: svn commit: r237738 - stable/9/lib/libedit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pfg@freebsd.org List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jul 2012 01:48:00 -0000 =0A--- Mer 4/7/12, Peter Jeremy ha scritto:=0A...=0A> = >Author: pfg=0A> >Date: Fri Jun 29 03:01:38 2012=0A> >New Revision: 237738= =0A> >URL: http://svn.freebsd.org/changeset/base/237738=0A> >=0A> >Log:=0A>= >=A0 MFC=A0=A0=A0 r237448:=0A> >=A0 =0A> >=A0 Merge changes from upstream = libedit.=0A> =0A> This breaks sh(1) resizing for me (and appears to be the= =0A> problem=0A> underlying kern/169603).=A0 Reverting this commit makes=0A= > the problem go=0A> away.=A0 I have added more details to that PR.=0A> =0A= =0AI found the problem:=0A=0Ahttps://bugzilla.redhat.com/show_bug.cgi?id=3D= 575383=0A=0AIt was fixed upstream so I will commit it soon.=0A=0AThanks!=0A= =0APedro.=0A From owner-svn-src-all@FreeBSD.ORG Thu Jul 5 07:20:17 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DCF70106566B; Thu, 5 Jul 2012 07:20:16 +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 C8BE58FC14; Thu, 5 Jul 2012 07:20:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q657KGbc058513; Thu, 5 Jul 2012 07:20:16 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q657KGrS058511; Thu, 5 Jul 2012 07:20:16 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201207050720.q657KGrS058511@svn.freebsd.org> From: Alan Cox Date: Thu, 5 Jul 2012 07:20:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238126 - head/sys/amd64/amd64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jul 2012 07:20:17 -0000 Author: alc Date: Thu Jul 5 07:20:16 2012 New Revision: 238126 URL: http://svn.freebsd.org/changeset/base/238126 Log: Calculate the new PTE value in pmap_enter() before acquiring any locks. Move an assertion to the beginning of pmap_enter(). Modified: head/sys/amd64/amd64/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Thu Jul 5 00:52:23 2012 (r238125) +++ head/sys/amd64/amd64/pmap.c Thu Jul 5 07:20:16 2012 (r238126) @@ -3446,11 +3446,28 @@ pmap_enter(pmap_t pmap, vm_offset_t va, KASSERT(va < UPT_MIN_ADDRESS || va >= UPT_MAX_ADDRESS, ("pmap_enter: invalid to pmap_enter page table pages (va: 0x%lx)", va)); + KASSERT((m->oflags & VPO_UNMANAGED) != 0 || va < kmi.clean_sva || + va >= kmi.clean_eva, + ("pmap_enter: managed mapping within the clean submap")); KASSERT((m->oflags & (VPO_UNMANAGED | VPO_BUSY)) != 0 || VM_OBJECT_LOCKED(m->object), ("pmap_enter: page %p is not busy", m)); + pa = VM_PAGE_TO_PHYS(m); + newpte = (pt_entry_t)(pa | pmap_cache_bits(m->md.pat_mode, 0) | PG_V); + if ((m->oflags & VPO_UNMANAGED) == 0) + newpte |= PG_MANAGED; + if ((prot & VM_PROT_WRITE) != 0) + newpte |= PG_RW; + if ((prot & VM_PROT_EXECUTE) == 0) + newpte |= pg_nx; + if (wired) + newpte |= PG_W; + if (va < VM_MAXUSER_ADDRESS) + newpte |= PG_U; + if (pmap == kernel_pmap) + newpte |= PG_G; - mpte = NULL; + mpte = om = NULL; lock = NULL; rw_rlock(&pvh_global_lock); @@ -3471,8 +3488,6 @@ pmap_enter(pmap_t pmap, vm_offset_t va, } else panic("pmap_enter: invalid page directory va=%#lx", va); - pa = VM_PAGE_TO_PHYS(m); - om = NULL; origpte = *pte; opa = origpte & PG_FRAME; @@ -3497,10 +3512,8 @@ pmap_enter(pmap_t pmap, vm_offset_t va, if (mpte) mpte->wire_count--; - if (origpte & PG_MANAGED) { + if ((origpte & PG_MANAGED) != 0) om = m; - pa |= PG_MANAGED; - } goto validate; } @@ -3530,15 +3543,12 @@ pmap_enter(pmap_t pmap, vm_offset_t va, /* * Enter on the PV list if part of our managed memory. */ - if ((m->oflags & VPO_UNMANAGED) == 0) { - KASSERT(va < kmi.clean_sva || va >= kmi.clean_eva, - ("pmap_enter: managed mapping within the clean submap")); + if ((newpte & PG_MANAGED) != 0) { if (pv == NULL) pv = get_pv_entry(pmap, &lock); CHANGE_PV_LIST_LOCK_TO_VM_PAGE(&lock, m); pv->pv_va = va; TAILQ_INSERT_TAIL(&m->md.pv_list, pv, pv_list); - pa |= PG_MANAGED; } else if (pv != NULL) free_pv_entry(pmap, pv); @@ -3549,40 +3559,25 @@ pmap_enter(pmap_t pmap, vm_offset_t va, pmap->pm_stats.wired_count++; validate: - /* - * Now validate mapping with desired protection/wiring. - */ - newpte = (pt_entry_t)(pa | pmap_cache_bits(m->md.pat_mode, 0) | PG_V); - if ((prot & VM_PROT_WRITE) != 0) { - newpte |= PG_RW; - if ((newpte & PG_MANAGED) != 0) - vm_page_aflag_set(m, PGA_WRITEABLE); - } - if ((prot & VM_PROT_EXECUTE) == 0) - newpte |= pg_nx; - if (wired) - newpte |= PG_W; - if (va < VM_MAXUSER_ADDRESS) - newpte |= PG_U; - if (pmap == kernel_pmap) - newpte |= PG_G; /* - * if the mapping or permission bits are different, we need - * to update the pte. + * Update the PTE only if the mapping or protection/wiring bits are + * different. */ - if ((origpte & ~(PG_M|PG_A)) != newpte) { + if ((origpte & ~(PG_M | PG_A)) != newpte) { newpte |= PG_A; if ((access & VM_PROT_WRITE) != 0) newpte |= PG_M; + if ((newpte & (PG_MANAGED | PG_RW)) == (PG_MANAGED | PG_RW)) + vm_page_aflag_set(m, PGA_WRITEABLE); if (origpte & PG_V) { invlva = FALSE; origpte = pte_load_store(pte, newpte); if (origpte & PG_A) { if (origpte & PG_MANAGED) vm_page_aflag_set(om, PGA_REFERENCED); - if (opa != VM_PAGE_TO_PHYS(m) || ((origpte & - PG_NX) == 0 && (newpte & PG_NX))) + if (opa != pa || ((origpte & PG_NX) == 0 && + (newpte & PG_NX) != 0)) invlva = TRUE; } if ((origpte & (PG_M | PG_RW)) == (PG_M | PG_RW)) { From owner-svn-src-all@FreeBSD.ORG Thu Jul 5 13:45:24 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 614D4106566C; Thu, 5 Jul 2012 13:45:24 +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 328608FC17; Thu, 5 Jul 2012 13:45:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q65DjOvQ076569; Thu, 5 Jul 2012 13:45:24 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q65DjN2w076566; Thu, 5 Jul 2012 13:45:23 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201207051345.q65DjN2w076566@svn.freebsd.org> From: Edward Tomasz Napierala Date: Thu, 5 Jul 2012 13:45:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238129 - stable/9/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jul 2012 13:45:24 -0000 Author: trasz Date: Thu Jul 5 13:45:23 2012 New Revision: 238129 URL: http://svn.freebsd.org/changeset/base/238129 Log: MFC r237572: Add missing MLINKS for whatever -> if_whatever. Approved by: re (kib) Modified: stable/9/share/man/man4/Makefile Directory Properties: stable/9/share/man/man4/ (props changed) Modified: stable/9/share/man/man4/Makefile ============================================================================== --- stable/9/share/man/man4/Makefile Thu Jul 5 09:49:52 2012 (r238128) +++ stable/9/share/man/man4/Makefile Thu Jul 5 13:45:23 2012 (r238129) @@ -540,8 +540,11 @@ MAN= aac.4 \ MLINKS= ae.4 if_ae.4 MLINKS+=age.4 if_age.4 MLINKS+=agp.4 agpgart.4 +MLINKS+=alc.4 if_alc.4 MLINKS+=ale.4 if_ale.4 MLINKS+=altq.4 ALTQ.4 +MLINKS+=ath.4 if_ath.4 +MLINKS+=ath_pci.4 if_ath_pci.4 MLINKS+=an.4 if_an.4 MLINKS+=aue.4 if_aue.4 MLINKS+=axe.4 if_axe.4 @@ -551,9 +554,13 @@ MLINKS+=bge.4 if_bge.4 MLINKS+=bktr.4 brooktree.4 MLINKS+=bridge.4 if_bridge.4 MLINKS+=bwi.4 if_bwi.4 +MLINKS+=bwn.4 if_bwn.4 MLINKS+=cas.4 if_cas.4 +MLINKS+=cdce.4 if_cdce.4 MLINKS+=crypto.4 cryptodev.4 MLINKS+=cue.4 if_cue.4 +MLINKS+=cxgb.4 if_cxgb.4 +MLINKS+=cxgbe.4 if_cxgbe.4 MLINKS+=dc.4 if_dc.4 MLINKS+=de.4 if_de.4 MLINKS+=disc.4 if_disc.4 @@ -599,14 +606,19 @@ MLINKS+=ixgbe.4 if_ixgbe.4 MLINKS+=jme.4 if_jme.4 MLINKS+=kue.4 if_kue.4 MLINKS+=lagg.4 trunk.4 +MLINKS+=lagg.4 if_lagg.4 MLINKS+=le.4 if_le.4 MLINKS+=lge.4 if_lge.4 +MLINKS+=lmc.4 if_lmc.4 MLINKS+=lo.4 loop.4 MLINKS+=lp.4 plip.4 MLINKS+=malo.4 if_malo.4 MLINKS+=md.4 vn.4 MLINKS+=mem.4 kmem.4 MLINKS+=mn.4 if_mn.4 +MLINKS+=mos.4 if_mos.4 +MLINKS+=msk.4 if_msk.4 +MLINKS+=mwl.4 if_mwl.4 MLINKS+=mxge.4 if_mxge.4 MLINKS+=my.4 if_my.4 MLINKS+=${_ndis.4} ${_if_ndis.4} @@ -626,11 +638,13 @@ MLINKS+=re.4 if_re.4 MLINKS+=rl.4 if_rl.4 MLINKS+=rue.4 if_rue.4 MLINKS+=rum.4 if_rum.4 +MLINKS+=run.4 if_run.4 MLINKS+=scsi.4 CAM.4 \ scsi.4 cam.4 \ scsi.4 scbus.4 \ scsi.4 SCSI.4 MLINKS+=sf.4 if_sf.4 +MLINKS+=sge.4 if_sge.4 MLINKS+=sis.4 if_sis.4 MLINKS+=sk.4 if_sk.4 MLINKS+=smp.4 SMP.4 @@ -662,6 +676,7 @@ MLINKS+=vge.4 if_vge.4 MLINKS+=vlan.4 if_vlan.4 MLINKS+=vpo.4 imm.4 MLINKS+=vr.4 if_vr.4 +MLINKS+=vte.4 if_vte.4 MLINKS+=${_vxge.4} ${_if_vxge.4} MLINKS+=watchdog.4 SW_WATCHDOG.4 MLINKS+=wb.4 if_wb.4 @@ -735,6 +750,9 @@ MLINKS+=lindev.4 full.4 .if ${MACHINE_CPUARCH} == "amd64" _qlxgb.4= qlxgb.4 _sfxge.4= sfxge.4 + +MLINKS+=qlxgb.4 if_qlxgb.4 +MLINKS+=sfxge.4 if_sfxge.4 .endif .if ${MACHINE_CPUARCH} == "powerpc" From owner-svn-src-all@FreeBSD.ORG Thu Jul 5 15:23:45 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EA4471065673; Thu, 5 Jul 2012 15:23:45 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D54DA8FC0C; Thu, 5 Jul 2012 15:23:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q65FNjeK080658; Thu, 5 Jul 2012 15:23:45 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q65FNj6H080656; Thu, 5 Jul 2012 15:23:45 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201207051523.q65FNj6H080656@svn.freebsd.org> From: Marcel Moolenaar Date: Thu, 5 Jul 2012 15:23:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238130 - head/sys/arm/mv X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jul 2012 15:23:46 -0000 Author: marcel Date: Thu Jul 5 15:23:45 2012 New Revision: 238130 URL: http://svn.freebsd.org/changeset/base/238130 Log: Fix LINT. Obtained from: Juniper Networks, Inc. Modified: head/sys/arm/mv/mv_machdep.c Modified: head/sys/arm/mv/mv_machdep.c ============================================================================== --- head/sys/arm/mv/mv_machdep.c Thu Jul 5 13:45:23 2012 (r238129) +++ head/sys/arm/mv/mv_machdep.c Thu Jul 5 15:23:45 2012 (r238130) @@ -498,7 +498,7 @@ initarm(struct arm_boot_params *abp) physmem = memsize / PAGE_SIZE; debugf("initarm: console initialized\n"); - debugf(" arg1 mdp = 0x%08x\n", (uint32_t)mdp); + debugf(" arg1 kmdp = 0x%08x\n", (uint32_t)kmdp); debugf(" boothowto = 0x%08x\n", boothowto); printf(" dtbp = 0x%08x\n", (uint32_t)dtbp); print_kernel_section_addr(); From owner-svn-src-all@FreeBSD.ORG Thu Jul 5 15:32:31 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 973B01065675; Thu, 5 Jul 2012 15:32:31 +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 8160C8FC0A; Thu, 5 Jul 2012 15:32:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q65FWVWs081074; Thu, 5 Jul 2012 15:32:31 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q65FWVos081072; Thu, 5 Jul 2012 15:32:31 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201207051532.q65FWVos081072@svn.freebsd.org> From: Alexander Motin Date: Thu, 5 Jul 2012 15:32:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238131 - stable/9/sys/dev/sound/pci/hda X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jul 2012 15:32:31 -0000 Author: mav Date: Thu Jul 5 15:32:31 2012 New Revision: 238131 URL: http://svn.freebsd.org/changeset/base/238131 Log: MFC r238011: Restore GPIO config quirks handling, lost during last big refactoring. This fixes sound from speakers on some laptops, including MacBook Pro. Approved by: re (kib) Modified: stable/9/sys/dev/sound/pci/hda/hdaa_patches.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/sound/pci/hda/hdaa_patches.c ============================================================================== --- stable/9/sys/dev/sound/pci/hda/hdaa_patches.c Thu Jul 5 15:23:45 2012 (r238130) +++ stable/9/sys/dev/sound/pci/hda/hdaa_patches.c Thu Jul 5 15:32:31 2012 (r238131) @@ -401,12 +401,9 @@ hdaa_patch(struct hdaa_devinfo *devinfo) if (!(HDA_DEV_MATCH(hdac_quirks[i].model, subid) && HDA_DEV_MATCH(hdac_quirks[i].id, id))) continue; - if (hdac_quirks[i].set != 0) - devinfo->quirks |= - hdac_quirks[i].set; - if (hdac_quirks[i].unset != 0) - devinfo->quirks &= - ~(hdac_quirks[i].unset); + devinfo->quirks |= hdac_quirks[i].set; + devinfo->quirks &= ~(hdac_quirks[i].unset); + devinfo->gpio = hdac_quirks[i].gpio; } /* Apply per-widget patch. */ From owner-svn-src-all@FreeBSD.ORG Thu Jul 5 15:34:05 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 392E3106564A; Thu, 5 Jul 2012 15:34:05 +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 236708FC18; Thu, 5 Jul 2012 15:34:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q65FY5EW081215; Thu, 5 Jul 2012 15:34:05 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q65FY4Xt081213; Thu, 5 Jul 2012 15:34:04 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201207051534.q65FY4Xt081213@svn.freebsd.org> From: Alexander Motin Date: Thu, 5 Jul 2012 15:34: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: r238132 - stable/8/sys/dev/sound/pci/hda X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jul 2012 15:34:05 -0000 Author: mav Date: Thu Jul 5 15:34:04 2012 New Revision: 238132 URL: http://svn.freebsd.org/changeset/base/238132 Log: MFC r238011: Restore GPIO config quirks handling, lost during last big refactoring. This fixes sound from speakers on some laptops, including MacBook Pro. Modified: stable/8/sys/dev/sound/pci/hda/hdaa_patches.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/dev/sound/pci/hda/hdaa_patches.c ============================================================================== --- stable/8/sys/dev/sound/pci/hda/hdaa_patches.c Thu Jul 5 15:32:31 2012 (r238131) +++ stable/8/sys/dev/sound/pci/hda/hdaa_patches.c Thu Jul 5 15:34:04 2012 (r238132) @@ -401,12 +401,9 @@ hdaa_patch(struct hdaa_devinfo *devinfo) if (!(HDA_DEV_MATCH(hdac_quirks[i].model, subid) && HDA_DEV_MATCH(hdac_quirks[i].id, id))) continue; - if (hdac_quirks[i].set != 0) - devinfo->quirks |= - hdac_quirks[i].set; - if (hdac_quirks[i].unset != 0) - devinfo->quirks &= - ~(hdac_quirks[i].unset); + devinfo->quirks |= hdac_quirks[i].set; + devinfo->quirks &= ~(hdac_quirks[i].unset); + devinfo->gpio = hdac_quirks[i].gpio; } /* Apply per-widget patch. */ From owner-svn-src-all@FreeBSD.ORG Thu Jul 5 15:34:56 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 83EDB1065670; Thu, 5 Jul 2012 15:34:56 +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 6DA8C8FC14; Thu, 5 Jul 2012 15:34:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q65FYugx081301; Thu, 5 Jul 2012 15:34:56 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q65FYuwK081299; Thu, 5 Jul 2012 15:34:56 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201207051534.q65FYuwK081299@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 5 Jul 2012 15:34:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238133 - stable/9/libexec/rtld-elf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jul 2012 15:34:56 -0000 Author: kib Date: Thu Jul 5 15:34:55 2012 New Revision: 238133 URL: http://svn.freebsd.org/changeset/base/238133 Log: MFC r237659: Ensure that for the object which is a dependency for some filtee, relocations are performed before the object's initializer is called. Approved by: re (kensmith) Modified: stable/9/libexec/rtld-elf/rtld.c Directory Properties: stable/9/libexec/rtld-elf/ (props changed) Modified: stable/9/libexec/rtld-elf/rtld.c ============================================================================== --- stable/9/libexec/rtld-elf/rtld.c Thu Jul 5 15:34:04 2012 (r238132) +++ stable/9/libexec/rtld-elf/rtld.c Thu Jul 5 15:34:55 2012 (r238133) @@ -117,6 +117,10 @@ static void objlist_push_head(Objlist *, static void objlist_push_tail(Objlist *, Obj_Entry *); static void objlist_remove(Objlist *, Obj_Entry *); static void *path_enumerate(const char *, path_enum_proc, void *); +static int relocate_object_dag(Obj_Entry *root, bool bind_now, + Obj_Entry *rtldobj, int flags, RtldLockState *lockstate); +static int relocate_object(Obj_Entry *obj, bool bind_now, Obj_Entry *rtldobj, + int flags, RtldLockState *lockstate); static int relocate_objects(Obj_Entry *, bool, Obj_Entry *, int, RtldLockState *); static int resolve_objects_ifunc(Obj_Entry *first, bool bind_now, @@ -2217,52 +2221,70 @@ objlist_remove(Objlist *list, Obj_Entry } /* - * Relocate newly-loaded shared objects. The argument is a pointer to - * the Obj_Entry for the first such object. All objects from the first - * to the end of the list of objects are relocated. Returns 0 on success, - * or -1 on failure. + * Relocate dag rooted in the specified object. + * Returns 0 on success, or -1 on failure. */ + static int -relocate_objects(Obj_Entry *first, bool bind_now, Obj_Entry *rtldobj, +relocate_object_dag(Obj_Entry *root, bool bind_now, Obj_Entry *rtldobj, + int flags, RtldLockState *lockstate) +{ + Objlist_Entry *elm; + int error; + + error = 0; + STAILQ_FOREACH(elm, &root->dagmembers, link) { + error = relocate_object(elm->obj, bind_now, rtldobj, flags, + lockstate); + if (error == -1) + break; + } + return (error); +} + +/* + * Relocate single object. + * Returns 0 on success, or -1 on failure. + */ +static int +relocate_object(Obj_Entry *obj, bool bind_now, Obj_Entry *rtldobj, int flags, RtldLockState *lockstate) { - Obj_Entry *obj; - for (obj = first; obj != NULL; obj = obj->next) { if (obj->relocated) - continue; + return (0); obj->relocated = true; if (obj != rtldobj) - dbg("relocating \"%s\"", obj->path); + dbg("relocating \"%s\"", obj->path); if (obj->symtab == NULL || obj->strtab == NULL || - !(obj->valid_hash_sysv || obj->valid_hash_gnu)) { - _rtld_error("%s: Shared object has no run-time symbol table", - obj->path); - return -1; + !(obj->valid_hash_sysv || obj->valid_hash_gnu)) { + _rtld_error("%s: Shared object has no run-time symbol table", + obj->path); + return (-1); } if (obj->textrel) { - /* There are relocations to the write-protected text segment. */ - if (mprotect(obj->mapbase, obj->textsize, - PROT_READ|PROT_WRITE|PROT_EXEC) == -1) { - _rtld_error("%s: Cannot write-enable text segment: %s", - obj->path, rtld_strerror(errno)); - return -1; - } + /* There are relocations to the write-protected text segment. */ + if (mprotect(obj->mapbase, obj->textsize, + PROT_READ|PROT_WRITE|PROT_EXEC) == -1) { + _rtld_error("%s: Cannot write-enable text segment: %s", + obj->path, rtld_strerror(errno)); + return (-1); + } } /* Process the non-PLT relocations. */ if (reloc_non_plt(obj, rtldobj, flags, lockstate)) - return -1; + return (-1); if (obj->textrel) { /* Re-protected the text segment. */ - if (mprotect(obj->mapbase, obj->textsize, - PROT_READ|PROT_EXEC) == -1) { - _rtld_error("%s: Cannot write-protect text segment: %s", - obj->path, rtld_strerror(errno)); - return -1; - } + if (mprotect(obj->mapbase, obj->textsize, + PROT_READ|PROT_EXEC) == -1) { + _rtld_error("%s: Cannot write-protect text segment: %s", + obj->path, rtld_strerror(errno)); + return (-1); + } } @@ -2271,18 +2293,19 @@ relocate_objects(Obj_Entry *first, bool /* Process the PLT relocations. */ if (reloc_plt(obj) == -1) - return -1; + return (-1); /* Relocate the jump slots if we are doing immediate binding. */ if (obj->bind_now || bind_now) - if (reloc_jmpslots(obj, flags, lockstate) == -1) - return -1; + if (reloc_jmpslots(obj, flags, lockstate) == -1) + return (-1); if (obj->relro_size > 0) { - if (mprotect(obj->relro_page, obj->relro_size, PROT_READ) == -1) { - _rtld_error("%s: Cannot enforce relro protection: %s", - obj->path, rtld_strerror(errno)); - return -1; - } + if (mprotect(obj->relro_page, obj->relro_size, + PROT_READ) == -1) { + _rtld_error("%s: Cannot enforce relro protection: %s", + obj->path, rtld_strerror(errno)); + return (-1); + } } /* @@ -2292,9 +2315,30 @@ relocate_objects(Obj_Entry *first, bool */ obj->magic = RTLD_MAGIC; obj->version = RTLD_VERSION; - } - return (0); + return (0); +} + +/* + * Relocate newly-loaded shared objects. The argument is a pointer to + * the Obj_Entry for the first such object. All objects from the first + * to the end of the list of objects are relocated. Returns 0 on success, + * or -1 on failure. + */ +static int +relocate_objects(Obj_Entry *first, bool bind_now, Obj_Entry *rtldobj, + int flags, RtldLockState *lockstate) +{ + Obj_Entry *obj; + int error; + + for (error = 0, obj = first; obj != NULL; obj = obj->next) { + error = relocate_object(obj, bind_now, rtldobj, flags, + lockstate); + if (error == -1) + break; + } + return (error); } /* @@ -2614,10 +2658,10 @@ dlopen_object(const char *name, int fd, result = rtld_verify_versions(&obj->dagmembers); if (result != -1 && ld_tracing) goto trace; - if (result == -1 || (relocate_objects(obj, - (mode & RTLD_MODEMASK) == RTLD_NOW, &obj_rtld, + if (result == -1 || relocate_object_dag(obj, + (mode & RTLD_MODEMASK) == RTLD_NOW, &obj_rtld, (lo_flags & RTLD_LO_EARLY) ? SYMLOOK_EARLY : 0, - lockstate)) == -1) { + lockstate) == -1) { dlopen_cleanup(obj); obj = NULL; } else if (lo_flags & RTLD_LO_EARLY) { From owner-svn-src-all@FreeBSD.ORG Thu Jul 5 15:36:00 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D7CE11065670; Thu, 5 Jul 2012 15:35:59 +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 C20468FC12; Thu, 5 Jul 2012 15:35:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q65FZxXY081379; Thu, 5 Jul 2012 15:35:59 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q65FZxCu081374; Thu, 5 Jul 2012 15:35:59 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201207051535.q65FZxCu081374@svn.freebsd.org> From: Alexander Motin Date: Thu, 5 Jul 2012 15:35:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238134 - in stable/9/sys/dev/usb: . controller X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jul 2012 15:36:00 -0000 Author: mav Date: Thu Jul 5 15:35:59 2012 New Revision: 238134 URL: http://svn.freebsd.org/changeset/base/238134 Log: MFC r238015: Add IDs for some USB controllers I have around. Just a cosmetics. Approved by: re (kib) Modified: stable/9/sys/dev/usb/controller/ehci_pci.c stable/9/sys/dev/usb/controller/ohci_pci.c stable/9/sys/dev/usb/controller/xhci_pci.c stable/9/sys/dev/usb/usbdevs Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/controller/ehci_pci.c ============================================================================== --- stable/9/sys/dev/usb/controller/ehci_pci.c Thu Jul 5 15:34:55 2012 (r238133) +++ stable/9/sys/dev/usb/controller/ehci_pci.c Thu Jul 5 15:35:59 2012 (r238134) @@ -104,9 +104,6 @@ ehci_pci_match(device_t self) uint32_t device_id = pci_get_devid(self); switch (device_id) { - case 0x268c8086: - return ("Intel 63XXESB USB 2.0 controller"); - case 0x523910b9: return "ALi M5239 USB 2.0 controller"; @@ -120,7 +117,13 @@ ehci_pci_match(device_t self) return "ATI SB200 USB 2.0 controller"; case 0x43731002: return "ATI SB400 USB 2.0 controller"; + case 0x43961002: + return ("AMD SB7x0/SB8x0/SB9x0 USB 2.0 controller"); + case 0x1e268086: + return ("Intel Panther Point USB 2.0 controller"); + case 0x1e2d8086: + return ("Intel Panther Point USB 2.0 controller"); case 0x25ad8086: return "Intel 6300ESB USB 2.0 controller"; case 0x24cd8086: @@ -129,9 +132,10 @@ ehci_pci_match(device_t self) return "Intel 82801EB/R (ICH5) USB 2.0 controller"; case 0x265c8086: return "Intel 82801FB (ICH6) USB 2.0 controller"; + case 0x268c8086: + return ("Intel 63XXESB USB 2.0 controller"); case 0x27cc8086: return "Intel 82801GB/R (ICH7) USB 2.0 controller"; - case 0x28368086: return "Intel 82801H (ICH8) USB 2.0 controller USB2-A"; case 0x283a8086: Modified: stable/9/sys/dev/usb/controller/ohci_pci.c ============================================================================== --- stable/9/sys/dev/usb/controller/ohci_pci.c Thu Jul 5 15:34:55 2012 (r238133) +++ stable/9/sys/dev/usb/controller/ohci_pci.c Thu Jul 5 15:35:59 2012 (r238134) @@ -132,6 +132,10 @@ ohci_pci_match(device_t self) return "ATI SB400 USB Controller"; case 0x43751002: return "ATI SB400 USB Controller"; + case 0x43971002: + return ("AMD SB7x0/SB8x0/SB9x0 USB controller"); + case 0x43991002: + return ("AMD SB7x0/SB8x0/SB9x0 USB controller"); case 0x06701095: return ("CMD Tech 670 (USB0670) USB controller"); Modified: stable/9/sys/dev/usb/controller/xhci_pci.c ============================================================================== --- stable/9/sys/dev/usb/controller/xhci_pci.c Thu Jul 5 15:34:55 2012 (r238133) +++ stable/9/sys/dev/usb/controller/xhci_pci.c Thu Jul 5 15:35:59 2012 (r238134) @@ -93,6 +93,19 @@ MODULE_DEPEND(xhci, usb, 1, 1, 1); static const char * xhci_pci_match(device_t self) { + uint32_t device_id = pci_get_devid(self); + + switch (device_id) { + case 0x01941033: + return ("NEC uPD720200 USB 3.0 controller"); + + case 0x1e318086: + return ("Intel Panther Point USB 3.0 controller"); + + default: + break; + } + if ((pci_get_class(self) == PCIC_SERIALBUS) && (pci_get_subclass(self) == PCIS_SERIALBUS_USB) && (pci_get_progif(self) == PCIP_SERIALBUS_USB_XHCI)) { Modified: stable/9/sys/dev/usb/usbdevs ============================================================================== --- stable/9/sys/dev/usb/usbdevs Thu Jul 5 15:34:55 2012 (r238133) +++ stable/9/sys/dev/usb/usbdevs Thu Jul 5 15:35:59 2012 (r238134) @@ -559,6 +559,7 @@ vendor APACER 0x1005 Apacer vendor MOTOROLA4 0x100d Motorola vendor AIRPLUS 0x1011 Airplus vendor DESKNOTE 0x1019 Desknote +vendor NEC3 0x1033 NEC vendor GIGABYTE 0x1044 GIGABYTE vendor WESTERN 0x1058 Western Digital vendor MOTOROLA 0x1063 Motorola @@ -1916,6 +1917,7 @@ product INSYSTEM STORAGE_V2 0x5701 USB S product INTEL EASYPC_CAMERA 0x0110 Easy PC Camera product INTEL TESTBOARD 0x9890 82930 test board product INTEL2 IRMH 0x0020 Integrated Rate Matching Hub +product INTEL2 IRMH2 0x0024 Integrated Rate Matching Hub /* Intersil products */ product INTERSIL PRISM_GT 0x1000 PrismGT USB 2.0 WLAN From owner-svn-src-all@FreeBSD.ORG Thu Jul 5 15:37:18 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4D9111065678; Thu, 5 Jul 2012 15:37:18 +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 37DE78FC12; Thu, 5 Jul 2012 15:37:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q65FbITx081508; Thu, 5 Jul 2012 15:37:18 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q65FbH0f081503; Thu, 5 Jul 2012 15:37:17 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201207051537.q65FbH0f081503@svn.freebsd.org> From: Alexander Motin Date: Thu, 5 Jul 2012 15:37: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: r238135 - in stable/8/sys/dev/usb: . controller X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jul 2012 15:37:18 -0000 Author: mav Date: Thu Jul 5 15:37:17 2012 New Revision: 238135 URL: http://svn.freebsd.org/changeset/base/238135 Log: MFC r238015: Add IDs for some USB controllers I have around. Just a cosmetics. Modified: stable/8/sys/dev/usb/controller/ehci_pci.c stable/8/sys/dev/usb/controller/ohci_pci.c stable/8/sys/dev/usb/controller/xhci_pci.c stable/8/sys/dev/usb/usbdevs Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/dev/usb/controller/ehci_pci.c ============================================================================== --- stable/8/sys/dev/usb/controller/ehci_pci.c Thu Jul 5 15:35:59 2012 (r238134) +++ stable/8/sys/dev/usb/controller/ehci_pci.c Thu Jul 5 15:37:17 2012 (r238135) @@ -104,9 +104,6 @@ ehci_pci_match(device_t self) uint32_t device_id = pci_get_devid(self); switch (device_id) { - case 0x268c8086: - return ("Intel 63XXESB USB 2.0 controller"); - case 0x523910b9: return "ALi M5239 USB 2.0 controller"; @@ -120,7 +117,13 @@ ehci_pci_match(device_t self) return "ATI SB200 USB 2.0 controller"; case 0x43731002: return "ATI SB400 USB 2.0 controller"; + case 0x43961002: + return ("AMD SB7x0/SB8x0/SB9x0 USB 2.0 controller"); + case 0x1e268086: + return ("Intel Panther Point USB 2.0 controller"); + case 0x1e2d8086: + return ("Intel Panther Point USB 2.0 controller"); case 0x25ad8086: return "Intel 6300ESB USB 2.0 controller"; case 0x24cd8086: @@ -129,9 +132,10 @@ ehci_pci_match(device_t self) return "Intel 82801EB/R (ICH5) USB 2.0 controller"; case 0x265c8086: return "Intel 82801FB (ICH6) USB 2.0 controller"; + case 0x268c8086: + return ("Intel 63XXESB USB 2.0 controller"); case 0x27cc8086: return "Intel 82801GB/R (ICH7) USB 2.0 controller"; - case 0x28368086: return "Intel 82801H (ICH8) USB 2.0 controller USB2-A"; case 0x283a8086: Modified: stable/8/sys/dev/usb/controller/ohci_pci.c ============================================================================== --- stable/8/sys/dev/usb/controller/ohci_pci.c Thu Jul 5 15:35:59 2012 (r238134) +++ stable/8/sys/dev/usb/controller/ohci_pci.c Thu Jul 5 15:37:17 2012 (r238135) @@ -132,6 +132,10 @@ ohci_pci_match(device_t self) return "ATI SB400 USB Controller"; case 0x43751002: return "ATI SB400 USB Controller"; + case 0x43971002: + return ("AMD SB7x0/SB8x0/SB9x0 USB controller"); + case 0x43991002: + return ("AMD SB7x0/SB8x0/SB9x0 USB controller"); case 0x06701095: return ("CMD Tech 670 (USB0670) USB controller"); Modified: stable/8/sys/dev/usb/controller/xhci_pci.c ============================================================================== --- stable/8/sys/dev/usb/controller/xhci_pci.c Thu Jul 5 15:35:59 2012 (r238134) +++ stable/8/sys/dev/usb/controller/xhci_pci.c Thu Jul 5 15:37:17 2012 (r238135) @@ -93,6 +93,19 @@ MODULE_DEPEND(xhci, usb, 1, 1, 1); static const char * xhci_pci_match(device_t self) { + uint32_t device_id = pci_get_devid(self); + + switch (device_id) { + case 0x01941033: + return ("NEC uPD720200 USB 3.0 controller"); + + case 0x1e318086: + return ("Intel Panther Point USB 3.0 controller"); + + default: + break; + } + if ((pci_get_class(self) == PCIC_SERIALBUS) && (pci_get_subclass(self) == PCIS_SERIALBUS_USB) && (pci_get_progif(self) == PCIP_SERIALBUS_USB_XHCI)) { Modified: stable/8/sys/dev/usb/usbdevs ============================================================================== --- stable/8/sys/dev/usb/usbdevs Thu Jul 5 15:35:59 2012 (r238134) +++ stable/8/sys/dev/usb/usbdevs Thu Jul 5 15:37:17 2012 (r238135) @@ -558,6 +558,7 @@ vendor APACER 0x1005 Apacer vendor MOTOROLA4 0x100d Motorola vendor AIRPLUS 0x1011 Airplus vendor DESKNOTE 0x1019 Desknote +vendor NEC3 0x1033 NEC vendor GIGABYTE 0x1044 GIGABYTE vendor WESTERN 0x1058 Western Digital vendor MOTOROLA 0x1063 Motorola @@ -1912,6 +1913,7 @@ product INSYSTEM STORAGE_V2 0x5701 USB S product INTEL EASYPC_CAMERA 0x0110 Easy PC Camera product INTEL TESTBOARD 0x9890 82930 test board product INTEL2 IRMH 0x0020 Integrated Rate Matching Hub +product INTEL2 IRMH2 0x0024 Integrated Rate Matching Hub /* Intersil products */ product INTERSIL PRISM_GT 0x1000 PrismGT USB 2.0 WLAN From owner-svn-src-all@FreeBSD.ORG Thu Jul 5 15:38:33 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2FDAA1065703; Thu, 5 Jul 2012 15:38:33 +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 19D728FC1E; Thu, 5 Jul 2012 15:38:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q65FcWOZ081636; Thu, 5 Jul 2012 15:38:32 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q65FcWGA081633; Thu, 5 Jul 2012 15:38:32 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201207051538.q65FcWGA081633@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 5 Jul 2012 15:38:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238136 - stable/9/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jul 2012 15:38:33 -0000 Author: kib Date: Thu Jul 5 15:38:32 2012 New Revision: 238136 URL: http://svn.freebsd.org/changeset/base/238136 Log: MFC r237660: Optimize the handling of SC_NPROCESSORS_CONF, by using auxv AT_NCPU value if present. Approved by: re (kensmith) Modified: stable/9/lib/libc/gen/sysconf.c Directory Properties: stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/gen/sysconf.c ============================================================================== --- stable/9/lib/libc/gen/sysconf.c Thu Jul 5 15:37:17 2012 (r238135) +++ stable/9/lib/libc/gen/sysconf.c Thu Jul 5 15:38:32 2012 (r238136) @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -51,6 +52,7 @@ __FBSDID("$FreeBSD$"); #include "../stdlib/atexit.h" #include "tzfile.h" /* from ../../../contrib/tzcode/stdtime */ +#include "libc_private.h" #define _PATH_ZONEINFO TZDIR /* from tzfile.h */ @@ -585,6 +587,8 @@ yesno: case _SC_NPROCESSORS_CONF: case _SC_NPROCESSORS_ONLN: + if (_elf_aux_info(AT_NCPUS, &value, sizeof(value)) == 0) + return ((long)value); mib[0] = CTL_HW; mib[1] = HW_NCPU; break; From owner-svn-src-all@FreeBSD.ORG Thu Jul 5 15:39:31 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6432C1065672; Thu, 5 Jul 2012 15:39:31 +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 352438FC22; Thu, 5 Jul 2012 15:39:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q65FdVXQ081737; Thu, 5 Jul 2012 15:39:31 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q65FdVOO081735; Thu, 5 Jul 2012 15:39:31 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201207051539.q65FdVOO081735@svn.freebsd.org> From: Alexander Motin Date: Thu, 5 Jul 2012 15:39:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238137 - stable/9/sys/dev/sound/pci/hda X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jul 2012 15:39:31 -0000 Author: mav Date: Thu Jul 5 15:39:30 2012 New Revision: 238137 URL: http://svn.freebsd.org/changeset/base/238137 Log: MFC r238022: Remove 14 not very useful characters " HDA CODEC PCM" from HDA pcm device names to shorten them. PulseAudio reported to have problems with names longer then 63 chars and at least in XMMS long names are inconvinient. Approved by: re (kib) Modified: stable/9/sys/dev/sound/pci/hda/hdaa.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/sound/pci/hda/hdaa.c ============================================================================== --- stable/9/sys/dev/sound/pci/hda/hdaa.c Thu Jul 5 15:38:32 2012 (r238136) +++ stable/9/sys/dev/sound/pci/hda/hdaa.c Thu Jul 5 15:39:30 2012 (r238137) @@ -6203,12 +6203,14 @@ hdaa_resume(device_t dev) static int hdaa_probe(device_t dev) { + const char *pdesc; char buf[128]; if (hda_get_node_type(dev) != HDA_PARAM_FCT_GRP_TYPE_NODE_TYPE_AUDIO) return (ENXIO); - snprintf(buf, sizeof(buf), "%s Audio Function Group", - device_get_desc(device_get_parent(dev))); + pdesc = device_get_desc(device_get_parent(dev)); + snprintf(buf, sizeof(buf), "%.*s Audio Function Group", + (int)(strlen(pdesc) - 10), pdesc); device_set_desc_copy(dev, buf); return (BUS_PROBE_DEFAULT); } @@ -6565,6 +6567,7 @@ hdaa_pcm_probe(device_t dev) struct hdaa_pcm_devinfo *pdevinfo = (struct hdaa_pcm_devinfo *)device_get_ivars(dev); struct hdaa_devinfo *devinfo = pdevinfo->devinfo; + const char *pdesc; char chans1[8], chans2[8]; char buf[128]; int loc1, loc2, t1, t2; @@ -6610,8 +6613,9 @@ hdaa_pcm_probe(device_t dev) t1 = -2; if (pdevinfo->digital) t1 = -2; - snprintf(buf, sizeof(buf), "%s PCM (%s%s%s%s%s%s%s%s%s)", - device_get_desc(device_get_parent(device_get_parent(dev))), + pdesc = device_get_desc(device_get_parent(dev)); + snprintf(buf, sizeof(buf), "%.*s (%s%s%s%s%s%s%s%s%s)", + (int)(strlen(pdesc) - 21), pdesc, loc1 >= 0 ? HDA_LOCS[loc1] : "", loc1 >= 0 ? " " : "", (pdevinfo->digital == 0x7)?"HDMI/DP": ((pdevinfo->digital == 0x5)?"DisplayPort": From owner-svn-src-all@FreeBSD.ORG Thu Jul 5 15:40:42 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 58712106564A; Thu, 5 Jul 2012 15:40:42 +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 298588FC1D; Thu, 5 Jul 2012 15:40:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q65Feg2F081854; Thu, 5 Jul 2012 15:40:42 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q65FefRY081852; Thu, 5 Jul 2012 15:40:41 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201207051540.q65FefRY081852@svn.freebsd.org> From: Alexander Motin Date: Thu, 5 Jul 2012 15:40: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: r238138 - stable/8/sys/dev/sound/pci/hda X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jul 2012 15:40:42 -0000 Author: mav Date: Thu Jul 5 15:40:41 2012 New Revision: 238138 URL: http://svn.freebsd.org/changeset/base/238138 Log: MFC r238022: Remove 14 not very useful characters " HDA CODEC PCM" from HDA pcm device names to shorten them. PulseAudio reported to have problems with names longer then 63 chars and at least in XMMS long names are inconvinient. Modified: stable/8/sys/dev/sound/pci/hda/hdaa.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/dev/sound/pci/hda/hdaa.c ============================================================================== --- stable/8/sys/dev/sound/pci/hda/hdaa.c Thu Jul 5 15:39:30 2012 (r238137) +++ stable/8/sys/dev/sound/pci/hda/hdaa.c Thu Jul 5 15:40:41 2012 (r238138) @@ -6203,12 +6203,14 @@ hdaa_resume(device_t dev) static int hdaa_probe(device_t dev) { + const char *pdesc; char buf[128]; if (hda_get_node_type(dev) != HDA_PARAM_FCT_GRP_TYPE_NODE_TYPE_AUDIO) return (ENXIO); - snprintf(buf, sizeof(buf), "%s Audio Function Group", - device_get_desc(device_get_parent(dev))); + pdesc = device_get_desc(device_get_parent(dev)); + snprintf(buf, sizeof(buf), "%.*s Audio Function Group", + (int)(strlen(pdesc) - 10), pdesc); device_set_desc_copy(dev, buf); return (BUS_PROBE_DEFAULT); } @@ -6565,6 +6567,7 @@ hdaa_pcm_probe(device_t dev) struct hdaa_pcm_devinfo *pdevinfo = (struct hdaa_pcm_devinfo *)device_get_ivars(dev); struct hdaa_devinfo *devinfo = pdevinfo->devinfo; + const char *pdesc; char chans1[8], chans2[8]; char buf[128]; int loc1, loc2, t1, t2; @@ -6610,8 +6613,9 @@ hdaa_pcm_probe(device_t dev) t1 = -2; if (pdevinfo->digital) t1 = -2; - snprintf(buf, sizeof(buf), "%s PCM (%s%s%s%s%s%s%s%s%s)", - device_get_desc(device_get_parent(device_get_parent(dev))), + pdesc = device_get_desc(device_get_parent(dev)); + snprintf(buf, sizeof(buf), "%.*s (%s%s%s%s%s%s%s%s%s)", + (int)(strlen(pdesc) - 21), pdesc, loc1 >= 0 ? HDA_LOCS[loc1] : "", loc1 >= 0 ? " " : "", (pdevinfo->digital == 0x7)?"HDMI/DP": ((pdevinfo->digital == 0x5)?"DisplayPort": From owner-svn-src-all@FreeBSD.ORG Thu Jul 5 15:41:31 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DC62610656B5; Thu, 5 Jul 2012 15:41:31 +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 929E58FC12; Thu, 5 Jul 2012 15:41:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q65FfVpL081929; Thu, 5 Jul 2012 15:41:31 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q65FfVC1081927; Thu, 5 Jul 2012 15:41:31 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201207051541.q65FfVC1081927@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 5 Jul 2012 15:41:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238139 - stable/9/tools/test/auxinfo X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jul 2012 15:41:32 -0000 Author: kib Date: Thu Jul 5 15:41:31 2012 New Revision: 238139 URL: http://svn.freebsd.org/changeset/base/238139 Log: MFC r237661: Add a test for number of CPUs configured/online. Approved by: re (kensmith) Modified: stable/9/tools/test/auxinfo/auxinfo.c Directory Properties: stable/9/tools/test/auxinfo/ (props changed) Modified: stable/9/tools/test/auxinfo/auxinfo.c ============================================================================== --- stable/9/tools/test/auxinfo/auxinfo.c Thu Jul 5 15:40:41 2012 (r238138) +++ stable/9/tools/test/auxinfo/auxinfo.c Thu Jul 5 15:41:31 2012 (r238139) @@ -47,6 +47,13 @@ test_osreldate(void) printf("OSRELDATE: %d\n", getosreldate()); } +static void +test_ncpus(void) +{ + + printf("NCPUs: %ld\n", sysconf(_SC_NPROCESSORS_CONF)); +} + int main(int argc __unused, char *argv[] __unused) { @@ -54,5 +61,6 @@ main(int argc __unused, char *argv[] __u test_pagesizes(); test_pagesize(); test_osreldate(); + test_ncpus(); return (0); } From owner-svn-src-all@FreeBSD.ORG Thu Jul 5 16:02:15 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 00662106564A; Thu, 5 Jul 2012 16:02:14 +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 DD8698FC12; Thu, 5 Jul 2012 16:02:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q65G2EAA082884; Thu, 5 Jul 2012 16:02:14 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q65G2EGb082881; Thu, 5 Jul 2012 16:02:14 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201207051602.q65G2EGb082881@svn.freebsd.org> From: Edward Tomasz Napierala Date: Thu, 5 Jul 2012 16:02:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238140 - stable/9/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jul 2012 16:02:15 -0000 Author: trasz Date: Thu Jul 5 16:02:14 2012 New Revision: 238140 URL: http://svn.freebsd.org/changeset/base/238140 Log: MFC r237636: Add manual page for bxe(4). Approved by: re (kib) Added: stable/9/share/man/man4/bxe.4 - copied unchanged from r237636, head/share/man/man4/bxe.4 Modified: stable/9/share/man/man4/Makefile Directory Properties: stable/9/share/man/man4/ (props changed) Modified: stable/9/share/man/man4/Makefile ============================================================================== --- stable/9/share/man/man4/Makefile Thu Jul 5 15:41:31 2012 (r238139) +++ stable/9/share/man/man4/Makefile Thu Jul 5 16:02:14 2012 (r238140) @@ -37,6 +37,7 @@ MAN= aac.4 \ ${_amdsbwd.4} \ ${_amdsmb.4} \ ${_amdtemp.4} \ + ${_bxe.4} \ amr.4 \ an.4 \ ${_apic.4} \ @@ -555,6 +556,7 @@ MLINKS+=bktr.4 brooktree.4 MLINKS+=bridge.4 if_bridge.4 MLINKS+=bwi.4 if_bwi.4 MLINKS+=bwn.4 if_bwn.4 +MLINKS+=${_bxe.4} ${_if_bxe.4} MLINKS+=cas.4 if_cas.4 MLINKS+=cdce.4 if_cdce.4 MLINKS+=crypto.4 cryptodev.4 @@ -706,6 +708,7 @@ _amdsmb.4= amdsmb.4 _amdtemp.4= amdtemp.4 _asmc.4= asmc.4 _atp.4= atp.4 +_bxe.4= bxe.4 _coretemp.4= coretemp.4 _cpuctl.4= cpuctl.4 _dpms.4= dpms.4 @@ -715,6 +718,7 @@ _hptmv.4= hptmv.4 _hptrr.4= hptrr.4 _i8254.4= i8254.4 _ichwd.4= ichwd.4 +_if_bxe.4= if_bxe.4 _if_ndis.4= if_ndis.4 _if_nfe.4= if_nfe.4 _if_nve.4= if_nve.4 Copied: stable/9/share/man/man4/bxe.4 (from r237636, head/share/man/man4/bxe.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/share/man/man4/bxe.4 Thu Jul 5 16:02:14 2012 (r238140, copy of r237636, head/share/man/man4/bxe.4) @@ -0,0 +1,138 @@ +.\" Copyright (c) 2012 Edward Tomasz Napierala +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd June 25, 2012 +.Dt BXE 4 +.Os +.Sh NAME +.Nm bxe +.Nd "Broadcom BCM57710/BCM57711/BCM57711E 10Gb Ethernet adapter driver" +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following lines in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device bxe" +.Ed +.Pp +Alternatively, to load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +if_bxe_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides support for PCIe 10GbE Ethernet adapters based on +BCM5771x chips. +The driver supports Jumbo Frames, VLAN tagging, IP, UDP and TCP checksum +offload, MSI-X, TCP Segmentation Offload (TSO), Large Receive Offload (LRO), +and Receive Side Steering (RSS). +.Pp +For more information on configuring this device, see +.Xr ifconfig 8 . +.Sh HARDWARE +The +.Nm +driver provides support for various NICs based on the Broadcom BCM5771x +family of 10GbE Ethernet controller chips, including the +following: +.Pp +.Bl -bullet -compact +.It +Broadcom NetXtreme II BCM57710 10GbE +.It +Broadcom NetXtreme II BCM57711 10GbE +.It +Broadcom NetXtreme II BCM57711E 10GbE +.El +.Sh SYSCTL VARIABLES +The following variables are available as both +.Xr sysctl 8 +variables and +.Xr loader 8 +tunables: +.Bl -tag -width indent +.It Va hw.bxe.dcc_enable +Enable HP Flex-10 support. +Allowed values are 0 to disable and 1 to enable. +The default value is 0. +.It Va hw.bxe.tso_enable +Enable TCP Segmentation Offload. +The default value is 1. +.It Va hw.bxe.int_mode +Set interrupt mode. +Allowed values are 0 for IRQ, 1 for MSI/IRQ and 2 for MSI-X/MSI/IRQ. +The default value is 2. +.It Va hw.bxe.queue_count +Specify the number of queues that will be used when a multi-queue +RSS mode is selected using bxe_multi_mode. +Allowed values are 0 for Auto or 1 to 16 for fixed number of queues. +The default value is 0. +.It Va hw.bxe.multi_mode +Enable Receive Side Steering. +Allowed values are 0, which disables all multi-queue/packet sorting +algorithms, and 1, which assigns incoming frames to receive queues +according to RSS. +The default value is 0. +.It Va hw.bxe.rx_ticks +Control interrupt coalescing for received frames. +The first frame always causes an interrupt, but subsequent frames +are coalesced until the RX/TX ticks timer value expires and another +interrupt occurs. +The default value is 25. +.It Va hw.bxe.tx_ticks +Control interrupt coalescing for trasmitted frames. +The first frame always causes an interrupt, but subsequent frames +are coalesced until the RX/TX ticks timer value expires and another +interrupt occurs. +The default value is 50. +.It Va hw.bxe.mrrs +Allows to set the PCIe maximum read request size. +Allowed values are -1 for Auto, 0 for 128B, 1 for 256B, 2 for 512B, +and 3 for 1kB. +The default value is -1. +.El +.Sh SEE ALSO +.Xr altq 4 , +.Xr arp 4 , +.Xr netintro 4 , +.Xr ng_ether 4 , +.Xr vlan 4 , +.Xr ifconfig 8 +.Sh HISTORY +The +.Nm +device driver first appeared in +.Fx 9.0 . +.Sh AUTHORS +The +.Nm +driver was written by +.An Gary Zambrano Aq zambrano@broadcom.com +and +.An David Christensen Aq davidch@broadcom.com . From owner-svn-src-all@FreeBSD.ORG Thu Jul 5 17:02:21 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4DC2C1065670; Thu, 5 Jul 2012 17:02:21 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 364CD8FC12; Thu, 5 Jul 2012 17:02:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q65H2LGH086701; Thu, 5 Jul 2012 17:02:21 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q65H2LxM086699; Thu, 5 Jul 2012 17:02:21 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201207051702.q65H2LxM086699@svn.freebsd.org> From: Brooks Davis Date: Thu, 5 Jul 2012 17:02:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238141 - head/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jul 2012 17:02:21 -0000 Author: brooks Date: Thu Jul 5 17:02:20 2012 New Revision: 238141 URL: http://svn.freebsd.org/changeset/base/238141 Log: Document the behavior (from 4.4-lite) that tokens returned by telldir() are single use. Sponsored by: DARPA, AFRL MFC after: 3 days Modified: head/lib/libc/gen/directory.3 Modified: head/lib/libc/gen/directory.3 ============================================================================== --- head/lib/libc/gen/directory.3 Thu Jul 5 16:02:14 2012 (r238140) +++ head/lib/libc/gen/directory.3 Thu Jul 5 17:02:20 2012 (r238141) @@ -28,7 +28,7 @@ .\" @(#)directory.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd April 16, 2008 +.Dd July 5, 2012 .Dt DIRECTORY 3 .Os .Sh NAME @@ -153,7 +153,7 @@ returns 0 on success or an error number The .Fn telldir function -returns the current location associated with the named +returns a token representing the current location associated with the named .Em directory stream . Values returned by .Fn telldir @@ -179,6 +179,13 @@ The new position reverts to the one asso when the .Fn telldir operation was performed. +State associated with the token returned by +.Fn telldir is freed when it is passed to +.Fn seekdir . +If you wish return to the same location again, +then you must create a new token with another +.Fn telldir +call. .Pp The .Fn rewinddir @@ -245,3 +252,9 @@ The .Fn fdopendir function appeared in .Fx 8.0 . +.Sh BUGS +The invalidation of +.Fn telldir +tokens when calling +.Fn seekdir +is non-standard. From owner-svn-src-all@FreeBSD.ORG Thu Jul 5 18:19:36 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 213461065672; Thu, 5 Jul 2012 18:19:36 +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 E68128FC08; Thu, 5 Jul 2012 18:19:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q65IJZvn004727; Thu, 5 Jul 2012 18:19:35 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q65IJZF4004724; Thu, 5 Jul 2012 18:19:35 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201207051819.q65IJZF4004724@svn.freebsd.org> From: John Baldwin Date: Thu, 5 Jul 2012 18:19:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238142 - in head/sys/amd64: amd64 include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jul 2012 18:19:36 -0000 Author: jhb Date: Thu Jul 5 18:19:35 2012 New Revision: 238142 URL: http://svn.freebsd.org/changeset/base/238142 Log: Now that our assembler supports the xsave family of instructions, use them natively rather than hand-assembled versions. For xgetbv/xsetbv, add a wrapper API to deal with xcr* registers: rxcr() and load_xcr(). Reviewed by: kib MFC after: 1 month Modified: head/sys/amd64/amd64/fpu.c head/sys/amd64/include/cpufunc.h Modified: head/sys/amd64/amd64/fpu.c ============================================================================== --- head/sys/amd64/amd64/fpu.c Thu Jul 5 17:02:20 2012 (r238141) +++ head/sys/amd64/amd64/fpu.c Thu Jul 5 18:19:35 2012 (r238142) @@ -85,9 +85,7 @@ xrstor(char *addr, uint64_t mask) low = mask; hi = mask >> 32; - /* xrstor (%rdi) */ - __asm __volatile(".byte 0x0f,0xae,0x2f" : : - "a" (low), "d" (hi), "D" (addr)); + __asm __volatile("xrstor %0" : : "m" (*addr), "a" (low), "d" (hi)); } static __inline void @@ -97,20 +95,8 @@ xsave(char *addr, uint64_t mask) low = mask; hi = mask >> 32; - /* xsave (%rdi) */ - __asm __volatile(".byte 0x0f,0xae,0x27" : : - "a" (low), "d" (hi), "D" (addr) : "memory"); -} - -static __inline void -xsetbv(uint32_t reg, uint64_t val) -{ - uint32_t low, hi; - - low = val; - hi = val >> 32; - __asm __volatile(".byte 0x0f,0x01,0xd1" : : - "c" (reg), "a" (low), "d" (hi)); + __asm __volatile("xsave %0" : "=m" (*addr) : "a" (low), "d" (hi) : + "memory"); } #else /* !(__GNUCLIKE_ASM && !lint) */ @@ -127,7 +113,6 @@ void start_emulating(void); void stop_emulating(void); void xrstor(char *addr, uint64_t mask); void xsave(char *addr, uint64_t mask); -void xsetbv(uint32_t reg, uint64_t val); #endif /* __GNUCLIKE_ASM && !lint */ @@ -238,7 +223,7 @@ fpuinit(void) if (use_xsave) { load_cr4(rcr4() | CR4_XSAVE); - xsetbv(XCR0, xsave_mask); + load_xcr(XCR0, xsave_mask); } /* Modified: head/sys/amd64/include/cpufunc.h ============================================================================== --- head/sys/amd64/include/cpufunc.h Thu Jul 5 17:02:20 2012 (r238141) +++ head/sys/amd64/include/cpufunc.h Thu Jul 5 18:19:35 2012 (r238142) @@ -418,6 +418,25 @@ rcr4(void) return (data); } +static __inline u_long +rxcr(u_int reg) +{ + u_int low, high; + + __asm __volatile("xgetbv" : "=a" (low), "=d" (high) : "c" (reg)); + return (low | ((uint64_t)high << 32)); +} + +static __inline void +load_xcr(u_int reg, u_long val) +{ + u_int low, high; + + low = val; + high = val >> 32; + __asm __volatile("xsetbv" : : "c" (reg), "a" (low), "d" (high)); +} + /* * Global TLB flush (except for thise for pages marked PG_G) */ From owner-svn-src-all@FreeBSD.ORG Thu Jul 5 18:23:37 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 45183106566B; Thu, 5 Jul 2012 18:23:37 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2E19F8FC08; Thu, 5 Jul 2012 18:23:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q65INb2d005738; Thu, 5 Jul 2012 18:23:37 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q65INa8m005727; Thu, 5 Jul 2012 18:23:36 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201207051823.q65INa8m005727@svn.freebsd.org> From: "David E. O'Brien" Date: Thu, 5 Jul 2012 18:23:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238143 - in head/tools: build/make_check regression/usr.bin/make/syntax/funny-targets X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jul 2012 18:23:37 -0000 Author: obrien Date: Thu Jul 5 18:23:36 2012 New Revision: 238143 URL: http://svn.freebsd.org/changeset/base/238143 Log: Remove the "funny targets" make check. We no longer need embedded :: targets to build FreeBSD (they are used in Perl man pages). We never needed embedded "!" in targets that I can find. We got this from OpenBSD and I cannot find any other make that supports such things -- contrary to their commit message claim: "This behaviour is also consistent with other versions of make.". Added: head/tools/regression/usr.bin/make/syntax/funny-targets/ head/tools/regression/usr.bin/make/syntax/funny-targets/Makefile (contents, props changed) head/tools/regression/usr.bin/make/syntax/funny-targets/expected.status.1 (contents, props changed) head/tools/regression/usr.bin/make/syntax/funny-targets/expected.status.2 (contents, props changed) head/tools/regression/usr.bin/make/syntax/funny-targets/expected.stderr.1 (contents, props changed) head/tools/regression/usr.bin/make/syntax/funny-targets/expected.stderr.2 (contents, props changed) head/tools/regression/usr.bin/make/syntax/funny-targets/expected.stdout.1 (contents, props changed) head/tools/regression/usr.bin/make/syntax/funny-targets/expected.stdout.2 (contents, props changed) head/tools/regression/usr.bin/make/syntax/funny-targets/test.t (contents, props changed) Modified: head/tools/build/make_check/Makefile Modified: head/tools/build/make_check/Makefile ============================================================================== --- head/tools/build/make_check/Makefile Thu Jul 5 18:19:35 2012 (r238142) +++ head/tools/build/make_check/Makefile Thu Jul 5 18:23:36 2012 (r238143) @@ -23,7 +23,7 @@ NIL= SMAKE= MAKEFLAGS= ${MAKE} -C ${.CURDIR} all: - @echo '1..17' + @echo '1..16' @${SMAKE} C_check || { cd ${.CURDIR} ; ${MAKE} failure ; } @echo "ok 1 - C_check # Test of -C flag existence detected no regression." @echo 1:${DATA1} 2:${DATA2} 3:${DATA3} 4:${DATA4} 5:${DATA5} | \ @@ -40,26 +40,24 @@ all: @echo "ok 6 - notdef # Test notdef detected no regression." @${SMAKE} modifiers || ${SMAKE} failure @echo "ok 7 - modifiers # Test modifiers detected no regression." - @${SMAKE} funny_targets || ${SMAKE} failure - @echo "ok 8 funny_targets # Test funny_targets detected no regression." @${SMAKE} arith_expr || ${SMAKE} failure - @echo "ok 9 arith_expr # Test arith_expr detected no regression." + @echo "ok 8 arith_expr # Test arith_expr detected no regression." @${SMAKE} PATH_exists || ${SMAKE} failure - @echo "ok 10 PATH_exists # Test PATH_exists detected no regression." + @echo "ok 9 PATH_exists # Test PATH_exists detected no regression." @${SMAKE} double_quotes || ${SMAKE} failure - @echo "ok 11 double_quotes # Test double_quotes detected no regression." + @echo "ok 10 double_quotes # Test double_quotes detected no regression." @! ${SMAKE} double_quotes2 >/dev/null 2>&1 && true || ${SMAKE} failure - @echo "ok 12 double_quotes2 # Test double_quotes2 detected no regression." + @echo "ok 11 double_quotes2 # Test double_quotes2 detected no regression." @${SMAKE} pass_cmd_vars || ${SMAKE} failure - @echo "ok 13 pass_cmd_vars # Test pass_cmd_vars detected no regression." + @echo "ok 12 pass_cmd_vars # Test pass_cmd_vars detected no regression." @${SMAKE} plus_flag || ${SMAKE} failure - @echo "ok 14 plus_flag # Test plus_flag detected no regression." + @echo "ok 13 plus_flag # Test plus_flag detected no regression." @! ${SMAKE} shell >/dev/null 2>&1 && true || ${SMAKE} failure - @echo "ok 15 shell # Test shell detected no regression." + @echo "ok 14 shell # Test shell detected no regression." @${SMAKE} shell_1 || ${SMAKE} failure - @echo "ok 16 shell_1 # Test shell_1 detected no regression." + @echo "ok 15 shell_1 # Test shell_1 detected no regression." @${SMAKE} shell_2 || ${SMAKE} failure - @echo "ok 17 shell_2 # Test shell_2 detected no regression." + @echo "ok 16 shell_2 # Test shell_2 detected no regression." .if make(C_check) C_check: @@ -107,12 +105,6 @@ modifiers: fi .endif -.if make(funny_targets) -funny_targets: colons::target exclamation!target -colons::target: -exclamation!target: -.endif - .if make(arith_expr) arith_expr: # See if arithmetic expression parsing is broken. Added: head/tools/regression/usr.bin/make/syntax/funny-targets/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/make/syntax/funny-targets/Makefile Thu Jul 5 18:23:36 2012 (r238143) @@ -0,0 +1,14 @@ +# $FreeBSD$ +# +# PR bin/6612 / GRN r102178 +# + +test1: colons::colons::target + +colons::colons::target: + @echo '${.TARGET}' + +test2: exclamation!target + +exclamation!target: + @echo '${.TARGET} Added: head/tools/regression/usr.bin/make/syntax/funny-targets/expected.status.1 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/make/syntax/funny-targets/expected.status.1 Thu Jul 5 18:23:36 2012 (r238143) @@ -0,0 +1 @@ +0 Added: head/tools/regression/usr.bin/make/syntax/funny-targets/expected.status.2 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/make/syntax/funny-targets/expected.status.2 Thu Jul 5 18:23:36 2012 (r238143) @@ -0,0 +1 @@ +0 Added: head/tools/regression/usr.bin/make/syntax/funny-targets/expected.stderr.1 ============================================================================== Added: head/tools/regression/usr.bin/make/syntax/funny-targets/expected.stderr.2 ============================================================================== Added: head/tools/regression/usr.bin/make/syntax/funny-targets/expected.stdout.1 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/make/syntax/funny-targets/expected.stdout.1 Thu Jul 5 18:23:36 2012 (r238143) @@ -0,0 +1 @@ +colons::colons::target Added: head/tools/regression/usr.bin/make/syntax/funny-targets/expected.stdout.2 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/make/syntax/funny-targets/expected.stdout.2 Thu Jul 5 18:23:36 2012 (r238143) @@ -0,0 +1 @@ +exclamation!target Added: head/tools/regression/usr.bin/make/syntax/funny-targets/test.t ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/make/syntax/funny-targets/test.t Thu Jul 5 18:23:36 2012 (r238143) @@ -0,0 +1,14 @@ +#!/bin/sh + +# $FreeBSD$ + +cd `dirname $0` +. ../../common.sh + +# Description +DESC='Target names with "funny" embeded characters.' + +# Run +TEST_N=2 + +eval_cmd $* From owner-svn-src-all@FreeBSD.ORG Thu Jul 5 19:34:41 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EEF9F106564A; Thu, 5 Jul 2012 19:34:40 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net (lor.one-eyed-alien.net [69.66.77.232]) by mx1.freebsd.org (Postfix) with ESMTP id 4CF828FC08; Thu, 5 Jul 2012 19:34:40 +0000 (UTC) Received: from lor.one-eyed-alien.net (localhost [127.0.0.1]) by lor.one-eyed-alien.net (8.14.4/8.14.4) with ESMTP id q65JXJVu020082; Thu, 5 Jul 2012 14:33:19 -0500 (CDT) (envelope-from brooks@lor.one-eyed-alien.net) Received: (from brooks@localhost) by lor.one-eyed-alien.net (8.14.4/8.14.4/Submit) id q65JXJ4J020081; Thu, 5 Jul 2012 14:33:19 -0500 (CDT) (envelope-from brooks) Date: Thu, 5 Jul 2012 14:33:19 -0500 From: Brooks Davis To: src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Message-ID: <20120705193319.GD87114@lor.one-eyed-alien.net> References: <201207051702.q65H2LxM086699@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="EP0wieDxd4TSJjHq" Content-Disposition: inline In-Reply-To: <201207051702.q65H2LxM086699@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Subject: Re: svn commit: r238141 - head/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jul 2012 19:34:41 -0000 --EP0wieDxd4TSJjHq Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jul 05, 2012 at 05:02:20PM +0000, Brooks Davis wrote: > Author: brooks > Date: Thu Jul 5 17:02:20 2012 > New Revision: 238141 > URL: http://svn.freebsd.org/changeset/base/238141 >=20 > Log: > Document the behavior (from 4.4-lite) that tokens returned by telldir()= are > single use. The ideal thing to do here is probably to import NetBSD's reimplementation that uses a per-directory cache rather than a global one, but documenting reality seemed like the easiest route to MFC. -- Brooks --EP0wieDxd4TSJjHq Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iD8DBQFP9ev+XY6L6fI4GtQRAmTJAKCZfGwiCQXOBSRhcoH21ZWRYIDQ8gCeJxet Q3vPOJNZmP/jSGF5GGF+dq8= =FsOk -----END PGP SIGNATURE----- --EP0wieDxd4TSJjHq-- From owner-svn-src-all@FreeBSD.ORG Thu Jul 5 20:02:25 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 568591065704; Thu, 5 Jul 2012 20:02:25 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 248DE8FC17; Thu, 5 Jul 2012 20:02:25 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 59253B99C; Thu, 5 Jul 2012 16:02:24 -0400 (EDT) From: John Baldwin To: Attilio Rao Date: Thu, 5 Jul 2012 07:49:42 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p17; KDE/4.5.5; amd64; ; ) References: <201207041951.q64JpPXu029310@svn.freebsd.org> <8344944B-1CEE-4CAD-96FB-EC5A743F6909@FreeBSD.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201207050749.43210.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 05 Jul 2012 16:02:24 -0400 (EDT) Cc: src-committers@freebsd.org, Andrey Chernov , svn-src-all@freebsd.org, David Chisnall , Konstantin Belousov , svn-src-head@freebsd.org, Pawel Jakub Dawidek , markm@freebsd.org Subject: Re: svn commit: r238118 - head/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jul 2012 20:02:25 -0000 On Wednesday, July 04, 2012 4:45:54 pm Attilio Rao wrote: > 2012/7/4 David Chisnall : > > On 4 Jul 2012, at 21:32, Andrey Chernov wrote: > > > >> 1) /dev/urandom may not exist in jails/sandboxes while sysctls (or old way > >> initialization) always exists. > > > > From the perspective of Capsicum sandboxes, a device node is better than a sysctl. The kernel must hard-code policy about which sysctls are permitted, but access to file descriptors is decided on a per-sandbox basis and is configurable by the user. The same applies to jails, although it's slightly more effort to make device nodes appear inside a jail. > > Also don't understimate the locking factor here. > I recall that at some point /dev/random was introducing some > scalability penalty on php (maybe related to the suhosin patch) until > kib made shared lookups available on devfs. IIRC, sysctls are still > Giant locked. sysctls are not all Giant locked. KERN_ARND is marked MPSAFE, so it does not use Giant: static int sysctl_kern_arnd(SYSCTL_HANDLER_ARGS) { char buf[256]; size_t len; len = req->oldlen; if (len > sizeof(buf)) len = sizeof(buf); arc4rand(buf, len, 0); return (SYSCTL_OUT(req, buf, len)); } SYSCTL_PROC(_kern, KERN_ARND, arandom, CTLTYPE_OPAQUE | CTLFLAG_RD | CTLFLAG_MPSAFE | CTLFLAG_CAPRD, NULL, 0, sysctl_kern_arnd, "", "arc4rand"); -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Thu Jul 5 20:26:58 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BC240106566B; Thu, 5 Jul 2012 20:26:58 +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 A55598FC0A; Thu, 5 Jul 2012 20:26:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q65KQwjh016782; Thu, 5 Jul 2012 20:26:58 GMT (envelope-from jfv@svn.freebsd.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q65KQw9m016770; Thu, 5 Jul 2012 20:26:58 GMT (envelope-from jfv@svn.freebsd.org) Message-Id: <201207052026.q65KQw9m016770@svn.freebsd.org> From: Jack F Vogel Date: Thu, 5 Jul 2012 20:26:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238148 - in head/sys: conf dev/e1000 modules/igb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jul 2012 20:26:58 -0000 Author: jfv Date: Thu Jul 5 20:26:57 2012 New Revision: 238148 URL: http://svn.freebsd.org/changeset/base/238148 Log: Sync with Intel internal source: shared code update and small changes in core required Add support for new i210/i211 devices Improve queue calculation based on mac type MFC after:5 days Added: head/sys/dev/e1000/e1000_i210.c (contents, props changed) head/sys/dev/e1000/e1000_i210.h (contents, props changed) Modified: head/sys/conf/files head/sys/dev/e1000/e1000_82541.c head/sys/dev/e1000/e1000_82543.c head/sys/dev/e1000/e1000_82571.c head/sys/dev/e1000/e1000_82575.c head/sys/dev/e1000/e1000_api.c head/sys/dev/e1000/e1000_api.h head/sys/dev/e1000/e1000_defines.h head/sys/dev/e1000/e1000_hw.h head/sys/dev/e1000/e1000_ich8lan.c head/sys/dev/e1000/e1000_mac.c head/sys/dev/e1000/e1000_mac.h head/sys/dev/e1000/e1000_manage.c head/sys/dev/e1000/e1000_manage.h head/sys/dev/e1000/e1000_phy.c head/sys/dev/e1000/e1000_phy.h head/sys/dev/e1000/e1000_regs.h head/sys/dev/e1000/if_em.c head/sys/dev/e1000/if_igb.c head/sys/modules/igb/Makefile Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Thu Jul 5 20:21:13 2012 (r238147) +++ head/sys/conf/files Thu Jul 5 20:26:57 2012 (r238148) @@ -1196,6 +1196,8 @@ dev/e1000/e1000_82575.c optional em | i compile-with "${NORMAL_C} -I$S/dev/e1000" dev/e1000/e1000_ich8lan.c optional em | igb \ compile-with "${NORMAL_C} -I$S/dev/e1000" +dev/e1000/e1000_i210.c optional em | igb \ + compile-with "${NORMAL_C} -I$S/dev/e1000" dev/e1000/e1000_api.c optional em | igb \ compile-with "${NORMAL_C} -I$S/dev/e1000" dev/e1000/e1000_mac.c optional em | igb \ Modified: head/sys/dev/e1000/e1000_82541.c ============================================================================== --- head/sys/dev/e1000/e1000_82541.c Thu Jul 5 20:21:13 2012 (r238147) +++ head/sys/dev/e1000/e1000_82541.c Thu Jul 5 20:26:57 2012 (r238148) @@ -642,7 +642,7 @@ static s32 e1000_check_for_link_82541(st * of MAC speed/duplex configuration. So we only need to * configure Collision Distance in the MAC. */ - e1000_config_collision_dist_generic(hw); + mac->ops.config_collision_dist(hw); /* * Configure Flow Control now that Auto-Neg has completed. Modified: head/sys/dev/e1000/e1000_82543.c ============================================================================== --- head/sys/dev/e1000/e1000_82543.c Thu Jul 5 20:21:13 2012 (r238147) +++ head/sys/dev/e1000/e1000_82543.c Thu Jul 5 20:26:57 2012 (r238148) @@ -1126,7 +1126,7 @@ static s32 e1000_setup_copper_link_82543 DEBUGOUT("Valid link established!!!\n"); /* Config the MAC and PHY after link is up */ if (hw->mac.type == e1000_82544) { - e1000_config_collision_dist_generic(hw); + hw->mac.ops.config_collision_dist(hw); } else { ret_val = e1000_config_mac_to_phy_82543(hw); if (ret_val) @@ -1160,7 +1160,7 @@ static s32 e1000_setup_fiber_link_82543( /* Take the link out of reset */ ctrl &= ~E1000_CTRL_LRST; - e1000_config_collision_dist_generic(hw); + hw->mac.ops.config_collision_dist(hw); ret_val = e1000_commit_fc_settings_generic(hw); if (ret_val) @@ -1259,7 +1259,7 @@ static s32 e1000_check_for_copper_link_8 * settings. */ if (mac->type == e1000_82544) - e1000_config_collision_dist_generic(hw); + hw->mac.ops.config_collision_dist(hw); else { ret_val = e1000_config_mac_to_phy_82543(hw); if (ret_val) { @@ -1433,7 +1433,7 @@ static s32 e1000_config_mac_to_phy_82543 if (phy_data & M88E1000_PSSR_DPLX) ctrl |= E1000_CTRL_FD; - e1000_config_collision_dist_generic(hw); + hw->mac.ops.config_collision_dist(hw); /* * Set up speed in the Device Control register depending on Modified: head/sys/dev/e1000/e1000_82571.c ============================================================================== --- head/sys/dev/e1000/e1000_82571.c Thu Jul 5 20:21:13 2012 (r238147) +++ head/sys/dev/e1000/e1000_82571.c Thu Jul 5 20:26:57 2012 (r238148) @@ -1907,7 +1907,7 @@ void e1000_set_laa_state_82571(struct e1 * incoming packets directed to this port are dropped. * Eventually the LAA will be in RAR[0] and RAR[14]. */ - e1000_rar_set_generic(hw, hw->mac.addr, + hw->mac.ops.rar_set(hw, hw->mac.addr, hw->mac.rar_entry_count - 1); return; } Modified: head/sys/dev/e1000/e1000_82575.c ============================================================================== --- head/sys/dev/e1000/e1000_82575.c Thu Jul 5 20:21:13 2012 (r238147) +++ head/sys/dev/e1000/e1000_82575.c Thu Jul 5 20:26:57 2012 (r238148) @@ -1,6 +1,6 @@ /****************************************************************************** - Copyright (c) 2001-2011, Intel Corporation + Copyright (c) 2001-2012, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without @@ -38,9 +38,12 @@ * 82575GB Gigabit Network Connection * 82576 Gigabit Network Connection * 82576 Quad Port Gigabit Mezzanine Adapter + * 82580 Gigabit Network Connection + * I350 Gigabit Network Connection */ #include "e1000_api.h" +#include "e1000_i210.h" static s32 e1000_init_phy_params_82575(struct e1000_hw *hw); static s32 e1000_init_mac_params_82575(struct e1000_hw *hw); @@ -162,6 +165,9 @@ static s32 e1000_init_phy_params_82575(s DEBUGFUNC("e1000_init_phy_params_82575"); + phy->ops.read_i2c_byte = e1000_read_i2c_byte_generic; + phy->ops.write_i2c_byte = e1000_write_i2c_byte_generic; + if (hw->phy.media_type != e1000_media_type_copper) { phy->type = e1000_phy_none; goto out; @@ -195,12 +201,22 @@ static s32 e1000_init_phy_params_82575(s if (e1000_sgmii_active_82575(hw) && !e1000_sgmii_uses_mdio_82575(hw)) { phy->ops.read_reg = e1000_read_phy_reg_sgmii_82575; phy->ops.write_reg = e1000_write_phy_reg_sgmii_82575; - } else if (hw->mac.type >= e1000_82580) { - phy->ops.read_reg = e1000_read_phy_reg_82580; - phy->ops.write_reg = e1000_write_phy_reg_82580; } else { - phy->ops.read_reg = e1000_read_phy_reg_igp; - phy->ops.write_reg = e1000_write_phy_reg_igp; + switch (hw->mac.type) { + case e1000_82580: + case e1000_i350: + phy->ops.read_reg = e1000_read_phy_reg_82580; + phy->ops.write_reg = e1000_write_phy_reg_82580; + break; + case e1000_i210: + case e1000_i211: + phy->ops.read_reg = e1000_read_phy_reg_gs40g; + phy->ops.write_reg = e1000_write_phy_reg_gs40g; + break; + default: + phy->ops.read_reg = e1000_read_phy_reg_igp; + phy->ops.write_reg = e1000_write_phy_reg_igp; + } } /* Set phy->phy_addr and phy->id. */ @@ -245,6 +261,15 @@ static s32 e1000_init_phy_params_82575(s phy->ops.set_d0_lplu_state = e1000_set_d0_lplu_state_82580; phy->ops.set_d3_lplu_state = e1000_set_d3_lplu_state_82580; break; + case I210_I_PHY_ID: + phy->type = e1000_phy_i210; + phy->ops.check_polarity = e1000_check_polarity_m88; + phy->ops.get_info = e1000_get_phy_info_m88; + phy->ops.get_cable_length = e1000_get_cable_length_m88_gen2; + phy->ops.set_d0_lplu_state = e1000_set_d0_lplu_state_82580; + phy->ops.set_d3_lplu_state = e1000_set_d3_lplu_state_82580; + phy->ops.force_speed_duplex = e1000_phy_force_speed_duplex_m88; + break; default: ret_val = -E1000_ERR_PHY; goto out; @@ -281,28 +306,32 @@ s32 e1000_init_nvm_params_82575(struct e size = 15; nvm->word_size = 1 << size; - nvm->opcode_bits = 8; - nvm->delay_usec = 1; - switch (nvm->override) { - case e1000_nvm_override_spi_large: - nvm->page_size = 32; - nvm->address_bits = 16; - break; - case e1000_nvm_override_spi_small: - nvm->page_size = 8; - nvm->address_bits = 8; - break; - default: - nvm->page_size = eecd & E1000_EECD_ADDR_BITS ? 32 : 8; - nvm->address_bits = eecd & E1000_EECD_ADDR_BITS ? 16 : 8; - break; - } - - nvm->type = e1000_nvm_eeprom_spi; - - if (nvm->word_size == (1 << 15)) - nvm->page_size = 128; + if (hw->mac.type < e1000_i210) { + nvm->opcode_bits = 8; + nvm->delay_usec = 1; + + switch (nvm->override) { + case e1000_nvm_override_spi_large: + nvm->page_size = 32; + nvm->address_bits = 16; + break; + case e1000_nvm_override_spi_small: + nvm->page_size = 8; + nvm->address_bits = 8; + break; + default: + nvm->page_size = eecd & E1000_EECD_ADDR_BITS ? 32 : 8; + nvm->address_bits = eecd & E1000_EECD_ADDR_BITS ? + 16 : 8; + break; + } + if (nvm->word_size == (1 << 15)) + nvm->page_size = 128; + nvm->type = e1000_nvm_eeprom_spi; + } else { + nvm->type = e1000_nvm_flash_hw; + } /* Function Pointers */ nvm->ops.acquire = e1000_acquire_nvm_82575; nvm->ops.release = e1000_release_nvm_82575; @@ -316,7 +345,7 @@ s32 e1000_init_nvm_params_82575(struct e nvm->ops.update = e1000_update_nvm_checksum_generic; nvm->ops.valid_led_default = e1000_valid_led_default_82575; - /* override genric family function pointers for specific descendants */ + /* override generic family function pointers for specific descendants */ switch (hw->mac.type) { case e1000_82580: nvm->ops.validate = e1000_validate_nvm_checksum_82580; @@ -368,8 +397,7 @@ static s32 e1000_init_mac_params_82575(s mac->has_fwsm = TRUE; /* ARC supported; valid only if manageability features are enabled. */ mac->arc_subsystem_valid = - (E1000_READ_REG(hw, E1000_FWSM) & E1000_FWSM_MODE_MASK) - ? TRUE : FALSE; + !!(E1000_READ_REG(hw, E1000_FWSM) & E1000_FWSM_MODE_MASK); /* Function pointers */ @@ -394,8 +422,6 @@ static s32 e1000_init_mac_params_82575(s mac->ops.power_up_serdes = e1000_power_up_serdes_link_82575; /* check for link */ mac->ops.check_for_link = e1000_check_for_link_82575; - /* receive address register setting */ - mac->ops.rar_set = e1000_rar_set_generic; /* read mac address */ mac->ops.read_mac_addr = e1000_read_mac_addr_82575; /* configure collision distance */ @@ -428,6 +454,13 @@ static s32 e1000_init_mac_params_82575(s mac->ops.clear_hw_cntrs = e1000_clear_hw_cntrs_82575; /* link info */ mac->ops.get_link_up_info = e1000_get_link_up_info_82575; + /* acquire SW_FW sync */ + mac->ops.acquire_swfw_sync = e1000_acquire_swfw_sync_82575; + mac->ops.release_swfw_sync = e1000_release_swfw_sync_82575; + if (mac->type >= e1000_i210) { + mac->ops.acquire_swfw_sync = e1000_acquire_swfw_sync_i210; + mac->ops.release_swfw_sync = e1000_release_swfw_sync_i210; + } /* set lan id for port to determine which phy lock to use */ hw->mac.ops.set_lan_id(hw); @@ -470,7 +503,7 @@ static s32 e1000_acquire_phy_82575(struc else if (hw->bus.func == E1000_FUNC_3) mask = E1000_SWFW_PHY3_SM; - return e1000_acquire_swfw_sync_82575(hw, mask); + return hw->mac.ops.acquire_swfw_sync(hw, mask); } /** @@ -492,7 +525,7 @@ static void e1000_release_phy_82575(stru else if (hw->bus.func == E1000_FUNC_3) mask = E1000_SWFW_PHY3_SM; - e1000_release_swfw_sync_82575(hw, mask); + hw->mac.ops.release_swfw_sync(hw, mask); } /** @@ -796,7 +829,7 @@ static s32 e1000_set_d0_lplu_state_82580 { struct e1000_phy_info *phy = &hw->phy; s32 ret_val = E1000_SUCCESS; - u16 data; + u32 data; DEBUGFUNC("e1000_set_d0_lplu_state_82580"); @@ -844,7 +877,7 @@ s32 e1000_set_d3_lplu_state_82580(struct { struct e1000_phy_info *phy = &hw->phy; s32 ret_val = E1000_SUCCESS; - u16 data; + u32 data; DEBUGFUNC("e1000_set_d3_lplu_state_82580"); @@ -918,11 +951,7 @@ static s32 e1000_acquire_nvm_82575(struc } - switch (hw->mac.type) { - default: - ret_val = e1000_acquire_nvm_generic(hw); - } - + ret_val = e1000_acquire_nvm_generic(hw); if (ret_val) e1000_release_swfw_sync_82575(hw, E1000_SWFW_EEP_SM); @@ -941,10 +970,8 @@ static void e1000_release_nvm_82575(stru { DEBUGFUNC("e1000_release_nvm_82575"); - switch (hw->mac.type) { - default: - e1000_release_nvm_generic(hw); - } + e1000_release_nvm_generic(hw); + e1000_release_swfw_sync_82575(hw, E1000_SWFW_EEP_SM); } @@ -1058,7 +1085,7 @@ static s32 e1000_get_cfg_done_82575(stru DEBUGOUT("MNG configuration cycle has not completed.\n"); /* If EEPROM is not marked present, init the PHY manually */ - if (((E1000_READ_REG(hw, E1000_EECD) & E1000_EECD_PRES) == 0) && + if (!(E1000_READ_REG(hw, E1000_EECD) & E1000_EECD_PRES) && (hw->phy.type == e1000_phy_igp_3)) e1000_phy_init_script_igp3(hw); @@ -1115,6 +1142,7 @@ static s32 e1000_check_for_link_82575(st * continue to check for link. */ hw->mac.get_link_status = !hw->mac.serdes_has_link; + } else { ret_val = e1000_check_for_copper_link_generic(hw); } @@ -1168,11 +1196,6 @@ static s32 e1000_get_pcs_speed_and_duple DEBUGFUNC("e1000_get_pcs_speed_and_duplex_82575"); - /* Set up defaults for the return values of this function */ - mac->serdes_has_link = FALSE; - *speed = 0; - *duplex = 0; - /* * Read the PCS Status register for link state. For non-copper mode, * the status register is not accurate. The PCS status register is @@ -1181,11 +1204,9 @@ static s32 e1000_get_pcs_speed_and_duple pcs = E1000_READ_REG(hw, E1000_PCS_LSTAT); /* - * The link up bit determines when link is up on autoneg. The sync ok - * gets set once both sides sync up and agree upon link. Stable link - * can be determined by checking for both link up and link sync ok + * The link up bit determines when link is up on autoneg. */ - if ((pcs & E1000_PCS_LSTS_LINK_OK) && (pcs & E1000_PCS_LSTS_SYNK_OK)) { + if (pcs & E1000_PCS_LSTS_LINK_OK) { mac->serdes_has_link = TRUE; /* Detect and store PCS speed */ @@ -1201,6 +1222,10 @@ static s32 e1000_get_pcs_speed_and_duple *duplex = FULL_DUPLEX; else *duplex = HALF_DUPLEX; + } else { + mac->serdes_has_link = FALSE; + *speed = 0; + *duplex = 0; } return E1000_SUCCESS; @@ -1293,7 +1318,7 @@ static s32 e1000_reset_hw_82575(struct e } /* If EEPROM is not present, run manual init scripts */ - if ((E1000_READ_REG(hw, E1000_EECD) & E1000_EECD_PRES) == 0) + if (!(E1000_READ_REG(hw, E1000_EECD) & E1000_EECD_PRES)) e1000_reset_init_script_82575(hw); /* Clear any pending interrupt events. */ @@ -1396,6 +1421,7 @@ static s32 e1000_setup_copper_link_82575 } } switch (hw->phy.type) { + case e1000_phy_i210: case e1000_phy_m88: if (hw->phy.id == I347AT4_E_PHY_ID || hw->phy.id == M88E1112_E_PHY_ID || @@ -1605,31 +1631,28 @@ static s32 e1000_get_media_type_82575(st } /* Read Init Control Word #3*/ hw->nvm.ops.read(hw, init_ctrl_wd_3_offset, 1, &init_ctrl_wd_3); + + /* + * Align link mode bits to + * their CTRL_EXT location. + */ current_link_mode = init_ctrl_wd_3; + current_link_mode <<= (E1000_CTRL_EXT_LINK_MODE_OFFSET - + init_ctrl_wd_3_bit_offset); + current_link_mode &= E1000_CTRL_EXT_LINK_MODE_MASK; + /* * Switch to CSR for all but internal PHY. */ - if ((init_ctrl_wd_3 << (E1000_CTRL_EXT_LINK_MODE_OFFSET - - init_ctrl_wd_3_bit_offset)) != - E1000_CTRL_EXT_LINK_MODE_GMII) { - current_link_mode = ctrl_ext; - init_ctrl_wd_3_bit_offset = - E1000_CTRL_EXT_LINK_MODE_OFFSET; - } + if (current_link_mode != E1000_CTRL_EXT_LINK_MODE_GMII) + /* Take link mode from CSR */ + current_link_mode = ctrl_ext & + E1000_CTRL_EXT_LINK_MODE_MASK; } else { /* Take link mode from CSR */ - current_link_mode = ctrl_ext; - init_ctrl_wd_3_bit_offset = E1000_CTRL_EXT_LINK_MODE_OFFSET; + current_link_mode = ctrl_ext & E1000_CTRL_EXT_LINK_MODE_MASK; } - /* - * Align link mode bits to - * their CTRL_EXT location. - */ - current_link_mode <<= (E1000_CTRL_EXT_LINK_MODE_OFFSET - - init_ctrl_wd_3_bit_offset); - current_link_mode &= E1000_CTRL_EXT_LINK_MODE_MASK; - switch (current_link_mode) { case E1000_CTRL_EXT_LINK_MODE_1000BASE_KX: @@ -2331,7 +2354,7 @@ static s32 e1000_reset_hw_82580(struct e msec_delay(10); /* Determine whether or not a global dev reset is requested */ - if (global_device_reset && e1000_acquire_swfw_sync_82575(hw, + if (global_device_reset && hw->mac.ops.acquire_swfw_sync(hw, swmbsw_mask)) global_device_reset = FALSE; @@ -2359,7 +2382,7 @@ static s32 e1000_reset_hw_82580(struct e } /* If EEPROM is not present, run manual init scripts */ - if ((E1000_READ_REG(hw, E1000_EECD) & E1000_EECD_PRES) == 0) + if (!(E1000_READ_REG(hw, E1000_EECD) & E1000_EECD_PRES)) e1000_reset_init_script_82575(hw); /* clear global device reset status bit */ @@ -2378,7 +2401,7 @@ static s32 e1000_reset_hw_82580(struct e /* Release semaphore */ if (global_device_reset) - e1000_release_swfw_sync_82575(hw, swmbsw_mask); + hw->mac.ops.release_swfw_sync(hw, swmbsw_mask); return ret_val; } @@ -2538,7 +2561,7 @@ static s32 e1000_update_nvm_checksum_825 goto out; } - if ((nvm_data & NVM_COMPATIBILITY_BIT_MASK) == 0) { + if (!(nvm_data & NVM_COMPATIBILITY_BIT_MASK)) { /* set compatibility bit to validate checksums appropriately */ nvm_data = nvm_data | NVM_COMPATIBILITY_BIT_MASK; ret_val = hw->nvm.ops.write(hw, NVM_COMPATIBILITY_REG_3, 1, @@ -2737,6 +2760,7 @@ s32 e1000_set_i2c_bb(struct e1000_hw *hw * e1000_read_i2c_byte_generic - Reads 8 bit word over I2C * @hw: pointer to hardware structure * @byte_offset: byte offset to read + * @dev_addr: device address * @data: value read * * Performs byte read operation over I2C interface at @@ -2750,14 +2774,14 @@ s32 e1000_read_i2c_byte_generic(struct e u32 retry = 1; u16 swfw_mask = 0; - bool nack = 1; + bool nack = TRUE; DEBUGFUNC("e1000_read_i2c_byte_generic"); swfw_mask = E1000_SWFW_PHY0_SM; do { - if (e1000_acquire_swfw_sync_82575(hw, swfw_mask) + if (hw->mac.ops.acquire_swfw_sync(hw, swfw_mask) != E1000_SUCCESS) { status = E1000_ERR_SWFW_SYNC; goto read_byte_out; @@ -2805,7 +2829,7 @@ s32 e1000_read_i2c_byte_generic(struct e break; fail: - e1000_release_swfw_sync_82575(hw, swfw_mask); + hw->mac.ops.release_swfw_sync(hw, swfw_mask); msec_delay(100); e1000_i2c_bus_clear(hw); retry++; @@ -2816,7 +2840,7 @@ fail: } while (retry < max_retry); - e1000_release_swfw_sync_82575(hw, swfw_mask); + hw->mac.ops.release_swfw_sync(hw, swfw_mask); read_byte_out: @@ -2827,6 +2851,7 @@ read_byte_out: * e1000_write_i2c_byte_generic - Writes 8 bit word over I2C * @hw: pointer to hardware structure * @byte_offset: byte offset to write + * @dev_addr: device address * @data: value to write * * Performs byte write operation over I2C interface at @@ -2844,7 +2869,7 @@ s32 e1000_write_i2c_byte_generic(struct swfw_mask = E1000_SWFW_PHY0_SM; - if (e1000_acquire_swfw_sync_82575(hw, swfw_mask) != E1000_SUCCESS) { + if (hw->mac.ops.acquire_swfw_sync(hw, swfw_mask) != E1000_SUCCESS) { status = E1000_ERR_SWFW_SYNC; goto write_byte_out; } @@ -2888,7 +2913,7 @@ fail: DEBUGOUT("I2C byte write error.\n"); } while (retry < max_retry); - e1000_release_swfw_sync_82575(hw, swfw_mask); + hw->mac.ops.release_swfw_sync(hw, swfw_mask); write_byte_out: @@ -3020,7 +3045,7 @@ static s32 e1000_get_i2c_ack(struct e100 u32 i = 0; u32 i2cctl = E1000_READ_REG(hw, E1000_I2CPARAMS); u32 timeout = 10; - bool ack = 1; + bool ack = TRUE; DEBUGFUNC("e1000_get_i2c_ack"); @@ -3040,7 +3065,7 @@ static s32 e1000_get_i2c_ack(struct e100 return E1000_ERR_I2C; ack = e1000_get_i2c_data(&i2cctl); - if (ack == 1) { + if (ack) { DEBUGOUT("I2C ack was not received.\n"); status = E1000_ERR_I2C; } Modified: head/sys/dev/e1000/e1000_api.c ============================================================================== --- head/sys/dev/e1000/e1000_api.c Thu Jul 5 20:21:13 2012 (r238147) +++ head/sys/dev/e1000/e1000_api.c Thu Jul 5 20:26:57 2012 (r238148) @@ -1,6 +1,6 @@ /****************************************************************************** - Copyright (c) 2001-2011, Intel Corporation + Copyright (c) 2001-2012, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without @@ -323,6 +323,17 @@ s32 e1000_set_mac_type(struct e1000_hw * case E1000_DEV_ID_I350_DA4: mac->type = e1000_i350; break; + case E1000_DEV_ID_I210_COPPER: + case E1000_DEV_ID_I210_COPPER_OEM1: + case E1000_DEV_ID_I210_COPPER_IT: + case E1000_DEV_ID_I210_FIBER: + case E1000_DEV_ID_I210_SERDES: + case E1000_DEV_ID_I210_SGMII: + mac->type = e1000_i210; + break; + case E1000_DEV_ID_I211_COPPER: + mac->type = e1000_i211; + break; case E1000_DEV_ID_82576_VF: mac->type = e1000_vfadapt; break; @@ -425,6 +436,10 @@ s32 e1000_setup_init_funcs(struct e1000_ case e1000_i350: e1000_init_function_pointers_82575(hw); break; + case e1000_i210: + case e1000_i211: + e1000_init_function_pointers_i210(hw); + break; case e1000_vfadapt: e1000_init_function_pointers_vf(hw); break; Modified: head/sys/dev/e1000/e1000_api.h ============================================================================== --- head/sys/dev/e1000/e1000_api.h Thu Jul 5 20:21:13 2012 (r238147) +++ head/sys/dev/e1000/e1000_api.h Thu Jul 5 20:26:57 2012 (r238148) @@ -1,6 +1,6 @@ /****************************************************************************** - Copyright (c) 2001-2011, Intel Corporation + Copyright (c) 2001-2012, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without @@ -49,6 +49,7 @@ extern void e1000_rx_fifo_flush_82575(st extern void e1000_init_function_pointers_vf(struct e1000_hw *hw); extern void e1000_power_up_fiber_serdes_link(struct e1000_hw *hw); extern void e1000_shutdown_fiber_serdes_link(struct e1000_hw *hw); +extern void e1000_init_function_pointers_i210(struct e1000_hw *hw); s32 e1000_set_mac_type(struct e1000_hw *hw); s32 e1000_setup_init_funcs(struct e1000_hw *hw, bool init_device); @@ -118,6 +119,7 @@ s32 e1000_mng_write_dhcp_info(struct e10 u32 e1000_translate_register_82542(u32 reg); + /* * TBI_ACCEPT macro definition: * Modified: head/sys/dev/e1000/e1000_defines.h ============================================================================== --- head/sys/dev/e1000/e1000_defines.h Thu Jul 5 20:21:13 2012 (r238147) +++ head/sys/dev/e1000/e1000_defines.h Thu Jul 5 20:26:57 2012 (r238148) @@ -1,6 +1,6 @@ /****************************************************************************** - Copyright (c) 2001-2011, Intel Corporation + Copyright (c) 2001-2012, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without @@ -1344,6 +1344,16 @@ #define E1000_EECD_SEC1VAL 0x00400000 /* Sector One Valid */ #define E1000_EECD_SECVAL_SHIFT 22 #define E1000_EECD_SEC1VAL_VALID_MASK (E1000_EECD_AUTO_RD | E1000_EECD_PRES) +#define E1000_EECD_FLUPD_I210 0x00800000 /* Update FLASH */ +#define E1000_EECD_FLUDONE_I210 0x04000000 /* Update FLASH done */ +#define E1000_EECD_FLASH_DETECTED_I210 0x00080000 /* FLASH detected */ +#define E1000_FLUDONE_ATTEMPTS 20000 +#define E1000_EERD_EEWR_MAX_COUNT 512 /* buffered EEPROM words rw */ +#define E1000_I210_FIFO_SEL_RX 0x00 +#define E1000_I210_FIFO_SEL_TX_QAV(_i) (0x02 + (_i)) +#define E1000_I210_FIFO_SEL_TX_LEGACY E1000_I210_FIFO_SEL_TX_QAV(0) +#define E1000_I210_FIFO_SEL_BMC2OS_TX 0x06 +#define E1000_I210_FIFO_SEL_BMC2OS_RX 0x01 #define E1000_NVM_SWDPIN0 0x0001 /* SWDPIN 0 NVM Value */ #define E1000_NVM_LED_LOGIC 0x0020 /* Led Logic Word */ @@ -1361,6 +1371,20 @@ #define NVM_VERSION 0x0005 #define NVM_SERDES_AMPLITUDE 0x0006 /* SERDES output amplitude */ #define NVM_PHY_CLASS_WORD 0x0007 +#define NVM_ETRACK_WORD 0x0042 +#define NVM_COMB_VER_OFF 0x0083 +#define NVM_COMB_VER_PTR 0x003d + +#define NVM_MAC_ADDR 0x0000 +#define NVM_SUB_DEV_ID 0x000B +#define NVM_SUB_VEN_ID 0x000C +#define NVM_DEV_ID 0x000D +#define NVM_VEN_ID 0x000E +#define NVM_INIT_CTRL_2 0x000F +#define NVM_INIT_CTRL_4 0x0013 +#define NVM_LED_1_CFG 0x001C +#define NVM_LED_0_2_CFG 0x001F + #define NVM_INIT_CONTROL1_REG 0x000A #define NVM_INIT_CONTROL2_REG 0x000F #define NVM_SWDEF_PINS_CTRL_PORT_1 0x0010 @@ -1380,12 +1404,12 @@ #define E1000_NVM_CFG_DONE_PORT_2 0x100000 /* ...for third port */ #define E1000_NVM_CFG_DONE_PORT_3 0x200000 /* ...for fourth port */ -#define NVM_82580_LAN_FUNC_OFFSET(a) (a ? (0x40 + (0x40 * a)) : 0) +#define NVM_82580_LAN_FUNC_OFFSET(a) ((a) ? (0x40 + (0x40 * (a))) : 0) /* Mask bits for fields in Word 0x24 of the NVM */ #define NVM_WORD24_COM_MDIO 0x0008 /* MDIO interface shared */ #define NVM_WORD24_EXT_MDIO 0x0004 /* MDIO accesses routed extrnl */ -/* Offset of Link Mode bits for 82575 up to Kawela */ +/* Offset of Link Mode bits for 82575/82576 */ #define NVM_WORD24_LNK_MODE_OFFSET 8 /* Offset of Link Mode bits for 82580 up */ #define NVM_WORD24_82580_LNK_MODE_OFFSET 4 @@ -1525,6 +1549,7 @@ #define I82579_E_PHY_ID 0x01540090 #define I82580_I_PHY_ID 0x015403A0 #define I350_I_PHY_ID 0x015403B0 +#define I210_I_PHY_ID 0x01410C00 #define IGP04E1000_E_PHY_ID 0x02A80391 #define M88_VENDOR 0x0141 @@ -1787,6 +1812,8 @@ #define E1000_DMACR_DMAC_LX_MASK 0x30000000 #define E1000_DMACR_DMAC_LX_SHIFT 28 #define E1000_DMACR_DMAC_EN 0x80000000 /* Enable DMA Coalescing */ +/* DMA Coalescing BMC-to-OS Watchdog Enable */ +#define E1000_DMACR_DC_BMC2OSW_EN 0x00008000 /* DMA Coalescing Transmit Threshold */ #define E1000_DMCTXTH_DMCTTHR_MASK 0x00000FFF @@ -1807,8 +1834,9 @@ /* Lx power decision based on DMA coal */ #define E1000_PCIEMISC_LX_DECISION 0x00000080 -#define E1000_LTRC_EEEMS_EN 0x00000005 /* Enable EEE LTR max send */ #define E1000_RXPBS_SIZE_I210_MASK 0x0000003F /* Rx packet buffer size */ +#define E1000_TXPB0S_SIZE_I210_MASK 0x0000003F /* Tx packet buffer 0 size */ +#define E1000_LTRC_EEEMS_EN 0x00000020 /* Enable EEE LTR max send */ /* Minimum time for 1000BASE-T where no data will be transmit following move out * of EEE LPI Tx state */ @@ -1826,12 +1854,14 @@ #define E1000_LTRMINV_SCALE_1024 2 /* Reg val to set scale to 32768 nsec */ #define E1000_LTRMINV_SCALE_32768 3 +#define E1000_LTRMINV_LSNP_REQ 0x00008000 /* LTR Snoop Requirement */ #define E1000_LTRMAXV_SCALE_MASK 0x00001C00 /* LTR maximum scale */ #define E1000_LTRMAXV_SCALE_SHIFT 10 /* Reg val to set scale to 1024 nsec */ #define E1000_LTRMAXV_SCALE_1024 2 /* Reg val to set scale to 32768 nsec */ #define E1000_LTRMAXV_SCALE_32768 3 +#define E1000_LTRMAXV_LSNP_REQ 0x00008000 /* LTR Snoop Requirement */ #define E1000_DOBFFCTL_OBFFTHR_MASK 0x000000FF /* OBFF threshold */ #define E1000_DOBFFCTL_EXIT_ACT_MASK 0x01000000 /* Exit active CB */ Modified: head/sys/dev/e1000/e1000_hw.h ============================================================================== --- head/sys/dev/e1000/e1000_hw.h Thu Jul 5 20:21:13 2012 (r238147) +++ head/sys/dev/e1000/e1000_hw.h Thu Jul 5 20:26:57 2012 (r238148) @@ -1,6 +1,6 @@ /****************************************************************************** - Copyright (c) 2001-2011, Intel Corporation + Copyright (c) 2001-2012, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without @@ -154,6 +154,13 @@ struct e1000_hw; #define E1000_DEV_ID_I350_SERDES 0x1523 #define E1000_DEV_ID_I350_SGMII 0x1524 #define E1000_DEV_ID_I350_DA4 0x1546 +#define E1000_DEV_ID_I210_COPPER 0x1533 +#define E1000_DEV_ID_I210_COPPER_OEM1 0x1534 +#define E1000_DEV_ID_I210_COPPER_IT 0x1535 +#define E1000_DEV_ID_I210_FIBER 0x1536 +#define E1000_DEV_ID_I210_SERDES 0x1537 +#define E1000_DEV_ID_I210_SGMII 0x1538 +#define E1000_DEV_ID_I211_COPPER 0x1539 #define E1000_DEV_ID_DH89XXCC_SGMII 0x0438 #define E1000_DEV_ID_DH89XXCC_SERDES 0x043A #define E1000_DEV_ID_DH89XXCC_BACKPLANE 0x043C @@ -203,6 +210,8 @@ enum e1000_mac_type { e1000_82576, e1000_82580, e1000_i350, + e1000_i210, + e1000_i211, e1000_vfadapt, e1000_vfadapt_i350, e1000_num_macs /* List is 1-based, so subtract 1 for TRUE count. */ @@ -248,6 +257,7 @@ enum e1000_phy_type { e1000_phy_82579, e1000_phy_82580, e1000_phy_vf, + e1000_phy_i210, }; enum e1000_bus_type { @@ -674,6 +684,8 @@ struct e1000_mac_operations { struct e1000_host_mng_command_header*); s32 (*mng_enable_host_if)(struct e1000_hw *); s32 (*wait_autoneg)(struct e1000_hw *); + s32 (*acquire_swfw_sync)(struct e1000_hw *, u16); + void (*release_swfw_sync)(struct e1000_hw *, u16); }; /* @@ -911,13 +923,13 @@ struct e1000_dev_spec_ich8lan { E1000_MUTEX nvm_mutex; E1000_MUTEX swflag_mutex; bool nvm_k1_enabled; - int eee_disable; + bool eee_disable; }; struct e1000_dev_spec_82575 { bool sgmii_active; bool global_device_reset; - int eee_disable; + bool eee_disable; bool module_plugged; u32 mtu; }; @@ -967,6 +979,7 @@ struct e1000_hw { #include "e1000_80003es2lan.h" #include "e1000_ich8lan.h" #include "e1000_82575.h" +#include "e1000_i210.h" /* These functions must be implemented by drivers */ void e1000_pci_clear_mwi(struct e1000_hw *hw); Added: head/sys/dev/e1000/e1000_i210.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/e1000/e1000_i210.c Thu Jul 5 20:26:57 2012 (r238148) @@ -0,0 +1,740 @@ +/****************************************************************************** + + Copyright (c) 2001-2012, Intel Corporation + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + 3. Neither the name of the Intel Corporation nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +******************************************************************************/ +/*$FreeBSD$*/ + +#include "e1000_api.h" + + +static s32 e1000_acquire_nvm_i210(struct e1000_hw *hw); +static void e1000_release_nvm_i210(struct e1000_hw *hw); +static s32 e1000_get_hw_semaphore_i210(struct e1000_hw *hw); +static void e1000_put_hw_semaphore_i210(struct e1000_hw *hw); +static s32 e1000_write_nvm_srwr(struct e1000_hw *hw, u16 offset, u16 words, + u16 *data); +static s32 e1000_pool_flash_update_done_i210(struct e1000_hw *hw); +static s32 e1000_valid_led_default_i210(struct e1000_hw *hw, u16 *data); +static s32 e1000_read_nvm_i211(struct e1000_hw *hw, u16 offset, u16 words, + u16 *data); + +/** + * e1000_acquire_nvm_i210 - Request for access to EEPROM + * @hw: pointer to the HW structure + * + * Acquire the necessary semaphores for exclusive access to the EEPROM. + * Set the EEPROM access request bit and wait for EEPROM access grant bit. + * Return successful if access grant bit set, else clear the request for + * EEPROM access and return -E1000_ERR_NVM (-1). + **/ +static s32 e1000_acquire_nvm_i210(struct e1000_hw *hw) +{ + s32 ret_val; + + DEBUGFUNC("e1000_acquire_nvm_i210"); + + ret_val = e1000_acquire_swfw_sync_i210(hw, E1000_SWFW_EEP_SM); + + return ret_val; +} + +/** + * e1000_release_nvm_i210 - Release exclusive access to EEPROM + * @hw: pointer to the HW structure + * + * Stop any current commands to the EEPROM and clear the EEPROM request bit, + * then release the semaphores acquired. + **/ +static void e1000_release_nvm_i210(struct e1000_hw *hw) +{ + DEBUGFUNC("e1000_release_nvm_i210"); + + e1000_release_swfw_sync_i210(hw, E1000_SWFW_EEP_SM); +} + +/** + * e1000_acquire_swfw_sync_i210 - Acquire SW/FW semaphore + * @hw: pointer to the HW structure + * @mask: specifies which semaphore to acquire + * + * Acquire the SW/FW semaphore to access the PHY or NVM. The mask + * will also specify which port we're acquiring the lock for. + **/ +s32 e1000_acquire_swfw_sync_i210(struct e1000_hw *hw, u16 mask) +{ + u32 swfw_sync; + u32 swmask = mask; + u32 fwmask = mask << 16; + s32 ret_val = E1000_SUCCESS; + s32 i = 0, timeout = 200; /* FIXME: find real value to use here */ + + DEBUGFUNC("e1000_acquire_swfw_sync_i210"); + + while (i < timeout) { + if (e1000_get_hw_semaphore_i210(hw)) { + ret_val = -E1000_ERR_SWFW_SYNC; + goto out; + } + + swfw_sync = E1000_READ_REG(hw, E1000_SW_FW_SYNC); + if (!(swfw_sync & fwmask)) + break; + + /* + * Firmware currently using resource (fwmask) + */ + e1000_put_hw_semaphore_i210(hw); + msec_delay_irq(5); + i++; + } + + if (i == timeout) { + DEBUGOUT("Driver can't access resource, SW_FW_SYNC timeout.\n"); + ret_val = -E1000_ERR_SWFW_SYNC; + goto out; + } + + swfw_sync |= swmask; + E1000_WRITE_REG(hw, E1000_SW_FW_SYNC, swfw_sync); + + e1000_put_hw_semaphore_i210(hw); + +out: + return ret_val; +} + +/** + * e1000_release_swfw_sync_i210 - Release SW/FW semaphore + * @hw: pointer to the HW structure + * @mask: specifies which semaphore to acquire + * + * Release the SW/FW semaphore used to access the PHY or NVM. The mask + * will also specify which port we're releasing the lock for. + **/ +void e1000_release_swfw_sync_i210(struct e1000_hw *hw, u16 mask) +{ + u32 swfw_sync; + + DEBUGFUNC("e1000_release_swfw_sync_i210"); + + while (e1000_get_hw_semaphore_i210(hw) != E1000_SUCCESS) + ; /* Empty */ + + swfw_sync = E1000_READ_REG(hw, E1000_SW_FW_SYNC); + swfw_sync &= ~mask; + E1000_WRITE_REG(hw, E1000_SW_FW_SYNC, swfw_sync); + + e1000_put_hw_semaphore_i210(hw); +} + +/** + * e1000_get_hw_semaphore_i210 - Acquire hardware semaphore + * @hw: pointer to the HW structure + * + * Acquire the HW semaphore to access the PHY or NVM + **/ +static s32 e1000_get_hw_semaphore_i210(struct e1000_hw *hw) +{ + u32 swsm; + s32 ret_val = E1000_SUCCESS; + s32 timeout = hw->nvm.word_size + 1; + s32 i = 0; + + DEBUGFUNC("e1000_get_hw_semaphore_i210"); + + /* Get the FW semaphore. */ + for (i = 0; i < timeout; i++) { + swsm = E1000_READ_REG(hw, E1000_SWSM); + E1000_WRITE_REG(hw, E1000_SWSM, swsm | E1000_SWSM_SWESMBI); + + /* Semaphore acquired if bit latched */ + if (E1000_READ_REG(hw, E1000_SWSM) & E1000_SWSM_SWESMBI) + break; + + usec_delay(50); + } + + if (i == timeout) { + /* Release semaphores */ + e1000_put_hw_semaphore_generic(hw); + DEBUGOUT("Driver can't access the NVM\n"); + ret_val = -E1000_ERR_NVM; + goto out; + } + +out: + return ret_val; +} + +/** + * e1000_put_hw_semaphore_i210 - Release hardware semaphore + * @hw: pointer to the HW structure + * + * Release hardware semaphore used to access the PHY or NVM + **/ +static void e1000_put_hw_semaphore_i210(struct e1000_hw *hw) +{ + u32 swsm; + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu Jul 5 20:51:45 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 76A581065680; Thu, 5 Jul 2012 20:51:45 +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 5F91B8FC1D; Thu, 5 Jul 2012 20:51:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q65KpjhG017868; Thu, 5 Jul 2012 20:51:45 GMT (envelope-from jfv@svn.freebsd.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q65KpjCD017859; Thu, 5 Jul 2012 20:51:45 GMT (envelope-from jfv@svn.freebsd.org) Message-Id: <201207052051.q65KpjCD017859@svn.freebsd.org> From: Jack F Vogel Date: Thu, 5 Jul 2012 20:51:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238149 - head/sys/dev/ixgbe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jul 2012 20:51:45 -0000 Author: jfv Date: Thu Jul 5 20:51:44 2012 New Revision: 238149 URL: http://svn.freebsd.org/changeset/base/238149 Log: Update to the ixgbe driver: - Add a couple of new devices - Flow control changes in shared and core code - Bug fix to Flow Director for 82598 - Shared code sync to internal with required core change Thanks to those helping in the testing and improvements to this driver! MFC after:5 days Modified: head/sys/dev/ixgbe/ixgbe.c head/sys/dev/ixgbe/ixgbe_82598.c head/sys/dev/ixgbe/ixgbe_82598.h head/sys/dev/ixgbe/ixgbe_82599.c head/sys/dev/ixgbe/ixgbe_api.c head/sys/dev/ixgbe/ixgbe_api.h head/sys/dev/ixgbe/ixgbe_common.c head/sys/dev/ixgbe/ixgbe_common.h head/sys/dev/ixgbe/ixgbe_osdep.h head/sys/dev/ixgbe/ixgbe_phy.c head/sys/dev/ixgbe/ixgbe_type.h head/sys/dev/ixgbe/ixgbe_vf.c head/sys/dev/ixgbe/ixgbe_x540.c head/sys/dev/ixgbe/ixv.c Modified: head/sys/dev/ixgbe/ixgbe.c ============================================================================== --- head/sys/dev/ixgbe/ixgbe.c Thu Jul 5 20:26:57 2012 (r238148) +++ head/sys/dev/ixgbe/ixgbe.c Thu Jul 5 20:51:44 2012 (r238149) @@ -47,7 +47,7 @@ int ixgbe_display_debug_stat /********************************************************************* * Driver version *********************************************************************/ -char ixgbe_driver_version[] = "2.4.5"; +char ixgbe_driver_version[] = "2.4.8"; /********************************************************************* * PCI Device ID Table @@ -80,8 +80,10 @@ static ixgbe_vendor_info_t ixgbe_vendor_ {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_T3_LOM, 0, 0, 0}, {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_COMBO_BACKPLANE, 0, 0, 0}, {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_BACKPLANE_FCOE, 0, 0, 0}, + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_SFP_SF2, 0, 0, 0}, {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_SFP_FCOE, 0, 0, 0}, {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599EN_SFP, 0, 0, 0}, + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X540T1, 0, 0, 0}, {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X540T, 0, 0, 0}, /* required last entry */ {0, 0, 0, 0, 0} @@ -242,10 +244,6 @@ TUNABLE_INT("hw.ixgbe.max_interrupt_rate static int ixgbe_rx_process_limit = 128; TUNABLE_INT("hw.ixgbe.rx_process_limit", &ixgbe_rx_process_limit); -/* Flow control setting, default to full */ -static int ixgbe_flow_control = ixgbe_fc_full; -TUNABLE_INT("hw.ixgbe.flow_control", &ixgbe_flow_control); - /* ** Smart speed setting, default to on ** this only works as a compile option @@ -526,28 +524,25 @@ ixgbe_attach(device_t dev) goto err_late; } - /* Get Hardware Flow Control setting */ - hw->fc.requested_mode = ixgbe_fc_full; - adapter->fc = hw->fc.requested_mode; - hw->fc.pause_time = IXGBE_FC_PAUSE; - hw->fc.low_water = IXGBE_FC_LO; - hw->fc.high_water[0] = IXGBE_FC_HI; - hw->fc.send_xon = TRUE; - error = ixgbe_init_hw(hw); - if (error == IXGBE_ERR_EEPROM_VERSION) { + switch (error) { + case IXGBE_ERR_EEPROM_VERSION: device_printf(dev, "This device is a pre-production adapter/" "LOM. Please be aware there may be issues associated " "with your hardware.\n If you are experiencing problems " "please contact your Intel or hardware representative " "who provided you with this hardware.\n"); - } else if (error == IXGBE_ERR_SFP_NOT_SUPPORTED) + break; + case IXGBE_ERR_SFP_NOT_SUPPORTED: device_printf(dev,"Unsupported SFP+ Module\n"); - - if (error) { error = EIO; device_printf(dev,"Hardware Initialization Failure\n"); goto err_late; + case IXGBE_ERR_SFP_NOT_PRESENT: + device_printf(dev,"No SFP+ Module found\n"); + /* falls thru */ + default: + break; } /* Detect and set physical type */ @@ -1236,7 +1231,7 @@ ixgbe_init_locked(struct adapter *adapte #ifdef IXGBE_FDIR /* Init Flow director */ if (hw->mac.type != ixgbe_mac_82598EB) { - u32 hdrm = 64 << fdir_pballoc; + u32 hdrm = 32 << fdir_pballoc; hw->mac.ops.setup_rxpba(hw, 0, hdrm, PBA_STRATEGY_EQUAL); ixgbe_init_fdir_signature_82599(&adapter->hw, fdir_pballoc); @@ -1262,6 +1257,35 @@ ixgbe_init_locked(struct adapter *adapte /* Config/Enable Link */ ixgbe_config_link(adapter); + /* Hardware Packet Buffer & Flow Control setup */ + { + u32 rxpb, frame, size, tmp; + + frame = adapter->max_frame_size; + + /* Calculate High Water */ + if (hw->mac.type == ixgbe_mac_X540) + tmp = IXGBE_DV_X540(frame, frame); + else + tmp = IXGBE_DV(frame, frame); + size = IXGBE_BT2KB(tmp); + rxpb = IXGBE_READ_REG(hw, IXGBE_RXPBSIZE(0)) >> 10; + hw->fc.high_water[0] = rxpb - size; + + /* Now calculate Low Water */ + if (hw->mac.type == ixgbe_mac_X540) + tmp = IXGBE_LOW_DV_X540(frame); + else + tmp = IXGBE_LOW_DV(frame); + hw->fc.low_water[0] = IXGBE_BT2KB(tmp); + + adapter->fc = hw->fc.requested_mode = ixgbe_fc_full; + hw->fc.pause_time = IXGBE_FC_PAUSE; + hw->fc.send_xon = TRUE; + } + /* Initialize the FC settings */ + ixgbe_start_hw(hw); + /* And now turn on interrupts */ ixgbe_enable_intr(adapter); @@ -1551,10 +1575,8 @@ ixgbe_msix_link(void *arg) /* This is probably overkill :) */ if (!atomic_cmpset_int(&adapter->fdir_reinit, 0, 1)) return; - /* Clear the interrupt */ - IXGBE_WRITE_REG(hw, IXGBE_EICR, IXGBE_EICR_FLOW_DIR); - /* Turn off the interface */ - adapter->ifp->if_drv_flags &= ~IFF_DRV_RUNNING; + /* Disable the interrupt */ + IXGBE_WRITE_REG(hw, IXGBE_EIMC, IXGBE_EICR_FLOW_DIR); taskqueue_enqueue(adapter->tq, &adapter->fdir_task); } else #endif @@ -2056,6 +2078,8 @@ ixgbe_update_link_status(struct adapter ((adapter->link_speed == 128)? 10:1), "Full Duplex"); adapter->link_active = TRUE; + /* Update any Flow Control changes */ + ixgbe_fc_enable(&adapter->hw); if_link_state_change(ifp, LINK_STATE_UP); } } else { /* Link down */ @@ -3063,7 +3087,7 @@ ixgbe_initialize_transmit_units(struct a txctrl = IXGBE_READ_REG(hw, IXGBE_DCA_TXCTRL_82599(i)); break; } - txctrl &= ~IXGBE_DCA_TXCTRL_TX_WB_RO_EN; + txctrl &= ~IXGBE_DCA_TXCTRL_DESC_WRO_EN; switch (hw->mac.type) { case ixgbe_mac_82598EB: IXGBE_WRITE_REG(hw, IXGBE_DCA_TXCTRL(i), txctrl); @@ -5095,6 +5119,8 @@ ixgbe_reinit_fdir(void *context, int pen return; ixgbe_reinit_fdir_tables_82599(&adapter->hw); adapter->fdir_reinit = 0; + /* re-enable flow director interrupts */ + IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIMS, IXGBE_EIMS_FLOW_DIR); /* Restart the interface */ ifp->if_drv_flags |= IFF_DRV_RUNNING; return; @@ -5652,8 +5678,9 @@ ixgbe_set_flowcntl(SYSCTL_HANDLER_ARGS) default: adapter->hw.fc.requested_mode = ixgbe_fc_none; } - - ixgbe_fc_enable(&adapter->hw, 0); + /* Don't autoneg if forcing a value */ + adapter->hw.fc.disable_fc_autoneg = TRUE; + ixgbe_fc_enable(&adapter->hw); return error; } @@ -5669,9 +5696,9 @@ ixgbe_add_rx_process_limit(struct adapte /* ** Control link advertise speed: -** 0 - normal ** 1 - advertise only 1G ** 2 - advertise 100Mb +** 3 - advertise normal */ static int ixgbe_set_advertise(SYSCTL_HANDLER_ARGS) @@ -5685,13 +5712,15 @@ ixgbe_set_advertise(SYSCTL_HANDLER_ARGS) adapter = (struct adapter *) arg1; dev = adapter->dev; hw = &adapter->hw; - last = hw->phy.autoneg_advertised; + last = adapter->advertise; error = sysctl_handle_int(oidp, &adapter->advertise, 0, req); - if ((error) || (adapter->advertise == -1)) return (error); + if (adapter->advertise == last) /* no change */ + return (0); + if (!((hw->phy.media_type == ixgbe_media_type_copper) || (hw->phy.multispeed_fiber))) return (error); @@ -5705,11 +5734,10 @@ ixgbe_set_advertise(SYSCTL_HANDLER_ARGS) speed = IXGBE_LINK_SPEED_1GB_FULL; else if (adapter->advertise == 2) speed = IXGBE_LINK_SPEED_100_FULL; - else + else if (adapter->advertise == 3) speed = IXGBE_LINK_SPEED_1GB_FULL | IXGBE_LINK_SPEED_10GB_FULL; - - if (speed == last) /* no change */ + else /* bogus value */ return (error); hw->mac.autotry_restart = TRUE; Modified: head/sys/dev/ixgbe/ixgbe_82598.c ============================================================================== --- head/sys/dev/ixgbe/ixgbe_82598.c Thu Jul 5 20:26:57 2012 (r238148) +++ head/sys/dev/ixgbe/ixgbe_82598.c Thu Jul 5 20:51:44 2012 (r238149) @@ -104,31 +104,6 @@ out: } /** - * ixgbe_get_pcie_msix_count_82598 - Gets MSI-X vector count - * @hw: pointer to hardware structure - * - * Read PCIe configuration space, and get the MSI-X vector count from - * the capabilities table. - **/ -u32 ixgbe_get_pcie_msix_count_82598(struct ixgbe_hw *hw) -{ - u32 msix_count = 18; - - DEBUGFUNC("ixgbe_get_pcie_msix_count_82598"); - - if (hw->mac.msix_vectors_from_pcie) { - msix_count = IXGBE_READ_PCIE_WORD(hw, - IXGBE_PCIE_MSIX_82598_CAPS); - msix_count &= IXGBE_PCIE_MSIX_TBL_SZ_MASK; - - /* MSI-X count is zero-based in HW, so increment to give - * proper value */ - msix_count++; - } - return msix_count; -} - -/** * ixgbe_init_ops_82598 - Inits func ptrs and MAC type * @hw: pointer to hardware structure * @@ -176,7 +151,7 @@ s32 ixgbe_init_ops_82598(struct ixgbe_hw mac->rx_pb_size = 512; mac->max_tx_queues = 32; mac->max_rx_queues = 64; - mac->max_msix_vectors = ixgbe_get_pcie_msix_count_82598(hw); + mac->max_msix_vectors = ixgbe_get_pcie_msix_count_generic(hw); /* SFP+ Module */ phy->ops.read_i2c_eeprom = &ixgbe_read_i2c_eeprom_82598; @@ -280,15 +255,15 @@ s32 ixgbe_start_hw_82598(struct ixgbe_hw for (i = 0; ((i < hw->mac.max_tx_queues) && (i < IXGBE_DCA_MAX_QUEUES_82598)); i++) { regval = IXGBE_READ_REG(hw, IXGBE_DCA_TXCTRL(i)); - regval &= ~IXGBE_DCA_TXCTRL_TX_WB_RO_EN; + regval &= ~IXGBE_DCA_TXCTRL_DESC_WRO_EN; IXGBE_WRITE_REG(hw, IXGBE_DCA_TXCTRL(i), regval); } for (i = 0; ((i < hw->mac.max_rx_queues) && (i < IXGBE_DCA_MAX_QUEUES_82598)); i++) { regval = IXGBE_READ_REG(hw, IXGBE_DCA_RXCTRL(i)); - regval &= ~(IXGBE_DCA_RXCTRL_DESC_WRO_EN | - IXGBE_DCA_RXCTRL_DESC_HSRO_EN); + regval &= ~(IXGBE_DCA_RXCTRL_DATA_WRO_EN | + IXGBE_DCA_RXCTRL_HEAD_WRO_EN); IXGBE_WRITE_REG(hw, IXGBE_DCA_RXCTRL(i), regval); } @@ -416,21 +391,41 @@ out: /** * ixgbe_fc_enable_82598 - Enable flow control * @hw: pointer to hardware structure - * @packetbuf_num: packet buffer number (0-7) * * Enable flow control according to the current settings. **/ -s32 ixgbe_fc_enable_82598(struct ixgbe_hw *hw, s32 packetbuf_num) +s32 ixgbe_fc_enable_82598(struct ixgbe_hw *hw) { s32 ret_val = IXGBE_SUCCESS; u32 fctrl_reg; u32 rmcs_reg; u32 reg; + u32 fcrtl, fcrth; u32 link_speed = 0; + int i; bool link_up; DEBUGFUNC("ixgbe_fc_enable_82598"); + /* Validate the water mark configuration */ + if (!hw->fc.pause_time) { + ret_val = IXGBE_ERR_INVALID_LINK_SETTINGS; + goto out; + } + + /* Low water mark of zero causes XOFF floods */ + for (i = 0; i < IXGBE_DCB_MAX_TRAFFIC_CLASS; i++) { + if ((hw->fc.current_mode & ixgbe_fc_tx_pause) && + hw->fc.high_water[i]) { + if (!hw->fc.low_water[i] || + hw->fc.low_water[i] >= hw->fc.high_water[i]) { + DEBUGOUT("Invalid water mark configuration\n"); + ret_val = IXGBE_ERR_INVALID_LINK_SETTINGS; + goto out; + } + } + } + /* * On 82598 having Rx FC on causes resets while doing 1G * so if it's on turn it off once we know link_speed. For @@ -452,9 +447,7 @@ s32 ixgbe_fc_enable_82598(struct ixgbe_h } /* Negotiate the fc mode to use */ - ret_val = ixgbe_fc_autoneg(hw); - if (ret_val == IXGBE_ERR_FLOW_CONTROL) - goto out; + ixgbe_fc_autoneg(hw); /* Disable any previous flow control settings */ fctrl_reg = IXGBE_READ_REG(hw, IXGBE_FCTRL); @@ -516,28 +509,27 @@ s32 ixgbe_fc_enable_82598(struct ixgbe_h IXGBE_WRITE_REG(hw, IXGBE_RMCS, rmcs_reg); /* Set up and enable Rx high/low water mark thresholds, enable XON. */ - if (hw->fc.current_mode & ixgbe_fc_tx_pause) { - reg = hw->fc.low_water << 6; - if (hw->fc.send_xon) - reg |= IXGBE_FCRTL_XONE; - - IXGBE_WRITE_REG(hw, IXGBE_FCRTL(packetbuf_num), reg); - - reg = hw->fc.high_water[packetbuf_num] << 6; - reg |= IXGBE_FCRTH_FCEN; + for (i = 0; i < IXGBE_DCB_MAX_TRAFFIC_CLASS; i++) { + if ((hw->fc.current_mode & ixgbe_fc_tx_pause) && + hw->fc.high_water[i]) { + fcrtl = (hw->fc.low_water[i] << 10) | IXGBE_FCRTL_XONE; + fcrth = (hw->fc.high_water[i] << 10) | IXGBE_FCRTH_FCEN; + IXGBE_WRITE_REG(hw, IXGBE_FCRTL(i), fcrtl); + IXGBE_WRITE_REG(hw, IXGBE_FCRTH(i), fcrth); + } else { + IXGBE_WRITE_REG(hw, IXGBE_FCRTL(i), 0); + IXGBE_WRITE_REG(hw, IXGBE_FCRTH(i), 0); + } - IXGBE_WRITE_REG(hw, IXGBE_FCRTH(packetbuf_num), reg); } /* Configure pause time (2 TCs per register) */ - reg = IXGBE_READ_REG(hw, IXGBE_FCTTV(packetbuf_num / 2)); - if ((packetbuf_num & 1) == 0) - reg = (reg & 0xFFFF0000) | hw->fc.pause_time; - else - reg = (reg & 0x0000FFFF) | (hw->fc.pause_time << 16); - IXGBE_WRITE_REG(hw, IXGBE_FCTTV(packetbuf_num / 2), reg); + reg = hw->fc.pause_time * 0x00010001; + for (i = 0; i < (IXGBE_DCB_MAX_TRAFFIC_CLASS / 2); i++) + IXGBE_WRITE_REG(hw, IXGBE_FCTTV(i), reg); - IXGBE_WRITE_REG(hw, IXGBE_FCRTV, (hw->fc.pause_time >> 1)); + /* Configure flow control refresh threshold value */ + IXGBE_WRITE_REG(hw, IXGBE_FCRTV, hw->fc.pause_time / 2); out: return ret_val; @@ -1325,15 +1317,15 @@ void ixgbe_enable_relaxed_ordering_82598 for (i = 0; ((i < hw->mac.max_tx_queues) && (i < IXGBE_DCA_MAX_QUEUES_82598)); i++) { regval = IXGBE_READ_REG(hw, IXGBE_DCA_TXCTRL(i)); - regval |= IXGBE_DCA_TXCTRL_TX_WB_RO_EN; + regval |= IXGBE_DCA_TXCTRL_DESC_WRO_EN; IXGBE_WRITE_REG(hw, IXGBE_DCA_TXCTRL(i), regval); } for (i = 0; ((i < hw->mac.max_rx_queues) && (i < IXGBE_DCA_MAX_QUEUES_82598)); i++) { regval = IXGBE_READ_REG(hw, IXGBE_DCA_RXCTRL(i)); - regval |= (IXGBE_DCA_RXCTRL_DESC_WRO_EN | - IXGBE_DCA_RXCTRL_DESC_HSRO_EN); + regval |= IXGBE_DCA_RXCTRL_DATA_WRO_EN | + IXGBE_DCA_RXCTRL_HEAD_WRO_EN; IXGBE_WRITE_REG(hw, IXGBE_DCA_RXCTRL(i), regval); } Modified: head/sys/dev/ixgbe/ixgbe_82598.h ============================================================================== --- head/sys/dev/ixgbe/ixgbe_82598.h Thu Jul 5 20:26:57 2012 (r238148) +++ head/sys/dev/ixgbe/ixgbe_82598.h Thu Jul 5 20:51:44 2012 (r238149) @@ -36,7 +36,7 @@ #define _IXGBE_82598_H_ u32 ixgbe_get_pcie_msix_count_82598(struct ixgbe_hw *hw); -s32 ixgbe_fc_enable_82598(struct ixgbe_hw *hw, s32 packetbuf_num); +s32 ixgbe_fc_enable_82598(struct ixgbe_hw *hw); s32 ixgbe_start_hw_82598(struct ixgbe_hw *hw); void ixgbe_enable_relaxed_ordering_82598(struct ixgbe_hw *hw); s32 ixgbe_set_vmdq_82598(struct ixgbe_hw *hw, u32 rar, u32 vmdq); Modified: head/sys/dev/ixgbe/ixgbe_82599.c ============================================================================== --- head/sys/dev/ixgbe/ixgbe_82599.c Thu Jul 5 20:26:57 2012 (r238148) +++ head/sys/dev/ixgbe/ixgbe_82599.c Thu Jul 5 20:51:44 2012 (r238149) @@ -243,6 +243,7 @@ s32 ixgbe_init_ops_82599(struct ixgbe_hw /* RAR, Multicast, VLAN */ mac->ops.set_vmdq = &ixgbe_set_vmdq_generic; + mac->ops.set_vmdq_san_mac = &ixgbe_set_vmdq_san_mac_generic; mac->ops.clear_vmdq = &ixgbe_clear_vmdq_generic; mac->ops.insert_mac_addr = &ixgbe_insert_mac_addr_generic; mac->rar_highwater = 1; @@ -304,7 +305,9 @@ s32 ixgbe_get_link_capabilities_82599(st /* Check if 1G SFP module. */ if (hw->phy.sfp_type == ixgbe_sfp_type_1g_cu_core0 || - hw->phy.sfp_type == ixgbe_sfp_type_1g_cu_core1) { + hw->phy.sfp_type == ixgbe_sfp_type_1g_cu_core1 || + hw->phy.sfp_type == ixgbe_sfp_type_1g_sx_core0 || + hw->phy.sfp_type == ixgbe_sfp_type_1g_sx_core1) { *speed = IXGBE_LINK_SPEED_1GB_FULL; *negotiation = TRUE; goto out; @@ -420,6 +423,7 @@ enum ixgbe_media_type ixgbe_get_media_ty case IXGBE_DEV_ID_82599_SFP: case IXGBE_DEV_ID_82599_SFP_FCOE: case IXGBE_DEV_ID_82599_SFP_EM: + case IXGBE_DEV_ID_82599_SFP_SF2: case IXGBE_DEV_ID_82599EN_SFP: media_type = ixgbe_media_type_fiber; break; @@ -1088,6 +1092,9 @@ mac_reset_top: hw->mac.ops.set_rar(hw, hw->mac.num_rar_entries - 1, hw->mac.san_addr, 0, IXGBE_RAH_AV); + /* Save the SAN MAC RAR index */ + hw->mac.san_mac_rar_index = hw->mac.num_rar_entries - 1; + /* Reserve the last RAR for the SAN MAC address */ hw->mac.num_rar_entries--; } @@ -2037,6 +2044,8 @@ sfp_check: physical_layer = IXGBE_PHYSICAL_LAYER_10GBASE_LR; else if (comp_codes_1g & IXGBE_SFF_1GBASET_CAPABLE) physical_layer = IXGBE_PHYSICAL_LAYER_1000BASE_T; + else if (comp_codes_1g & IXGBE_SFF_1GBASESX_CAPABLE) + physical_layer = IXGBE_PHYSICAL_LAYER_1000BASE_SX; break; default: break; @@ -2233,3 +2242,4 @@ static s32 ixgbe_read_eeprom_82599(struc return ret_val; } + Modified: head/sys/dev/ixgbe/ixgbe_api.c ============================================================================== --- head/sys/dev/ixgbe/ixgbe_api.c Thu Jul 5 20:26:57 2012 (r238148) +++ head/sys/dev/ixgbe/ixgbe_api.c Thu Jul 5 20:51:44 2012 (r238149) @@ -118,6 +118,7 @@ s32 ixgbe_set_mac_type(struct ixgbe_hw * case IXGBE_DEV_ID_82599_BACKPLANE_FCOE: case IXGBE_DEV_ID_82599_SFP_FCOE: case IXGBE_DEV_ID_82599_SFP_EM: + case IXGBE_DEV_ID_82599_SFP_SF2: case IXGBE_DEV_ID_82599EN_SFP: case IXGBE_DEV_ID_82599_CX4: case IXGBE_DEV_ID_82599_T3_LOM: @@ -130,6 +131,7 @@ s32 ixgbe_set_mac_type(struct ixgbe_hw * hw->mac.type = ixgbe_mac_X540_vf; break; case IXGBE_DEV_ID_X540T: + case IXGBE_DEV_ID_X540T1: hw->mac.type = ixgbe_mac_X540; break; default: @@ -811,6 +813,18 @@ s32 ixgbe_set_vmdq(struct ixgbe_hw *hw, { return ixgbe_call_func(hw, hw->mac.ops.set_vmdq, (hw, rar, vmdq), IXGBE_NOT_IMPLEMENTED); + +} + +/** + * ixgbe_set_vmdq_san_mac - Associate VMDq index 127 with a receive address + * @hw: pointer to hardware structure + * @vmdq: VMDq default pool index + **/ +s32 ixgbe_set_vmdq_san_mac(struct ixgbe_hw *hw, u32 vmdq) +{ + return ixgbe_call_func(hw, hw->mac.ops.set_vmdq_san_mac, + (hw, vmdq), IXGBE_NOT_IMPLEMENTED); } /** @@ -960,13 +974,12 @@ s32 ixgbe_set_vlvf(struct ixgbe_hw *hw, /** * ixgbe_fc_enable - Enable flow control * @hw: pointer to hardware structure - * @packetbuf_num: packet buffer number (0-7) * * Configures the flow control settings based on SW configuration. **/ -s32 ixgbe_fc_enable(struct ixgbe_hw *hw, s32 packetbuf_num) +s32 ixgbe_fc_enable(struct ixgbe_hw *hw) { - return ixgbe_call_func(hw, hw->mac.ops.fc_enable, (hw, packetbuf_num), + return ixgbe_call_func(hw, hw->mac.ops.fc_enable, (hw), IXGBE_NOT_IMPLEMENTED); } @@ -1102,7 +1115,7 @@ u32 ixgbe_get_supported_physical_layer(s } /** - * ixgbe_enable_rx_dma - Enables Rx DMA unit, dependant on device specifics + * ixgbe_enable_rx_dma - Enables Rx DMA unit, dependent on device specifics * @hw: pointer to hardware structure * @regval: bitfield to write to the Rx DMA register * Modified: head/sys/dev/ixgbe/ixgbe_api.h ============================================================================== --- head/sys/dev/ixgbe/ixgbe_api.h Thu Jul 5 20:26:57 2012 (r238148) +++ head/sys/dev/ixgbe/ixgbe_api.h Thu Jul 5 20:51:44 2012 (r238149) @@ -104,6 +104,7 @@ s32 ixgbe_set_rar(struct ixgbe_hw *hw, u u32 enable_addr); s32 ixgbe_clear_rar(struct ixgbe_hw *hw, u32 index); s32 ixgbe_set_vmdq(struct ixgbe_hw *hw, u32 rar, u32 vmdq); +s32 ixgbe_set_vmdq_san_mac(struct ixgbe_hw *hw, u32 vmdq); s32 ixgbe_clear_vmdq(struct ixgbe_hw *hw, u32 rar, u32 vmdq); s32 ixgbe_init_rx_addrs(struct ixgbe_hw *hw); u32 ixgbe_get_num_rx_addrs(struct ixgbe_hw *hw); @@ -120,7 +121,7 @@ s32 ixgbe_set_vfta(struct ixgbe_hw *hw, u32 vind, bool vlan_on); s32 ixgbe_set_vlvf(struct ixgbe_hw *hw, u32 vlan, u32 vind, bool vlan_on, bool *vfta_changed); -s32 ixgbe_fc_enable(struct ixgbe_hw *hw, s32 packetbuf_num); +s32 ixgbe_fc_enable(struct ixgbe_hw *hw); s32 ixgbe_set_fw_drv_ver(struct ixgbe_hw *hw, u8 maj, u8 min, u8 build, u8 ver); void ixgbe_set_mta(struct ixgbe_hw *hw, u8 *mc_addr); Modified: head/sys/dev/ixgbe/ixgbe_common.c ============================================================================== --- head/sys/dev/ixgbe/ixgbe_common.c Thu Jul 5 20:26:57 2012 (r238148) +++ head/sys/dev/ixgbe/ixgbe_common.c Thu Jul 5 20:51:44 2012 (r238149) @@ -51,13 +51,6 @@ static void ixgbe_release_eeprom(struct static s32 ixgbe_mta_vector(struct ixgbe_hw *hw, u8 *mc_addr); static s32 ixgbe_get_san_mac_addr_offset(struct ixgbe_hw *hw, u16 *san_mac_offset); -static s32 ixgbe_fc_autoneg_fiber(struct ixgbe_hw *hw); -static s32 ixgbe_fc_autoneg_backplane(struct ixgbe_hw *hw); -static s32 ixgbe_fc_autoneg_copper(struct ixgbe_hw *hw); -static s32 ixgbe_device_supports_autoneg_fc(struct ixgbe_hw *hw); -static s32 ixgbe_negotiate_fc(struct ixgbe_hw *hw, u32 adv_reg, u32 lp_reg, - u32 adv_sym, u32 adv_asm, u32 lp_sym, u32 lp_asm); -static s32 ixgbe_setup_fc(struct ixgbe_hw *hw, s32 packetbuf_num); static s32 ixgbe_read_eeprom_buffer_bit_bang(struct ixgbe_hw *hw, u16 offset, u16 words, u16 *data); static s32 ixgbe_write_eeprom_buffer_bit_bang(struct ixgbe_hw *hw, u16 offset, @@ -146,6 +139,177 @@ s32 ixgbe_init_ops_generic(struct ixgbe_ } /** + * ixgbe_device_supports_autoneg_fc - Check if phy supports autoneg flow + * control + * @hw: pointer to hardware structure + * + * There are several phys that do not support autoneg flow control. This + * function check the device id to see if the associated phy supports + * autoneg flow control. + **/ +static s32 ixgbe_device_supports_autoneg_fc(struct ixgbe_hw *hw) +{ + + DEBUGFUNC("ixgbe_device_supports_autoneg_fc"); + + switch (hw->device_id) { + case IXGBE_DEV_ID_X540T: + case IXGBE_DEV_ID_X540T1: + return IXGBE_SUCCESS; + case IXGBE_DEV_ID_82599_T3_LOM: + return IXGBE_SUCCESS; + default: + return IXGBE_ERR_FC_NOT_SUPPORTED; + } +} + +/** + * ixgbe_setup_fc - Set up flow control + * @hw: pointer to hardware structure + * + * Called at init time to set up flow control. + **/ +static s32 ixgbe_setup_fc(struct ixgbe_hw *hw) +{ + s32 ret_val = IXGBE_SUCCESS; + u32 reg = 0, reg_bp = 0; + u16 reg_cu = 0; + + DEBUGFUNC("ixgbe_setup_fc"); + + /* + * Validate the requested mode. Strict IEEE mode does not allow + * ixgbe_fc_rx_pause because it will cause us to fail at UNH. + */ + if (hw->fc.strict_ieee && hw->fc.requested_mode == ixgbe_fc_rx_pause) { + DEBUGOUT("ixgbe_fc_rx_pause not valid in strict IEEE mode\n"); + ret_val = IXGBE_ERR_INVALID_LINK_SETTINGS; + goto out; + } + + /* + * 10gig parts do not have a word in the EEPROM to determine the + * default flow control setting, so we explicitly set it to full. + */ + if (hw->fc.requested_mode == ixgbe_fc_default) + hw->fc.requested_mode = ixgbe_fc_full; + + /* + * Set up the 1G and 10G flow control advertisement registers so the + * HW will be able to do fc autoneg once the cable is plugged in. If + * we link at 10G, the 1G advertisement is harmless and vice versa. + */ + switch (hw->phy.media_type) { + case ixgbe_media_type_fiber: + case ixgbe_media_type_backplane: + reg = IXGBE_READ_REG(hw, IXGBE_PCS1GANA); + reg_bp = IXGBE_READ_REG(hw, IXGBE_AUTOC); + break; + case ixgbe_media_type_copper: + hw->phy.ops.read_reg(hw, IXGBE_MDIO_AUTO_NEG_ADVT, + IXGBE_MDIO_AUTO_NEG_DEV_TYPE, ®_cu); + break; + default: + break; + } + + /* + * The possible values of fc.requested_mode are: + * 0: Flow control is completely disabled + * 1: Rx flow control is enabled (we can receive pause frames, + * but not send pause frames). + * 2: Tx flow control is enabled (we can send pause frames but + * we do not support receiving pause frames). + * 3: Both Rx and Tx flow control (symmetric) are enabled. + * other: Invalid. + */ + switch (hw->fc.requested_mode) { + case ixgbe_fc_none: + /* Flow control completely disabled by software override. */ + reg &= ~(IXGBE_PCS1GANA_SYM_PAUSE | IXGBE_PCS1GANA_ASM_PAUSE); + if (hw->phy.media_type == ixgbe_media_type_backplane) + reg_bp &= ~(IXGBE_AUTOC_SYM_PAUSE | + IXGBE_AUTOC_ASM_PAUSE); + else if (hw->phy.media_type == ixgbe_media_type_copper) + reg_cu &= ~(IXGBE_TAF_SYM_PAUSE | IXGBE_TAF_ASM_PAUSE); + break; + case ixgbe_fc_tx_pause: + /* + * Tx Flow control is enabled, and Rx Flow control is + * disabled by software override. + */ + reg |= IXGBE_PCS1GANA_ASM_PAUSE; + reg &= ~IXGBE_PCS1GANA_SYM_PAUSE; + if (hw->phy.media_type == ixgbe_media_type_backplane) { + reg_bp |= IXGBE_AUTOC_ASM_PAUSE; + reg_bp &= ~IXGBE_AUTOC_SYM_PAUSE; + } else if (hw->phy.media_type == ixgbe_media_type_copper) { + reg_cu |= IXGBE_TAF_ASM_PAUSE; + reg_cu &= ~IXGBE_TAF_SYM_PAUSE; + } + break; + case ixgbe_fc_rx_pause: + /* + * Rx Flow control is enabled and Tx Flow control is + * disabled by software override. Since there really + * isn't a way to advertise that we are capable of RX + * Pause ONLY, we will advertise that we support both + * symmetric and asymmetric Rx PAUSE, as such we fall + * through to the fc_full statement. Later, we will + * disable the adapter's ability to send PAUSE frames. + */ + case ixgbe_fc_full: + /* Flow control (both Rx and Tx) is enabled by SW override. */ + reg |= IXGBE_PCS1GANA_SYM_PAUSE | IXGBE_PCS1GANA_ASM_PAUSE; + if (hw->phy.media_type == ixgbe_media_type_backplane) + reg_bp |= IXGBE_AUTOC_SYM_PAUSE | + IXGBE_AUTOC_ASM_PAUSE; + else if (hw->phy.media_type == ixgbe_media_type_copper) + reg_cu |= IXGBE_TAF_SYM_PAUSE | IXGBE_TAF_ASM_PAUSE; + break; + default: + DEBUGOUT("Flow control param set incorrectly\n"); + ret_val = IXGBE_ERR_CONFIG; + goto out; + break; + } + + if (hw->mac.type != ixgbe_mac_X540) { + /* + * Enable auto-negotiation between the MAC & PHY; + * the MAC will advertise clause 37 flow control. + */ + IXGBE_WRITE_REG(hw, IXGBE_PCS1GANA, reg); + reg = IXGBE_READ_REG(hw, IXGBE_PCS1GLCTL); + + /* Disable AN timeout */ + if (hw->fc.strict_ieee) + reg &= ~IXGBE_PCS1GLCTL_AN_1G_TIMEOUT_EN; + + IXGBE_WRITE_REG(hw, IXGBE_PCS1GLCTL, reg); + DEBUGOUT1("Set up FC; PCS1GLCTL = 0x%08X\n", reg); + } + + /* + * AUTOC restart handles negotiation of 1G and 10G on backplane + * and copper. There is no need to set the PCS1GCTL register. + * + */ + if (hw->phy.media_type == ixgbe_media_type_backplane) { + reg_bp |= IXGBE_AUTOC_AN_RESTART; + IXGBE_WRITE_REG(hw, IXGBE_AUTOC, reg_bp); + } else if ((hw->phy.media_type == ixgbe_media_type_copper) && + (ixgbe_device_supports_autoneg_fc(hw) == IXGBE_SUCCESS)) { + hw->phy.ops.write_reg(hw, IXGBE_MDIO_AUTO_NEG_ADVT, + IXGBE_MDIO_AUTO_NEG_DEV_TYPE, reg_cu); + } + + DEBUGOUT1("Set up FC; IXGBE_AUTOC = 0x%08X\n", reg); +out: + return ret_val; +} + +/** * ixgbe_start_hw_generic - Prepare hardware for Tx/Rx * @hw: pointer to hardware structure * @@ -156,6 +320,7 @@ s32 ixgbe_init_ops_generic(struct ixgbe_ **/ s32 ixgbe_start_hw_generic(struct ixgbe_hw *hw) { + s32 ret_val; u32 ctrl_ext; DEBUGFUNC("ixgbe_start_hw_generic"); @@ -178,12 +343,15 @@ s32 ixgbe_start_hw_generic(struct ixgbe_ IXGBE_WRITE_FLUSH(hw); /* Setup flow control */ - ixgbe_setup_fc(hw, 0); + ret_val = ixgbe_setup_fc(hw); + if (ret_val != IXGBE_SUCCESS) + goto out; /* Clear adapter stopped flag */ hw->adapter_stopped = FALSE; - return IXGBE_SUCCESS; +out: + return ret_val; } /** @@ -211,14 +379,14 @@ s32 ixgbe_start_hw_gen2(struct ixgbe_hw /* Disable relaxed ordering */ for (i = 0; i < hw->mac.max_tx_queues; i++) { regval = IXGBE_READ_REG(hw, IXGBE_DCA_TXCTRL_82599(i)); - regval &= ~IXGBE_DCA_TXCTRL_TX_WB_RO_EN; + regval &= ~IXGBE_DCA_TXCTRL_DESC_WRO_EN; IXGBE_WRITE_REG(hw, IXGBE_DCA_TXCTRL_82599(i), regval); } for (i = 0; i < hw->mac.max_rx_queues; i++) { regval = IXGBE_READ_REG(hw, IXGBE_DCA_RXCTRL(i)); - regval &= ~(IXGBE_DCA_RXCTRL_DESC_WRO_EN | - IXGBE_DCA_RXCTRL_DESC_HSRO_EN); + regval &= ~(IXGBE_DCA_RXCTRL_DATA_WRO_EN | + IXGBE_DCA_RXCTRL_HEAD_WRO_EN); IXGBE_WRITE_REG(hw, IXGBE_DCA_RXCTRL(i), regval); } @@ -583,6 +751,9 @@ s32 ixgbe_get_bus_info_generic(struct ix case IXGBE_PCI_LINK_SPEED_5000: hw->bus.speed = ixgbe_bus_speed_5000; break; + case IXGBE_PCI_LINK_SPEED_8000: + hw->bus.speed = ixgbe_bus_speed_8000; + break; default: hw->bus.speed = ixgbe_bus_speed_unknown; break; @@ -2242,27 +2413,44 @@ s32 ixgbe_disable_mc_generic(struct ixgb /** * ixgbe_fc_enable_generic - Enable flow control * @hw: pointer to hardware structure - * @packetbuf_num: packet buffer number (0-7) * * Enable flow control according to the current settings. **/ -s32 ixgbe_fc_enable_generic(struct ixgbe_hw *hw, s32 packetbuf_num) +s32 ixgbe_fc_enable_generic(struct ixgbe_hw *hw) { s32 ret_val = IXGBE_SUCCESS; u32 mflcn_reg, fccfg_reg; u32 reg; u32 fcrtl, fcrth; + int i; DEBUGFUNC("ixgbe_fc_enable_generic"); - /* Negotiate the fc mode to use */ - ret_val = ixgbe_fc_autoneg(hw); - if (ret_val == IXGBE_ERR_FLOW_CONTROL) + /* Validate the water mark configuration */ + if (!hw->fc.pause_time) { + ret_val = IXGBE_ERR_INVALID_LINK_SETTINGS; goto out; + } + + /* Low water mark of zero causes XOFF floods */ + for (i = 0; i < IXGBE_DCB_MAX_TRAFFIC_CLASS; i++) { + if ((hw->fc.current_mode & ixgbe_fc_tx_pause) && + hw->fc.high_water[i]) { + if (!hw->fc.low_water[i] || + hw->fc.low_water[i] >= hw->fc.high_water[i]) { + DEBUGOUT("Invalid water mark configuration\n"); + ret_val = IXGBE_ERR_INVALID_LINK_SETTINGS; + goto out; + } + } + } + + /* Negotiate the fc mode to use */ + ixgbe_fc_autoneg(hw); /* Disable any previous flow control settings */ mflcn_reg = IXGBE_READ_REG(hw, IXGBE_MFLCN); - mflcn_reg &= ~(IXGBE_MFLCN_RFCE | IXGBE_MFLCN_RPFCE); + mflcn_reg &= ~(IXGBE_MFLCN_RPFCE_MASK | IXGBE_MFLCN_RFCE); fccfg_reg = IXGBE_READ_REG(hw, IXGBE_FCCFG); fccfg_reg &= ~(IXGBE_FCCFG_TFCE_802_3X | IXGBE_FCCFG_TFCE_PRIORITY); @@ -2319,120 +2507,110 @@ s32 ixgbe_fc_enable_generic(struct ixgbe IXGBE_WRITE_REG(hw, IXGBE_MFLCN, mflcn_reg); IXGBE_WRITE_REG(hw, IXGBE_FCCFG, fccfg_reg); - fcrth = hw->fc.high_water[packetbuf_num] << 10; - fcrtl = hw->fc.low_water << 10; - if (hw->fc.current_mode & ixgbe_fc_tx_pause) { - fcrth |= IXGBE_FCRTH_FCEN; - if (hw->fc.send_xon) - fcrtl |= IXGBE_FCRTL_XONE; - } + /* Set up and enable Rx high/low water mark thresholds, enable XON. */ + for (i = 0; i < IXGBE_DCB_MAX_TRAFFIC_CLASS; i++) { + if ((hw->fc.current_mode & ixgbe_fc_tx_pause) && + hw->fc.high_water[i]) { + fcrtl = (hw->fc.low_water[i] << 10) | IXGBE_FCRTL_XONE; + IXGBE_WRITE_REG(hw, IXGBE_FCRTL_82599(i), fcrtl); + fcrth = (hw->fc.high_water[i] << 10) | IXGBE_FCRTH_FCEN; + } else { + IXGBE_WRITE_REG(hw, IXGBE_FCRTL_82599(i), 0); + /* + * In order to prevent Tx hangs when the internal Tx + * switch is enabled we must set the high water mark + * to the maximum FCRTH value. This allows the Tx + * switch to function even under heavy Rx workloads. + */ + fcrth = IXGBE_READ_REG(hw, IXGBE_RXPBSIZE(i)) - 32; + } - IXGBE_WRITE_REG(hw, IXGBE_FCRTH_82599(packetbuf_num), fcrth); - IXGBE_WRITE_REG(hw, IXGBE_FCRTL_82599(packetbuf_num), fcrtl); + IXGBE_WRITE_REG(hw, IXGBE_FCRTH_82599(i), fcrth); + } /* Configure pause time (2 TCs per register) */ - reg = IXGBE_READ_REG(hw, IXGBE_FCTTV(packetbuf_num / 2)); - if ((packetbuf_num & 1) == 0) - reg = (reg & 0xFFFF0000) | hw->fc.pause_time; - else - reg = (reg & 0x0000FFFF) | (hw->fc.pause_time << 16); - IXGBE_WRITE_REG(hw, IXGBE_FCTTV(packetbuf_num / 2), reg); + reg = hw->fc.pause_time * 0x00010001; + for (i = 0; i < (IXGBE_DCB_MAX_TRAFFIC_CLASS / 2); i++) + IXGBE_WRITE_REG(hw, IXGBE_FCTTV(i), reg); - IXGBE_WRITE_REG(hw, IXGBE_FCRTV, (hw->fc.pause_time >> 1)); + /* Configure flow control refresh threshold value */ + IXGBE_WRITE_REG(hw, IXGBE_FCRTV, hw->fc.pause_time / 2); out: return ret_val; } /** - * ixgbe_fc_autoneg - Configure flow control + * ixgbe_negotiate_fc - Negotiate flow control * @hw: pointer to hardware structure + * @adv_reg: flow control advertised settings + * @lp_reg: link partner's flow control settings + * @adv_sym: symmetric pause bit in advertisement + * @adv_asm: asymmetric pause bit in advertisement + * @lp_sym: symmetric pause bit in link partner advertisement + * @lp_asm: asymmetric pause bit in link partner advertisement * - * Compares our advertised flow control capabilities to those advertised by - * our link partner, and determines the proper flow control mode to use. + * Find the intersection between advertised settings and link partner's + * advertised settings **/ -s32 ixgbe_fc_autoneg(struct ixgbe_hw *hw) +static s32 ixgbe_negotiate_fc(struct ixgbe_hw *hw, u32 adv_reg, u32 lp_reg, + u32 adv_sym, u32 adv_asm, u32 lp_sym, u32 lp_asm) { - s32 ret_val = IXGBE_ERR_FC_NOT_NEGOTIATED; - ixgbe_link_speed speed; - bool link_up; + if ((!(adv_reg)) || (!(lp_reg))) + return IXGBE_ERR_FC_NOT_NEGOTIATED; - DEBUGFUNC("ixgbe_fc_autoneg"); + if ((adv_reg & adv_sym) && (lp_reg & lp_sym)) { + /* + * Now we need to check if the user selected Rx ONLY + * of pause frames. In this case, we had to advertise + * FULL flow control because we could not advertise RX + * ONLY. Hence, we must now check to see if we need to + * turn OFF the TRANSMISSION of PAUSE frames. + */ + if (hw->fc.requested_mode == ixgbe_fc_full) { + hw->fc.current_mode = ixgbe_fc_full; + DEBUGOUT("Flow Control = FULL.\n"); + } else { + hw->fc.current_mode = ixgbe_fc_rx_pause; + DEBUGOUT("Flow Control=RX PAUSE frames only\n"); + } + } else if (!(adv_reg & adv_sym) && (adv_reg & adv_asm) && + (lp_reg & lp_sym) && (lp_reg & lp_asm)) { + hw->fc.current_mode = ixgbe_fc_tx_pause; + DEBUGOUT("Flow Control = TX PAUSE frames only.\n"); + } else if ((adv_reg & adv_sym) && (adv_reg & adv_asm) && + !(lp_reg & lp_sym) && (lp_reg & lp_asm)) { + hw->fc.current_mode = ixgbe_fc_rx_pause; + DEBUGOUT("Flow Control = RX PAUSE frames only.\n"); + } else { + hw->fc.current_mode = ixgbe_fc_none; + DEBUGOUT("Flow Control = NONE.\n"); + } + return IXGBE_SUCCESS; +} - if (hw->fc.disable_fc_autoneg) - goto out; +/** + * ixgbe_fc_autoneg_fiber - Enable flow control on 1 gig fiber + * @hw: pointer to hardware structure + * + * Enable flow control according on 1 gig fiber. + **/ +static s32 ixgbe_fc_autoneg_fiber(struct ixgbe_hw *hw) +{ + u32 pcs_anadv_reg, pcs_lpab_reg, linkstat; + s32 ret_val = IXGBE_ERR_FC_NOT_NEGOTIATED; /* - * AN should have completed when the cable was plugged in. - * Look for reasons to bail out. Bail out if: - * - FC autoneg is disabled, or if - * - link is not up. - * - * Since we're being called from an LSC, link is already known to be up. - * So use link_up_wait_to_complete=FALSE. - */ - hw->mac.ops.check_link(hw, &speed, &link_up, FALSE); - if (!link_up) { - ret_val = IXGBE_ERR_FLOW_CONTROL; - goto out; - } - - switch (hw->phy.media_type) { - /* Autoneg flow control on fiber adapters */ - case ixgbe_media_type_fiber: - if (speed == IXGBE_LINK_SPEED_1GB_FULL) - ret_val = ixgbe_fc_autoneg_fiber(hw); - break; - - /* Autoneg flow control on backplane adapters */ - case ixgbe_media_type_backplane: - ret_val = ixgbe_fc_autoneg_backplane(hw); - break; - - /* Autoneg flow control on copper adapters */ - case ixgbe_media_type_copper: - if (ixgbe_device_supports_autoneg_fc(hw) == IXGBE_SUCCESS) - ret_val = ixgbe_fc_autoneg_copper(hw); - break; - - default: - break; - } - -out: - if (ret_val == IXGBE_SUCCESS) { - hw->fc.fc_was_autonegged = TRUE; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu Jul 5 21:32:26 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C4EA6106566B; Thu, 5 Jul 2012 21:32:26 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 99C808FC15; Thu, 5 Jul 2012 21:32:26 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id F1279B95A; Thu, 5 Jul 2012 17:32:25 -0400 (EDT) From: John Baldwin To: Jack F Vogel Date: Thu, 5 Jul 2012 17:25:48 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p17; KDE/4.5.5; amd64; ; ) References: <201207052026.q65KQw9m016770@svn.freebsd.org> In-Reply-To: <201207052026.q65KQw9m016770@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201207051725.48614.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 05 Jul 2012 17:32:26 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r238148 - in head/sys: conf dev/e1000 modules/igb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jul 2012 21:32:26 -0000 On Thursday, July 05, 2012 4:26:58 pm Jack F Vogel wrote: > Author: jfv > Date: Thu Jul 5 20:26:57 2012 > New Revision: 238148 > URL: http://svn.freebsd.org/changeset/base/238148 > > Log: > Sync with Intel internal source: > shared code update and small changes in core required > Add support for new i210/i211 devices > Improve queue calculation based on mac type > > MFC after:5 days I only spot two small regressions in this merge: Index: if_igb.c =================================================================== --- if_igb.c (revision 238148) +++ if_igb.c (working copy) @@ -767,8 +767,6 @@ igb_detach(device_t dev) if (adapter->vlan_detach != NULL) EVENTHANDLER_DEREGISTER(vlan_unconfig, adapter->vlan_detach); - ether_ifdetach(adapter->ifp); - callout_drain(&adapter->timer); #ifdef DEV_NETMAP @@ -965,7 +963,7 @@ igb_mq_start(struct ifnet *ifp, struct mbuf *m) IGB_TX_UNLOCK(txr); } else { err = drbr_enqueue(ifp, txr->br, m); - taskqueue_enqueue(que->tq, &que->que_task); + taskqueue_enqueue(que->tq, &txr->txq_task); } return (err); (The current driver calls ether_ifdetach() twice, and the second change refixes the issue with packets being delivered out-of-order.) However, the changes to add a (int *)cast to eee_disable are not safe. You will need to add some sort of SYSCTL_PROC wrapper that sets the boolean directly instead. I don't think it is safe to rely on bool being an int. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Thu Jul 5 21:41:20 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 20BAD106564A; Thu, 5 Jul 2012 21:41:20 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.dawidek.net (60.wheelsystems.com [83.12.187.60]) by mx1.freebsd.org (Postfix) with ESMTP id 667278FC08; Thu, 5 Jul 2012 21:41:19 +0000 (UTC) Received: from localhost (89-73-195-149.dynamic.chello.pl [89.73.195.149]) by mail.dawidek.net (Postfix) with ESMTPSA id BC327FB8; Thu, 5 Jul 2012 23:41:14 +0200 (CEST) Date: Thu, 5 Jul 2012 23:39:02 +0200 From: Pawel Jakub Dawidek To: John Baldwin Message-ID: <20120705213901.GA1442@garage.freebsd.pl> References: <201207041951.q64JpPXu029310@svn.freebsd.org> <8344944B-1CEE-4CAD-96FB-EC5A743F6909@FreeBSD.org> <201207050749.43210.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Kj7319i9nmIyA2yE" Content-Disposition: inline In-Reply-To: <201207050749.43210.jhb@freebsd.org> X-OS: FreeBSD 10.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: src-committers@freebsd.org, Andrey Chernov , svn-src-all@freebsd.org, David Chisnall , Attilio Rao , Konstantin Belousov , svn-src-head@freebsd.org, markm@freebsd.org Subject: Re: svn commit: r238118 - head/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jul 2012 21:41:20 -0000 --Kj7319i9nmIyA2yE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jul 05, 2012 at 07:49:42AM -0400, John Baldwin wrote: > On Wednesday, July 04, 2012 4:45:54 pm Attilio Rao wrote: > > 2012/7/4 David Chisnall : > > > On 4 Jul 2012, at 21:32, Andrey Chernov wrote: > > > > > >> 1) /dev/urandom may not exist in jails/sandboxes while sysctls (or o= ld=20 > way > > >> initialization) always exists. > > > > > > From the perspective of Capsicum sandboxes, a device node is better t= han a=20 > sysctl. The kernel must hard-code policy about which sysctls are permitt= ed,=20 > but access to file descriptors is decided on a per-sandbox basis and is= =20 > configurable by the user. The same applies to jails, although it's sligh= tly=20 > more effort to make device nodes appear inside a jail. > >=20 > > Also don't understimate the locking factor here. > > I recall that at some point /dev/random was introducing some > > scalability penalty on php (maybe related to the suhosin patch) until > > kib made shared lookups available on devfs. IIRC, sysctls are still > > Giant locked. >=20 > sysctls are not all Giant locked. KERN_ARND is marked MPSAFE, so it doe= s not=20 > use Giant: It doesn't really matter. Our in-kernel random generator has its own giant lock, so is basically single threaded. Compare results of those two on some SMP machine: # dd if=3D/dev/random of=3D/dev/null bs=3D1m count=3D1024 # sh -c 'for i in `jot $(sysctl -n hw.ncpu)`; do dd if=3D/dev/random of=3D= /dev/null bs=3D1m count=3D128 & done' --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://tupytaj.pl --Kj7319i9nmIyA2yE Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAk/2CXUACgkQForvXbEpPzS8/QCgr19zdVzPwBJXfplzypty7+zY FMUAniLFmLcedbL7iJo8BusoT/boo3Jh =YNK1 -----END PGP SIGNATURE----- --Kj7319i9nmIyA2yE-- From owner-svn-src-all@FreeBSD.ORG Thu Jul 5 23:19:17 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3EA611065670; Thu, 5 Jul 2012 23:19:17 +0000 (UTC) (envelope-from ache@vniz.net) Received: from vniz.net (vniz.net [194.87.13.69]) by mx1.freebsd.org (Postfix) with ESMTP id 5A7008FC08; Thu, 5 Jul 2012 23:19:13 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by vniz.net (8.14.5/8.14.5) with ESMTP id q65NJ5Qr076733; Fri, 6 Jul 2012 03:19:05 +0400 (MSK) (envelope-from ache@vniz.net) Received: (from ache@localhost) by localhost (8.14.5/8.14.5/Submit) id q65NJ4wG076732; Fri, 6 Jul 2012 03:19:05 +0400 (MSK) (envelope-from ache) Date: Fri, 6 Jul 2012 03:19:04 +0400 From: Andrey Chernov To: Pawel Jakub Dawidek Message-ID: <20120705231903.GA76664@vniz.net> Mail-Followup-To: Andrey Chernov , Pawel Jakub Dawidek , John Baldwin , Attilio Rao , David Chisnall , src-committers@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, svn-src-head@FreeBSD.ORG, Konstantin Belousov , markm@FreeBSD.ORG References: <201207041951.q64JpPXu029310@svn.freebsd.org> <8344944B-1CEE-4CAD-96FB-EC5A743F6909@FreeBSD.org> <201207050749.43210.jhb@freebsd.org> <20120705213901.GA1442@garage.freebsd.pl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="cWoXeonUoKmBZSoM" Content-Disposition: inline In-Reply-To: <20120705213901.GA1442@garage.freebsd.pl> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: src-committers@FreeBSD.ORG, John Baldwin , svn-src-all@FreeBSD.ORG, David Chisnall , Attilio Rao , Konstantin Belousov , svn-src-head@FreeBSD.ORG, markm@FreeBSD.ORG Subject: Re: svn commit: r238118 - head/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jul 2012 23:19:17 -0000 --cWoXeonUoKmBZSoM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jul 05, 2012 at 11:39:02PM +0200, Pawel Jakub Dawidek wrote: > > sysctls are not all Giant locked. KERN_ARND is marked MPSAFE, so it d= oes not=20 > > use Giant: >=20 > It doesn't really matter. Our in-kernel random generator has its own > giant lock, so is basically single threaded. Compare results of those > two on some SMP machine: >=20 > # dd if=3D/dev/random of=3D/dev/null bs=3D1m count=3D1024 >=20 > # sh -c 'for i in `jot $(sysctl -n hw.ncpu)`; do dd if=3D/dev/random of= =3D/dev/null bs=3D1m count=3D128 & done' It doesn't really matter for KERN_ARND because it is rarely reseeded and=20 consume most of its time on internal arc4 permutations. That is why strong= =20 KERN_ARND seeding after boot is required (currently it is very weak and=20 easily guessed as I already mention) - started right after boot=20 applications all suffers from weak seeding up to the next rare KERN_ARND=20 and arc4random() both reseeds.. --=20 http://ache.vniz.net/ --cWoXeonUoKmBZSoM Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAk/2IOcACgkQVg5YK5ZEdN2XRgCgtyIYXuY50eyxAojhXAhdPI7x te4AnA7zICkZ6S95V3wRl0nM9BubhrSO =fHc7 -----END PGP SIGNATURE----- --cWoXeonUoKmBZSoM-- From owner-svn-src-all@FreeBSD.ORG Thu Jul 5 23:36:18 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 521C3106564A; Thu, 5 Jul 2012 23:36:18 +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 3D52B8FC17; Thu, 5 Jul 2012 23:36:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q65NaIfv026091; Thu, 5 Jul 2012 23:36:18 GMT (envelope-from jfv@svn.freebsd.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q65NaIrb026089; Thu, 5 Jul 2012 23:36:18 GMT (envelope-from jfv@svn.freebsd.org) Message-Id: <201207052336.q65NaIrb026089@svn.freebsd.org> From: Jack F Vogel Date: Thu, 5 Jul 2012 23:36:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238151 - head/sys/dev/e1000 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jul 2012 23:36:18 -0000 Author: jfv Date: Thu Jul 5 23:36:17 2012 New Revision: 238151 URL: http://svn.freebsd.org/changeset/base/238151 Log: Correct small regressions pointed out by jhb, thanks John. MFC after:5 days Modified: head/sys/dev/e1000/if_igb.c Modified: head/sys/dev/e1000/if_igb.c ============================================================================== --- head/sys/dev/e1000/if_igb.c Thu Jul 5 21:11:03 2012 (r238150) +++ head/sys/dev/e1000/if_igb.c Thu Jul 5 23:36:17 2012 (r238151) @@ -767,8 +767,6 @@ igb_detach(device_t dev) if (adapter->vlan_detach != NULL) EVENTHANDLER_DEREGISTER(vlan_unconfig, adapter->vlan_detach); - ether_ifdetach(adapter->ifp); - callout_drain(&adapter->timer); #ifdef DEV_NETMAP @@ -965,7 +963,7 @@ igb_mq_start(struct ifnet *ifp, struct m IGB_TX_UNLOCK(txr); } else { err = drbr_enqueue(ifp, txr->br, m); - taskqueue_enqueue(que->tq, &que->que_task); + taskqueue_enqueue(que->tq, &txr->txq_task); } return (err); From owner-svn-src-all@FreeBSD.ORG Fri Jul 6 00:03:46 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 454381065670; Fri, 6 Jul 2012 00:03:46 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2F7158FC15; Fri, 6 Jul 2012 00:03:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6603kTN027278; Fri, 6 Jul 2012 00:03:46 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6603jYA027272; Fri, 6 Jul 2012 00:03:45 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201207060003.q6603jYA027272@svn.freebsd.org> From: "David E. O'Brien" Date: Fri, 6 Jul 2012 00:03:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238152 - vendor/NetBSD/bmake/dist X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jul 2012 00:03:46 -0000 Author: obrien Date: Fri Jul 6 00:03:45 2012 New Revision: 238152 URL: http://svn.freebsd.org/changeset/base/238152 Log: Import the 20120704 release of the "Portable" BSD make tool (from NetBSD). Submitted by: Simon Gerraty Modified: vendor/NetBSD/bmake/dist/ChangeLog vendor/NetBSD/bmake/dist/Makefile.in vendor/NetBSD/bmake/dist/bsd.after-import.mk vendor/NetBSD/bmake/dist/job.c vendor/NetBSD/bmake/dist/meta.c Modified: vendor/NetBSD/bmake/dist/ChangeLog ============================================================================== --- vendor/NetBSD/bmake/dist/ChangeLog Thu Jul 5 23:36:17 2012 (r238151) +++ vendor/NetBSD/bmake/dist/ChangeLog Fri Jul 6 00:03:45 2012 (r238152) @@ -1,3 +1,19 @@ +2012-07-04 Simon J. Gerraty + + * Makefile.in (MAKE_VERSION): bump version to 20120704 + Merge with NetBSD make, pick up + o Job_ParseShell should call Shell_Init if it has been + previously called. + * Makefile.in: set USE_META based on configure result. + also .PARSEDIR is safer indicator of bmake. + +2012-06-26 Simon J. Gerraty + + * Makefile.in: bump version to 20120626 + ensure CPPFLAGS is in CFLAGS + * meta.c: avoid nested externs + * bsd.after-import.mk: avoid ${.CURDIR}/Makefile as target + 2012-06-20 Simon J. Gerraty * Makefile.in (MAKE_VERSION): bump version to 20120620 Modified: vendor/NetBSD/bmake/dist/Makefile.in ============================================================================== --- vendor/NetBSD/bmake/dist/Makefile.in Thu Jul 5 23:36:17 2012 (r238151) +++ vendor/NetBSD/bmake/dist/Makefile.in Fri Jul 6 00:03:45 2012 (r238152) @@ -1,7 +1,7 @@ # $NetBSD: Makefile,v 1.56 2012/05/30 21:54:23 sjg Exp $ # @(#)Makefile 5.2 (Berkeley) 12/28/90 -# $Id: Makefile.in,v 1.164 2012/06/20 22:44:26 sjg Exp $ +# $Id: Makefile.in,v 1.168 2012/07/05 04:10:23 sjg Exp $ PROG= bmake SRCS= arch.c buf.c compat.c cond.c dir.c for.c hash.c job.c main.c \ @@ -21,13 +21,15 @@ srcdir= @srcdir@ CC?= @CC@ # Base version on src date -MAKE_VERSION= 20120620 +MAKE_VERSION= 20120704 MACHINE=@machine@ MACHINE_ARCH=@machine_arch@ DEFAULT_SYS_PATH = @default_sys_path@ +CPPFLAGS+= @CPPFLAGS@ +CFLAGS+= ${CPPFLAGS} CFLAGS+= -D_PATH_DEFSYSPATH=\"${DEFAULT_SYS_PATH}\" -CFLAGS+= -I. -I${srcdir} @DEFS@ @CPPFLAGS@ ${XDEFS} -DMAKE_NATIVE +CFLAGS+= -I. -I${srcdir} @DEFS@ ${XDEFS} -DMAKE_NATIVE CFLAGS+= ${CFLAGS_${.TARGET:T}} CFLAGS+= ${COPTS.${.ALLSRC:M*.c:T:u}} COPTS.main.c+= "-DMAKE_VERSION=\"${MAKE_VERSION}\"" @@ -39,7 +41,7 @@ LDADD= @LIBS@ SRCS+= ${LIBOBJS:T:.o=.c} .endif -USE_META ?= @use_meta@ +USE_META = @use_meta@ .if ${USE_META} != "no" SRCS+= meta.c CPPFLAGS+= -DUSE_META @@ -83,7 +85,7 @@ SRCS+= sigcompat.c CFLAGS+= -DSIGNAL_FLAGS=SA_RESTART .endif .endif -.if defined(.MAKE.LEVEL) +.if defined(.PARSEDIR) .if make(obj) || make(clean) SUBDIR+= unit-tests .endif @@ -134,7 +136,7 @@ _mfromdir=${srcdir} # sigh, FreeBSD at least includes bsd.subdir.mk via bsd.obj.mk # so the inclusion below, results in complaints about re-defined # targets. For NetBSD though we need to explicitly include it. -.if defined(.MAKE.LEVEL) +.if defined(.PARSEDIR) .if defined(SUBDIR) && !target(${SUBDIR:[1]}) .-include .endif Modified: vendor/NetBSD/bmake/dist/bsd.after-import.mk ============================================================================== --- vendor/NetBSD/bmake/dist/bsd.after-import.mk Thu Jul 5 23:36:17 2012 (r238151) +++ vendor/NetBSD/bmake/dist/bsd.after-import.mk Fri Jul 6 00:03:45 2012 (r238152) @@ -1,4 +1,4 @@ -# $Id: bsd.after-import.mk,v 1.5 2012/06/20 22:45:07 sjg Exp $ +# $Id: bsd.after-import.mk,v 1.6 2012/06/27 18:23:32 sjg Exp $ # This makefile is for use when integrating bmake into a BSD build # system. Use this makefile after importing bmake. @@ -9,7 +9,7 @@ # The goal is to allow the benefits of autoconf without # the overhead of running configure. -all: ${.CURDIR}/Makefile +all: _makefile all: after-import # we rely on bmake @@ -79,8 +79,8 @@ after-import: bootstrap ${MAKEFILE} .endfor # this needs the most work -${.CURDIR}/Makefile: bootstrap ${MAKEFILE} .PRECIOUS - @echo Generating ${.TARGET:T} +_makefile: bootstrap ${MAKEFILE} + @echo Generating ${.CURDIR}/Makefile @(echo '# This is a generated file, do NOT edit!'; \ echo '# See ${_this:S,${SRCTOP}/,,}'; \ echo '#'; echo '# $$${OS}$$'; echo; \ @@ -97,8 +97,9 @@ ${.CURDIR}/Makefile: bootstrap ${MAKEFIL echo; echo 'after-import: ${_this:S,${SRCTOP},\${SRCTOP},}'; \ echo ' cd $${.CURDIR} && $${.MAKE} -f ${_this:S,${SRCTOP},\${SRCTOP},}'; \ echo; echo '.sinclude "Makefile.inc"'; \ - echo ) > ${.TARGET:T}.new - @mv ${.TARGET:T}.new ${.TARGET} + echo ) > ${.TARGET} + @cmp -s ${.TARGET} ${.CURDIR}/Makefile || \ + mv ${.TARGET} ${.CURDIR}/Makefile .include Modified: vendor/NetBSD/bmake/dist/job.c ============================================================================== --- vendor/NetBSD/bmake/dist/job.c Thu Jul 5 23:36:17 2012 (r238151) +++ vendor/NetBSD/bmake/dist/job.c Fri Jul 6 00:03:45 2012 (r238152) @@ -1,4 +1,4 @@ -/* $NetBSD: job.c,v 1.162 2012/06/12 19:21:50 joerg Exp $ */ +/* $NetBSD: job.c,v 1.163 2012/07/03 21:03:40 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -70,14 +70,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: job.c,v 1.162 2012/06/12 19:21:50 joerg Exp $"; +static char rcsid[] = "$NetBSD: job.c,v 1.163 2012/07/03 21:03:40 sjg Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)job.c 8.2 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: job.c,v 1.162 2012/06/12 19:21:50 joerg Exp $"); +__RCSID("$NetBSD: job.c,v 1.163 2012/07/03 21:03:40 sjg Exp $"); #endif #endif /* not lint */ #endif @@ -2441,7 +2441,7 @@ Job_ParseShell(char *line) * If no path was given, the user wants one of the pre-defined shells, * yes? So we find the one s/he wants with the help of JobMatchShell * and set things up the right way. shellPath will be set up by - * Job_Init. + * Shell_Init. */ if (newShell.name == NULL) { Parse_Error(PARSE_FATAL, "Neither path nor name specified"); @@ -2456,6 +2456,12 @@ Job_ParseShell(char *line) } commandShell = sh; shellName = newShell.name; + if (shellPath) { + /* Shell_Init has already been called! Do it again. */ + free(UNCONST(shellPath)); + shellPath = NULL; + Shell_Init(); + } } } else { /* Modified: vendor/NetBSD/bmake/dist/meta.c ============================================================================== --- vendor/NetBSD/bmake/dist/meta.c Thu Jul 5 23:36:17 2012 (r238151) +++ vendor/NetBSD/bmake/dist/meta.c Fri Jul 6 00:03:45 2012 (r238152) @@ -1,4 +1,4 @@ -/* $NetBSD: meta.c,v 1.24 2011/09/21 14:30:47 christos Exp $ */ +/* $NetBSD: meta.c,v 1.25 2012/06/27 17:22:58 sjg Exp $ */ /* * Implement 'meta' mode. @@ -68,6 +68,7 @@ static Boolean metaSilent = FALSE; /* if extern Boolean forceJobs; extern Boolean comatMake; +extern char **environ; #define MAKE_META_PREFIX ".MAKE.META.PREFIX" @@ -388,7 +389,6 @@ printCMD(void *cmdp, void *mfpp) static FILE * meta_create(BuildMon *pbm, GNode *gn) { - extern char **environ; meta_file_t mf; char buf[MAXPATHLEN]; char objdir[MAXPATHLEN]; From owner-svn-src-all@FreeBSD.ORG Fri Jul 6 00:03:49 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8474C106567A; Fri, 6 Jul 2012 00:03:49 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 52DBC8FC19; Fri, 6 Jul 2012 00:03:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6603ng9027315; Fri, 6 Jul 2012 00:03:49 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6603nUm027314; Fri, 6 Jul 2012 00:03:49 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201207060003.q6603nUm027314@svn.freebsd.org> From: "David E. O'Brien" Date: Fri, 6 Jul 2012 00:03:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238153 - vendor/NetBSD/bmake/20120704 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jul 2012 00:03:49 -0000 Author: obrien Date: Fri Jul 6 00:03:48 2012 New Revision: 238153 URL: http://svn.freebsd.org/changeset/base/238153 Log: "Tag" the 20120704 Portable BSD make import. Added: vendor/NetBSD/bmake/20120704/ - copied from r238152, vendor/NetBSD/bmake/dist/ From owner-svn-src-all@FreeBSD.ORG Fri Jul 6 00:04:22 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id ACFD2106570A; Fri, 6 Jul 2012 00:04:22 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9744A8FC0C; Fri, 6 Jul 2012 00:04:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6604MgE027375; Fri, 6 Jul 2012 00:04:22 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6604Mwu027373; Fri, 6 Jul 2012 00:04:22 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201207060004.q6604Mwu027373@svn.freebsd.org> From: "David E. O'Brien" Date: Fri, 6 Jul 2012 00:04:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238154 - vendor/NetBSD/bmake X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jul 2012 00:04:22 -0000 Author: obrien Date: Fri Jul 6 00:04:22 2012 New Revision: 238154 URL: http://svn.freebsd.org/changeset/base/238154 Log: Script used to commit r238152 / r238153. Modified: vendor/NetBSD/bmake/do-update.sh Modified: vendor/NetBSD/bmake/do-update.sh ============================================================================== --- vendor/NetBSD/bmake/do-update.sh Fri Jul 6 00:03:48 2012 (r238153) +++ vendor/NetBSD/bmake/do-update.sh Fri Jul 6 00:04:22 2012 (r238154) @@ -1,16 +1,20 @@ : # $FreeBSD$ +# "global" vars +ECHO= +# Set SVN variables +# select the local subversion site SVN=${SVN:-/usr/local/bin/svn} SITE=${SITE:-ftp://ftp.netbsd.org/pub/NetBSD/misc/sjg} + # For consistency... Error() { echo ERROR: ${1+"$@"} >&2 exit 1 } - Cd() { [ $# -eq 1 ] || Error "Cd() takes a single parameter." cd $1 || Error "cannot \"cd $1\" from $PWD" @@ -87,4 +91,16 @@ rm -rf bmake/missing svn-vendorimport.sh bmake dist ${SVN} stat dist -rm -f bmake-${VERSION}.tar.gz.sha1 $SITE/bmake-${VERSION}.tar.gz +rm -f bmake-${VERSION}.tar.gz bmake-${VERSION}.tar.gz.sha1 + +echo "Import the ${VERSION} release of the \"Portable\" BSD make tool (from NetBSD). + +Submitted by: Simon Gerraty " > /tmp/commit-log + +${ECHO} ${SVN} ci -F /tmp/commit-log dist + +SVNURL=$(${SVN} info | grep URL: | awk '{print $2}') + +${ECHO} ${SVN} copy \ + -m "\"Tag\" the ${VERSION} Portable BSD make import." \ + ${SVNURL}/dist ${SVNURL}/${VERSION} From owner-svn-src-all@FreeBSD.ORG Fri Jul 6 01:32:54 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2DA7A106564A; Fri, 6 Jul 2012 01:32:54 +0000 (UTC) (envelope-from ache@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 182418FC12; Fri, 6 Jul 2012 01:32:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q661Wr7L031246; Fri, 6 Jul 2012 01:32:53 GMT (envelope-from ache@svn.freebsd.org) Received: (from ache@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q661Wrgu031244; Fri, 6 Jul 2012 01:32:53 GMT (envelope-from ache@svn.freebsd.org) Message-Id: <201207060132.q661Wrgu031244@svn.freebsd.org> From: "Andrey A. Chernov" Date: Fri, 6 Jul 2012 01:32:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238158 - stable/9/usr.sbin/vidcontrol X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jul 2012 01:32:54 -0000 Author: ache Date: Fri Jul 6 01:32:53 2012 New Revision: 238158 URL: http://svn.freebsd.org/changeset/base/238158 Log: MFC r237777 Call set_terminal_mode() after video mode change, not before, because video mode change always reset terminal mode to xterm. It allows things like 'vidcontrol -T cons25 80x30' works as supposed, and allows 'allscreens_flags="-T cons25 80x30"' in /etc/rc.conf too. Approved by: re (hrs) Modified: stable/9/usr.sbin/vidcontrol/vidcontrol.c Directory Properties: stable/9/usr.sbin/vidcontrol/ (props changed) Modified: stable/9/usr.sbin/vidcontrol/vidcontrol.c ============================================================================== --- stable/9/usr.sbin/vidcontrol/vidcontrol.c Fri Jul 6 00:58:27 2012 (r238157) +++ stable/9/usr.sbin/vidcontrol/vidcontrol.c Fri Jul 6 01:32:53 2012 (r238158) @@ -1194,15 +1194,13 @@ set_terminal_mode(char *arg) fprintf(stderr, "\033[=T"); else if (strcmp(arg, "cons25") == 0) fprintf(stderr, "\033[=1T"); - else - usage(); } int main(int argc, char **argv) { - char *font, *type; + char *font, *type, *termmode; int dumpmod, dumpopt, opt; int reterr; @@ -1214,6 +1212,7 @@ main(int argc, char **argv) err(1, "must be on a virtual console"); dumpmod = 0; dumpopt = DUMP_FBF; + termmode = NULL; while ((opt = getopt(argc, argv, "b:Cc:df:g:h:Hi:l:LM:m:pPr:S:s:T:t:x")) != -1) switch(opt) { @@ -1285,7 +1284,10 @@ main(int argc, char **argv) set_console(optarg); break; case 'T': - set_terminal_mode(optarg); + if (strcmp(optarg, "xterm") != 0 && + strcmp(optarg, "cons25") != 0) + usage(); + termmode = optarg; break; case 't': set_screensaver_timeout(optarg); @@ -1308,6 +1310,8 @@ main(int argc, char **argv) } video_mode(argc, argv, &optind); + if (termmode != NULL) + set_terminal_mode(termmode); get_normal_colors(argc, argv, &optind); From owner-svn-src-all@FreeBSD.ORG Fri Jul 6 02:18:50 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2070F1065672; Fri, 6 Jul 2012 02:18: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 09E5C8FC08; Fri, 6 Jul 2012 02:18:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q662Inul033216; Fri, 6 Jul 2012 02:18:49 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q662InHT033214; Fri, 6 Jul 2012 02:18:49 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201207060218.q662InHT033214@svn.freebsd.org> From: Alan Cox Date: Fri, 6 Jul 2012 02:18:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238159 - head/sys/powerpc/aim X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jul 2012 02:18:50 -0000 Author: alc Date: Fri Jul 6 02:18:49 2012 New Revision: 238159 URL: http://svn.freebsd.org/changeset/base/238159 Log: Replace all uses of the vm page queues lock by a r/w lock that is private to this pmap. Tested by: andreast, jhibbits Modified: head/sys/powerpc/aim/mmu_oea.c Modified: head/sys/powerpc/aim/mmu_oea.c ============================================================================== --- head/sys/powerpc/aim/mmu_oea.c Fri Jul 6 01:32:53 2012 (r238158) +++ head/sys/powerpc/aim/mmu_oea.c Fri Jul 6 02:18:49 2012 (r238159) @@ -125,6 +125,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -204,6 +205,17 @@ struct pvo_head *moea_pvo_table; /* pvo struct pvo_head moea_pvo_kunmanaged = LIST_HEAD_INITIALIZER(moea_pvo_kunmanaged); /* list of unmanaged pages */ +/* + * Isolate the global pv list lock from data and other locks to prevent false + * sharing within the cache. + */ +static struct { + struct rwlock lock; + char padding[CACHE_LINE_SIZE - sizeof(struct rwlock)]; +} pvh_global __aligned(CACHE_LINE_SIZE); + +#define pvh_global_lock pvh_global.lock + uma_zone_t moea_upvo_zone; /* zone for pvo entries for unmanaged pages */ uma_zone_t moea_mpvo_zone; /* zone for pvo entries for managed pages */ @@ -455,7 +467,7 @@ static __inline void moea_attr_clear(vm_page_t m, int ptebit) { - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); m->md.mdpg_attrs &= ~ptebit; } @@ -470,7 +482,7 @@ static __inline void moea_attr_save(vm_page_t m, int ptebit) { - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); m->md.mdpg_attrs |= ptebit; } @@ -859,6 +871,11 @@ moea_bootstrap(mmu_t mmup, vm_offset_t k CPU_FILL(&kernel_pmap->pm_active); RB_INIT(&kernel_pmap->pmap_pvo); + /* + * Initialize the global pv list lock. + */ + rw_init(&pvh_global_lock, "pmap pv global"); + /* * Set up the Open Firmware mappings */ @@ -1066,10 +1083,10 @@ moea_enter(mmu_t mmu, pmap_t pmap, vm_of boolean_t wired) { - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); PMAP_LOCK(pmap); moea_enter_locked(pmap, va, m, prot, wired); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); PMAP_UNLOCK(pmap); } @@ -1102,7 +1119,7 @@ moea_enter_locked(pmap_t pmap, vm_offset pvo_flags = PVO_MANAGED; } if (pmap_bootstrapped) - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); PMAP_LOCK_ASSERT(pmap, MA_OWNED); KASSERT((m->oflags & (VPO_UNMANAGED | VPO_BUSY)) != 0 || VM_OBJECT_LOCKED(m->object), @@ -1166,14 +1183,14 @@ moea_enter_object(mmu_t mmu, pmap_t pm, psize = atop(end - start); m = m_start; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); PMAP_LOCK(pm); while (m != NULL && (diff = m->pindex - m_start->pindex) < psize) { moea_enter_locked(pm, start + ptoa(diff), m, prot & (VM_PROT_READ | VM_PROT_EXECUTE), FALSE); m = TAILQ_NEXT(m, listq); } - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); PMAP_UNLOCK(pm); } @@ -1182,11 +1199,11 @@ moea_enter_quick(mmu_t mmu, pmap_t pm, v vm_prot_t prot) { - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); PMAP_LOCK(pm); moea_enter_locked(pm, va, m, prot & (VM_PROT_READ | VM_PROT_EXECUTE), FALSE); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); PMAP_UNLOCK(pm); } @@ -1342,7 +1359,7 @@ moea_remove_write(mmu_t mmu, vm_page_t m if ((m->oflags & VPO_BUSY) == 0 && (m->aflags & PGA_WRITEABLE) == 0) return; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); lo = moea_attr_fetch(m); powerpc_sync(); LIST_FOREACH(pvo, vm_page_to_pvoh(m), pvo_vlink) { @@ -1368,7 +1385,7 @@ moea_remove_write(mmu_t mmu, vm_page_t m vm_page_dirty(m); } vm_page_aflag_clear(m, PGA_WRITEABLE); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); } /* @@ -1409,7 +1426,7 @@ moea_page_set_memattr(mmu_t mmu, vm_page return; } - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); pvo_head = vm_page_to_pvoh(m); lo = moea_calc_wimg(VM_PAGE_TO_PHYS(m), ma); @@ -1429,7 +1446,7 @@ moea_page_set_memattr(mmu_t mmu, vm_page PMAP_UNLOCK(pmap); } m->md.mdpg_cache_attrs = ma; - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); } /* @@ -1543,7 +1560,7 @@ moea_page_exists_quick(mmu_t mmu, pmap_t ("moea_page_exists_quick: page %p is not managed", m)); loops = 0; rv = FALSE; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); LIST_FOREACH(pvo, vm_page_to_pvoh(m), pvo_vlink) { if (pvo->pvo_pmap == pmap) { rv = TRUE; @@ -1552,7 +1569,7 @@ moea_page_exists_quick(mmu_t mmu, pmap_t if (++loops >= 16) break; } - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); return (rv); } @@ -1569,11 +1586,11 @@ moea_page_wired_mappings(mmu_t mmu, vm_p count = 0; if ((m->oflags & VPO_UNMANAGED) != 0) return (count); - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); LIST_FOREACH(pvo, vm_page_to_pvoh(m), pvo_vlink) if ((pvo->pvo_vaddr & PVO_WIRED) != 0) count++; - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); return (count); } @@ -1672,7 +1689,7 @@ moea_protect(mmu_t mmu, pmap_t pm, vm_of return; } - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); PMAP_LOCK(pm); key.pvo_vaddr = sva; for (pvo = RB_NFIND(pvo_tree, &pm->pmap_pvo, &key); @@ -1700,7 +1717,7 @@ moea_protect(mmu_t mmu, pmap_t pm, vm_of mtx_unlock(&moea_table_mutex); } } - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); PMAP_UNLOCK(pm); } @@ -1766,7 +1783,7 @@ moea_remove(mmu_t mmu, pmap_t pm, vm_off { struct pvo_entry *pvo, *tpvo, key; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); PMAP_LOCK(pm); key.pvo_vaddr = sva; for (pvo = RB_NFIND(pvo_tree, &pm->pmap_pvo, &key); @@ -1775,7 +1792,7 @@ moea_remove(mmu_t mmu, pmap_t pm, vm_off moea_pvo_remove(pvo, -1); } PMAP_UNLOCK(pm); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); } /* @@ -1789,7 +1806,7 @@ moea_remove_all(mmu_t mmu, vm_page_t m) struct pvo_entry *pvo, *next_pvo; pmap_t pmap; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); pvo_head = vm_page_to_pvoh(m); for (pvo = LIST_FIRST(pvo_head); pvo != NULL; pvo = next_pvo) { next_pvo = LIST_NEXT(pvo, pvo_vlink); @@ -1804,7 +1821,7 @@ moea_remove_all(mmu_t mmu, vm_page_t m) vm_page_dirty(m); } vm_page_aflag_clear(m, PGA_WRITEABLE); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); } /* @@ -2279,7 +2296,7 @@ moea_query_bit(vm_page_t m, int ptebit) if (moea_attr_fetch(m) & ptebit) return (TRUE); - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); LIST_FOREACH(pvo, vm_page_to_pvoh(m), pvo_vlink) { /* @@ -2288,7 +2305,7 @@ moea_query_bit(vm_page_t m, int ptebit) */ if (pvo->pvo_pte.pte.pte_lo & ptebit) { moea_attr_save(m, ptebit); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); return (TRUE); } } @@ -2312,13 +2329,13 @@ moea_query_bit(vm_page_t m, int ptebit) mtx_unlock(&moea_table_mutex); if (pvo->pvo_pte.pte.pte_lo & ptebit) { moea_attr_save(m, ptebit); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); return (TRUE); } } } - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); return (FALSE); } @@ -2329,7 +2346,7 @@ moea_clear_bit(vm_page_t m, int ptebit) struct pvo_entry *pvo; struct pte *pt; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); /* * Clear the cached value. @@ -2363,7 +2380,7 @@ moea_clear_bit(vm_page_t m, int ptebit) pvo->pvo_pte.pte.pte_lo &= ~ptebit; } - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); return (count); } From owner-svn-src-all@FreeBSD.ORG Fri Jul 6 03:43:34 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AAE58106566C; Fri, 6 Jul 2012 03:43:34 +0000 (UTC) (envelope-from bjk@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7B5988FC08; Fri, 6 Jul 2012 03:43:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q663hYdk036931; Fri, 6 Jul 2012 03:43:34 GMT (envelope-from bjk@svn.freebsd.org) Received: (from bjk@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q663hYVg036929; Fri, 6 Jul 2012 03:43:34 GMT (envelope-from bjk@svn.freebsd.org) Message-Id: <201207060343.q663hYVg036929@svn.freebsd.org> From: Benjamin Kaduk Date: Fri, 6 Jul 2012 03:43:34 +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: r238160 - stable/7/share/man/man5 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jul 2012 03:43:34 -0000 Author: bjk (doc committer) Date: Fri Jul 6 03:43:33 2012 New Revision: 238160 URL: http://svn.freebsd.org/changeset/base/238160 Log: MFC r237581: Explicitly mention that setting the change and expiry times to zero is equivalent to leaving the time unset. [1] Wordsmith in the compat support section. Use a full path to nologin(8) in the context of setting it as a user's shell, keeping a separate cross-reference. PR: docs/169354 [1] Approved by: hrs (mentor) Modified: stable/7/share/man/man5/passwd.5 Directory Properties: stable/7/share/man/man5/ (props changed) Modified: stable/7/share/man/man5/passwd.5 ============================================================================== --- stable/7/share/man/man5/passwd.5 Fri Jul 6 02:18:49 2012 (r238159) +++ stable/7/share/man/man5/passwd.5 Fri Jul 6 03:43:33 2012 (r238160) @@ -35,7 +35,7 @@ .\" From: @(#)passwd.5 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd May 8, 2007 +.Dd June 23, 2012 .Dt PASSWD 5 .Os .Sh NAME @@ -204,7 +204,8 @@ field is the number of seconds from the .Dv UTC , until the password for the account must be changed. -This field may be left empty to turn off the password aging feature. +This field may be left empty to turn off the password aging feature; +a value of zero is equivalent to leaving the field empty. .Pp The .Ar expire @@ -212,7 +213,8 @@ field is the number of seconds from the .Dv UTC , until the account expires. -This field may be left empty to turn off the account aging feature. +This field may be left empty to turn off the account aging feature; +a value of zero is equivalent to leaving the field empty. .Pp The .Ar gecos @@ -272,7 +274,8 @@ as it is done for system accounts, is to set its .Ar shell to -.Xr nologin 8 . +.Pa /sbin/nologin +.Pq see Xr nologin 8 . .Sh HESIOD SUPPORT If .Sq Li dns @@ -364,7 +367,7 @@ fields, the specified numbers will overr from the Hesiod domain or the .Tn NIS maps. -As well, if the +Likewise, if the .Ar gecos , .Ar dir or @@ -400,7 +403,8 @@ The additional fields .Ar change and .Ar expire -are added, but are turned off by default. +are added, but are turned off by default +.Pq setting these fields to zero is equivalent to leaving them blank . Class is currently not implemented, but change and expire are; to set them, use the current day in seconds from the epoch + whatever number of seconds of offset you want. From owner-svn-src-all@FreeBSD.ORG Fri Jul 6 03:44:41 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0BAFF1065670; Fri, 6 Jul 2012 03:44:41 +0000 (UTC) (envelope-from bjk@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D0D978FC17; Fri, 6 Jul 2012 03:44:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q663iebL037026; Fri, 6 Jul 2012 03:44:40 GMT (envelope-from bjk@svn.freebsd.org) Received: (from bjk@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q663ieNP037024; Fri, 6 Jul 2012 03:44:40 GMT (envelope-from bjk@svn.freebsd.org) Message-Id: <201207060344.q663ieNP037024@svn.freebsd.org> From: Benjamin Kaduk Date: Fri, 6 Jul 2012 03:44: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: r238161 - stable/8/share/man/man5 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jul 2012 03:44:41 -0000 Author: bjk (doc committer) Date: Fri Jul 6 03:44:40 2012 New Revision: 238161 URL: http://svn.freebsd.org/changeset/base/238161 Log: MFC r237581: Explicitly mention that setting the change and expiry times to zero is equivalent to leaving the time unset. [1] Wordsmith in the compat support section. Use a full path to nologin(8) in the context of setting it as a user's shell, keeping a separate cross-reference. PR: docs/169354 [1] Approved by: hrs (mentor) Modified: stable/8/share/man/man5/passwd.5 Directory Properties: stable/8/share/man/man5/ (props changed) Modified: stable/8/share/man/man5/passwd.5 ============================================================================== --- stable/8/share/man/man5/passwd.5 Fri Jul 6 03:43:33 2012 (r238160) +++ stable/8/share/man/man5/passwd.5 Fri Jul 6 03:44:40 2012 (r238161) @@ -35,7 +35,7 @@ .\" From: @(#)passwd.5 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd May 8, 2007 +.Dd June 23, 2012 .Dt PASSWD 5 .Os .Sh NAME @@ -204,7 +204,8 @@ field is the number of seconds from the .Dv UTC , until the password for the account must be changed. -This field may be left empty to turn off the password aging feature. +This field may be left empty to turn off the password aging feature; +a value of zero is equivalent to leaving the field empty. .Pp The .Ar expire @@ -212,7 +213,8 @@ field is the number of seconds from the .Dv UTC , until the account expires. -This field may be left empty to turn off the account aging feature. +This field may be left empty to turn off the account aging feature; +a value of zero is equivalent to leaving the field empty. .Pp The .Ar gecos @@ -272,7 +274,8 @@ as it is done for system accounts, is to set its .Ar shell to -.Xr nologin 8 . +.Pa /sbin/nologin +.Pq see Xr nologin 8 . .Sh HESIOD SUPPORT If .Sq Li dns @@ -364,7 +367,7 @@ fields, the specified numbers will overr from the Hesiod domain or the .Tn NIS maps. -As well, if the +Likewise, if the .Ar gecos , .Ar dir or @@ -400,7 +403,8 @@ The additional fields .Ar change and .Ar expire -are added, but are turned off by default. +are added, but are turned off by default +.Pq setting these fields to zero is equivalent to leaving them blank . Class is currently not implemented, but change and expire are; to set them, use the current day in seconds from the epoch + whatever number of seconds of offset you want. From owner-svn-src-all@FreeBSD.ORG Fri Jul 6 03:56:46 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7E378106564A; Fri, 6 Jul 2012 03:56:46 +0000 (UTC) (envelope-from bjk@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4E5E88FC08; Fri, 6 Jul 2012 03:56:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q663ukbi037551; Fri, 6 Jul 2012 03:56:46 GMT (envelope-from bjk@svn.freebsd.org) Received: (from bjk@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q663ukLp037549; Fri, 6 Jul 2012 03:56:46 GMT (envelope-from bjk@svn.freebsd.org) Message-Id: <201207060356.q663ukLp037549@svn.freebsd.org> From: Benjamin Kaduk Date: Fri, 6 Jul 2012 03:56:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238162 - stable/9/share/man/man5 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jul 2012 03:56:46 -0000 Author: bjk (doc committer) Date: Fri Jul 6 03:56:45 2012 New Revision: 238162 URL: http://svn.freebsd.org/changeset/base/238162 Log: MFC r237581: Explicitly mention that setting the change and expiry times to zero is equivalent to leaving the time unset. [1] Wordsmith in the compat support section. Use a full path to nologin(8) in the context of setting it as a user's shell, keeping a separate cross-reference. PR: docs/169354 [1] Approved by: re (hrs), hrs (mentor) Modified: stable/9/share/man/man5/passwd.5 Directory Properties: stable/9/share/man/man5/ (props changed) Modified: stable/9/share/man/man5/passwd.5 ============================================================================== --- stable/9/share/man/man5/passwd.5 Fri Jul 6 03:44:40 2012 (r238161) +++ stable/9/share/man/man5/passwd.5 Fri Jul 6 03:56:45 2012 (r238162) @@ -35,7 +35,7 @@ .\" From: @(#)passwd.5 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd May 8, 2007 +.Dd June 23, 2012 .Dt PASSWD 5 .Os .Sh NAME @@ -203,7 +203,8 @@ field is the number of seconds from the .Dv UTC , until the password for the account must be changed. -This field may be left empty to turn off the password aging feature. +This field may be left empty to turn off the password aging feature; +a value of zero is equivalent to leaving the field empty. .Pp The .Ar expire @@ -211,7 +212,8 @@ field is the number of seconds from the .Dv UTC , until the account expires. -This field may be left empty to turn off the account aging feature. +This field may be left empty to turn off the account aging feature; +a value of zero is equivalent to leaving the field empty. .Pp The .Ar gecos @@ -271,7 +273,8 @@ as it is done for system accounts, is to set its .Ar shell to -.Xr nologin 8 . +.Pa /sbin/nologin +.Pq see Xr nologin 8 . .Sh HESIOD SUPPORT If .Sq Li dns @@ -363,7 +366,7 @@ fields, the specified numbers will overr from the Hesiod domain or the .Tn NIS maps. -As well, if the +Likewise, if the .Ar gecos , .Ar dir or @@ -399,7 +402,8 @@ The additional fields .Ar change and .Ar expire -are added, but are turned off by default. +are added, but are turned off by default +.Pq setting these fields to zero is equivalent to leaving them blank . Class is currently not implemented, but change and expire are; to set them, use the current day in seconds from the epoch + whatever number of seconds of offset you want. From owner-svn-src-all@FreeBSD.ORG Fri Jul 6 06:42:25 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C478A106566B; Fri, 6 Jul 2012 06:42:25 +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 9622D8FC08; Fri, 6 Jul 2012 06:42:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q666gPoD044261; Fri, 6 Jul 2012 06:42:25 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q666gPBS044259; Fri, 6 Jul 2012 06:42:25 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201207060642.q666gPBS044259@svn.freebsd.org> From: Alan Cox Date: Fri, 6 Jul 2012 06:42:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238163 - head/sys/amd64/amd64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jul 2012 06:42:25 -0000 Author: alc Date: Fri Jul 6 06:42:25 2012 New Revision: 238163 URL: http://svn.freebsd.org/changeset/base/238163 Log: Make pmap_enter()'s management of PV entries consistent with the other pmap functions that manage PV entries. Specifically, remove the PV entry from the containing PV list only after the corresponding PTE is destroyed. Update the pmap's wired mapping count in pmap_enter() before the PV list lock is acquired. Modified: head/sys/amd64/amd64/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Fri Jul 6 03:56:45 2012 (r238162) +++ head/sys/amd64/amd64/pmap.c Fri Jul 6 06:42:25 2012 (r238163) @@ -3517,8 +3517,6 @@ pmap_enter(pmap_t pmap, vm_offset_t va, goto validate; } - pv = NULL; - /* * Mapping has changed, invalidate old range and fall through to * handle validating new mapping. @@ -3526,11 +3524,8 @@ pmap_enter(pmap_t pmap, vm_offset_t va, if (opa) { if (origpte & PG_W) pmap->pm_stats.wired_count--; - if (origpte & PG_MANAGED) { + if ((origpte & PG_MANAGED) != 0) om = PHYS_TO_VM_PAGE(opa); - CHANGE_PV_LIST_LOCK_TO_VM_PAGE(&lock, om); - pv = pmap_pvh_remove(&om->md, pmap, va); - } if (mpte != NULL) { mpte->wire_count--; KASSERT(mpte->wire_count > 0, @@ -3541,22 +3536,20 @@ pmap_enter(pmap_t pmap, vm_offset_t va, pmap_resident_count_inc(pmap, 1); /* + * Increment the counters. + */ + if (wired) + pmap->pm_stats.wired_count++; + + /* * Enter on the PV list if part of our managed memory. */ if ((newpte & PG_MANAGED) != 0) { - if (pv == NULL) - pv = get_pv_entry(pmap, &lock); - CHANGE_PV_LIST_LOCK_TO_VM_PAGE(&lock, m); + pv = get_pv_entry(pmap, &lock); pv->pv_va = va; + CHANGE_PV_LIST_LOCK_TO_PHYS(&lock, pa); TAILQ_INSERT_TAIL(&m->md.pv_list, pv, pv_list); - } else if (pv != NULL) - free_pv_entry(pmap, pv); - - /* - * Increment counters - */ - if (wired) - pmap->pm_stats.wired_count++; + } validate: @@ -3586,9 +3579,11 @@ validate: if ((newpte & PG_RW) == 0) invlva = TRUE; } - if ((om->aflags & PGA_WRITEABLE) != 0) { - CHANGE_PV_LIST_LOCK_TO_VM_PAGE(&lock, om); - if (TAILQ_EMPTY(&om->md.pv_list) && + if (opa != pa && (origpte & PG_MANAGED) != 0) { + CHANGE_PV_LIST_LOCK_TO_PHYS(&lock, opa); + pmap_pvh_free(&om->md, pmap, va); + if ((om->aflags & PGA_WRITEABLE) != 0 && + TAILQ_EMPTY(&om->md.pv_list) && ((om->flags & PG_FICTITIOUS) != 0 || TAILQ_EMPTY(&pa_to_pvh(opa)->pv_list))) vm_page_aflag_clear(om, PGA_WRITEABLE); From owner-svn-src-all@FreeBSD.ORG Fri Jul 6 12:13:28 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E1718106566B; Fri, 6 Jul 2012 12:13:28 +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 CC6068FC17; Fri, 6 Jul 2012 12:13:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q66CDScK059992; Fri, 6 Jul 2012 12:13:28 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q66CDS33059989; Fri, 6 Jul 2012 12:13:28 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201207061213.q66CDS33059989@svn.freebsd.org> From: John Baldwin Date: Fri, 6 Jul 2012 12:13:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238164 - head/sys/dev/atkbdc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jul 2012 12:13:29 -0000 Author: jhb Date: Fri Jul 6 12:13:28 2012 New Revision: 238164 URL: http://svn.freebsd.org/changeset/base/238164 Log: Add another PS/2 keyboard PNP ID. This ID is listed as "Reserved by Microsoft" in the standard PNP ID table, but has been seen in the wild on at least one laptop. PR: kern/169571 Submitted by: Matthias Apitz guru unixarea de MFC after: 3 days Modified: head/sys/dev/atkbdc/atkbdc_isa.c Modified: head/sys/dev/atkbdc/atkbdc_isa.c ============================================================================== --- head/sys/dev/atkbdc/atkbdc_isa.c Fri Jul 6 06:42:25 2012 (r238163) +++ head/sys/dev/atkbdc/atkbdc_isa.c Fri Jul 6 12:13:28 2012 (r238164) @@ -87,6 +87,7 @@ static driver_t atkbdc_isa_driver = { static struct isa_pnp_id atkbdc_ids[] = { { 0x0303d041, "Keyboard controller (i8042)" }, /* PNP0303 */ + { 0x0b03d041, "Keyboard controller (i8042)" }, /* PNP030B */ { 0x2003d041, "Keyboard controller (i8042)" }, /* PNP0320 */ { 0 } }; From owner-svn-src-all@FreeBSD.ORG Fri Jul 6 13:21:24 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9708B106566B; Fri, 6 Jul 2012 13:21:24 +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 68EE48FC1B; Fri, 6 Jul 2012 13:21:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q66DLOjp062772; Fri, 6 Jul 2012 13:21:24 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q66DLOQv062770; Fri, 6 Jul 2012 13:21:24 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201207061321.q66DLOQv062770@svn.freebsd.org> From: Ed Maste Date: Fri, 6 Jul 2012 13:21:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238165 - head/tools/tools/netmap X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jul 2012 13:21:24 -0000 Author: emaste Date: Fri Jul 6 13:21:23 2012 New Revision: 238165 URL: http://svn.freebsd.org/changeset/base/238165 Log: Allow threads to finish up when terminated by user Set a flag and allow worker threads to finish upon ^C, instead of immediately cancelling them, so that final packet count and rate stats can be displayed. Modified: head/tools/tools/netmap/pkt-gen.c Modified: head/tools/tools/netmap/pkt-gen.c ============================================================================== --- head/tools/tools/netmap/pkt-gen.c Fri Jul 6 12:13:28 2012 (r238164) +++ head/tools/tools/netmap/pkt-gen.c Fri Jul 6 13:21:23 2012 (r238165) @@ -191,6 +191,7 @@ struct targ { struct glob_arg *g; int used; int completed; + int cancel; int fd; struct nmreq nmr; struct netmap_if *nifp; @@ -221,15 +222,8 @@ static int global_nthreads; static void sigint_h(__unused int sig) { - for (int i = 0; i < global_nthreads; i++) { - /* cancel active threads. */ - if (targs[i].used == 0) - continue; - - D("Cancelling thread #%d\n", i); - pthread_cancel(targs[i].thread); - targs[i].used = 0; - } + for (int i = 0; i < global_nthreads; i++) + targs[i].cancel = 1; signal(SIGINT, SIG_DFL); } @@ -495,7 +489,7 @@ D("start"); void *pkt = &targ->pkt; pcap_t *p = targ->g->p; - for (i = 0; sent < n; i++) { + for (i = 0; sent < n && !targ->cancel; i++) { if (pcap_inject(p, pkt, size) != -1) sent++; if (i > 10000) { @@ -510,6 +504,8 @@ D("start"); * wait for available room in the send queue(s) */ if (poll(fds, 1, 2000) <= 0) { + if (targ->cancel) + break; D("poll error/timeout on queue %d\n", targ->me); goto quit; } @@ -518,7 +514,7 @@ D("start"); */ if (sent > 100000 && !(targ->g->options & OPT_COPY) ) options &= ~OPT_COPY; - for (i = targ->qfirst; i < targ->qlast; i++) { + for (i = targ->qfirst; i < targ->qlast && !targ->cancel; i++) { int m, limit = MIN(n - sent, targ->g->burst); txring = NETMAP_TXRING(nifp, i); @@ -529,6 +525,8 @@ D("start"); sent += m; targ->count = sent; } + if (targ->cancel) + break; } /* flush any remaining packets */ ioctl(fds[0].fd, NIOCTXSYNC, NULL); @@ -614,11 +612,11 @@ receiver_body(void *data) /* main loop, exit after 1s silence */ gettimeofday(&targ->tic, NULL); if (targ->g->use_pcap) { - for (;;) { + while (!targ->cancel) { pcap_dispatch(targ->g->p, targ->g->burst, receive_pcap, NULL); } } else { - while (1) { + while (!targ->cancel) { /* Once we started to receive packets, wait at most 1 seconds before quitting. */ if (poll(fds, 1, 1 * 1000) <= 0) { From owner-svn-src-all@FreeBSD.ORG Fri Jul 6 14:25:59 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EB2F8106566B; Fri, 6 Jul 2012 14:25: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 D490F8FC0C; Fri, 6 Jul 2012 14:25:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q66EPx7D065411; Fri, 6 Jul 2012 14:25:59 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q66EPxVe065409; Fri, 6 Jul 2012 14:25:59 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201207061425.q66EPxVe065409@svn.freebsd.org> From: John Baldwin Date: Fri, 6 Jul 2012 14:25:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238166 - head/sys/amd64/amd64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jul 2012 14:26:00 -0000 Author: jhb Date: Fri Jul 6 14:25:59 2012 New Revision: 238166 URL: http://svn.freebsd.org/changeset/base/238166 Log: Several fixes to the amd64 disassembler: - Add generic support for opcodes that are escape bytes used for multi-byte opcodes (such as the 0x0f prefix). Use this to replace the hard-coded 0x0f special case and add support for three-byte opcodes that use the 0x0f38 prefix. - Decode all Intel VMX instructions. invept and invvpid in particular are three-byte opcodes that use the 0x0f38 escape prefix. - Rework how the special 'SDEP' size flag works such that the default instruction name (i_name) is the instruction when the data size prefix (0x66) is not specified, and the alternate name in i_extra is used when the prefix is included. - Add a new 'ADEP' size flag similar to 'SDEP' except that it chooses between i_name and i_extra based on the address size prefix (0x67). Use this to fix the decoding for jrcxz vs jecxz which is determined by the address size prefix, not the operand size prefix. Also, jcxz is not possible in 64-bit mode, but jrcxz is the default instruction for that opcode. - Add support for handling instructions that have a mandatory 'rep' prefix (this means not outputting the 'repe ' prefix until determining if it is used as part of an opcode). Make 'pause' less of a special case this way. - Decode 'cmpxchg16b' and 'cdqe' which are variants of other instructions but with a REX.W prefix. MFC after: 1 month Modified: head/sys/amd64/amd64/db_disasm.c Modified: head/sys/amd64/amd64/db_disasm.c ============================================================================== --- head/sys/amd64/amd64/db_disasm.c Fri Jul 6 13:21:23 2012 (r238165) +++ head/sys/amd64/amd64/db_disasm.c Fri Jul 6 14:25:59 2012 (r238166) @@ -31,6 +31,7 @@ __FBSDID("$FreeBSD$"); * Instruction disassembler. */ #include +#include #include #include @@ -47,7 +48,9 @@ __FBSDID("$FreeBSD$"); #define DBLR 5 #define EXTR 6 #define SDEP 7 -#define NONE 8 +#define ADEP 8 +#define ESC 9 +#define NONE 10 /* * REX prefix and bits @@ -67,6 +70,7 @@ __FBSDID("$FreeBSD$"); #define Eb 4 /* address, byte size */ #define R 5 /* register, in 'reg' field */ #define Rw 6 /* word register, in 'reg' field */ +#define Rq 39 /* quad register, in 'reg' field */ #define Ri 7 /* register in instruction */ #define S 8 /* segment reg, in 'reg' field */ #define Si 9 /* segment reg, in instruction */ @@ -120,6 +124,45 @@ struct finst { (or pointer to table) */ }; +static const struct inst db_inst_0f388x[] = { +/*80*/ { "", TRUE, SDEP, op2(E, Rq), "invept" }, +/*81*/ { "", TRUE, SDEP, op2(E, Rq), "invvpid" }, +/*82*/ { "", FALSE, NONE, 0, 0 }, +/*83*/ { "", FALSE, NONE, 0, 0 }, +/*84*/ { "", FALSE, NONE, 0, 0 }, +/*85*/ { "", FALSE, NONE, 0, 0 }, +/*86*/ { "", FALSE, NONE, 0, 0 }, +/*87*/ { "", FALSE, NONE, 0, 0 }, + +/*88*/ { "", FALSE, NONE, 0, 0 }, +/*89*/ { "", FALSE, NONE, 0, 0 }, +/*8a*/ { "", FALSE, NONE, 0, 0 }, +/*8b*/ { "", FALSE, NONE, 0, 0 }, +/*8c*/ { "", FALSE, NONE, 0, 0 }, +/*8d*/ { "", FALSE, NONE, 0, 0 }, +/*8e*/ { "", FALSE, NONE, 0, 0 }, +/*8f*/ { "", FALSE, NONE, 0, 0 }, +}; + +static const struct inst * const db_inst_0f38[] = { + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + db_inst_0f388x, + 0, + 0, + 0, + 0, + 0, + 0, + 0 +}; + static const char * const db_Grp6[] = { "sldt", "str", @@ -160,8 +203,8 @@ static const char * const db_Grp9[] = { "", "", "", - "", - "" + "vmptrld", + "vmptrst" }; static const char * const db_Grp15[] = { @@ -236,7 +279,7 @@ static const struct inst db_inst_0f3x[] /*36*/ { "", FALSE, NONE, 0, 0 }, /*37*/ { "getsec",FALSE, NONE, 0, 0 }, -/*38*/ { "", FALSE, NONE, 0, 0 }, +/*38*/ { "", FALSE, ESC, 0, db_inst_0f38 }, /*39*/ { "", FALSE, NONE, 0, 0 }, /*3a*/ { "", FALSE, NONE, 0, 0 }, /*3b*/ { "", FALSE, NONE, 0, 0 }, @@ -266,6 +309,26 @@ static const struct inst db_inst_0f4x[] /*4f*/ { "cmovnle",TRUE, NONE, op2(E, R), 0 }, }; +static const struct inst db_inst_0f7x[] = { +/*70*/ { "", FALSE, NONE, 0, 0 }, +/*71*/ { "", FALSE, NONE, 0, 0 }, +/*72*/ { "", FALSE, NONE, 0, 0 }, +/*73*/ { "", FALSE, NONE, 0, 0 }, +/*74*/ { "", FALSE, NONE, 0, 0 }, +/*75*/ { "", FALSE, NONE, 0, 0 }, +/*76*/ { "", FALSE, NONE, 0, 0 }, +/*77*/ { "", FALSE, NONE, 0, 0 }, + +/*78*/ { "vmread", TRUE, NONE, op2(Rq, E), 0 }, +/*79*/ { "vmwrite",TRUE, NONE, op2(E, Rq), 0 }, +/*7a*/ { "", FALSE, NONE, 0, 0 }, +/*7b*/ { "", FALSE, NONE, 0, 0 }, +/*7c*/ { "", FALSE, NONE, 0, 0 }, +/*7d*/ { "", FALSE, NONE, 0, 0 }, +/*7e*/ { "", FALSE, NONE, 0, 0 }, +/*7f*/ { "", FALSE, NONE, 0, 0 }, +}; + static const struct inst db_inst_0f8x[] = { /*80*/ { "jo", FALSE, NONE, op1(Dl), 0 }, /*81*/ { "jno", FALSE, NONE, op1(Dl), 0 }, @@ -373,7 +436,7 @@ static const struct inst * const db_inst db_inst_0f4x, 0, 0, - 0, + db_inst_0f7x, db_inst_0f8x, db_inst_0f9x, db_inst_0fax, @@ -582,7 +645,7 @@ static const struct inst db_inst_table[2 /*0c*/ { "or", FALSE, BYTE, op2(I, A), 0 }, /*0d*/ { "or", FALSE, LONG, op2(I, A), 0 }, /*0e*/ { "push", FALSE, NONE, op1(Si), 0 }, -/*0f*/ { "", FALSE, NONE, 0, 0 }, +/*0f*/ { "", FALSE, ESC, 0, db_inst_0f }, /*10*/ { "adc", TRUE, BYTE, op2(R, E), 0 }, /*11*/ { "adc", TRUE, LONG, op2(R, E), 0 }, @@ -738,8 +801,8 @@ static const struct inst db_inst_table[2 /*96*/ { "xchg", FALSE, LONG, op2(A, Ri), 0 }, /*97*/ { "xchg", FALSE, LONG, op2(A, Ri), 0 }, -/*98*/ { "cbw", FALSE, SDEP, 0, "cwde" }, /* cbw/cwde */ -/*99*/ { "cwd", FALSE, SDEP, 0, "cdq" }, /* cwd/cdq */ +/*98*/ { "cwde", FALSE, SDEP, 0, "cbw" }, +/*99*/ { "cdq", FALSE, SDEP, 0, "cwd" }, /*9a*/ { "lcall", FALSE, NONE, op1(OS), 0 }, /*9b*/ { "wait", FALSE, NONE, 0, 0 }, /*9c*/ { "pushf", FALSE, LONG, 0, 0 }, @@ -822,7 +885,7 @@ static const struct inst db_inst_table[2 /*e0*/ { "loopne",FALSE, NONE, op1(Db), 0 }, /*e1*/ { "loope", FALSE, NONE, op1(Db), 0 }, /*e2*/ { "loop", FALSE, NONE, op1(Db), 0 }, -/*e3*/ { "jcxz", FALSE, SDEP, op1(Db), "jecxz" }, +/*e3*/ { "jrcxz", FALSE, ADEP, op1(Db), "jecxz" }, /*e4*/ { "in", FALSE, BYTE, op2(Ib, A), 0 }, /*e5*/ { "in", FALSE, LONG, op2(Ib, A) , 0 }, /*e6*/ { "out", FALSE, BYTE, op2(A, Ib), 0 }, @@ -1208,14 +1271,6 @@ db_disasm(loc, altfmt) if (prefix) { get_value_inc(inst, loc, 1, FALSE); } - if (rep == TRUE) { - if (inst == 0x90) { - db_printf("pause\n"); - return (loc); - } - db_printf("repe "); /* XXX repe VS rep */ - rep = FALSE; - } } while (prefix); if (inst >= 0xd8 && inst <= 0xdf) { @@ -1224,9 +1279,10 @@ db_disasm(loc, altfmt) return (loc); } - if (inst == 0x0f) { + ip = &db_inst_table[inst]; + while (ip->i_size == ESC) { get_value_inc(inst, loc, 1, FALSE); - ip = db_inst_0f[inst>>4]; + ip = ((const struct inst * const *)ip->i_extra)[inst>>4]; if (ip == 0) { ip = &db_bad_inst; } @@ -1234,8 +1290,6 @@ db_disasm(loc, altfmt) ip = &ip[inst&0xf]; } } - else - ip = &db_inst_table[inst]; if (ip->i_has_modrm) { get_value_inc(regmodrm, loc, 1, FALSE); @@ -1269,6 +1323,26 @@ db_disasm(loc, altfmt) /* Special cases that don't fit well in the tables. */ if (ip->i_extra == db_Grp7 && f_mod(rex, regmodrm) == 3) { switch (regmodrm) { + case 0xc1: + i_name = "vmcall"; + i_size = NONE; + i_mode = 0; + break; + case 0xc2: + i_name = "vmlaunch"; + i_size = NONE; + i_mode = 0; + break; + case 0xc3: + i_name = "vmresume"; + i_size = NONE; + i_mode = 0; + break; + case 0xc4: + i_name = "vmxoff"; + i_size = NONE; + i_mode = 0; + break; case 0xc8: i_name = "monitor"; i_size = NONE; @@ -1307,8 +1381,42 @@ db_disasm(loc, altfmt) i_mode = 0; } + /* Handle instructions identified by mandatory prefixes. */ + if (rep == TRUE) { + if (inst == 0x90) { + i_name = "pause"; + i_size = NONE; + i_mode = 0; + rep = FALSE; + } else if (ip->i_extra == db_Grp9 && f_mod(rex, regmodrm) != 3 && + f_reg(rex, regmodrm) == 0x6) { + i_name = "vmxon"; + rep = FALSE; + } + } + if (size == WORD) { + if (ip->i_extra == db_Grp9 && f_mod(rex, regmodrm) != 3 && + f_reg(rex, regmodrm) == 0x6) { + i_name = "vmclear"; + } + } + if (rex & REX_W) { + if (strcmp(i_name, "cwde") == 0) + i_name = "cdqe"; + else if (strcmp(i_name, "cmpxchg8b") == 0) + i_name = "cmpxchg16b"; + } + + if (rep == TRUE) + db_printf("repe "); /* XXX repe VS rep */ + if (i_size == SDEP) { - if (size == WORD) + if (size == LONG) + db_printf("%s", i_name); + else + db_printf("%s", (const char *)ip->i_extra); + } else if (i_size == ADEP) { + if (short_addr == FALSE) db_printf("%s", i_name); else db_printf("%s", (const char *)ip->i_extra); @@ -1381,6 +1489,10 @@ db_disasm(loc, altfmt) db_printf("%s", db_reg[rex != 0 ? 1 : 0][WORD][f_reg(rex, regmodrm)]); break; + case Rq: + db_printf("%s", db_reg[rex != 0 ? 1 : 0][QUAD][f_reg(rex, regmodrm)]); + break; + case Ri: db_printf("%s", db_reg[0][QUAD][f_rm(rex, inst)]); break; From owner-svn-src-all@FreeBSD.ORG Fri Jul 6 14:28:18 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C8F1B106566B; Fri, 6 Jul 2012 14:28:18 +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 B29048FC0C; Fri, 6 Jul 2012 14:28:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q66ESIeT065539; Fri, 6 Jul 2012 14:28:18 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q66ESIcB065534; Fri, 6 Jul 2012 14:28:18 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201207061428.q66ESIcB065534@svn.freebsd.org> From: John Baldwin Date: Fri, 6 Jul 2012 14:28:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238167 - in head/contrib/binutils: gas/config opcodes X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jul 2012 14:28:18 -0000 Author: jhb Date: Fri Jul 6 14:28:18 2012 New Revision: 238167 URL: http://svn.freebsd.org/changeset/base/238167 Log: Add support for the 'invept' and 'invvpid' instructions. Beyond simply adding appropriate table entries, the assembler had to be adjusted as these are the first non-SSE instructions to use a 3-byte opcode (and a mandatory prefix to boot). MFC after: 1 month Modified: head/contrib/binutils/gas/config/tc-i386.c head/contrib/binutils/opcodes/i386-dis.c head/contrib/binutils/opcodes/i386-opc.tbl head/contrib/binutils/opcodes/i386-tbl.h Modified: head/contrib/binutils/gas/config/tc-i386.c ============================================================================== --- head/contrib/binutils/gas/config/tc-i386.c Fri Jul 6 14:25:59 2012 (r238166) +++ head/contrib/binutils/gas/config/tc-i386.c Fri Jul 6 14:28:18 2012 (r238167) @@ -3990,6 +3990,16 @@ output_insn (void) goto check_prefix; } } + else if (i.tm.base_opcode == 0x660f3880 || i.tm.base_opcode == 0x660f3881) + { + /* invept and invvpid are 3 byte instructions with a + mandatory prefix. */ + if (i.tm.base_opcode & 0xff000000) + { + prefix = (i.tm.base_opcode >> 24) & 0xff; + add_prefix (prefix); + } + } else if ((i.tm.base_opcode & 0xff0000) != 0) { prefix = (i.tm.base_opcode >> 16) & 0xff; @@ -4029,6 +4039,12 @@ output_insn (void) p = frag_more (3); *p++ = (i.tm.base_opcode >> 16) & 0xff; } + else if (i.tm.base_opcode == 0x660f3880 || + i.tm.base_opcode == 0x660f3881) + { + p = frag_more (3); + *p++ = (i.tm.base_opcode >> 16) & 0xff; + } else p = frag_more (2); Modified: head/contrib/binutils/opcodes/i386-dis.c ============================================================================== --- head/contrib/binutils/opcodes/i386-dis.c Fri Jul 6 14:25:59 2012 (r238166) +++ head/contrib/binutils/opcodes/i386-dis.c Fri Jul 6 14:28:18 2012 (r238167) @@ -213,6 +213,7 @@ fetch_data (struct disassemble_info *inf #define Ew { OP_E, w_mode } #define M { OP_M, 0 } /* lea, lgdt, etc. */ #define Ma { OP_M, v_mode } +#define Mo { OP_M, o_mode } #define Mp { OP_M, f_mode } /* 32 or 48 bit memory operand for LDS, LES etc */ #define Mq { OP_M, q_mode } #define Gb { OP_G, b_mode } @@ -540,6 +541,8 @@ fetch_data (struct disassemble_info *inf #define PREGRP95 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 95 } } #define PREGRP96 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 96 } } #define PREGRP97 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 97 } } +#define PREGRP98 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 98 } } +#define PREGRP99 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 99 } } #define X86_64_0 NULL, { { NULL, X86_64_SPECIAL }, { NULL, 0 } } @@ -2586,6 +2589,22 @@ static const struct dis386 prefix_user_t { "punpckldq",{ MX, EMq } }, { "(bad)", { XX } }, }, + + /* PREGRP98 */ + { + { "(bad)", { XX } }, + { "(bad)", { XX } }, + { "invept", { Gm, Mo } }, + { "(bad)", { XX } }, + }, + + /* PREGRP99 */ + { + { "(bad)", { XX } }, + { "(bad)", { XX } }, + { "invvpid",{ Gm, Mo } }, + { "(bad)", { XX } }, + }, }; static const struct dis386 x86_64_table[][2] = { @@ -2755,8 +2774,8 @@ static const struct dis386 three_byte_ta { "(bad)", { XX } }, { "(bad)", { XX } }, /* 80 */ - { "(bad)", { XX } }, - { "(bad)", { XX } }, + { PREGRP98 }, + { PREGRP99 }, { "(bad)", { XX } }, { "(bad)", { XX } }, { "(bad)", { XX } }, @@ -5884,7 +5903,7 @@ static void OP_M (int bytemode, int sizeflag) { if (modrm.mod == 3) - /* bad bound,lea,lds,les,lfs,lgs,lss,cmpxchg8b,vmptrst modrm */ + /* bad bound,lea,lds,les,lfs,lgs,lss,cmpxchg8b,vmptrst,invept,invvpid modrm */ BadOp (); else OP_E (bytemode, sizeflag); Modified: head/contrib/binutils/opcodes/i386-opc.tbl ============================================================================== --- head/contrib/binutils/opcodes/i386-opc.tbl Fri Jul 6 14:25:59 2012 (r238166) +++ head/contrib/binutils/opcodes/i386-opc.tbl Fri Jul 6 14:28:18 2012 (r238167) @@ -1289,6 +1289,10 @@ mwait, 2, 0xf01, 0xc9, CpuSSE3|CpuNo64, mwait, 2, 0xf01, 0xc9, CpuSSE3|Cpu64, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt|NoRex64, { Reg64, Reg64 } // VMX instructions. +invept, 2, 0x660f3880, None, CpuVMX|CpuNo64, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|No_qSuf|No_xSuf|NoRex64, { BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg32 } +invept, 2, 0x660f3880, None, CpuVMX|Cpu64, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|No_qSuf|No_xSuf|NoRex64, { BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg64 } +invvpid, 2, 0x660f3881, None, CpuVMX|CpuNo64, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|No_qSuf|No_xSuf|NoRex64, { BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg32 } +invvpid, 2, 0x660f3881, None, CpuVMX|Cpu64, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|No_qSuf|No_xSuf|NoRex64, { BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg64 } vmcall, 0, 0xf01, 0xc1, CpuVMX, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { 0 } vmclear, 1, 0x660fc7, 0x6, CpuVMX, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|NoRex64, { BaseIndex|Disp8|Disp16|Disp32|Disp32S } vmlaunch, 0, 0xf01, 0xc2, CpuVMX, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { 0 } Modified: head/contrib/binutils/opcodes/i386-tbl.h ============================================================================== --- head/contrib/binutils/opcodes/i386-tbl.h Fri Jul 6 14:25:59 2012 (r238166) +++ head/contrib/binutils/opcodes/i386-tbl.h Fri Jul 6 14:28:18 2012 (r238167) @@ -3625,6 +3625,22 @@ const template i386_optab[] = No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt|NoRex64, { Reg64, Reg64 } }, + { "invept", 2, 0x660f3880, None, CpuVMX|CpuNo64, + Modrm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|No_qSuf|No_xSuf|NoRex64, + { BaseIndex|Disp8|Disp16|Disp32|Disp32S, + Reg32 } }, + { "invept", 2, 0x660f3880, None, CpuVMX|Cpu64, + Modrm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|No_qSuf|No_xSuf|NoRex64, + { BaseIndex|Disp8|Disp16|Disp32|Disp32S, + Reg64 } }, + { "invvpid", 2, 0x660f3881, None, CpuVMX|CpuNo64, + Modrm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|No_qSuf|No_xSuf|NoRex64, + { BaseIndex|Disp8|Disp16|Disp32|Disp32S, + Reg32 } }, + { "invvpid", 2, 0x660f3881, None, CpuVMX|Cpu64, + Modrm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|No_qSuf|No_xSuf|NoRex64, + { BaseIndex|Disp8|Disp16|Disp32|Disp32S, + Reg64 } }, { "vmcall", 0, 0xf01, 0xc1, CpuVMX, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { 0 } }, From owner-svn-src-all@FreeBSD.ORG Fri Jul 6 14:41:02 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EA8A71065670; Fri, 6 Jul 2012 14:41:02 +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 D52608FC08; Fri, 6 Jul 2012 14:41:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q66Ef2hf066149; Fri, 6 Jul 2012 14:41:02 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q66Ef2M4066144; Fri, 6 Jul 2012 14:41:02 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201207061441.q66Ef2M4066144@svn.freebsd.org> From: Andriy Gapon Date: Fri, 6 Jul 2012 14:41:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238168 - in head/sys/cddl/dev/dtrace: amd64 i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jul 2012 14:41:03 -0000 Author: avg Date: Fri Jul 6 14:41:02 2012 New Revision: 238168 URL: http://svn.freebsd.org/changeset/base/238168 Log: r237748 continuation: segment-override prefixes are not invalid in long mode Update DTrace disassembler accordingly. The code to treat the prefixes as null prefixes was already in place. Although in practice compilers seem to generate only cs-prefix for use in long NOPs, the same treatment is applied to all of cs, ds, es, ss for consistency. Reported by: emaste Tested by: emaste Obtained from: Illumos commit 13442:4adbe6de60c8 (+ local changes) MFC after: 5 days Modified: head/sys/cddl/dev/dtrace/amd64/dis_tables.c head/sys/cddl/dev/dtrace/i386/dis_tables.c Modified: head/sys/cddl/dev/dtrace/amd64/dis_tables.c ============================================================================== --- head/sys/cddl/dev/dtrace/amd64/dis_tables.c Fri Jul 6 14:28:18 2012 (r238167) +++ head/sys/cddl/dev/dtrace/amd64/dis_tables.c Fri Jul 6 14:41:02 2012 (r238168) @@ -1146,14 +1146,14 @@ const instable_t dis_distable[16][16] = /* [1,C] */ TNS("sbbb",IA), TS("sbb",IA), TSx("push",SEG), TSx("pop",SEG), }, { /* [2,0] */ TNS("andb",RMw), TS("and",RMw), TNS("andb",MRw), TS("and",MRw), -/* [2,4] */ TNS("andb",IA), TS("and",IA), TNSx("%es:",OVERRIDE), TNSx("daa",NORM), +/* [2,4] */ TNS("andb",IA), TS("and",IA), TNS("%es:",OVERRIDE), TNSx("daa",NORM), /* [2,8] */ TNS("subb",RMw), TS("sub",RMw), TNS("subb",MRw), TS("sub",MRw), -/* [2,C] */ TNS("subb",IA), TS("sub",IA), TNSx("%cs:",OVERRIDE), TNSx("das",NORM), +/* [2,C] */ TNS("subb",IA), TS("sub",IA), TNS("%cs:",OVERRIDE), TNSx("das",NORM), }, { /* [3,0] */ TNS("xorb",RMw), TS("xor",RMw), TNS("xorb",MRw), TS("xor",MRw), -/* [3,4] */ TNS("xorb",IA), TS("xor",IA), TNSx("%ss:",OVERRIDE), TNSx("aaa",NORM), +/* [3,4] */ TNS("xorb",IA), TS("xor",IA), TNS("%ss:",OVERRIDE), TNSx("aaa",NORM), /* [3,8] */ TNS("cmpb",RMw), TS("cmp",RMw), TNS("cmpb",MRw), TS("cmp",MRw), -/* [3,C] */ TNS("cmpb",IA), TS("cmp",IA), TNSx("%ds:",OVERRIDE), TNSx("aas",NORM), +/* [3,C] */ TNS("cmpb",IA), TS("cmp",IA), TNS("%ds:",OVERRIDE), TNSx("aas",NORM), }, { /* [4,0] */ TSx("inc",R), TSx("inc",R), TSx("inc",R), TSx("inc",R), /* [4,4] */ TSx("inc",R), TSx("inc",R), TSx("inc",R), TSx("inc",R), Modified: head/sys/cddl/dev/dtrace/i386/dis_tables.c ============================================================================== --- head/sys/cddl/dev/dtrace/i386/dis_tables.c Fri Jul 6 14:28:18 2012 (r238167) +++ head/sys/cddl/dev/dtrace/i386/dis_tables.c Fri Jul 6 14:41:02 2012 (r238168) @@ -1146,14 +1146,14 @@ const instable_t dis_distable[16][16] = /* [1,C] */ TNS("sbbb",IA), TS("sbb",IA), TSx("push",SEG), TSx("pop",SEG), }, { /* [2,0] */ TNS("andb",RMw), TS("and",RMw), TNS("andb",MRw), TS("and",MRw), -/* [2,4] */ TNS("andb",IA), TS("and",IA), TNSx("%es:",OVERRIDE), TNSx("daa",NORM), +/* [2,4] */ TNS("andb",IA), TS("and",IA), TNS("%es:",OVERRIDE), TNSx("daa",NORM), /* [2,8] */ TNS("subb",RMw), TS("sub",RMw), TNS("subb",MRw), TS("sub",MRw), -/* [2,C] */ TNS("subb",IA), TS("sub",IA), TNSx("%cs:",OVERRIDE), TNSx("das",NORM), +/* [2,C] */ TNS("subb",IA), TS("sub",IA), TNS("%cs:",OVERRIDE), TNSx("das",NORM), }, { /* [3,0] */ TNS("xorb",RMw), TS("xor",RMw), TNS("xorb",MRw), TS("xor",MRw), -/* [3,4] */ TNS("xorb",IA), TS("xor",IA), TNSx("%ss:",OVERRIDE), TNSx("aaa",NORM), +/* [3,4] */ TNS("xorb",IA), TS("xor",IA), TNS("%ss:",OVERRIDE), TNSx("aaa",NORM), /* [3,8] */ TNS("cmpb",RMw), TS("cmp",RMw), TNS("cmpb",MRw), TS("cmp",MRw), -/* [3,C] */ TNS("cmpb",IA), TS("cmp",IA), TNSx("%ds:",OVERRIDE), TNSx("aas",NORM), +/* [3,C] */ TNS("cmpb",IA), TS("cmp",IA), TNS("%ds:",OVERRIDE), TNSx("aas",NORM), }, { /* [4,0] */ TSx("inc",R), TSx("inc",R), TSx("inc",R), TSx("inc",R), /* [4,4] */ TSx("inc",R), TSx("inc",R), TSx("inc",R), TSx("inc",R), From owner-svn-src-all@FreeBSD.ORG Fri Jul 6 14:45:31 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 55A551065672; Fri, 6 Jul 2012 14:45:31 +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 264C98FC08; Fri, 6 Jul 2012 14:45:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q66EjV9q066368; Fri, 6 Jul 2012 14:45:31 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q66EjUAw066365; Fri, 6 Jul 2012 14:45:30 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201207061445.q66EjUAw066365@svn.freebsd.org> From: Andriy Gapon Date: Fri, 6 Jul 2012 14:45:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238169 - in head/sys/cddl/dev/dtrace: amd64 i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jul 2012 14:45:31 -0000 Author: avg Date: Fri Jul 6 14:45:30 2012 New Revision: 238169 URL: http://svn.freebsd.org/changeset/base/238169 Log: r237748 continuation: fix nopw (0f 1f) behavior with respect to modifiers To do: proper merge with Illumos vendor area. Reported by: emaste Tested by: emaste Obtained from: Illumos commit 13442:4adbe6de60c8 MFC after: 5 days Modified: head/sys/cddl/dev/dtrace/amd64/dis_tables.c head/sys/cddl/dev/dtrace/i386/dis_tables.c Modified: head/sys/cddl/dev/dtrace/amd64/dis_tables.c ============================================================================== --- head/sys/cddl/dev/dtrace/amd64/dis_tables.c Fri Jul 6 14:41:02 2012 (r238168) +++ head/sys/cddl/dev/dtrace/amd64/dis_tables.c Fri Jul 6 14:45:30 2012 (r238169) @@ -815,7 +815,7 @@ const instable_t dis_op0F[16][16] = { /* [10] */ TNSZ("movups",XMMO,16), TNSZ("movups",XMMOS,16),TNSZ("movlps",XMMO,8), TNSZ("movlps",XMMOS,8), /* [14] */ TNSZ("unpcklps",XMMO,16),TNSZ("unpckhps",XMMO,16),TNSZ("movhps",XMMOM,8),TNSZ("movhps",XMMOMS,8), /* [18] */ IND(dis_op0F18), INVALID, INVALID, INVALID, -/* [1C] */ INVALID, INVALID, INVALID, TNS("nopw", M), +/* [1C] */ INVALID, INVALID, INVALID, TS("nopw", Mw), }, { /* [20] */ TSy("mov",SREG), TSy("mov",SREG), TSy("mov",SREG), TSy("mov",SREG), /* [24] */ TSx("mov",SREG), INVALID, TSx("mov",SREG), INVALID, Modified: head/sys/cddl/dev/dtrace/i386/dis_tables.c ============================================================================== --- head/sys/cddl/dev/dtrace/i386/dis_tables.c Fri Jul 6 14:41:02 2012 (r238168) +++ head/sys/cddl/dev/dtrace/i386/dis_tables.c Fri Jul 6 14:45:30 2012 (r238169) @@ -815,7 +815,7 @@ const instable_t dis_op0F[16][16] = { /* [10] */ TNSZ("movups",XMMO,16), TNSZ("movups",XMMOS,16),TNSZ("movlps",XMMO,8), TNSZ("movlps",XMMOS,8), /* [14] */ TNSZ("unpcklps",XMMO,16),TNSZ("unpckhps",XMMO,16),TNSZ("movhps",XMMOM,8),TNSZ("movhps",XMMOMS,8), /* [18] */ IND(dis_op0F18), INVALID, INVALID, INVALID, -/* [1C] */ INVALID, INVALID, INVALID, TNS("nopw", M), +/* [1C] */ INVALID, INVALID, INVALID, TS("nopw", Mw), }, { /* [20] */ TSy("mov",SREG), TSy("mov",SREG), TSy("mov",SREG), TSy("mov",SREG), /* [24] */ TSx("mov",SREG), INVALID, TSx("mov",SREG), INVALID, From owner-svn-src-all@FreeBSD.ORG Fri Jul 6 15:07:06 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7C74C1065670; Fri, 6 Jul 2012 15:07:06 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 4EDB38FC1C; Fri, 6 Jul 2012 15:07:06 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 9F05DB99A; Fri, 6 Jul 2012 11:07:05 -0400 (EDT) From: John Baldwin To: src-committers@freebsd.org Date: Fri, 6 Jul 2012 11:03:25 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p17; KDE/4.5.5; amd64; ; ) References: <201207061428.q66ESIcB065534@svn.freebsd.org> In-Reply-To: <201207061428.q66ESIcB065534@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201207061103.25423.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 06 Jul 2012 11:07:05 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r238167 - in head/contrib/binutils: gas/config opcodes X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jul 2012 15:07:06 -0000 On Friday, July 06, 2012 10:28:18 am John Baldwin wrote: > Author: jhb > Date: Fri Jul 6 14:28:18 2012 > New Revision: 238167 > URL: http://svn.freebsd.org/changeset/base/238167 > > Log: > Add support for the 'invept' and 'invvpid' instructions. Beyond simply > adding appropriate table entries, the assembler had to be adjusted as > these are the first non-SSE instructions to use a 3-byte opcode (and a > mandatory prefix to boot). > > MFC after: 1 month To my knowledge, this allows bhyve to now be built with our in-tree toolchain. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Fri Jul 6 15:17:46 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 53A1D106566C; Fri, 6 Jul 2012 15:17:46 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from alto.onthenet.com.au (alto.OntheNet.com.au [203.13.68.12]) by mx1.freebsd.org (Postfix) with ESMTP id 06CB58FC08; Fri, 6 Jul 2012 15:17:46 +0000 (UTC) Received: from dommail.onthenet.com.au (dommail.OntheNet.com.au [203.13.70.57]) by alto.onthenet.com.au (Postfix) with ESMTPS id 4773712367; Sat, 7 Jul 2012 01:17:45 +1000 (EST) Received: from Peter-Grehans-MacBook-Pro.local (c-75-70-33-234.hsd1.co.comcast.net [75.70.33.234]) by dommail.onthenet.com.au (MOS 4.2.4-GA) with ESMTP id BEX53042 (AUTH peterg@ptree32.com.au); Sat, 7 Jul 2012 01:17:42 +1000 Message-ID: <4FF70194.7060105@freebsd.org> Date: Fri, 06 Jul 2012 09:17:40 -0600 From: Peter Grehan User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.28) Gecko/20120306 Thunderbird/3.1.20 MIME-Version: 1.0 To: John Baldwin References: <201207061428.q66ESIcB065534@svn.freebsd.org> <201207061103.25423.jhb@freebsd.org> In-Reply-To: <201207061103.25423.jhb@freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Junkmail-Info: RCVD_IN_PBL,RCVD_IN_SORBS_DUL,RDNS_DYNAMIC,SPF_SOFTFAIL X-Junkmail-Status: score=29/51, host=dommail.onthenet.com.au Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r238167 - in head/contrib/binutils: gas/config opcodes X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jul 2012 15:17:46 -0000 > To my knowledge, this allows bhyve to now be built with our in-tree toolchain. It does :) Thanks for doing this work. I'll IFC the bhyve branch and remove the Makefile changes that invoked the binutils port. later, Peter. From owner-svn-src-all@FreeBSD.ORG Fri Jul 6 15:36:40 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 41BB21065678; Fri, 6 Jul 2012 15:36: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 2CD568FC17; Fri, 6 Jul 2012 15:36:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q66FaeqR068542; Fri, 6 Jul 2012 15:36:40 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q66FadUO068540; Fri, 6 Jul 2012 15:36:39 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201207061536.q66FadUO068540@svn.freebsd.org> From: Ed Maste Date: Fri, 6 Jul 2012 15:36:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238170 - head/tools/tools/netmap X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jul 2012 15:36:40 -0000 Author: emaste Date: Fri Jul 6 15:36:39 2012 New Revision: 238170 URL: http://svn.freebsd.org/changeset/base/238170 Log: Also report tx bandwidth with Ethernet overhead Modified: head/tools/tools/netmap/pkt-gen.c Modified: head/tools/tools/netmap/pkt-gen.c ============================================================================== --- head/tools/tools/netmap/pkt-gen.c Fri Jul 6 14:45:30 2012 (r238169) +++ head/tools/tools/netmap/pkt-gen.c Fri Jul 6 15:36:39 2012 (r238170) @@ -653,27 +653,41 @@ quit: return (NULL); } +static char * +scaled_val(double val) +{ + static char buf[64]; + const char *units[] = {"", "K", "M", "G"}; + int i = 0; + + while (val >= 1000 && i < 3) { + val /= 1000; + i++; + } + snprintf(buf, sizeof(buf), "%.2f%s", val, units[i]); + return (buf); +} + static void tx_output(uint64_t sent, int size, double delta) { - double amount = 8.0 * (1.0 * size * sent) / delta; + uint64_t bytes_sent = sent * size; + double bw = 8.0 * bytes_sent / delta; double pps = sent / delta; - char units[4] = { '\0', 'K', 'M', 'G' }; - int aunit = 0, punit = 0; - - while (amount >= 1000) { - amount /= 1000; - aunit += 1; - } - while (pps >= 1000) { - pps /= 1000; - punit += 1; - } + /* + * Assume Ethernet overhead of 24 bytes per packet excluding header: + * FCS 4 bytes + * Preamble 8 bytes + * IFG 12 bytes + */ + double bw_with_overhead = 8.0 * (bytes_sent + sent * 24) / delta; printf("Sent %" PRIu64 " packets, %d bytes each, in %.2f seconds.\n", sent, size, delta); - printf("Speed: %.2f%cpps. Bandwidth: %.2f%cbps.\n", - pps, units[punit], amount, units[aunit]); + printf("Speed: %spps. ", scaled_val(pps)); + printf("Bandwidth: %sbps ", scaled_val(bw)); + printf("(%sbps with overhead).\n", scaled_val(bw_with_overhead)); + } From owner-svn-src-all@FreeBSD.ORG Fri Jul 6 15:46:39 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 99CC61065670; Fri, 6 Jul 2012 15:46:39 +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 850988FC1A; Fri, 6 Jul 2012 15:46:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q66FkdYU068982; Fri, 6 Jul 2012 15:46:39 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q66FkdqP068980; Fri, 6 Jul 2012 15:46:39 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201207061546.q66FkdqP068980@svn.freebsd.org> From: Edward Tomasz Napierala Date: Fri, 6 Jul 2012 15:46:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238171 - head/sys/geom X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jul 2012 15:46:39 -0000 Author: trasz Date: Fri Jul 6 15:46:38 2012 New Revision: 238171 URL: http://svn.freebsd.org/changeset/base/238171 Log: Fix typo in the comment. Modified: head/sys/geom/geom_dev.c Modified: head/sys/geom/geom_dev.c ============================================================================== --- head/sys/geom/geom_dev.c Fri Jul 6 15:36:39 2012 (r238170) +++ head/sys/geom/geom_dev.c Fri Jul 6 15:46:38 2012 (r238171) @@ -497,7 +497,7 @@ g_dev_strategy(struct bio *bp) * * Called from below when the provider orphaned us. * - Clear any dump settings. - * - Destroy the struct cdev *to prevent any more request from coming in. The + * - Destroy the struct cdev to prevent any more request from coming in. The * provider is already marked with an error, so anything which comes in * in the interrim will be returned immediately. * - Wait for any outstanding I/O to finish. From owner-svn-src-all@FreeBSD.ORG Fri Jul 6 15:57:04 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9BCA41065675; Fri, 6 Jul 2012 15:57:04 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6EEDF8FC22; Fri, 6 Jul 2012 15:57:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q66Fv46P069467; Fri, 6 Jul 2012 15:57:04 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q66Fv45N069464; Fri, 6 Jul 2012 15:57:04 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201207061557.q66Fv45N069464@svn.freebsd.org> From: Marcel Moolenaar Date: Fri, 6 Jul 2012 15:57:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238172 - head/sys/dev/agp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jul 2012 15:57:04 -0000 Author: marcel Date: Fri Jul 6 15:57:03 2012 New Revision: 238172 URL: http://svn.freebsd.org/changeset/base/238172 Log: agp.c: Don't use Maxmem when the amount of memory is meant. Use realmem instead. Maxmem is not only a MD variable, it represents the highest physical memory address in use. On systems where memory is sparsely layed-out the highest memory address and the amount of memory are not interchangeable. Scaling the AGP aperture based on the actual amount of memory (= realmem) rather than the available memory (= physmem) makes sure there's consistent behaviour across architectures. agp_i810.c: While arguably the use of Maxmem can be considered correct, replace its use with realmem anyway. agp_i810.c is specific to amd64, i386 & pc98, which have a dense physical memory layout. Avoiding Maxmem here is done with an eye on copy-n-paste behaviour in general and to avoid confusion caused by using realmem in agp.c and Maxmem in agp_i810.c. In both cases, remove the inclusion of md_var.h Modified: head/sys/dev/agp/agp.c head/sys/dev/agp/agp_i810.c Modified: head/sys/dev/agp/agp.c ============================================================================== --- head/sys/dev/agp/agp.c Fri Jul 6 15:46:38 2012 (r238171) +++ head/sys/dev/agp/agp.c Fri Jul 6 15:57:03 2012 (r238172) @@ -55,7 +55,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include @@ -234,7 +233,7 @@ agp_generic_attach(device_t dev) * Work out an upper bound for agp memory allocation. This * uses a heurisitc table from the Linux driver. */ - memsize = ptoa(Maxmem) >> 20; + memsize = ptoa(realmem) >> 20; for (i = 0; i < agp_max_size; i++) { if (memsize <= agp_max[i][0]) break; Modified: head/sys/dev/agp/agp_i810.c ============================================================================== --- head/sys/dev/agp/agp_i810.c Fri Jul 6 15:46:38 2012 (r238171) +++ head/sys/dev/agp/agp_i810.c Fri Jul 6 15:57:03 2012 (r238172) @@ -74,7 +74,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include MALLOC_DECLARE(M_AGP); @@ -1439,7 +1438,7 @@ agp_i810_attach(device_t dev) if (error) return (error); - if (ptoa((vm_paddr_t)Maxmem) > + if (ptoa((vm_paddr_t)realmem) > (1ULL << sc->match->driver->busdma_addr_mask_sz) - 1) { device_printf(dev, "agp_i810 does not support physical " "memory above %ju.\n", (uintmax_t)(1ULL << From owner-svn-src-all@FreeBSD.ORG Fri Jul 6 16:43:57 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2B593106566C; Fri, 6 Jul 2012 16:43:57 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 152578FC16; Fri, 6 Jul 2012 16:43:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q66Ghuf3071585; Fri, 6 Jul 2012 16:43:56 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q66Ghu9R071579; Fri, 6 Jul 2012 16:43:56 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201207061643.q66Ghu9R071579@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Fri, 6 Jul 2012 16:43:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238173 - head/lib/libedit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jul 2012 16:43:57 -0000 Author: pfg Date: Fri Jul 6 16:43:56 2012 New Revision: 238173 URL: http://svn.freebsd.org/changeset/base/238173 Log: Fix issue resizing bin/sh This partially reverts some changes from r237448 that are causing breakage when resizing under bin/sh . Reverted changes from NetBSD are: Mar 10 20:46:15 2009 - editline.3 read.c make el_gets set the count to -1 on error to distinguish between EOF and error. Feb 19 15:20:22 2009 - read.c sig.c sig.h reset and redraw on sigcont. From Anon Ymous. Feb 15 21:24:13 2009 don't restart on EINTR, instead return NULL immediately. From Anon Ymous PR: 169603 Reported by: Peter Jeremy, David Shao MFC after: 3 days Modified: head/lib/libedit/editline.3 head/lib/libedit/el.h head/lib/libedit/read.c head/lib/libedit/sig.c head/lib/libedit/sig.h Modified: head/lib/libedit/editline.3 ============================================================================== --- head/lib/libedit/editline.3 Fri Jul 6 15:57:03 2012 (r238172) +++ head/lib/libedit/editline.3 Fri Jul 6 16:43:56 2012 (r238173) @@ -162,11 +162,6 @@ is modified to contain the number of cha Returns the line read if successful, or .Dv NULL if no characters were read or if an error occurred. -If an error occurred, -.Fa count -is set to \-1 and -.Dv errno -contains the error code that caused it. The return value may not remain valid across calls to .Fn el_gets and must be copied if the data is to be retained. Modified: head/lib/libedit/el.h ============================================================================== --- head/lib/libedit/el.h Fri Jul 6 15:57:03 2012 (r238172) +++ head/lib/libedit/el.h Fri Jul 6 16:43:56 2012 (r238173) @@ -115,7 +115,6 @@ struct editline { FILE *el_errfile; /* Stdio stuff */ int el_infd; /* Input file descriptor */ int el_flags; /* Various flags. */ - int el_errno; /* Local copy of errno */ coord_t el_cursor; /* Cursor location */ char **el_display; /* Real screen image = what is there */ char **el_vdisplay; /* Virtual screen image = what we see */ Modified: head/lib/libedit/read.c ============================================================================== --- head/lib/libedit/read.c Fri Jul 6 15:57:03 2012 (r238172) +++ head/lib/libedit/read.c Fri Jul 6 16:43:56 2012 (r238173) @@ -49,7 +49,7 @@ __FBSDID("$FreeBSD$"); #include #include "el.h" -#define OKCMD -1 /* must be -1! */ +#define OKCMD -1 private int read__fixio(int, int); private int read_preread(EditLine *); @@ -170,7 +170,7 @@ read__fixio(int fd __unused, int e) return (e ? 0 : -1); case EINTR: - return (-1); + return (0); default: return (-1); @@ -235,12 +235,9 @@ read_getcmd(EditLine *el, el_action_t *c el_action_t cmd; int num; - el->el_errno = 0; do { - if ((num = el_getc(el, ch)) != 1) { /* if EOF or error */ - el->el_errno = num == 0 ? 0 : errno; + if ((num = el_getc(el, ch)) != 1) /* if EOF or error */ return (num); - } #ifdef KANJI if ((*ch & 0200)) { @@ -292,21 +289,14 @@ read_char(EditLine *el, char *cp) ssize_t num_read; int tried = 0; - again: - el->el_signal->sig_no = 0; - while ((num_read = read(el->el_infd, cp, 1)) == -1) { - if (el->el_signal->sig_no == SIGCONT) { - sig_set(el); - el_set(el, EL_REFRESH); - goto again; - } + while ((num_read = read(el->el_infd, cp, 1)) == -1) if (!tried && read__fixio(el->el_infd, errno) == 0) tried = 1; else { *cp = '\0'; return (-1); } - } + return (int)num_read; } @@ -413,20 +403,17 @@ el_gets(EditLine *el, int *nread) int num; /* how many chars we have read at NL */ char ch; int crlf = 0; - int nrb; #ifdef FIONREAD c_macro_t *ma = &el->el_chared.c_macro; #endif /* FIONREAD */ - if (nread == NULL) - nread = &nrb; *nread = 0; if (el->el_flags & NO_TTY) { char *cp = el->el_line.buffer; size_t idx; - while ((num = (*el->el_read.read_char)(el, cp)) == 1) { + while ((*el->el_read.read_char)(el, cp) == 1) { /* make sure there is space for next character */ if (cp + 1 >= el->el_line.limit) { idx = (cp - el->el_line.buffer); @@ -440,16 +427,12 @@ el_gets(EditLine *el, int *nread) if (cp[-1] == '\r' || cp[-1] == '\n') break; } - if (num == -1) { - if (errno == EINTR) - cp = el->el_line.buffer; - el->el_errno = errno; - } el->el_line.cursor = el->el_line.lastchar = cp; *cp = '\0'; - *nread = (int)(el->el_line.cursor - el->el_line.buffer); - goto done; + if (nread) + *nread = (int)(el->el_line.cursor - el->el_line.buffer); + return (*nread ? el->el_line.buffer : NULL); } @@ -460,8 +443,8 @@ el_gets(EditLine *el, int *nread) (void) ioctl(el->el_infd, FIONREAD, (ioctl_t) & chrs); if (chrs == 0) { if (tty_rawmode(el) < 0) { - errno = 0; - *nread = 0; + if (nread) + *nread = 0; return (NULL); } } @@ -474,7 +457,6 @@ el_gets(EditLine *el, int *nread) if (el->el_flags & EDIT_DISABLED) { char *cp; size_t idx; - if ((el->el_flags & UNBUFFERED) == 0) cp = el->el_line.buffer; else @@ -482,7 +464,7 @@ el_gets(EditLine *el, int *nread) term__flush(el); - while ((num = (*el->el_read.read_char)(el, cp)) == 1) { + while ((*el->el_read.read_char)(el, cp) == 1) { /* make sure there is space next character */ if (cp + 1 >= el->el_line.limit) { idx = (cp - el->el_line.buffer); @@ -498,15 +480,11 @@ el_gets(EditLine *el, int *nread) break; } - if (num == -1) { - if (errno == EINTR) - cp = el->el_line.buffer; - el->el_errno = errno; - } - el->el_line.cursor = el->el_line.lastchar = cp; *cp = '\0'; - goto done; + if (nread) + *nread = (int)(el->el_line.cursor - el->el_line.buffer); + return (*nread ? el->el_line.buffer : NULL); } for (num = OKCMD; num == OKCMD;) { /* while still editing this @@ -522,12 +500,6 @@ el_gets(EditLine *el, int *nread) #endif /* DEBUG_READ */ break; } - if (el->el_errno == EINTR) { - el->el_line.buffer[0] = '\0'; - el->el_line.lastchar = - el->el_line.cursor = el->el_line.buffer; - break; - } if ((unsigned int)cmdnum >= (unsigned int)el->el_map.nfunc) { /* BUG CHECK command */ #ifdef DEBUG_EDIT (void) fprintf(el->el_errfile, @@ -645,17 +617,12 @@ el_gets(EditLine *el, int *nread) /* make sure the tty is set up correctly */ if ((el->el_flags & UNBUFFERED) == 0) { read_finish(el); - *nread = num != -1 ? num : 0; + if (nread) + *nread = num; } else { - *nread = (int)(el->el_line.lastchar - el->el_line.buffer); + if (nread) + *nread = + (int)(el->el_line.lastchar - el->el_line.buffer); } -done: - if (*nread == 0) { - if (num == -1) { - *nread = -1; - errno = el->el_errno; - } - return NULL; - } else - return el->el_line.buffer; + return (num ? el->el_line.buffer : NULL); } Modified: head/lib/libedit/sig.c ============================================================================== --- head/lib/libedit/sig.c Fri Jul 6 15:57:03 2012 (r238172) +++ head/lib/libedit/sig.c Fri Jul 6 16:43:56 2012 (r238173) @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $NetBSD: sig.c,v 1.15 2009/02/19 15:20:22 christos Exp $ + * $NetBSD: sig.c,v 1.14 2009/02/18 15:04:40 christos Exp $ */ #if !defined(lint) && !defined(SCCSID) @@ -73,8 +73,6 @@ sig_handler(int signo) (void) sigaddset(&nset, signo); (void) sigprocmask(SIG_BLOCK, &nset, &oset); - sel->el_signal->sig_no = signo; - switch (signo) { case SIGCONT: tty_rawmode(sel); @@ -160,12 +158,12 @@ sig_set(EditLine *el) struct sigaction osa, nsa; nsa.sa_handler = sig_handler; - nsa.sa_flags = 0; sigemptyset(&nsa.sa_mask); (void) sigprocmask(SIG_BLOCK, &el->el_signal->sig_set, &oset); for (i = 0; sighdl[i] != -1; i++) { + nsa.sa_flags = SIGINT ? 0 : SA_RESTART; /* This could happen if we get interrupted */ if (sigaction(sighdl[i], &nsa, &osa) != -1 && osa.sa_handler != sig_handler) Modified: head/lib/libedit/sig.h ============================================================================== --- head/lib/libedit/sig.h Fri Jul 6 15:57:03 2012 (r238172) +++ head/lib/libedit/sig.h Fri Jul 6 16:43:56 2012 (r238173) @@ -30,7 +30,7 @@ * SUCH DAMAGE. * * @(#)sig.h 8.1 (Berkeley) 6/4/93 - * $NetBSD: sig.h,v 1.5 2003/08/07 16:44:33 agc Exp $ + * $NetBSD: sig.h,v 1.7 2009/02/15 21:25:01 christos Exp $ * $FreeBSD$ */ @@ -61,7 +61,6 @@ typedef struct { struct sigaction sig_action[ALLSIGSNO]; sigset_t sig_set; - volatile sig_atomic_t sig_no; } *el_signal_t; protected void sig_end(EditLine*); From owner-svn-src-all@FreeBSD.ORG Fri Jul 6 17:03:44 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AE394106564A; Fri, 6 Jul 2012 17:03:44 +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 7F3D38FC08; Fri, 6 Jul 2012 17:03:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q66H3inf072492; Fri, 6 Jul 2012 17:03:44 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q66H3ix2072490; Fri, 6 Jul 2012 17:03:44 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201207061703.q66H3ix2072490@svn.freebsd.org> From: Ed Maste Date: Fri, 6 Jul 2012 17:03:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238175 - head/tools/tools/netmap X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jul 2012 17:03:44 -0000 Author: emaste Date: Fri Jul 6 17:03:43 2012 New Revision: 238175 URL: http://svn.freebsd.org/changeset/base/238175 Log: Allow continuous packet transmission (via -t 0) Also add a missing check for the cancel flag while waiting for the first packet in receive mode. Modified: head/tools/tools/netmap/pkt-gen.c Modified: head/tools/tools/netmap/pkt-gen.c ============================================================================== --- head/tools/tools/netmap/pkt-gen.c Fri Jul 6 16:54:25 2012 (r238174) +++ head/tools/tools/netmap/pkt-gen.c Fri Jul 6 17:03:43 2012 (r238175) @@ -472,9 +472,14 @@ sender_body(void *data) struct pollfd fds[1]; struct netmap_if *nifp = targ->nifp; struct netmap_ring *txring; - int i, n = targ->g->npackets / targ->g->nthreads, sent = 0; + int i, pkts_per_td = targ->g->npackets / targ->g->nthreads, sent = 0; + int continuous = 0; int options = targ->g->options | OPT_COPY; D("start"); + if (pkts_per_td == 0) { + continuous = 1; + pkts_per_td = 100000; + } if (setaffinity(targ->thread, targ->affinity)) goto quit; /* setup poll(2) mechanism. */ @@ -489,7 +494,7 @@ D("start"); void *pkt = &targ->pkt; pcap_t *p = targ->g->p; - for (i = 0; sent < n && !targ->cancel; i++) { + for (i = 0; (sent < pkts_per_td && !targ->cancel) || continuous; i++) { if (pcap_inject(p, pkt, size) != -1) sent++; if (i > 10000) { @@ -498,7 +503,7 @@ D("start"); } } } else { - while (sent < n) { + while (sent < pkts_per_td || continuous) { /* * wait for available room in the send queue(s) @@ -515,7 +520,9 @@ D("start"); if (sent > 100000 && !(targ->g->options & OPT_COPY) ) options &= ~OPT_COPY; for (i = targ->qfirst; i < targ->qlast && !targ->cancel; i++) { - int m, limit = MIN(n - sent, targ->g->burst); + int m, limit = targ->g->burst; + if (!continuous && pkts_per_td - sent < limit) + limit = pkts_per_td - sent; txring = NETMAP_TXRING(nifp, i); if (txring->avail == 0) @@ -602,7 +609,7 @@ receiver_body(void *data) fds[0].events = (POLLIN); /* unbounded wait for the first packet. */ - for (;;) { + while (!targ->cancel) { i = poll(fds, 1, 1000); if (i > 0 && !(fds[0].revents & POLLERR)) break; @@ -716,7 +723,7 @@ usage(void) "Usage:\n" "%s arguments\n" "\t-i interface interface name\n" - "\t-t pkts_to_send also forces send mode\n" + "\t-t pkts_to_send also forces send mode, 0 = continuous\n" "\t-r pkts_to_receive also forces receive mode\n" "\t-l pkts_size in bytes excluding CRC\n" "\t-d dst-ip end with %%n to sweep n addresses\n" From owner-svn-src-all@FreeBSD.ORG Fri Jul 6 17:42:35 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CD078106564A; Fri, 6 Jul 2012 17:42:34 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B6F168FC0A; Fri, 6 Jul 2012 17:42:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q66HgYkL074137; Fri, 6 Jul 2012 17:42:34 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q66HgYdM074135; Fri, 6 Jul 2012 17:42:34 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201207061742.q66HgYdM074135@svn.freebsd.org> From: Dimitry Andric Date: Fri, 6 Jul 2012 17:42:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238177 - stable/9/cddl/contrib/opensolaris/lib/libdtrace/common X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jul 2012 17:42:35 -0000 Author: dim Date: Fri Jul 6 17:42:34 2012 New Revision: 238177 URL: http://svn.freebsd.org/changeset/base/238177 Log: MFC r238071: Fix clang warning, introduced in the recent dtrace import. Approved by: re (kib) Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c Directory Properties: stable/9/cddl/ (props changed) stable/9/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c ============================================================================== --- stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c Fri Jul 6 17:07:50 2012 (r238176) +++ stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c Fri Jul 6 17:42:34 2012 (r238177) @@ -796,7 +796,7 @@ dt_print_llquantize(dtrace_hdl_t *dtp, F return (0); assert(last_bin == bin); - (void) snprintf(c, sizeof (c), ">= %lld", value); + (void) snprintf(c, sizeof (c), ">= %lld", (long long)value); if (dt_printf(dtp, fp, "%16s ", c) < 0) return (-1); From owner-svn-src-all@FreeBSD.ORG Fri Jul 6 18:12:18 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DBEE91065673; Fri, 6 Jul 2012 18:12:18 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 705E38FC0C; Fri, 6 Jul 2012 18:12:18 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q66ICQKm045913; Fri, 6 Jul 2012 21:12:26 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q66ICDRH019227; Fri, 6 Jul 2012 21:12:13 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q66ICDUQ019226; Fri, 6 Jul 2012 21:12:13 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 6 Jul 2012 21:12:13 +0300 From: Konstantin Belousov To: Marcel Moolenaar Message-ID: <20120706181213.GI2338@deviant.kiev.zoral.com.ua> References: <201207061557.q66Fv45N069464@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="2xeD/fx0+7k8I/QN" Content-Disposition: inline In-Reply-To: <201207061557.q66Fv45N069464@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r238172 - head/sys/dev/agp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jul 2012 18:12:19 -0000 --2xeD/fx0+7k8I/QN Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jul 06, 2012 at 03:57:04PM +0000, Marcel Moolenaar wrote: > Author: marcel > Date: Fri Jul 6 15:57:03 2012 > New Revision: 238172 > URL: http://svn.freebsd.org/changeset/base/238172 >=20 > Log: > agp.c: > Don't use Maxmem when the amount of memory is meant. Use realmem instea= d. > Maxmem is not only a MD variable, it represents the highest physical me= mory > address in use. On systems where memory is sparsely layed-out the highe= st > memory address and the amount of memory are not interchangeable. Scalin= g the > AGP aperture based on the actual amount of memory (=3D realmem) rather = than > the available memory (=3D physmem) makes sure there's consistent behavi= our > across architectures. > =20 > agp_i810.c: > While arguably the use of Maxmem can be considered correct, replace its= use > with realmem anyway. agp_i810.c is specific to amd64, i386 & pc98, which > have a dense physical memory layout. Avoiding Maxmem here is done with = an > eye on copy-n-paste behaviour in general and to avoid confusion caused = by > using realmem in agp.c and Maxmem in agp_i810.c. The agp_i810.c use is to prevent attachment when largest physical address of populated memory exceeds GPU limits established by PTE format and chipset errata. Editing Maxmem to be spelled as realmem seems to change nothing right now, but I do argue that this is wrong, and commit message makes future archeology quite confusing. > =20 > In both cases, remove the inclusion of md_var.h >=20 > Modified: > head/sys/dev/agp/agp.c > head/sys/dev/agp/agp_i810.c >=20 > Modified: head/sys/dev/agp/agp.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/dev/agp/agp.c Fri Jul 6 15:46:38 2012 (r238171) > +++ head/sys/dev/agp/agp.c Fri Jul 6 15:57:03 2012 (r238172) > @@ -55,7 +55,6 @@ __FBSDID("$FreeBSD$"); > #include > #include > =20 > -#include > #include > #include > #include > @@ -234,7 +233,7 @@ agp_generic_attach(device_t dev) > * Work out an upper bound for agp memory allocation. This > * uses a heurisitc table from the Linux driver. > */ > - memsize =3D ptoa(Maxmem) >> 20; > + memsize =3D ptoa(realmem) >> 20; > for (i =3D 0; i < agp_max_size; i++) { > if (memsize <=3D agp_max[i][0]) > break; >=20 > Modified: head/sys/dev/agp/agp_i810.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/dev/agp/agp_i810.c Fri Jul 6 15:46:38 2012 (r238171) > +++ head/sys/dev/agp/agp_i810.c Fri Jul 6 15:57:03 2012 (r238172) > @@ -74,7 +74,6 @@ __FBSDID("$FreeBSD$"); > =20 > #include > #include > -#include > #include > =20 > MALLOC_DECLARE(M_AGP); > @@ -1439,7 +1438,7 @@ agp_i810_attach(device_t dev) > if (error) > return (error); > =20 > - if (ptoa((vm_paddr_t)Maxmem) > > + if (ptoa((vm_paddr_t)realmem) > > (1ULL << sc->match->driver->busdma_addr_mask_sz) - 1) { > device_printf(dev, "agp_i810 does not support physical " > "memory above %ju.\n", (uintmax_t)(1ULL << --2xeD/fx0+7k8I/QN Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAk/3KnwACgkQC3+MBN1Mb4hiKQCgn1NuIpG7znvtNOjeueP8FG1o YYYAn3SlmhlhtHbxlfti65lktViYUsbu =j6vY -----END PGP SIGNATURE----- --2xeD/fx0+7k8I/QN-- From owner-svn-src-all@FreeBSD.ORG Fri Jul 6 19:30:51 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 523F91065672; Fri, 6 Jul 2012 19:30:51 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 335328FC0C; Fri, 6 Jul 2012 19:30:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q66JUpEM078713; Fri, 6 Jul 2012 19:30:51 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q66JUphx078710; Fri, 6 Jul 2012 19:30:51 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201207061930.q66JUphx078710@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Fri, 6 Jul 2012 19:30:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238178 - head/lib/libedit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jul 2012 19:30:51 -0000 Author: pfg Date: Fri Jul 6 19:30:50 2012 New Revision: 238178 URL: http://svn.freebsd.org/changeset/base/238178 Log: Merge a small update from NetBSD. Feb 15 21:55:23 2009 - chared.c chared.h pass lint on _LP64. MFC after: 1 week Modified: head/lib/libedit/chared.c head/lib/libedit/chared.h Modified: head/lib/libedit/chared.c ============================================================================== --- head/lib/libedit/chared.c Fri Jul 6 17:42:34 2012 (r238177) +++ head/lib/libedit/chared.c Fri Jul 6 19:30:50 2012 (r238178) @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $NetBSD: chared.c,v 1.25 2005/08/08 01:41:30 christos Exp $ + * $NetBSD: chared.c,v 1.27 2009/02/15 21:55:23 christos Exp $ */ #if !defined(lint) && !defined(SCCSID) @@ -59,12 +59,12 @@ cv_undo(EditLine *el) { c_undo_t *vu = &el->el_chared.c_undo; c_redo_t *r = &el->el_chared.c_redo; - unsigned int size; + size_t size; /* Save entire line for undo */ size = el->el_line.lastchar - el->el_line.buffer; vu->len = size; - vu->cursor = el->el_line.cursor - el->el_line.buffer; + vu->cursor = (int)(el->el_line.cursor - el->el_line.buffer); memcpy(vu->buf, el->el_line.buffer, size); /* save command info for redo */ @@ -83,7 +83,7 @@ cv_yank(EditLine *el, const char *ptr, i { c_kill_t *k = &el->el_chared.c_kill; - memcpy(k->buf, ptr, size +0u); + memcpy(k->buf, ptr, (size_t)size); k->last = k->buf + size; } @@ -97,7 +97,7 @@ c_insert(EditLine *el, int num) char *cp; if (el->el_line.lastchar + num >= el->el_line.limit) { - if (!ch_enlargebufs(el, num +0u)) + if (!ch_enlargebufs(el, (size_t)num)) return; /* can't go past end of buffer */ } @@ -118,7 +118,7 @@ c_delafter(EditLine *el, int num) { if (el->el_line.cursor + num > el->el_line.lastchar) - num = el->el_line.lastchar - el->el_line.cursor; + num = (int)(el->el_line.lastchar - el->el_line.cursor); if (el->el_map.current != el->el_map.emacs) { cv_undo(el); @@ -159,7 +159,7 @@ c_delbefore(EditLine *el, int num) { if (el->el_line.cursor - num < el->el_line.buffer) - num = el->el_line.cursor - el->el_line.buffer; + num = (int)(el->el_line.cursor - el->el_line.buffer); if (el->el_map.current != el->el_map.emacs) { cv_undo(el); @@ -375,7 +375,7 @@ cv_delfini(EditLine *el) /* sanity */ return; - size = el->el_line.cursor - el->el_chared.c_vcmd.pos; + size = (int)(el->el_line.cursor - el->el_chared.c_vcmd.pos); if (size == 0) size = 1; el->el_line.cursor = el->el_chared.c_vcmd.pos; @@ -529,8 +529,7 @@ ch_reset(EditLine *el, int mclear) } private void -ch__clearmacro(el) - EditLine *el; +ch__clearmacro(EditLine *el) { c_macro_t *ma = &el->el_chared.c_macro; while (ma->level >= 0) @@ -542,9 +541,7 @@ ch__clearmacro(el) * Returns 1 if successful, 0 if not. */ protected int -ch_enlargebufs(el, addlen) - EditLine *el; - size_t addlen; +ch_enlargebufs(EditLine *el, size_t addlen) { size_t sz, newsz; char *newbuffer, *oldbuf, *oldkbuf; @@ -695,12 +692,12 @@ protected int c_gets(EditLine *el, char *buf, const char *prompt) { char ch; - int len; + ssize_t len; char *cp = el->el_line.buffer; if (prompt) { len = strlen(prompt); - memcpy(cp, prompt, len + 0u); + memcpy(cp, prompt, (size_t)len); cp += len; } len = 0; @@ -721,7 +718,7 @@ c_gets(EditLine *el, char *buf, const ch case '\010': /* Delete and backspace */ case '\177': - if (len <= 0) { + if (len == 0) { len = -1; break; } @@ -749,7 +746,7 @@ c_gets(EditLine *el, char *buf, const ch el->el_line.buffer[0] = '\0'; el->el_line.lastchar = el->el_line.buffer; el->el_line.cursor = el->el_line.buffer; - return len; + return (int)len; } @@ -771,6 +768,6 @@ c_hpos(EditLine *el) ptr >= el->el_line.buffer && *ptr != '\n'; ptr--) continue; - return (el->el_line.cursor - ptr - 1); + return (int)(el->el_line.cursor - ptr - 1); } } Modified: head/lib/libedit/chared.h ============================================================================== --- head/lib/libedit/chared.h Fri Jul 6 17:42:34 2012 (r238177) +++ head/lib/libedit/chared.h Fri Jul 6 19:30:50 2012 (r238178) @@ -30,7 +30,7 @@ * SUCH DAMAGE. * * @(#)chared.h 8.1 (Berkeley) 6/4/93 - * $NetBSD: chared.h,v 1.17 2006/03/06 21:11:56 christos Exp $ + * $NetBSD: chared.h,v 1.18 2009/02/15 21:55:23 christos Exp $ * $FreeBSD$ */ @@ -70,7 +70,7 @@ typedef struct c_macro_t { * Undo information for vi - no undo in emacs (yet) */ typedef struct c_undo_t { - int len; /* length of saved line */ + ssize_t len; /* length of saved line */ int cursor; /* position of saved cursor */ char *buf; /* full saved text */ } c_undo_t; From owner-svn-src-all@FreeBSD.ORG Fri Jul 6 20:11:59 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 96796106566B; Fri, 6 Jul 2012 20:11:59 +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 810C88FC08; Fri, 6 Jul 2012 20:11:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q66KBxxj080426; Fri, 6 Jul 2012 20:11:59 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q66KBx6O080424; Fri, 6 Jul 2012 20:11:59 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201207062011.q66KBx6O080424@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 6 Jul 2012 20:11:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238179 - head/sys/amd64/amd64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jul 2012 20:11:59 -0000 Author: kib Date: Fri Jul 6 20:11:58 2012 New Revision: 238179 URL: http://svn.freebsd.org/changeset/base/238179 Log: Use assembler mnemonic instead of manually assembling, contination for r238142. Reviewed by: jhb MFC after: 1 month Modified: head/sys/amd64/amd64/cpu_switch.S Modified: head/sys/amd64/amd64/cpu_switch.S ============================================================================== --- head/sys/amd64/amd64/cpu_switch.S Fri Jul 6 19:30:50 2012 (r238178) +++ head/sys/amd64/amd64/cpu_switch.S Fri Jul 6 20:11:58 2012 (r238179) @@ -122,8 +122,7 @@ done_store_dr: 1: movq %rdx,%rcx movl xsave_mask,%eax movl xsave_mask+4,%edx -/* xsave (%r8) */ - .byte 0x41,0x0f,0xae,0x20 + xsave (%r8) movq %rcx,%rdx 2: smsw %ax orb $CR0_TS,%al @@ -499,10 +498,8 @@ ENTRY(resumectx) movq %rax,%rdx shrq $32,%rdx movl $XCR0,%ecx -/* xsetbv */ - .byte 0x0f, 0x01, 0xd1 -/* xrstor (%rbx) */ - .byte 0x0f, 0xae, 0x2b + xsetbv + xrstor (%rbx) jmp 2f 1: fxrstor (%rbx) From owner-svn-src-all@FreeBSD.ORG Fri Jul 6 20:13:17 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 985B4106566C; Fri, 6 Jul 2012 20:13:17 +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 83EDB8FC16; Fri, 6 Jul 2012 20:13:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q66KDHhq080515; Fri, 6 Jul 2012 20:13:17 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q66KDHUl080513; Fri, 6 Jul 2012 20:13:17 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201207062013.q66KDHUl080513@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 6 Jul 2012 20:13:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238180 - head/sys/vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jul 2012 20:13:17 -0000 Author: kib Date: Fri Jul 6 20:13:16 2012 New Revision: 238180 URL: http://svn.freebsd.org/changeset/base/238180 Log: Style. Reviewed by: alc (previous version) MFC after: 1 week Modified: head/sys/vm/vm_pageout.c Modified: head/sys/vm/vm_pageout.c ============================================================================== --- head/sys/vm/vm_pageout.c Fri Jul 6 20:11:58 2012 (r238179) +++ head/sys/vm/vm_pageout.c Fri Jul 6 20:13:16 2012 (r238180) @@ -836,7 +836,7 @@ rescan0: object = m->object; if (!VM_OBJECT_TRYLOCK(object) && (!vm_pageout_fallback_object_lock(m, &next) || - m->hold_count != 0)) { + m->hold_count != 0)) { VM_OBJECT_UNLOCK(object); vm_page_unlock(m); addl_page_shortage++; @@ -867,8 +867,8 @@ rescan0: * level VM system not knowing anything about existing * references. */ - } else if (((m->aflags & PGA_REFERENCED) == 0) && - (actcount = pmap_ts_referenced(m))) { + } else if ((m->aflags & PGA_REFERENCED) == 0 && + (actcount = pmap_ts_referenced(m)) != 0) { vm_page_activate(m); vm_page_unlock(m); m->act_count += actcount + ACT_ADVANCE; From owner-svn-src-all@FreeBSD.ORG Fri Jul 6 20:14:28 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0CB7B106564A; Fri, 6 Jul 2012 20:14: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 EBC9D8FC16; Fri, 6 Jul 2012 20:14:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q66KERiv080596; Fri, 6 Jul 2012 20:14:27 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q66KERSX080594; Fri, 6 Jul 2012 20:14:27 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201207062014.q66KERSX080594@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 6 Jul 2012 20:14:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238181 - head/sys/modules/em X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jul 2012 20:14:28 -0000 Author: kib Date: Fri Jul 6 20:14:27 2012 New Revision: 238181 URL: http://svn.freebsd.org/changeset/base/238181 Log: Add a source file needed for module linking. MFC after: 4 days Modified: head/sys/modules/em/Makefile Modified: head/sys/modules/em/Makefile ============================================================================== --- head/sys/modules/em/Makefile Fri Jul 6 20:13:16 2012 (r238180) +++ head/sys/modules/em/Makefile Fri Jul 6 20:14:27 2012 (r238181) @@ -9,7 +9,7 @@ CORE_SRC = if_em.c e1000_osdep.c # undefined when using modular driver if not needed LEGACY_SRC += if_lem.c COMMON_SHARED = e1000_api.c e1000_phy.c e1000_nvm.c e1000_mac.c \ - e1000_manage.c e1000_vf.c e1000_mbx.c + e1000_manage.c e1000_vf.c e1000_mbx.c e1000_i210.c PCIE_SHARED = e1000_80003es2lan.c e1000_ich8lan.c e1000_82571.c e1000_82575.c LEGACY_SHARED = e1000_82540.c e1000_82542.c e1000_82541.c e1000_82543.c From owner-svn-src-all@FreeBSD.ORG Fri Jul 6 20:16:23 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 40867106564A; Fri, 6 Jul 2012 20:16:23 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 125A68FC0A; Fri, 6 Jul 2012 20:16:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q66KGMUc080731; Fri, 6 Jul 2012 20:16:22 GMT (envelope-from theraven@svn.freebsd.org) Received: (from theraven@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q66KGM1e080728; Fri, 6 Jul 2012 20:16:22 GMT (envelope-from theraven@svn.freebsd.org) Message-Id: <201207062016.q66KGM1e080728@svn.freebsd.org> From: David Chisnall Date: Fri, 6 Jul 2012 20:16:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238182 - head/lib/libc/locale X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jul 2012 20:16:23 -0000 Author: theraven Date: Fri Jul 6 20:16:22 2012 New Revision: 238182 URL: http://svn.freebsd.org/changeset/base/238182 Log: Restore the __collate_load_error global that was accidentally removed in the xlocale refactoring. MFC after: 1 week Modified: head/lib/libc/locale/collate.c head/lib/libc/locale/setrunelocale.c Modified: head/lib/libc/locale/collate.c ============================================================================== --- head/lib/libc/locale/collate.c Fri Jul 6 20:14:27 2012 (r238181) +++ head/lib/libc/locale/collate.c Fri Jul 6 20:16:22 2012 (r238182) @@ -56,11 +56,11 @@ __FBSDID("$FreeBSD$"); * We also modify the collation table test functions to search the thread-local * table first and the global table second. */ -#define __collate_load_error (table->__collate_load_error) #define __collate_substitute_nontrivial (table->__collate_substitute_nontrivial) #define __collate_substitute_table_ptr (table->__collate_substitute_table_ptr) #define __collate_char_pri_table_ptr (table->__collate_char_pri_table_ptr) #define __collate_chain_pri_table (table->__collate_chain_pri_table) +int __collate_load_error; struct xlocale_collate __xlocale_global_collate = { @@ -109,7 +109,9 @@ __collate_load(const char *encoding, loc int __collate_load_tables(const char *encoding) { - return __collate_load_tables_l(encoding, &__xlocale_global_collate); + int ret = __collate_load_tables_l(encoding, &__xlocale_global_collate); + __collate_load_error = __xlocale_global_collate.__collate_load_error; + return ret; } int @@ -123,7 +125,7 @@ __collate_load_tables_l(const char *enco /* 'encoding' must be already checked. */ if (strcmp(encoding, "C") == 0 || strcmp(encoding, "POSIX") == 0) { - __collate_load_error = 1; + table->__collate_load_error = 1; return (_LDP_CACHE); } @@ -240,7 +242,7 @@ __collate_load_tables_l(const char *enco break; } } - __collate_load_error = 0; + table->__collate_load_error = 0; return (_LDP_LOADED); } Modified: head/lib/libc/locale/setrunelocale.c ============================================================================== --- head/lib/libc/locale/setrunelocale.c Fri Jul 6 20:14:27 2012 (r238181) +++ head/lib/libc/locale/setrunelocale.c Fri Jul 6 20:16:22 2012 (r238182) @@ -67,7 +67,6 @@ extern _RuneLocale *_Read_RuneMagi(FILE static int __setrunelocale(struct xlocale_ctype *l, const char *); -#define __collate_load_error (table->__collate_load_error) #define __collate_substitute_nontrivial (table->__collate_substitute_nontrivial) #define __collate_substitute_table_ptr (table->__collate_substitute_table_ptr) #define __collate_char_pri_table_ptr (table->__collate_char_pri_table_ptr) From owner-svn-src-all@FreeBSD.ORG Fri Jul 6 21:15:52 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4A8721065670; Fri, 6 Jul 2012 21:15:52 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id A30F18FC0C; Fri, 6 Jul 2012 21:15:51 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q66LFr8M092016; Sat, 7 Jul 2012 00:15:54 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q66LFTCm020614; Sat, 7 Jul 2012 00:15:29 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q66LFTFD020613; Sat, 7 Jul 2012 00:15:29 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 7 Jul 2012 00:15:29 +0300 From: Konstantin Belousov To: David Chisnall Message-ID: <20120706211529.GP2338@deviant.kiev.zoral.com.ua> References: <201207062016.q66KGM1e080728@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="6sj9mcRtP+pTWLOo" Content-Disposition: inline In-Reply-To: <201207062016.q66KGM1e080728@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r238182 - head/lib/libc/locale X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jul 2012 21:15:52 -0000 --6sj9mcRtP+pTWLOo Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jul 06, 2012 at 08:16:22PM +0000, David Chisnall wrote: > Author: theraven > Date: Fri Jul 6 20:16:22 2012 > New Revision: 238182 > URL: http://svn.freebsd.org/changeset/base/238182 >=20 > Log: > Restore the __collate_load_error global that was accidentally removed i= n the > xlocale refactoring. > =20 I think this commit is wrong, or at least not complete. You failed to restore the actual export of the symbol in locale/Symbol.map. > MFC after: 1 week >=20 > Modified: > head/lib/libc/locale/collate.c > head/lib/libc/locale/setrunelocale.c >=20 > Modified: head/lib/libc/locale/collate.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/lib/libc/locale/collate.c Fri Jul 6 20:14:27 2012 (r238181) > +++ head/lib/libc/locale/collate.c Fri Jul 6 20:16:22 2012 (r238182) > @@ -56,11 +56,11 @@ __FBSDID("$FreeBSD$"); > * We also modify the collation table test functions to search the threa= d-local > * table first and the global table second. =20 > */ > -#define __collate_load_error (table->__collate_load_error) > #define __collate_substitute_nontrivial (table->__collate_substitute_non= trivial) > #define __collate_substitute_table_ptr (table->__collate_substitute_tabl= e_ptr) > #define __collate_char_pri_table_ptr (table->__collate_char_pri_table_pt= r) > #define __collate_chain_pri_table (table->__collate_chain_pri_table) > +int __collate_load_error; > =20 > =20 > struct xlocale_collate __xlocale_global_collate =3D { > @@ -109,7 +109,9 @@ __collate_load(const char *encoding, loc > int > __collate_load_tables(const char *encoding) > { > - return __collate_load_tables_l(encoding, &__xlocale_global_collate); > + int ret =3D __collate_load_tables_l(encoding, &__xlocale_global_collate= ); > + __collate_load_error =3D __xlocale_global_collate.__collate_load_error; > + return ret; > } > =20 > int > @@ -123,7 +125,7 @@ __collate_load_tables_l(const char *enco > =20 > /* 'encoding' must be already checked. */ > if (strcmp(encoding, "C") =3D=3D 0 || strcmp(encoding, "POSIX") =3D=3D = 0) { > - __collate_load_error =3D 1; > + table->__collate_load_error =3D 1; > return (_LDP_CACHE); > } > =20 > @@ -240,7 +242,7 @@ __collate_load_tables_l(const char *enco > break; > } > } > - __collate_load_error =3D 0; > + table->__collate_load_error =3D 0; > =20 > return (_LDP_LOADED); > } >=20 > Modified: head/lib/libc/locale/setrunelocale.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/lib/libc/locale/setrunelocale.c Fri Jul 6 20:14:27 2012 (r23818= 1) > +++ head/lib/libc/locale/setrunelocale.c Fri Jul 6 20:16:22 2012 (r23818= 2) > @@ -67,7 +67,6 @@ extern _RuneLocale *_Read_RuneMagi(FILE=20 > =20 > static int __setrunelocale(struct xlocale_ctype *l, const char *); > =20 > -#define __collate_load_error (table->__collate_load_error) > #define __collate_substitute_nontrivial (table->__collate_substitute_non= trivial) > #define __collate_substitute_table_ptr (table->__collate_substitute_tabl= e_ptr) > #define __collate_char_pri_table_ptr (table->__collate_char_pri_table_pt= r) --6sj9mcRtP+pTWLOo Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAk/3VXEACgkQC3+MBN1Mb4hHSwCgpOdnsvvLxZzBs0v9slSvQS2L fHQAniKUVEcsgXI/zJ3zhMCizl3tYHlt =1uTx -----END PGP SIGNATURE----- --6sj9mcRtP+pTWLOo-- From owner-svn-src-all@FreeBSD.ORG Fri Jul 6 21:24:01 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 86B7B106564A; Fri, 6 Jul 2012 21:24:01 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id D88918FC0C; Fri, 6 Jul 2012 21:24:00 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q66LNjGg097148; Sat, 7 Jul 2012 00:23:45 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q66LNWb0020674; Sat, 7 Jul 2012 00:23:32 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q66LNW85020673; Sat, 7 Jul 2012 00:23:32 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 7 Jul 2012 00:23:32 +0300 From: Konstantin Belousov To: David Chisnall Message-ID: <20120706212332.GQ2338@deviant.kiev.zoral.com.ua> References: <201207062016.q66KGM1e080728@svn.freebsd.org> <20120706211529.GP2338@deviant.kiev.zoral.com.ua> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="V2tfspbppmK1TQo2" Content-Disposition: inline In-Reply-To: <20120706211529.GP2338@deviant.kiev.zoral.com.ua> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r238182 - head/lib/libc/locale X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jul 2012 21:24:01 -0000 --V2tfspbppmK1TQo2 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Jul 07, 2012 at 12:15:29AM +0300, Konstantin Belousov wrote: > On Fri, Jul 06, 2012 at 08:16:22PM +0000, David Chisnall wrote: > > Author: theraven > > Date: Fri Jul 6 20:16:22 2012 > > New Revision: 238182 > > URL: http://svn.freebsd.org/changeset/base/238182 > >=20 > > Log: > > Restore the __collate_load_error global that was accidentally removed= in the > > xlocale refactoring. > > =20 > I think this commit is wrong, or at least not complete. > You failed to restore the actual export of the symbol in locale/Symbol.ma= p. I stay corrected: the symbol _is_ present in the Symbol.map, sorry. But it is located in the private version definition, which was the reason that I did not noticed it, and which changes the status of commit from "incomplete" to "unneccessary". We do not guarantee anything about private symbols. Most likely, it is application error to link to this symbol. If application use for it is legitimate, then the symbol shall be moved to FBSD_1.3 version. --V2tfspbppmK1TQo2 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAk/3V1QACgkQC3+MBN1Mb4j1lACghUBU18OTXaSiibHOX00ULEVz pUYAnjGD6XJaCsqsUMy9j31FqDz2Y6Y2 =sSkP -----END PGP SIGNATURE----- --V2tfspbppmK1TQo2-- From owner-svn-src-all@FreeBSD.ORG Fri Jul 6 23:17:31 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3D344106564A; Fri, 6 Jul 2012 23:17:31 +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 283F68FC08; Fri, 6 Jul 2012 23:17:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q66NHVRa089059; Fri, 6 Jul 2012 23:17:31 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q66NHUb4089057; Fri, 6 Jul 2012 23:17:30 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201207062317.q66NHUb4089057@svn.freebsd.org> From: Ed Maste Date: Fri, 6 Jul 2012 23:17:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238183 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jul 2012 23:17:31 -0000 Author: emaste Date: Fri Jul 6 23:17:30 2012 New Revision: 238183 URL: http://svn.freebsd.org/changeset/base/238183 Log: Implement SIOCGIFMEDIA for if_tap(4) Appease certain if_tap(4) consumers by providing simulated Ethernet media status. DragonFly commit 70d9a675bf5441cc854a843ead702d08928c37f3 Obtained from: DragonFly BSD Modified: head/sys/net/if_tap.c Modified: head/sys/net/if_tap.c ============================================================================== --- head/sys/net/if_tap.c Fri Jul 6 20:16:22 2012 (r238182) +++ head/sys/net/if_tap.c Fri Jul 6 23:17:30 2012 (r238183) @@ -65,6 +65,7 @@ #include #include #include +#include #include #include #include @@ -602,7 +603,8 @@ tapifioctl(struct ifnet *ifp, u_long cmd struct tap_softc *tp = ifp->if_softc; struct ifreq *ifr = (struct ifreq *)data; struct ifstat *ifs = NULL; - int dummy; + struct ifmediareq *ifmr = NULL; + int dummy, error = 0; switch (cmd) { case SIOCSIFFLAGS: /* XXX -- just like vmnet does */ @@ -610,6 +612,22 @@ tapifioctl(struct ifnet *ifp, u_long cmd case SIOCDELMULTI: break; + case SIOCGIFMEDIA: + ifmr = (struct ifmediareq *)data; + dummy = ifmr->ifm_count; + ifmr->ifm_count = 1; + ifmr->ifm_status = IFM_AVALID; + ifmr->ifm_active = IFM_ETHER; + if (tp->tap_flags & TAP_OPEN) + ifmr->ifm_status |= IFM_ACTIVE; + ifmr->ifm_current = ifmr->ifm_active; + if (dummy >= 1) { + int media = IFM_ETHER; + error = copyout(&media, ifmr->ifm_ulist, + sizeof(int)); + } + break; + case SIOCSIFMTU: ifp->if_mtu = ifr->ifr_mtu; break; @@ -626,11 +644,11 @@ tapifioctl(struct ifnet *ifp, u_long cmd break; default: - return (ether_ioctl(ifp, cmd, data)); - /* NOT REACHED */ + error = ether_ioctl(ifp, cmd, data); + break; } - return (0); + return (error); } /* tapifioctl */ From owner-svn-src-all@FreeBSD.ORG Sat Jul 7 00:25:18 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5DDA0106564A; Sat, 7 Jul 2012 00:25:18 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 45F428FC08; Sat, 7 Jul 2012 00:25:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q670PIwx093312; Sat, 7 Jul 2012 00:25:18 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q670PITR093305; Sat, 7 Jul 2012 00:25:18 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201207070025.q670PITR093305@svn.freebsd.org> From: Marcel Moolenaar Date: Sat, 7 Jul 2012 00:25:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238184 - in head/sys: conf ia64/ia64 ia64/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jul 2012 00:25:18 -0000 Author: marcel Date: Sat Jul 7 00:25:17 2012 New Revision: 238184 URL: http://svn.freebsd.org/changeset/base/238184 Log: Hide the creation of phys_avail behind an API to make it easier to do it correctly. We now iterate the EFI memory descriptors once and collect all the information in a single pass. This includes: 1. The I/O port base address, 2. The PAL memory region. Have the physmem API track this. 3. Memory descriptors of memory we can't use, like bad memory, runtime services code & data, etc. Have the physmem API track these. 4. memory descriptors of memory we can use or re-use, such as free memory, boot time services code & data, loader code & data, etc. These are added by the physmem API. Since the PBVM page table and pages are in memory described as loader data, inform the physmem API of chunks that need to be delated from the available physical memory. While here, remove Maxmem and replace it with the better named paddr_max. Maxmem was defined as physmem, which is generally wrong. Now, paddr_max is properly defined as the largesty physical address. The upshot of all this is that: 1. We properly determine realmem. 2. We maximize physmem by re-using memory where possible. 3. We remove complexity from ia64_init() in machdep.c. 4. Remove confusion about realmem, physmem & Maxmem. The new ia64_physmem_alloc() is to replace pmap_steal_memory() in pmap.c, as well as replace the handcrafted allocation of the VHPT for the BSP in pmap_bootstrap() in pmap.c. This is step 2 and addresses the manipulation of phys_avail after it is being created. Added: head/sys/ia64/ia64/physmem.c (contents, props changed) Modified: head/sys/conf/files.ia64 head/sys/ia64/ia64/busdma_machdep.c head/sys/ia64/ia64/machdep.c head/sys/ia64/include/md_var.h head/sys/ia64/include/param.h Modified: head/sys/conf/files.ia64 ============================================================================== --- head/sys/conf/files.ia64 Fri Jul 6 23:17:30 2012 (r238183) +++ head/sys/conf/files.ia64 Sat Jul 7 00:25:17 2012 (r238184) @@ -98,6 +98,7 @@ ia64/ia64/mp_machdep.c optional smp ia64/ia64/nexus.c standard ia64/ia64/pal.S standard ia64/ia64/physical.S standard +ia64/ia64/physmem.c standard ia64/ia64/pmap.c standard ia64/ia64/ptrace_machdep.c standard ia64/ia64/sal.c standard Modified: head/sys/ia64/ia64/busdma_machdep.c ============================================================================== --- head/sys/ia64/ia64/busdma_machdep.c Fri Jul 6 23:17:30 2012 (r238183) +++ head/sys/ia64/ia64/busdma_machdep.c Sat Jul 7 00:25:17 2012 (r238184) @@ -262,7 +262,7 @@ bus_dma_tag_create(bus_dma_tag_t parent, atomic_add_int(&parent->ref_count, 1); } - if (newtag->lowaddr < ptoa(Maxmem) && (flags & BUS_DMA_ALLOCNOW) != 0) { + if (newtag->lowaddr < paddr_max && (flags & BUS_DMA_ALLOCNOW) != 0) { /* Must bounce */ if (ptoa(total_bpages) < maxsize) { @@ -340,7 +340,7 @@ bus_dmamap_create(bus_dma_tag_t dmat, in * exclusion region, a data alignment that is stricter than 1, and/or * an active address boundary. */ - if (dmat->lowaddr < ptoa(Maxmem)) { + if (dmat->lowaddr < paddr_max) { /* Must bounce */ int maxpages; @@ -356,7 +356,7 @@ bus_dmamap_create(bus_dma_tag_t dmat, in * Attempt to add pages to our pool on a per-instance * basis up to a sane limit. */ - maxpages = MIN(MAX_BPAGES, Maxmem - atop(dmat->lowaddr)); + maxpages = MIN(MAX_BPAGES, atop(paddr_max - dmat->lowaddr)); if ((dmat->flags & BUS_DMA_MIN_ALLOC_COMP) == 0 || (dmat->map_count > 0 && total_bpages < maxpages)) { int pages; @@ -438,7 +438,7 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, voi */ if ((dmat->maxsize <= PAGE_SIZE) && (dmat->alignment < dmat->maxsize) && - dmat->lowaddr >= ptoa(Maxmem)) { + dmat->lowaddr >= paddr_max) { *vaddr = malloc(dmat->maxsize, M_DEVBUF, mflags); } else { /* @@ -473,7 +473,7 @@ bus_dmamem_free(bus_dma_tag_t dmat, void panic("bus_dmamem_free: Invalid map freed\n"); if ((dmat->maxsize <= PAGE_SIZE) && (dmat->alignment < dmat->maxsize) && - dmat->lowaddr >= ptoa(Maxmem)) + dmat->lowaddr >= paddr_max) free(vaddr, M_DEVBUF); else { contigfree(vaddr, dmat->maxsize, M_DEVBUF); @@ -506,7 +506,7 @@ _bus_dmamap_load_buffer(bus_dma_tag_t dm else pmap = NULL; - if ((dmat->lowaddr < ptoa(Maxmem) || dmat->boundary > 0 || + if ((dmat->lowaddr < paddr_max || dmat->boundary > 0 || dmat->alignment > 1) && map != &nobounce_dmamap && map->pagesneeded == 0) { vm_offset_t vendaddr; Modified: head/sys/ia64/ia64/machdep.c ============================================================================== --- head/sys/ia64/ia64/machdep.c Fri Jul 6 23:17:30 2012 (r238183) +++ head/sys/ia64/ia64/machdep.c Sat Jul 7 00:25:17 2012 (r238184) @@ -152,22 +152,11 @@ SYSCTL_STRING(_hw, OID_AUTO, family, CTL extern vm_offset_t ksym_start, ksym_end; #endif - struct msgbuf *msgbufp = NULL; /* Other subsystems (e.g., ACPI) can hook this later. */ void (*cpu_idle_hook)(void) = NULL; -long Maxmem = 0; -long realmem = 0; - -#define PHYSMAP_SIZE (2 * VM_PHYSSEG_MAX) - -vm_paddr_t phys_avail[PHYSMAP_SIZE + 2]; - -/* must be 2 less so 0 0 can signal end of chunks */ -#define PHYS_AVAIL_ARRAY_END ((sizeof(phys_avail) / sizeof(vm_offset_t)) - 2) - struct kva_md_info kmi; #define Mhz 1000000L @@ -270,25 +259,8 @@ cpu_startup(void *dummy) #ifdef PERFMON perfmon_init(); #endif - printf("real memory = %ld (%ld MB)\n", ia64_ptob(Maxmem), - ia64_ptob(Maxmem) / 1048576); - realmem = Maxmem; - - /* - * Display any holes after the first chunk of extended memory. - */ - if (bootverbose) { - int indx; - - printf("Physical memory chunk(s):\n"); - for (indx = 0; phys_avail[indx + 1] != 0; indx += 2) { - long size1 = phys_avail[indx + 1] - phys_avail[indx]; - - printf("0x%08lx - 0x%08lx, %ld bytes (%ld pages)\n", - phys_avail[indx], phys_avail[indx + 1] - 1, size1, - size1 >> PAGE_SHIFT); - } - } + printf("real memory = %ld (%ld MB)\n", ptoa(realmem), + ptoa(realmem) / 1048576); vm_ksubmap_init(&kmi); @@ -700,43 +672,87 @@ struct ia64_init_return ia64_init(void) { struct ia64_init_return ret; - int phys_avail_cnt; - vm_offset_t kernstart, kernend; - vm_offset_t kernstartpfn, kernendpfn, pfn0, pfn1; - char *p; struct efi_md *md; + pt_entry_t *pbvm_pgtbl_ent, *pbvm_pgtbl_lim; + char *p; + vm_offset_t kernend; + vm_size_t mdlen; int metadata_missing; - /* NO OUTPUT ALLOWED UNTIL FURTHER NOTICE */ - /* - * TODO: Disable interrupts, floating point etc. - * Maybe flush cache and tlb + * NO OUTPUT ALLOWED UNTIL FURTHER NOTICE. */ + ia64_set_fpsr(IA64_FPSR_DEFAULT); /* - * TODO: Get critical system information (if possible, from the - * information provided by the boot program). + * Region 6 is direct mapped UC and region 7 is direct mapped + * WC. The details of this is controlled by the Alt {I,D}TLB + * handlers. Here we just make sure that they have the largest + * possible page size to minimise TLB usage. */ + ia64_set_rr(IA64_RR_BASE(6), (6 << 8) | (PAGE_SHIFT << 2)); + ia64_set_rr(IA64_RR_BASE(7), (7 << 8) | (PAGE_SHIFT << 2)); + ia64_srlz_d(); + + /* Initialize/setup physical memory datastructures */ + ia64_physmem_init(); /* - * Look for the I/O ports first - we need them for console - * probing. + * Process the memory map. This gives us the PAL locations, + * the I/O port base address, the available memory regions + * for initializing the physical memory map. */ for (md = efi_md_first(); md != NULL; md = efi_md_next(md)) { + mdlen = md->md_pages * EFI_PAGE_SIZE; switch (md->md_type) { case EFI_MD_TYPE_IOPORT: ia64_port_base = (uintptr_t)pmap_mapdev(md->md_phys, - md->md_pages * EFI_PAGE_SIZE); + mdlen); break; case EFI_MD_TYPE_PALCODE: - ia64_pal_size = md->md_pages * EFI_PAGE_SIZE; ia64_pal_base = md->md_phys; + ia64_pal_size = mdlen; + /*FALLTHROUGH*/ + case EFI_MD_TYPE_BAD: + case EFI_MD_TYPE_FIRMWARE: + case EFI_MD_TYPE_RECLAIM: + case EFI_MD_TYPE_RT_CODE: + case EFI_MD_TYPE_RT_DATA: + /* Don't use these memory regions. */ + ia64_physmem_track(md->md_phys, mdlen); + break; + case EFI_MD_TYPE_BS_CODE: + case EFI_MD_TYPE_BS_DATA: + case EFI_MD_TYPE_CODE: + case EFI_MD_TYPE_DATA: + case EFI_MD_TYPE_FREE: + /* These are ok to use. */ + ia64_physmem_add(md->md_phys, mdlen); break; } } + /* + * Remove the PBVM and its page table from phys_avail. The loader + * passes the physical address of the page table to us. The virtual + * address of the page table is fixed. + * Track and the PBVM limit for later use. + */ + ia64_physmem_delete(bootinfo->bi_pbvm_pgtbl, bootinfo->bi_pbvm_pgtblsz); + pbvm_pgtbl_ent = (void *)IA64_PBVM_PGTBL; + pbvm_pgtbl_lim = (void *)(IA64_PBVM_PGTBL + bootinfo->bi_pbvm_pgtblsz); + while (pbvm_pgtbl_ent < pbvm_pgtbl_lim) { + if ((*pbvm_pgtbl_ent & PTE_PRESENT) == 0) + break; + ia64_physmem_delete(*pbvm_pgtbl_ent & PTE_PPN_MASK, + IA64_PBVM_PAGE_SIZE); + pbvm_pgtbl_ent++; + } + + /* Finalize physical memory datastructures */ + ia64_physmem_fini(); + metadata_missing = 0; if (bootinfo->bi_modulep) preload_metadata = (caddr_t)bootinfo->bi_modulep; @@ -757,9 +773,8 @@ ia64_init(void) bootverbose = 1; /* - * Find the beginning and end of the kernel. + * Find the end of the kernel. */ - kernstart = trunc_page(kernel_text); #ifdef DDB ksym_start = bootinfo->bi_symtab; ksym_end = bootinfo->bi_esymtab; @@ -772,16 +787,6 @@ ia64_init(void) kernend = round_page(bootinfo->bi_kernend); /* - * Region 6 is direct mapped UC and region 7 is direct mapped - * WC. The details of this is controlled by the Alt {I,D}TLB - * handlers. Here we just make sure that they have the largest - * possible page size to minimise TLB usage. - */ - ia64_set_rr(IA64_RR_BASE(6), (6 << 8) | (PAGE_SHIFT << 2)); - ia64_set_rr(IA64_RR_BASE(7), (7 << 8) | (PAGE_SHIFT << 2)); - ia64_srlz_d(); - - /* * Wire things up so we can call the firmware. */ map_pal_code(); @@ -828,92 +833,6 @@ ia64_init(void) freeenv(p); } - kernstartpfn = atop(IA64_RR_MASK(kernstart)); - kernendpfn = atop(IA64_RR_MASK(kernend)); - - /* - * Size the memory regions and load phys_avail[] with the results. - */ - - /* - * Find out how much memory is available, by looking at - * the memory descriptors. - */ - -#ifdef DEBUG_MD - printf("Memory descriptor count: %d\n", mdcount); -#endif - - phys_avail_cnt = 0; - for (md = efi_md_first(); md != NULL; md = efi_md_next(md)) { -#ifdef DEBUG_MD - printf("MD %p: type %d pa 0x%lx cnt 0x%lx\n", md, - md->md_type, md->md_phys, md->md_pages); -#endif - - pfn0 = ia64_btop(round_page(md->md_phys)); - pfn1 = ia64_btop(trunc_page(md->md_phys + md->md_pages * 4096)); - if (pfn1 <= pfn0) - continue; - - if (md->md_type != EFI_MD_TYPE_FREE) - continue; - - /* - * We have a memory descriptor that describes conventional - * memory that is for general use. We must determine if the - * loader has put the kernel in this region. - */ - physmem += (pfn1 - pfn0); - if (pfn0 <= kernendpfn && kernstartpfn <= pfn1) { - /* - * Must compute the location of the kernel - * within the segment. - */ -#ifdef DEBUG_MD - printf("Descriptor %p contains kernel\n", mp); -#endif - if (pfn0 < kernstartpfn) { - /* - * There is a chunk before the kernel. - */ -#ifdef DEBUG_MD - printf("Loading chunk before kernel: " - "0x%lx / 0x%lx\n", pfn0, kernstartpfn); -#endif - phys_avail[phys_avail_cnt] = ia64_ptob(pfn0); - phys_avail[phys_avail_cnt+1] = ia64_ptob(kernstartpfn); - phys_avail_cnt += 2; - } - if (kernendpfn < pfn1) { - /* - * There is a chunk after the kernel. - */ -#ifdef DEBUG_MD - printf("Loading chunk after kernel: " - "0x%lx / 0x%lx\n", kernendpfn, pfn1); -#endif - phys_avail[phys_avail_cnt] = ia64_ptob(kernendpfn); - phys_avail[phys_avail_cnt+1] = ia64_ptob(pfn1); - phys_avail_cnt += 2; - } - } else { - /* - * Just load this cluster as one chunk. - */ -#ifdef DEBUG_MD - printf("Loading descriptor %d: 0x%lx / 0x%lx\n", i, - pfn0, pfn1); -#endif - phys_avail[phys_avail_cnt] = ia64_ptob(pfn0); - phys_avail[phys_avail_cnt+1] = ia64_ptob(pfn1); - phys_avail_cnt += 2; - - } - } - phys_avail[phys_avail_cnt] = 0; - - Maxmem = physmem; init_param2(physmem); /* Added: head/sys/ia64/ia64/physmem.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/ia64/ia64/physmem.c Sat Jul 7 00:25:17 2012 (r238184) @@ -0,0 +1,195 @@ +/*- + * Copyright (c) 2012 Marcel Moolenaar + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include + +#include +#include + +static u_int phys_avail_segs; + +vm_paddr_t phys_avail[2 * VM_PHYSSEG_MAX + 2]; + +vm_paddr_t paddr_max; + +long realmem; + +static u_int +ia64_physmem_find(vm_paddr_t base, vm_paddr_t lim) +{ + u_int idx; + + for (idx = 0; phys_avail[idx + 1] != 0; idx += 2) { + if (phys_avail[idx] >= lim || + phys_avail[idx + 1] > base) + break; + } + return (idx); +} + +static int +ia64_physmem_insert(u_int idx, vm_paddr_t base, vm_paddr_t lim) +{ + u_int ridx; + + if (phys_avail_segs == VM_PHYSSEG_MAX) + return (ENOMEM); + + ridx = phys_avail_segs * 2; + while (idx < ridx) { + phys_avail[ridx + 1] = phys_avail[ridx - 1]; + phys_avail[ridx] = phys_avail[ridx - 2]; + ridx -= 2; + } + phys_avail[idx] = base; + phys_avail[idx + 1] = lim; + phys_avail_segs++; + return (0); +} + +static int +ia64_physmem_remove(u_int idx) +{ + + if (phys_avail_segs == 0) + return (ENOENT); + do { + phys_avail[idx] = phys_avail[idx + 2]; + phys_avail[idx + 1] = phys_avail[idx + 3]; + idx += 2; + } while (phys_avail[idx + 1] != 0); + phys_avail_segs--; + return (0); +} + +int +ia64_physmem_add(vm_paddr_t base, vm_size_t len) +{ + vm_paddr_t lim; + u_int idx; + + realmem += len; + + lim = base + len; + idx = ia64_physmem_find(base, lim); + if (phys_avail[idx] == lim) { + phys_avail[idx] = base; + return (0); + } + if (idx > 0 && phys_avail[idx - 1] == base) { + phys_avail[idx - 1] = lim; + return (0); + } + return (ia64_physmem_insert(idx, base, lim)); +} + +int +ia64_physmem_delete(vm_paddr_t base, vm_size_t len) +{ + vm_paddr_t lim; + u_int idx; + + lim = base + len; + idx = ia64_physmem_find(base, lim); + if (phys_avail[idx] >= lim || phys_avail[idx + 1] == 0) + return (ENOENT); + if (phys_avail[idx] < base && phys_avail[idx + 1] > lim) { + len = phys_avail[idx + 1] - lim; + phys_avail[idx + 1] = base; + base = lim; + lim = base + len; + return (ia64_physmem_insert(idx + 2, base, lim)); + } else { + if (phys_avail[idx] == base) + phys_avail[idx] = lim; + if (phys_avail[idx + 1] == lim) + phys_avail[idx + 1] = base; + if (phys_avail[idx] >= phys_avail[idx + 1]) + return (ia64_physmem_remove(idx)); + } + return (0); +} + +int +ia64_physmem_fini(void) +{ + vm_paddr_t base, lim, size; + u_int idx; + + idx = 0; + while (phys_avail[idx + 1] != 0) { + base = round_page(phys_avail[idx]); + lim = trunc_page(phys_avail[idx + 1]); + if (base < lim) { + phys_avail[idx] = base; + phys_avail[idx + 1] = lim; + size = lim - base; + physmem += atop(size); + paddr_max = lim; + idx += 2; + } else + ia64_physmem_remove(idx); + } + + /* + * Round realmem to a multple of 128MB. Hopefully that compensates + * for any loss of DRAM that isn't accounted for in the memory map. + * I'm thinking legacy BIOS or VGA here. In any case, it's ok if + * we got it wrong, because we don't actually use realmem. It's + * just for show... + */ + size = 1U << 27; + realmem = (realmem + size - 1) & ~(size - 1); + realmem = atop(realmem); + return (0); +} + +int +ia64_physmem_init(void) +{ + + /* Nothing to do just yet. */ + return (0); +} + +int +ia64_physmem_track(vm_paddr_t base, vm_size_t len) +{ + + realmem += len; + return (0); +} + +vm_paddr_t +ia64_physmem_alloc(vm_size_t len, vm_size_t align) +{ + + return (0); +} Modified: head/sys/ia64/include/md_var.h ============================================================================== --- head/sys/ia64/include/md_var.h Fri Jul 6 23:17:30 2012 (r238183) +++ head/sys/ia64/include/md_var.h Sat Jul 7 00:25:17 2012 (r238184) @@ -73,8 +73,7 @@ struct ia64_init_return { }; extern uint64_t ia64_lapic_addr; - -extern long Maxmem; +extern vm_paddr_t paddr_max; extern u_int busdma_swi_pending; void *acpi_find_table(const char *sig); @@ -93,6 +92,12 @@ int ia64_highfp_save(struct thread *); int ia64_highfp_save_ipi(void); struct ia64_init_return ia64_init(void); u_int ia64_itc_freq(void); +int ia64_physmem_add(vm_paddr_t, vm_size_t); +vm_paddr_t ia64_physmem_alloc(vm_size_t, vm_size_t); +int ia64_physmem_delete(vm_paddr_t, vm_size_t); +int ia64_physmem_fini(void); +int ia64_physmem_init(void); +int ia64_physmem_track(vm_paddr_t, vm_size_t); void ia64_probe_sapics(void); void ia64_sync_icache(vm_offset_t, vm_size_t); void interrupt(struct trapframe *); Modified: head/sys/ia64/include/param.h ============================================================================== --- head/sys/ia64/include/param.h Fri Jul 6 23:17:30 2012 (r238183) +++ head/sys/ia64/include/param.h Sat Jul 7 00:25:17 2012 (r238184) @@ -110,9 +110,6 @@ #define atop(x) ((unsigned long)(x) >> PAGE_SHIFT) #define ptoa(x) ((unsigned long)(x) << PAGE_SHIFT) -#define ia64_btop(x) ((unsigned long)(x) >> PAGE_SHIFT) -#define ia64_ptob(x) ((unsigned long)(x) << PAGE_SHIFT) - #define pgtok(x) ((x) * (PAGE_SIZE / 1024)) #endif /* !_IA64_INCLUDE_PARAM_H_ */ From owner-svn-src-all@FreeBSD.ORG Sat Jul 7 01:12:10 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A82E2106566B; Sat, 7 Jul 2012 01:12:10 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from mail.xcllnt.net (mail.xcllnt.net [70.36.220.4]) by mx1.freebsd.org (Postfix) with ESMTP id 6F7AE8FC0A; Sat, 7 Jul 2012 01:12:10 +0000 (UTC) Received: from dhcp-192-168-2-58.wifi.xcllnt.net (wifi.xcllnt.net [70.36.220.6] (may be forged)) (authenticated bits=0) by mail.xcllnt.net (8.14.5/8.14.5) with ESMTP id q671Bt2Y056896 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Fri, 6 Jul 2012 18:12:03 -0700 (PDT) (envelope-from marcel@xcllnt.net) Mime-Version: 1.0 (Apple Message framework v1278) Content-Type: text/plain; charset=us-ascii From: Marcel Moolenaar In-Reply-To: <20120706181213.GI2338@deviant.kiev.zoral.com.ua> Date: Fri, 6 Jul 2012 18:11:56 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201207061557.q66Fv45N069464@svn.freebsd.org> <20120706181213.GI2338@deviant.kiev.zoral.com.ua> To: Konstantin Belousov X-Mailer: Apple Mail (2.1278) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Marcel Moolenaar , src-committers@freebsd.org Subject: Re: svn commit: r238172 - head/sys/dev/agp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jul 2012 01:12:10 -0000 On Jul 6, 2012, at 11:12 AM, Konstantin Belousov wrote: >> agp_i810.c: >> While arguably the use of Maxmem can be considered correct, replace = its use >> with realmem anyway. agp_i810.c is specific to amd64, i386 & pc98, = which >> have a dense physical memory layout. Avoiding Maxmem here is done = with an >> eye on copy-n-paste behaviour in general and to avoid confusion = caused by >> using realmem in agp.c and Maxmem in agp_i810.c. > The agp_i810.c use is to prevent attachment when largest physical = address > of populated memory exceeds GPU limits established by PTE format and > chipset errata. Editing Maxmem to be spelled as realmem seems to = change > nothing right now, but I do argue that this is wrong, and commit = message > makes future archeology quite confusing. The commit log states it all, including how one can arguably call the = change wrong. What exactly is confusing? --=20 Marcel Moolenaar marcel@xcllnt.net From owner-svn-src-all@FreeBSD.ORG Sat Jul 7 04:14:29 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 67DBB1065670; Sat, 7 Jul 2012 04:14:29 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 531698FC19; Sat, 7 Jul 2012 04:14:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q674ETMZ010786; Sat, 7 Jul 2012 04:14:29 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q674ETpZ010784; Sat, 7 Jul 2012 04:14:29 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <201207070414.q674ETpZ010784@svn.freebsd.org> From: Tim Kientzle Date: Sat, 7 Jul 2012 04:14:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238185 - head/usr.bin/mkesdb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jul 2012 04:14:29 -0000 Author: kientzle Date: Sat Jul 7 04:14:28 2012 New Revision: 238185 URL: http://svn.freebsd.org/changeset/base/238185 Log: Unbreak building WITH_ICONV=yes and new yacc. Modified: head/usr.bin/mkesdb/ldef.h Modified: head/usr.bin/mkesdb/ldef.h ============================================================================== --- head/usr.bin/mkesdb/ldef.h Sat Jul 7 00:25:17 2012 (r238184) +++ head/usr.bin/mkesdb/ldef.h Sat Jul 7 04:14:28 2012 (r238185) @@ -30,7 +30,6 @@ extern int line_number; extern int yyerror(const char *); extern int yylex(void); -extern int yyparse(void); struct named_csid { STAILQ_ENTRY(named_csid) ci_entry; From owner-svn-src-all@FreeBSD.ORG Sat Jul 7 04:49:54 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 166321065672; Sat, 7 Jul 2012 04:49: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 005358FC0A; Sat, 7 Jul 2012 04:49:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q674nr6G013612; Sat, 7 Jul 2012 04:49:53 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q674nrK7013610; Sat, 7 Jul 2012 04:49:53 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201207070449.q674nrK7013610@svn.freebsd.org> From: Warner Losh Date: Sat, 7 Jul 2012 04:49:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238186 - head/sys/boot/arm/at91 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jul 2012 04:49:54 -0000 Author: imp Date: Sat Jul 7 04:49:53 2012 New Revision: 238186 URL: http://svn.freebsd.org/changeset/base/238186 Log: Strip out the useless junk. All we really care about is the text, data and bss sections. All the rest is needed for normal binaries, but boot loaders aren't normal. Modified: head/sys/boot/arm/at91/linker.cfg Modified: head/sys/boot/arm/at91/linker.cfg ============================================================================== --- head/sys/boot/arm/at91/linker.cfg Sat Jul 7 04:14:28 2012 (r238185) +++ head/sys/boot/arm/at91/linker.cfg Sat Jul 7 04:49:53 2012 (r238186) @@ -31,258 +31,26 @@ SECTIONS .text : { *(.text) - *(.text.*) - *(.stub) - /* .gnu.warning sections are handled specially by elf32.em. */ - *(.gnu.warning) - *(.gnu.linkonce.t.*) - *(.glue_7t) *(.glue_7) } - .interp : { *(.interp) } - .hash : { *(.hash) } - .dynsym : { *(.dynsym) } - .dynstr : { *(.dynstr) } - .gnu.version : { *(.gnu.version) } - .gnu.version_d : { *(.gnu.version_d) } - .gnu.version_r : { *(.gnu.version_r) } - .rel.init : { *(.rel.init) } - .rela.init : { *(.rela.init) } - .rel.text : - { - *(.rel.text) - *(.rel.text.*) - *(.rel.gnu.linkonce.t.*) - } - .rela.text : - { - *(.rela.text) - *(.rela.text.*) - *(.rela.gnu.linkonce.t.*) - } - .rel.fini : { *(.rel.fini) } - .rela.fini : { *(.rela.fini) } - .rel.rodata : - { - *(.rel.rodata) - *(.rel.rodata.*) - *(.rel.gnu.linkonce.r.*) - } - .rela.rodata : - { - *(.rela.rodata) - *(.rela.rodata.*) - *(.rela.gnu.linkonce.r.*) - } - .rel.data : - { - *(.rel.data) - *(.rel.data.*) - *(.rel.gnu.linkonce.d.*) - } - .rela.data : - { - *(.rela.data) - *(.rela.data.*) - *(.rela.gnu.linkonce.d.*) - } - .rel.ctors : { *(.rel.ctors) } - .rela.ctors : { *(.rela.ctors) } - .rel.dtors : { *(.rel.dtors) } - .rela.dtors : { *(.rela.dtors) } - .rel.got : { *(.rel.got) } - .rela.got : { *(.rela.got) } - .rel.sdata : - { - *(.rel.sdata) - *(.rel.sdata.*) - *(.rel.gnu.linkonce.s.*) - } - .rela.sdata : - { - *(.rela.sdata) - *(.rela.sdata.*) - *(.rela.gnu.linkonce.s.*) - } - .rel.sbss : - { - *(.rel.sbss) - *(.rel.sbss.*) - *(.rel.gnu.linkonce.sb.*) - } - .rela.sbss : - { - *(.rela.sbss) - *(.rela.sbss.*) - *(.rel.gnu.linkonce.sb.*) - } - .rel.sdata2 : - { - *(.rel.sdata2) - *(.rel.sdata2.*) - *(.rel.gnu.linkonce.s2.*) - } - .rela.sdata2 : - { - *(.rela.sdata2) - *(.rela.sdata2.*) - *(.rela.gnu.linkonce.s2.*) - } - .rel.sbss2 : - { - *(.rel.sbss2) - *(.rel.sbss2.*) - *(.rel.gnu.linkonce.sb2.*) - } - .rela.sbss2 : - { - *(.rela.sbss2) - *(.rela.sbss2.*) - *(.rela.gnu.linkonce.sb2.*) - } - .rel.bss : - { - *(.rel.bss) - *(.rel.bss.*) - *(.rel.gnu.linkonce.b.*) - } - .rela.bss : - { - *(.rela.bss) - *(.rela.bss.*) - *(.rela.gnu.linkonce.b.*) - } - .rel.plt : { *(.rel.plt) } - .rela.plt : { *(.rela.plt) } - .init : - { - KEEP (*(.init)) - } =0 - .plt : { *(.plt) } - .fini : - { - KEEP (*(.fini)) - } =0 PROVIDE (__etext = .); PROVIDE (_etext = .); PROVIDE (etext = .); - .rodata : { *(.rodata) *(.rodata.*) *(.gnu.linkonce.r.*) } - .rodata1 : { *(.rodata1) } - .sdata2 : { *(.sdata2) *(.sdata2.*) *(.gnu.linkonce.s2.*) } - .sbss2 : { *(.sbss2) *(.sbss2.*) *(.gnu.linkonce.sb2.*) } .data : { __data_start = . ; *(.data) - *(.data.*) - *(.gnu.linkonce.d.*) - SORT(CONSTRUCTORS) - } - .data1 : { *(.data1) } - . = 0x21200000; - .eh_frame : { KEEP (*(.eh_frame)) } - .gcc_except_table : { *(.gcc_except_table) } - .ctors : - { - /* gcc uses crtbegin.o to find the start of - the constructors, so we make sure it is - first. Because this is a wildcard, it - doesn't matter if the user does not - actually link against crtbegin.o; the - linker won't look for a file to match a - wildcard. The wildcard also means that it - doesn't matter which directory crtbegin.o - is in. */ - KEEP (*crtbegin.o(.ctors)) - /* We don't want to include the .ctor section from - from the crtend.o file until after the sorted ctors. - The .ctor section from the crtend file contains the - end of ctors marker and it must be last */ - KEEP (*(EXCLUDE_FILE (*crtend.o ) .ctors)) - KEEP (*(SORT(.ctors.*))) - KEEP (*(.ctors)) - } - .dtors : - { - KEEP (*crtbegin.o(.dtors)) - KEEP (*(EXCLUDE_FILE (*crtend.o ) .dtors)) - KEEP (*(SORT(.dtors.*))) - KEEP (*(.dtors)) - } - .got : { *(.got.plt) *(.got) } - .dynamic : { *(.dynamic) } - /* We want the small data sections together, so single-instruction offsets - can access them all, and initialized data all before uninitialized, so - we can shorten the on-disk segment size. */ - .sdata : - { - *(.sdata) - *(.sdata.*) - *(.gnu.linkonce.s.*) } _edata = .; PROVIDE (edata = .); __bss_start = .; __bss_start__ = .; - .sbss : - { - PROVIDE (__sbss_start = .); - PROVIDE (___sbss_start = .); - *(.dynsbss) - *(.sbss) - *(.sbss.*) - *(.gnu.linkonce.sb.*) - *(.scommon) - PROVIDE (__sbss_end = .); - PROVIDE (___sbss_end = .); - } .bss : { - *(.dynbss) *(.bss) - *(.bss.*) - *(.gnu.linkonce.b.*) - *(COMMON) - /* Align here to ensure that the .bss section occupies space up to - _end. Align after .bss to ensure correct alignment even if the - .bss section disappears because there are no input sections. */ . = ALIGN(32 / 8); } . = ALIGN(32 / 8); _end = .; _bss_end__ = . ; __bss_end__ = . ; __end__ = . ; PROVIDE (end = .); - /* Stabs debugging sections. */ - .stab 0 : { *(.stab) } - .stabstr 0 : { *(.stabstr) } - .stab.excl 0 : { *(.stab.excl) } - .stab.exclstr 0 : { *(.stab.exclstr) } - .stab.index 0 : { *(.stab.index) } - .stab.indexstr 0 : { *(.stab.indexstr) } - .comment 0 : { *(.comment) } - /* DWARF debug sections. - Symbols in the DWARF debugging sections are relative to the beginning - of the section so we begin them at 0. */ - /* DWARF 1 */ - .debug 0 : { *(.debug) } - .line 0 : { *(.line) } - /* GNU DWARF 1 extensions */ - .debug_srcinfo 0 : { *(.debug_srcinfo) } - .debug_sfnames 0 : { *(.debug_sfnames) } - /* DWARF 1.1 and DWARF 2 */ - .debug_aranges 0 : { *(.debug_aranges) } - .debug_pubnames 0 : { *(.debug_pubnames) } - /* DWARF 2 */ - .debug_info 0 : { *(.debug_info) *(.gnu.linkonce.wi.*) } - .debug_abbrev 0 : { *(.debug_abbrev) } - .debug_line 0 : { *(.debug_line) } - .debug_frame 0 : { *(.debug_frame) } - .debug_str 0 : { *(.debug_str) } - .debug_loc 0 : { *(.debug_loc) } - .debug_macinfo 0 : { *(.debug_macinfo) } - /* SGI/MIPS DWARF 2 extensions */ - .debug_weaknames 0 : { *(.debug_weaknames) } - .debug_funcnames 0 : { *(.debug_funcnames) } - .debug_typenames 0 : { *(.debug_typenames) } - .debug_varnames 0 : { *(.debug_varnames) } - /* These must appear regardless of . */ } From owner-svn-src-all@FreeBSD.ORG Sat Jul 7 04:52:00 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2E158106566B; Sat, 7 Jul 2012 04:52:00 +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 17B698FC14; Sat, 7 Jul 2012 04:52:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q674pxJc013800; Sat, 7 Jul 2012 04:51:59 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q674pxps013798; Sat, 7 Jul 2012 04:51:59 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201207070451.q674pxps013798@svn.freebsd.org> From: Warner Losh Date: Sat, 7 Jul 2012 04:51:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238187 - head/sys/boot/arm/at91/libat91 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jul 2012 04:52:00 -0000 Author: imp Date: Sat Jul 7 04:51:59 2012 New Revision: 238187 URL: http://svn.freebsd.org/changeset/base/238187 Log: Allow other SOCs to be compiled in, first step. Modified: head/sys/boot/arm/at91/libat91/Makefile Modified: head/sys/boot/arm/at91/libat91/Makefile ============================================================================== --- head/sys/boot/arm/at91/libat91/Makefile Sat Jul 7 04:49:53 2012 (r238186) +++ head/sys/boot/arm/at91/libat91/Makefile Sat Jul 7 04:51:59 2012 (r238187) @@ -2,9 +2,11 @@ .include "${.CURDIR}/../Makefile.inc" +SOC?=at91rm9200 + LIB= at91 INTERNALLIB= -SRCS=at91rm9200_lowlevel.c delay.c eeprom.c emac.c emac_init.c getc.c \ +SRCS=${SOC}_lowlevel.c delay.c eeprom.c emac.c emac_init.c getc.c \ putchar.c printf.c reset.c spi_flash.c xmodem.c \ sd-card.c strcvt.c strlen.c strcmp.c memcpy.c strcpy.c \ memset.c memcmp.c From owner-svn-src-all@FreeBSD.ORG Sat Jul 7 04:55:43 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2FFAC106566B; Sat, 7 Jul 2012 04:55:43 +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 1BA4E8FC12; Sat, 7 Jul 2012 04:55:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q674tgLm014124; Sat, 7 Jul 2012 04:55:42 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q674tgl8014122; Sat, 7 Jul 2012 04:55:42 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201207070455.q674tgl8014122@svn.freebsd.org> From: Warner Losh Date: Sat, 7 Jul 2012 04:55:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238188 - head/sys/boot/arm/at91/boot0spi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jul 2012 04:55:43 -0000 Author: imp Date: Sat Jul 7 04:55:42 2012 New Revision: 238188 URL: http://svn.freebsd.org/changeset/base/238188 Log: Generalize this for loading the loader into the SPI. Plus trim about 100 bytes from the binary with silly tricks. Hope to get this small enough to run on the models that have 4k SRAM. We are close compiled for the at91rm9200, but still need to trim for the target. Modified: head/sys/boot/arm/at91/boot0spi/main.c Modified: head/sys/boot/arm/at91/boot0spi/main.c ============================================================================== --- head/sys/boot/arm/at91/boot0spi/main.c Sat Jul 7 04:51:59 2012 (r238187) +++ head/sys/boot/arm/at91/boot0spi/main.c Sat Jul 7 04:55:42 2012 (r238188) @@ -29,31 +29,26 @@ #include "at91rm9200_lowlevel.h" #include "spi_flash.h" -#define LOADER_OFFSET 0 -#define FPGA_OFFSET (15 * FLASH_PAGE_SIZE) -#define OFFSET FPGA_OFFSET +#define OFFSET 0 -int +void main(void) { int len, i, j, off, sec; char *addr = (char *)SDRAM_BASE + (1 << 20); /* download at + 1MB */ char *addr2 = (char *)SDRAM_BASE + (2 << 20); /* readback to + 2MB */ - char *addr3 = (char *)SDRAM_BASE + (3 << 20); /* extra copy at + 3MB */ SPI_InitFlash(); printf("Waiting for data\n"); while ((len = xmodem_rx(addr)) == -1) continue; - // Need extra copy at addr3 - memcpy(addr3, addr, (len + FLASH_PAGE_SIZE - 1) / FLASH_PAGE_SIZE * FLASH_PAGE_SIZE); - printf("Writing %u bytes to flash at %u\n", len, OFFSET); + printf("Writing %u bytes at %u\n", len, OFFSET); for (i = 0; i < len; i+= FLASH_PAGE_SIZE) { + off = i + OFFSET; for (j = 0; j < 10; j++) { - off = i + OFFSET; SPI_WriteFlash(off, addr + i, FLASH_PAGE_SIZE); SPI_ReadFlash(off, addr2 + i, FLASH_PAGE_SIZE); - if (p_memcmp(addr3 + i, addr2 + i, FLASH_PAGE_SIZE) == 0) + if (p_memcmp(addr + i, addr2 + i, FLASH_PAGE_SIZE) == 0) break; } if (j >= 10) @@ -64,5 +59,4 @@ main(void) continue; printf("Done\n"); reset(); - return (1); } From owner-svn-src-all@FreeBSD.ORG Sat Jul 7 05:02:40 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2E4D3106564A; Sat, 7 Jul 2012 05:02:40 +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 17EFA8FC12; Sat, 7 Jul 2012 05:02:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6752dq8014704; Sat, 7 Jul 2012 05:02:39 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6752d6X014688; Sat, 7 Jul 2012 05:02:39 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201207070502.q6752d6X014688@svn.freebsd.org> From: Warner Losh Date: Sat, 7 Jul 2012 05:02:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238189 - in head/sys: arm/at91 arm/conf arm/include conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jul 2012 05:02:40 -0000 Author: imp Date: Sat Jul 7 05:02:39 2012 New Revision: 238189 URL: http://svn.freebsd.org/changeset/base/238189 Log: Create a generic way to support multiple boards within an arm platform. Add all the atmel boards to the ATMEL kernel for testing purposes. Until boot loader arg parsing of baord type is done, this won't actually be able to do the runtime selection. Added: head/sys/arm/include/board.h (contents, props changed) Modified: head/sys/arm/at91/at91_machdep.c head/sys/arm/at91/at91board.h head/sys/arm/at91/board_bwct.c head/sys/arm/at91/board_ethernut5.c head/sys/arm/at91/board_hl200.c head/sys/arm/at91/board_hl201.c head/sys/arm/at91/board_kb920x.c head/sys/arm/at91/board_qila9g20.c head/sys/arm/at91/board_sam9g20ek.c head/sys/arm/at91/board_sam9x25ek.c head/sys/arm/at91/board_tsc4370.c head/sys/arm/conf/ATMEL head/sys/conf/options.arm Modified: head/sys/arm/at91/at91_machdep.c ============================================================================== --- head/sys/arm/at91/at91_machdep.c Sat Jul 7 04:55:42 2012 (r238188) +++ head/sys/arm/at91/at91_machdep.c Sat Jul 7 05:02:39 2012 (r238189) @@ -70,6 +70,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -402,6 +403,18 @@ at91_soc_id(void) at91_try_id(AT91_DBGU1); } +#ifdef ARM_MANY_BOARD +/* likely belongs in arm/arm/machdep.c, but since board_init is still at91 only... */ +SET_DECLARE(arm_board_set, const struct arm_board); + +/* Not yet fully functional, but enough to build ATMEL config */ +static long +board_init(void) +{ + return -1; +} +#endif + void * initarm(struct arm_boot_params *abp) { Modified: head/sys/arm/at91/at91board.h ============================================================================== --- head/sys/arm/at91/at91board.h Sat Jul 7 04:55:42 2012 (r238188) +++ head/sys/arm/at91/at91board.h Sat Jul 7 05:02:39 2012 (r238189) @@ -33,9 +33,4 @@ */ long at91_ramsize(void); -/* - * These routines are expected to be provided by the board files. - */ -long board_init(void); - #endif /* _ARM_AT91_AT91BOARD_H_ */ Modified: head/sys/arm/at91/board_bwct.c ============================================================================== --- head/sys/arm/at91/board_bwct.c Sat Jul 7 04:55:42 2012 (r238188) +++ head/sys/arm/at91/board_bwct.c Sat Jul 7 05:02:39 2012 (r238189) @@ -29,12 +29,13 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include #include -long +BOARD_INIT long board_init(void) { /* @@ -64,3 +65,5 @@ board_init(void) return (at91_ramsize()); } + +ARM_BOARD(NONE, "BWCT special"); Modified: head/sys/arm/at91/board_ethernut5.c ============================================================================== --- head/sys/arm/at91/board_ethernut5.c Sat Jul 7 04:55:42 2012 (r238188) +++ head/sys/arm/at91/board_ethernut5.c Sat Jul 7 05:02:39 2012 (r238189) @@ -33,12 +33,13 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include #include -long +BOARD_INIT long board_init(void) { @@ -144,3 +145,5 @@ board_init(void) return (at91_ramsize()); } + +ARM_BOARD(NONE, "Ethernut 5") Modified: head/sys/arm/at91/board_hl200.c ============================================================================== --- head/sys/arm/at91/board_hl200.c Sat Jul 7 04:55:42 2012 (r238188) +++ head/sys/arm/at91/board_hl200.c Sat Jul 7 05:02:39 2012 (r238189) @@ -29,12 +29,13 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include #include -long +BOARD_INIT long board_init(void) { /* @@ -61,3 +62,5 @@ board_init(void) return (at91_ramsize()); } + +ARM_BOARD(NONE, "HOTe 200"); Modified: head/sys/arm/at91/board_hl201.c ============================================================================== --- head/sys/arm/at91/board_hl201.c Sat Jul 7 04:55:42 2012 (r238188) +++ head/sys/arm/at91/board_hl201.c Sat Jul 7 05:02:39 2012 (r238189) @@ -29,12 +29,13 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include #include -long +BOARD_INIT long board_init(void) { /* Setup Ethernet Pins */ @@ -65,3 +66,5 @@ board_init(void) return (at91_ramsize()); } + +ARM_BOARD(NONE, "HOTe 201"); Modified: head/sys/arm/at91/board_kb920x.c ============================================================================== --- head/sys/arm/at91/board_kb920x.c Sat Jul 7 04:55:42 2012 (r238188) +++ head/sys/arm/at91/board_kb920x.c Sat Jul 7 05:02:39 2012 (r238189) @@ -29,13 +29,14 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include #include #include -long +BOARD_INIT long board_init(void) { /* @@ -70,3 +71,5 @@ board_init(void) return (at91_ramsize()); } + +ARM_BOARD(KB9200, "Kwikbyte KB920x") Modified: head/sys/arm/at91/board_qila9g20.c ============================================================================== --- head/sys/arm/at91/board_qila9g20.c Sat Jul 7 04:55:42 2012 (r238188) +++ head/sys/arm/at91/board_qila9g20.c Sat Jul 7 05:02:39 2012 (r238189) @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -44,7 +45,7 @@ __FBSDID("$FreeBSD$"); #define AT91SAM9G20_LED_SIZE AT91SAM9G20_PIO_SIZE #define AT91SAM9G20_IRQ_LED AT91SAM9G20_IRQ_PIOA -long +BOARD_INIT long board_init(void) { @@ -103,3 +104,5 @@ board_init(void) return (at91_ramsize()); } + +ARM_BOARD(QIL_A9G20, "Calico System QIL-9G20-Cxx"); Modified: head/sys/arm/at91/board_sam9g20ek.c ============================================================================== --- head/sys/arm/at91/board_sam9g20ek.c Sat Jul 7 04:55:42 2012 (r238188) +++ head/sys/arm/at91/board_sam9g20ek.c Sat Jul 7 05:02:39 2012 (r238189) @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -41,7 +42,7 @@ __FBSDID("$FreeBSD$"); #include //#include -long +BOARD_INIT long board_init(void) { /* PIOB's A periph: Turn USART 0's TX/RX pins */ @@ -122,3 +123,5 @@ board_init(void) return (at91_ramsize()); } + +ARM_BOARD(AT91SAM9G20, "Atmel SAM9G20-EK Development Card"); Modified: head/sys/arm/at91/board_sam9x25ek.c ============================================================================== --- head/sys/arm/at91/board_sam9x25ek.c Sat Jul 7 04:55:42 2012 (r238188) +++ head/sys/arm/at91/board_sam9x25ek.c Sat Jul 7 05:02:39 2012 (r238189) @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -41,7 +42,7 @@ __FBSDID("$FreeBSD$"); #include //#include -long +BOARD_INIT long board_init(void) { #if 0 @@ -123,3 +124,5 @@ board_init(void) #endif return (at91_ramsize()); } + +ARM_BOARD(AT91SAM9X5EK, "Atmel AT91SAM9x-EK Evaluation Board"); Modified: head/sys/arm/at91/board_tsc4370.c ============================================================================== --- head/sys/arm/at91/board_tsc4370.c Sat Jul 7 04:55:42 2012 (r238188) +++ head/sys/arm/at91/board_tsc4370.c Sat Jul 7 05:02:39 2012 (r238189) @@ -29,12 +29,13 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include #include -long +BOARD_INIT long board_init(void) { /* @@ -73,3 +74,5 @@ board_init(void) return (at91_ramsize()); } + +ARM_BOARD(NONE, "TSC4370 Controller Board"); Modified: head/sys/arm/conf/ATMEL ============================================================================== --- head/sys/arm/conf/ATMEL Sat Jul 7 04:55:42 2012 (r238188) +++ head/sys/arm/conf/ATMEL Sat Jul 7 05:02:39 2012 (r238189) @@ -18,15 +18,16 @@ options KERNVIRTADDR=0xc0000000 makeoptions MODULES_OVERRIDE="" # list all boards here, but not just yet (no multiboard in mainline). -#device at91_board_bwct -#device at91_board_ethernut5 -#device at91_board_hl200 -#device at91_board_hl201 -#device at91_board_kb920x -#device at91_board_qila9g20 +options ARM_MANY_BOARD +device at91_board_bwct +device at91_board_ethernut5 +device at91_board_hl200 +device at91_board_hl201 +device at91_board_kb920x +device at91_board_qila9g20 device at91_board_sam9g20ek -#device at91_board_sam9x25ek -#device at91_board_tsc4370 +device at91_board_sam9x25ek +device at91_board_tsc4370 #makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols Added: head/sys/arm/include/board.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/include/board.h Sat Jul 7 05:02:39 2012 (r238189) @@ -0,0 +1,62 @@ +/*- + * Copyright (c) 2012 Warner Losh. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* $FreeBSD$ */ + +#ifndef _ARM_INCLUDE_BOARD_H_ +#define _ARM_INCLUDE_BOARD_H_ + +#include + +typedef long (arm_board_init_fn)(void); + +struct arm_board { + int board_id; /* Board ID from the boot loader */ + const char *board_name; /* Human readable name */ + arm_board_init_fn *board_init; /* Board initialize code */ +}; + +#if defined(ARM_MANY_BOARD) + +#include "board_id.h" + +#define ARM_BOARD(id, name) \ + static struct arm_board this_board = { \ + .board_id = ARM_BOARD_ID_ ## id, \ + .board_name = name, \ + .board_init = board_init, \ + }; \ + DATA_SET(arm_boards, this_board); +#define BOARD_INIT static + +#else /* !ARM_MANY_BOARD */ + +#define ARM_BOARD(id, name) +extern arm_board_init_fn board_init; +#define BOARD_INIT + +#endif /* ARM_MANY_BOARD */ + +#endif /* _ARM_INCLUDE_BOARD_H_ */ Modified: head/sys/conf/options.arm ============================================================================== --- head/sys/conf/options.arm Sat Jul 7 04:55:42 2012 (r238188) +++ head/sys/conf/options.arm Sat Jul 7 05:02:39 2012 (r238189) @@ -3,6 +3,7 @@ ARM9_CACHE_WRITE_THROUGH opt_global.h ARM_CACHE_LOCK_ENABLE opt_global.h ARMFPE opt_global.h ARM_KERN_DIRECTMAP opt_vm.h +ARM_MANY_BOARD opt_global.h ARM_USE_SMALL_ALLOC opt_global.h COUNTS_PER_SEC opt_timer.h CPU_SA1100 opt_global.h From owner-svn-src-all@FreeBSD.ORG Sat Jul 7 05:17:44 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2BB3C106566C; Sat, 7 Jul 2012 05:17:44 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 15CA98FC08; Sat, 7 Jul 2012 05:17:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q675HhQp015905; Sat, 7 Jul 2012 05:17:43 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q675HhIX015900; Sat, 7 Jul 2012 05:17:43 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201207070517.q675HhIX015900@svn.freebsd.org> From: Marcel Moolenaar Date: Sat, 7 Jul 2012 05:17:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238190 - in head/sys/ia64: ia64 include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jul 2012 05:17:44 -0000 Author: marcel Date: Sat Jul 7 05:17:43 2012 New Revision: 238190 URL: http://svn.freebsd.org/changeset/base/238190 Log: Implement ia64_physmem_alloc() and use it consistently to get memory before VM has been initialized. This includes: 1. Replacing pmap_steal_memory(), 2. Replace the handcrafted logic to allocate a naturally aligned VHPT, 3. Properly allocate the DPCPU for the BSP. Ad 3: Appending the DPCPU to kernend worked as long as we wouldn't cross into the next PBVM page. If we were to cross into the next page, then there wouldn't be a PTE entry on the page table for it and we would end up with a MCA following a page fault. As such, this commit fixes MCAs occasionally seen. Modified: head/sys/ia64/ia64/machdep.c head/sys/ia64/ia64/physmem.c head/sys/ia64/ia64/pmap.c head/sys/ia64/include/md_var.h Modified: head/sys/ia64/ia64/machdep.c ============================================================================== --- head/sys/ia64/ia64/machdep.c Sat Jul 7 05:02:39 2012 (r238189) +++ head/sys/ia64/ia64/machdep.c Sat Jul 7 05:17:43 2012 (r238190) @@ -675,7 +675,6 @@ ia64_init(void) struct efi_md *md; pt_entry_t *pbvm_pgtbl_ent, *pbvm_pgtbl_lim; char *p; - vm_offset_t kernend; vm_size_t mdlen; int metadata_missing; @@ -773,20 +772,6 @@ ia64_init(void) bootverbose = 1; /* - * Find the end of the kernel. - */ -#ifdef DDB - ksym_start = bootinfo->bi_symtab; - ksym_end = bootinfo->bi_esymtab; - kernend = (vm_offset_t)round_page(ksym_end); -#else - kernend = (vm_offset_t)round_page(_end); -#endif - /* But if the bootstrap tells us otherwise, believe it! */ - if (bootinfo->bi_kernend) - kernend = round_page(bootinfo->bi_kernend); - - /* * Wire things up so we can call the firmware. */ map_pal_code(); @@ -805,9 +790,8 @@ ia64_init(void) pcpup = &pcpu0; ia64_set_k4((u_int64_t)pcpup); pcpu_init(pcpup, 0, sizeof(pcpu0)); - dpcpu_init((void *)kernend, 0); + dpcpu_init(ia64_physmem_alloc(DPCPU_SIZE, PAGE_SIZE), 0); PCPU_SET(md.lid, ia64_get_lid()); - kernend += DPCPU_SIZE; PCPU_SET(curthread, &thread0); /* @@ -838,14 +822,15 @@ ia64_init(void) /* * Initialize error message buffer (at end of core). */ - msgbufp = (struct msgbuf *)pmap_steal_memory(msgbufsize); + msgbufp = ia64_physmem_alloc(msgbufsize, PAGE_SIZE); msgbufinit(msgbufp, msgbufsize); proc_linkup0(&proc0, &thread0); /* * Init mapping for kernel stack for proc 0 */ - thread0.td_kstack = pmap_steal_memory(KSTACK_PAGES * PAGE_SIZE); + p = ia64_physmem_alloc(KSTACK_PAGES * PAGE_SIZE, PAGE_SIZE); + thread0.td_kstack = (uintptr_t)p; thread0.td_kstack_pages = KSTACK_PAGES; mutex_init(); @@ -871,6 +856,11 @@ ia64_init(void) /* * Initialize debuggers, and break into them if appropriate. */ +#ifdef DDB + ksym_start = bootinfo->bi_symtab; + ksym_end = bootinfo->bi_esymtab; +#endif + kdb_init(); #ifdef KDB Modified: head/sys/ia64/ia64/physmem.c ============================================================================== --- head/sys/ia64/ia64/physmem.c Sat Jul 7 05:02:39 2012 (r238189) +++ head/sys/ia64/ia64/physmem.c Sat Jul 7 05:17:43 2012 (r238190) @@ -187,9 +187,72 @@ ia64_physmem_track(vm_paddr_t base, vm_s return (0); } -vm_paddr_t +void * ia64_physmem_alloc(vm_size_t len, vm_size_t align) { + vm_paddr_t base, lim, pa; + void *ptr; + u_int idx; - return (0); + if (phys_avail_segs == 0) + return (NULL); + + len = round_page(len); + + /* + * Try and allocate with least effort. + */ + idx = phys_avail_segs * 2; + while (idx > 0) { + idx -= 2; + base = phys_avail[idx]; + lim = phys_avail[idx + 1]; + + if (lim - base < len) + continue; + + /* First try from the end. */ + pa = lim - len; + if ((pa & (align - 1)) == 0) { + if (pa == base) + ia64_physmem_remove(idx); + else + phys_avail[idx + 1] = pa; + goto gotit; + } + + /* Try from the start next. */ + pa = base; + if ((pa & (align - 1)) == 0) { + if (pa + len == lim) + ia64_physmem_remove(idx); + else + phys_avail[idx] += len; + goto gotit; + } + } + + /* + * Find a good segment and split it up. + */ + idx = phys_avail_segs * 2; + while (idx > 0) { + idx -= 2; + base = phys_avail[idx]; + lim = phys_avail[idx + 1]; + + pa = (base + align - 1) & ~(align - 1); + if (pa + len <= lim) { + ia64_physmem_delete(pa, len); + goto gotit; + } + } + + /* Out of luck. */ + return (NULL); + + gotit: + ptr = (void *)IA64_PHYS_TO_RR7(pa); + bzero(ptr, len); + return (ptr); } Modified: head/sys/ia64/ia64/pmap.c ============================================================================== --- head/sys/ia64/ia64/pmap.c Sat Jul 7 05:02:39 2012 (r238189) +++ head/sys/ia64/ia64/pmap.c Sat Jul 7 05:17:43 2012 (r238190) @@ -243,36 +243,6 @@ static int pmap_remove_vhpt(vm_offset_t static boolean_t pmap_try_insert_pv_entry(pmap_t pmap, vm_offset_t va, vm_page_t m); -vm_offset_t -pmap_steal_memory(vm_size_t size) -{ - vm_size_t bank_size; - vm_offset_t pa, va; - - size = round_page(size); - - bank_size = phys_avail[1] - phys_avail[0]; - while (size > bank_size) { - int i; - for (i = 0; phys_avail[i+2]; i+= 2) { - phys_avail[i] = phys_avail[i+2]; - phys_avail[i+1] = phys_avail[i+3]; - } - phys_avail[i] = 0; - phys_avail[i+1] = 0; - if (!phys_avail[0]) - panic("pmap_steal_memory: out of memory"); - bank_size = phys_avail[1] - phys_avail[0]; - } - - pa = phys_avail[0]; - phys_avail[0] += size; - - va = IA64_PHYS_TO_RR7(pa); - bzero((caddr_t) va, size); - return va; -} - static void pmap_initialize_vhpt(vm_offset_t vhpt) { @@ -318,7 +288,7 @@ pmap_bootstrap() struct ia64_pal_result res; vm_offset_t base; size_t size; - int i, j, count, ridbits; + int i, ridbits; /* * Query the PAL Code to find the loop parameters for the @@ -380,7 +350,7 @@ pmap_bootstrap() pmap_ridmax = (1 << ridbits); pmap_ridmapsz = pmap_ridmax / 64; - pmap_ridmap = (uint64_t *)pmap_steal_memory(pmap_ridmax / 8); + pmap_ridmap = ia64_physmem_alloc(pmap_ridmax / 8, PAGE_SIZE); pmap_ridmap[0] |= 0xff; pmap_rididx = 0; pmap_ridcount = 8; @@ -389,14 +359,10 @@ pmap_bootstrap() /* * Allocate some memory for initial kernel 'page tables'. */ - ia64_kptdir = (void *)pmap_steal_memory(PAGE_SIZE); + ia64_kptdir = ia64_physmem_alloc(PAGE_SIZE, PAGE_SIZE); nkpt = 0; kernel_vm_end = VM_MIN_KERNEL_ADDRESS; - for (i = 0; phys_avail[i+2]; i+= 2) - ; - count = i+2; - /* * Determine a valid (mappable) VHPT size. */ @@ -410,35 +376,18 @@ pmap_bootstrap() if (pmap_vhpt_log2size & 1) pmap_vhpt_log2size--; - base = 0; size = 1UL << pmap_vhpt_log2size; - for (i = 0; i < count; i += 2) { - base = (phys_avail[i] + size - 1) & ~(size - 1); - if (base + size <= phys_avail[i+1]) - break; - } - if (!phys_avail[i]) + base = (uintptr_t)ia64_physmem_alloc(size, size); + if (base == 0) panic("Unable to allocate VHPT"); - if (base != phys_avail[i]) { - /* Split this region. */ - for (j = count; j > i; j -= 2) { - phys_avail[j] = phys_avail[j-2]; - phys_avail[j+1] = phys_avail[j-2+1]; - } - phys_avail[i+1] = base; - phys_avail[i+2] = base + size; - } else - phys_avail[i] = base + size; - - base = IA64_PHYS_TO_RR7(base); PCPU_SET(md.vhpt, base); if (bootverbose) printf("VHPT: address=%#lx, size=%#lx\n", base, size); pmap_vhpt_nbuckets = size / sizeof(struct ia64_lpte); - pmap_vhpt_bucket = (void *)pmap_steal_memory(pmap_vhpt_nbuckets * - sizeof(struct ia64_bucket)); + pmap_vhpt_bucket = ia64_physmem_alloc(pmap_vhpt_nbuckets * + sizeof(struct ia64_bucket), PAGE_SIZE); for (i = 0; i < pmap_vhpt_nbuckets; i++) { /* Stolen memory is zeroed. */ mtx_init(&pmap_vhpt_bucket[i].mutex, "VHPT bucket lock", NULL, Modified: head/sys/ia64/include/md_var.h ============================================================================== --- head/sys/ia64/include/md_var.h Sat Jul 7 05:02:39 2012 (r238189) +++ head/sys/ia64/include/md_var.h Sat Jul 7 05:17:43 2012 (r238190) @@ -93,7 +93,7 @@ int ia64_highfp_save_ipi(void); struct ia64_init_return ia64_init(void); u_int ia64_itc_freq(void); int ia64_physmem_add(vm_paddr_t, vm_size_t); -vm_paddr_t ia64_physmem_alloc(vm_size_t, vm_size_t); +void *ia64_physmem_alloc(vm_size_t, vm_size_t); int ia64_physmem_delete(vm_paddr_t, vm_size_t); int ia64_physmem_fini(void); int ia64_physmem_init(void); From owner-svn-src-all@FreeBSD.ORG Sat Jul 7 07:59:15 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0D991106566B; Sat, 7 Jul 2012 07:59:15 +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 EDD5F8FC0C; Sat, 7 Jul 2012 07:59:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q677xEZn028172; Sat, 7 Jul 2012 07:59:14 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q677xE2V028170; Sat, 7 Jul 2012 07:59:14 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201207070759.q677xE2V028170@svn.freebsd.org> From: Andriy Gapon Date: Sat, 7 Jul 2012 07:59:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238192 - head/sys/dev/acpica X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jul 2012 07:59:15 -0000 Author: avg Date: Sat Jul 7 07:59:14 2012 New Revision: 238192 URL: http://svn.freebsd.org/changeset/base/238192 Log: acpi_cpu_cx_cst: consistently use cpu_cx_count during state enumeration cpu_cx_count is an index into accepted states, while i is an index into original _CST states MFC after: 1 week Modified: head/sys/dev/acpica/acpi_cpu.c Modified: head/sys/dev/acpica/acpi_cpu.c ============================================================================== --- head/sys/dev/acpica/acpi_cpu.c Sat Jul 7 05:25:22 2012 (r238191) +++ head/sys/dev/acpica/acpi_cpu.c Sat Jul 7 07:59:14 2012 (r238192) @@ -746,13 +746,13 @@ acpi_cpu_cx_cst(struct acpi_cpu_softc *s /* This is the first C1 state. Use the reserved slot. */ sc->cpu_cx_states[0] = *cx_ptr; } else { - sc->cpu_non_c3 = i; + sc->cpu_non_c3 = sc->cpu_cx_count; cx_ptr++; sc->cpu_cx_count++; } continue; case ACPI_STATE_C2: - sc->cpu_non_c3 = i; + sc->cpu_non_c3 = sc->cpu_cx_count; break; case ACPI_STATE_C3: default: From owner-svn-src-all@FreeBSD.ORG Sat Jul 7 08:12:51 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AC072106566C; Sat, 7 Jul 2012 08:12: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 971898FC0A; Sat, 7 Jul 2012 08:12:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q678Cpah029428; Sat, 7 Jul 2012 08:12:51 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q678CppW029426; Sat, 7 Jul 2012 08:12:51 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201207070812.q678CppW029426@svn.freebsd.org> From: Andriy Gapon Date: Sat, 7 Jul 2012 08:12:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238193 - head/sys/dev/acpica X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jul 2012 08:12:51 -0000 Author: avg Date: Sat Jul 7 08:12:51 2012 New Revision: 238193 URL: http://svn.freebsd.org/changeset/base/238193 Log: acpi_cpu_cx_list: there is no need to re-evaluate cpu_non_c3 here cpu_non_c3 is already evaluated in acpi_cpu_cx_cst and in acpi_cpu_set_cx_lowest. Besides acpi_cpu_cx_list is not protected by any locking. As a result also move setting of cpu_can_deep_sleep to more appropriate places. MFC after: 2 weeks Modified: head/sys/dev/acpica/acpi_cpu.c Modified: head/sys/dev/acpica/acpi_cpu.c ============================================================================== --- head/sys/dev/acpica/acpi_cpu.c Sat Jul 7 07:59:14 2012 (r238192) +++ head/sys/dev/acpica/acpi_cpu.c Sat Jul 7 08:12:51 2012 (r238193) @@ -670,6 +670,7 @@ acpi_cpu_generic_cx_probe(struct acpi_cp cx_ptr->trans_lat = AcpiGbl_FADT.C3Latency; cx_ptr++; sc->cpu_cx_count++; + cpu_can_deep_sleep = 1; } } } @@ -761,7 +762,8 @@ acpi_cpu_cx_cst(struct acpi_cpu_softc *s "acpi_cpu%d: C3[%d] not available.\n", device_get_unit(sc->cpu_dev), i)); continue; - } + } else + cpu_can_deep_sleep = 1; break; } @@ -885,16 +887,10 @@ acpi_cpu_cx_list(struct acpi_cpu_softc * /* * Set up the list of Cx states */ - sc->cpu_non_c3 = 0; sbuf_new(&sb, sc->cpu_cx_supported, sizeof(sc->cpu_cx_supported), SBUF_FIXEDLEN); - for (i = 0; i < sc->cpu_cx_count; i++) { + for (i = 0; i < sc->cpu_cx_count; i++) sbuf_printf(&sb, "C%d/%d ", i + 1, sc->cpu_cx_states[i].trans_lat); - if (sc->cpu_cx_states[i].type < ACPI_STATE_C3) - sc->cpu_non_c3 = i; - else - cpu_can_deep_sleep = 1; - } sbuf_trim(&sb); sbuf_finish(&sb); } From owner-svn-src-all@FreeBSD.ORG Sat Jul 7 08:19:35 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 58AE4106566C; Sat, 7 Jul 2012 08:19:35 +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 4467C8FC0A; Sat, 7 Jul 2012 08:19:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q678JZea029955; Sat, 7 Jul 2012 08:19:35 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q678JZe6029953; Sat, 7 Jul 2012 08:19:35 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201207070819.q678JZe6029953@svn.freebsd.org> From: Andriy Gapon Date: Sat, 7 Jul 2012 08:19:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238194 - head/sys/dev/acpica X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jul 2012 08:19:35 -0000 Author: avg Date: Sat Jul 7 08:19:34 2012 New Revision: 238194 URL: http://svn.freebsd.org/changeset/base/238194 Log: acpi_cpu_generic_cx_probe: for consistency set cpu_non_c3 here too although by default only C1 is enabled (cx_lowest=0) and enabling deeper states goes through acpi_cpu_set_cx_lowest which re-evaluates cpu_non_c3 MFC after: 2 weeks Modified: head/sys/dev/acpica/acpi_cpu.c Modified: head/sys/dev/acpica/acpi_cpu.c ============================================================================== --- head/sys/dev/acpica/acpi_cpu.c Sat Jul 7 08:12:51 2012 (r238193) +++ head/sys/dev/acpica/acpi_cpu.c Sat Jul 7 08:19:34 2012 (r238194) @@ -629,6 +629,7 @@ acpi_cpu_generic_cx_probe(struct acpi_cp cx_ptr->type = ACPI_STATE_C1; cx_ptr->trans_lat = 0; cx_ptr++; + sc->cpu_non_c3 = sc->cpu_cx_count; sc->cpu_cx_count++; /* @@ -653,6 +654,7 @@ acpi_cpu_generic_cx_probe(struct acpi_cp cx_ptr->type = ACPI_STATE_C2; cx_ptr->trans_lat = AcpiGbl_FADT.C2Latency; cx_ptr++; + sc->cpu_non_c3 = sc->cpu_cx_count; sc->cpu_cx_count++; } } From owner-svn-src-all@FreeBSD.ORG Sat Jul 7 08:35:42 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1DB451065673; Sat, 7 Jul 2012 08:35:42 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 5D0188FC1C; Sat, 7 Jul 2012 08:35:40 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q678ZmO5025849; Sat, 7 Jul 2012 11:35:48 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q678Zam4036512; Sat, 7 Jul 2012 11:35:36 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q678ZabZ036511; Sat, 7 Jul 2012 11:35:36 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 7 Jul 2012 11:35:36 +0300 From: Konstantin Belousov To: Marcel Moolenaar Message-ID: <20120707083535.GR2338@deviant.kiev.zoral.com.ua> References: <201207061557.q66Fv45N069464@svn.freebsd.org> <20120706181213.GI2338@deviant.kiev.zoral.com.ua> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="TDVcAd+kFgbLxwBe" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Marcel Moolenaar , src-committers@freebsd.org Subject: Re: svn commit: r238172 - head/sys/dev/agp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jul 2012 08:35:43 -0000 --TDVcAd+kFgbLxwBe Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jul 06, 2012 at 06:11:56PM -0700, Marcel Moolenaar wrote: >=20 > On Jul 6, 2012, at 11:12 AM, Konstantin Belousov wrote: >=20 > >> agp_i810.c: > >> While arguably the use of Maxmem can be considered correct, replace i= ts use > >> with realmem anyway. agp_i810.c is specific to amd64, i386 & pc98, wh= ich > >> have a dense physical memory layout. Avoiding Maxmem here is done wit= h an > >> eye on copy-n-paste behaviour in general and to avoid confusion cause= d by > >> using realmem in agp.c and Maxmem in agp_i810.c. > > The agp_i810.c use is to prevent attachment when largest physical addre= ss > > of populated memory exceeds GPU limits established by PTE format and > > chipset errata. Editing Maxmem to be spelled as realmem seems to change > > nothing right now, but I do argue that this is wrong, and commit message > > makes future archeology quite confusing. >=20 > The commit log states it all, including how one can arguably call the cha= nge > wrong. What exactly is confusing? The realmem is supposed to report available memory on the system, and not the highest physical memory address. Current calculation of maxmem as realmem is already wrong, often by 1GB on typical desktop machine, and I believe that it will become worse in the future. The platform does has all capacity to report non-dense layouts to OS, and OS is capable of supporting them already. I remember there were already reports of some IBM machines which have sparce address space, making maxmem/(real realmem) be a factor of 2. Confusing is the use of the amount of memory for decision that needs highest address. Commit log just restates the change made without any motivation, I think it is backward. --TDVcAd+kFgbLxwBe Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAk/39NcACgkQC3+MBN1Mb4iHUACgnKT68Xj/HSWKIzAAsChHWMSf I40AnjoEXF2B5ZYOKzudgDhtRzjdBdLl =pHxF -----END PGP SIGNATURE----- --TDVcAd+kFgbLxwBe-- From owner-svn-src-all@FreeBSD.ORG Sat Jul 7 08:41:38 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A68FD106564A; Sat, 7 Jul 2012 08:41:38 +0000 (UTC) (envelope-from zeising@daemonic.se) Received: from mail.lysator.liu.se (mail.lysator.liu.se [IPv6:2001:6b0:17:f0a0::3]) by mx1.freebsd.org (Postfix) with ESMTP id 214518FC0C; Sat, 7 Jul 2012 08:41:38 +0000 (UTC) Received: from mail.lysator.liu.se (localhost [127.0.0.1]) by mail.lysator.liu.se (Postfix) with ESMTP id 65FF440002; Sat, 7 Jul 2012 10:41:36 +0200 (CEST) Received: by mail.lysator.liu.se (Postfix, from userid 1004) id 5AE8E40007; Sat, 7 Jul 2012 10:41:36 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on bernadotte.lysator.liu.se X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=AWL autolearn=disabled version=3.3.1 X-Spam-Score: 0.0 Received: from mx.daemonic.se (mx.daemonic.se [IPv6:2001:470:dca9:0:1::3]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.lysator.liu.se (Postfix) with ESMTPSA id 1D8A540002; Sat, 7 Jul 2012 10:41:36 +0200 (CEST) Received: from mailscanner.daemonic.se (mailscanner.daemonic.se [IPv6:2001:470:dca9:0:1::6]) by mx.daemonic.se (Postfix) with ESMTPS id 3WTmW32ppqz8gtM; Sat, 7 Jul 2012 10:41:35 +0200 (CEST) X-Virus-Scanned: amavisd-new at daemonic.se Received: from mx.daemonic.se ([IPv6:2001:470:dca9:0:1::3]) (using TLS with cipher CAMELLIA256-SHA) by mailscanner.daemonic.se (mailscanner.daemonic.se [2001:470:dca9:0:1::6]) (amavisd-new, port 10025) with ESMTPS id q3TI7zfkbcfu; Sat, 7 Jul 2012 10:41:33 +0200 (CEST) Received: from mail.daemonic.se (mail.daemonic.se [10.1.0.4]) by mx.daemonic.se (Postfix) with ESMTPS id 3WTmW10L6Nz8gtL; Sat, 7 Jul 2012 10:41:33 +0200 (CEST) Received: from tifa.daemonic.se (tifa.daemonic.se [10.32.0.6]) by mail.daemonic.se (Postfix) with ESMTPSA id 3WTmW06t9lz9Ctj; Sat, 7 Jul 2012 10:41:32 +0200 (CEST) Received: from tifa.daemonic.se (localhost [IPv6:::1]) by tifa.daemonic.se (Postfix) with ESMTP id BBE0E228F3; Sat, 7 Jul 2012 10:41:32 +0200 (CEST) Message-ID: <4FF7F63C.40501@daemonic.se> Date: Sat, 07 Jul 2012 10:41:32 +0200 From: Niclas Zeising User-Agent: Mutt/1.5.21 MIME-Version: 1.0 To: Tim Kientzle References: <201207070414.q674ETpZ010784@svn.freebsd.org> In-Reply-To: <201207070414.q674ETpZ010784@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r238185 - head/usr.bin/mkesdb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jul 2012 08:41:38 -0000 On 07/07/12 06:14, Tim Kientzle wrote: > Author: kientzle > Date: Sat Jul 7 04:14:28 2012 > New Revision: 238185 > URL: http://svn.freebsd.org/changeset/base/238185 > > Log: > Unbreak building WITH_ICONV=yes and new yacc. > > Modified: > head/usr.bin/mkesdb/ldef.h > Can you please have a look at http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/167481 as well? Regards! -- Niclas Zeising From owner-svn-src-all@FreeBSD.ORG Sat Jul 7 14:44:21 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 000A5106566B; Sat, 7 Jul 2012 14:44:20 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from mail.xcllnt.net (mail.xcllnt.net [70.36.220.4]) by mx1.freebsd.org (Postfix) with ESMTP id C0F4B8FC0A; Sat, 7 Jul 2012 14:44:20 +0000 (UTC) Received: from dhcp-192-168-2-58.wifi.xcllnt.net (wifi.xcllnt.net [70.36.220.6] (may be forged)) (authenticated bits=0) by mail.xcllnt.net (8.14.5/8.14.5) with ESMTP id q67EiECC064629 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Sat, 7 Jul 2012 07:44:20 -0700 (PDT) (envelope-from marcel@xcllnt.net) Mime-Version: 1.0 (Apple Message framework v1278) Content-Type: text/plain; charset=us-ascii From: Marcel Moolenaar In-Reply-To: <20120707083535.GR2338@deviant.kiev.zoral.com.ua> Date: Sat, 7 Jul 2012 07:44:14 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <2B1DDEF4-A048-45BD-9A7A-8CB148282475@xcllnt.net> References: <201207061557.q66Fv45N069464@svn.freebsd.org> <20120706181213.GI2338@deviant.kiev.zoral.com.ua> <20120707083535.GR2338@deviant.kiev.zoral.com.ua> To: Konstantin Belousov X-Mailer: Apple Mail (2.1278) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Marcel Moolenaar , src-committers@freebsd.org Subject: Re: svn commit: r238172 - head/sys/dev/agp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jul 2012 14:44:21 -0000 On Jul 7, 2012, at 1:35 AM, Konstantin Belousov wrote: > On Fri, Jul 06, 2012 at 06:11:56PM -0700, Marcel Moolenaar wrote: >>=20 >> On Jul 6, 2012, at 11:12 AM, Konstantin Belousov wrote: >>=20 >>>> agp_i810.c: >>>> While arguably the use of Maxmem can be considered correct, replace = its use >>>> with realmem anyway. agp_i810.c is specific to amd64, i386 & pc98, = which >>>> have a dense physical memory layout. Avoiding Maxmem here is done = with an >>>> eye on copy-n-paste behaviour in general and to avoid confusion = caused by >>>> using realmem in agp.c and Maxmem in agp_i810.c. >>> The agp_i810.c use is to prevent attachment when largest physical = address >>> of populated memory exceeds GPU limits established by PTE format and >>> chipset errata. Editing Maxmem to be spelled as realmem seems to = change >>> nothing right now, but I do argue that this is wrong, and commit = message >>> makes future archeology quite confusing. >>=20 >> The commit log states it all, including how one can arguably call the = change >> wrong. What exactly is confusing? >=20 > The realmem is supposed to report available memory on the system, and > not the highest physical memory address. Correct. > Current calculation of maxmem > as realmem is already wrong, often by 1GB on typical desktop machine, > and I believe that it will become worse in the future. Sure. This is also why a variable like Maxmem is confusing. If you try to understand what it means or what it's for, you get mixed signals. On the one hand it's made identical to realmem and on the other hand there's comment that states that it's supposed to be the highest = address. > The platform does > has all capacity to report non-dense layouts to OS, and OS is capable = of > supporting them already. Yes, all platforms do. > I remember there were already reports of some > IBM machines which have sparce address space, making maxmem/(real = realmem) > be a factor of 2. That's nothing. On ia64 this can be a lot worse. > Confusing is the use of the amount of memory for decision that needs = highest > address. Commit log just restates the change made without any = motivation, > I think it is backward. The commit log states the motivation: developers tend to copy-n-paste = without truly understanding the subtle differences and may use the Maxmem use in agp_i810.c as the wrong precedence. Secondly, also mentioned in the = commit log, is the use of realmem in agp.c and then Maxmem in agp_i810.c which = is likely to be confusing. So the change from Maxmem to realmem in = agp_i810.c prioritizes the avoidance of confusion over pedantic correctness, which = we all know isn't achievable anyway. Since agp_i810.c is only for amd64, = i386 and pc98, also stated in the commit log, and all of those have dense = phys. memory, the discrepancy is still within the margin of error. In short: I'm not getting your comments. Do you want me to revert the = change to agp_i810.c so that we can put this to rest? --=20 Marcel Moolenaar marcel@xcllnt.net From owner-svn-src-all@FreeBSD.ORG Sat Jul 7 16:09:55 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 95B111065676; Sat, 7 Jul 2012 16:09:55 +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 67BE38FC12; Sat, 7 Jul 2012 16:09:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q67G9tLe062567; Sat, 7 Jul 2012 16:09:55 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q67G9twY062565; Sat, 7 Jul 2012 16:09:55 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201207071609.q67G9twY062565@svn.freebsd.org> From: Rui Paulo Date: Sat, 7 Jul 2012 16:09:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238196 - svnadmin/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jul 2012 16:09:55 -0000 Author: rpaulo Date: Sat Jul 7 16:09:53 2012 New Revision: 238196 URL: http://svn.freebsd.org/changeset/base/238196 Log: Release rdivacky from mentorship. Modified: svnadmin/conf/mentors Modified: svnadmin/conf/mentors ============================================================================== --- svnadmin/conf/mentors Sat Jul 7 10:13:20 2012 (r238195) +++ svnadmin/conf/mentors Sat Jul 7 16:09:53 2012 (r238196) @@ -31,7 +31,6 @@ mjg trasz monthadar adrian nork imp ray adrian -rdivacky rpaulo snb dwmalone sson gnn versus gavin Co-mentor: fjoe From owner-svn-src-all@FreeBSD.ORG Sat Jul 7 17:05:56 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A7F7106564A; Sat, 7 Jul 2012 17:05:56 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8530C8FC0C; Sat, 7 Jul 2012 17:05:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q67H5u2H067163; Sat, 7 Jul 2012 17:05:56 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q67H5uXB067160; Sat, 7 Jul 2012 17:05:56 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201207071705.q67H5uXB067160@svn.freebsd.org> From: Eitan Adler Date: Sat, 7 Jul 2012 17:05:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238197 - in head/usr.bin: mkcsmapper mkesdb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jul 2012 17:05:56 -0000 Author: eadler Date: Sat Jul 7 17:05:55 2012 New Revision: 238197 URL: http://svn.freebsd.org/changeset/base/238197 Log: Fix spelling PR: bin/167480 Submitted by: zeising Approved by: cperciva Modified: head/usr.bin/mkcsmapper/lex.l head/usr.bin/mkesdb/lex.l Modified: head/usr.bin/mkcsmapper/lex.l ============================================================================== --- head/usr.bin/mkcsmapper/lex.l Sat Jul 7 16:09:53 2012 (r238196) +++ head/usr.bin/mkcsmapper/lex.l Sat Jul 7 17:05:55 2012 (r238197) @@ -57,7 +57,7 @@ int line_number = 1; [\n] { line_number++; } . { } <> { - yyerror("unexpected file end (unterminate comment)\n"); + yyerror("unexpected file end (unterminated comment)\n"); exit(1); } Modified: head/usr.bin/mkesdb/lex.l ============================================================================== --- head/usr.bin/mkesdb/lex.l Sat Jul 7 16:09:53 2012 (r238196) +++ head/usr.bin/mkesdb/lex.l Sat Jul 7 17:05:55 2012 (r238197) @@ -59,7 +59,7 @@ int line_number = 1; [\n] { line_number++; } . { } <> { - yyerror("unexpected file end (unterminate comment)\n"); + yyerror("unexpected file end (unterminated comment)\n"); exit(1); } From owner-svn-src-all@FreeBSD.ORG Sat Jul 7 17:09:45 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 69A1F106564A; Sat, 7 Jul 2012 17:09:45 +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 542AA8FC15; Sat, 7 Jul 2012 17:09:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q67H9jIg067520; Sat, 7 Jul 2012 17:09:45 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q67H9jtn067514; Sat, 7 Jul 2012 17:09:45 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201207071709.q67H9jtn067514@svn.freebsd.org> From: Edward Tomasz Napierala Date: Sat, 7 Jul 2012 17:09:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238198 - in head/sys/geom: . bde uncompress uzip X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jul 2012 17:09:45 -0000 Author: trasz Date: Sat Jul 7 17:09:44 2012 New Revision: 238198 URL: http://svn.freebsd.org/changeset/base/238198 Log: Fix orphan() methods of several GEOM classes to not assume that there is an error set on the provider. With GEOM resizing, class can become orphaned when it doesn't implement resize() method and the provider size decreases. Reviewed by: mav Sponsored by: FreeBSD Foundation Modified: head/sys/geom/bde/g_bde.c head/sys/geom/geom_aes.c head/sys/geom/geom_slice.c head/sys/geom/uncompress/g_uncompress.c head/sys/geom/uzip/g_uzip.c Modified: head/sys/geom/bde/g_bde.c ============================================================================== --- head/sys/geom/bde/g_bde.c Sat Jul 7 17:05:55 2012 (r238197) +++ head/sys/geom/bde/g_bde.c Sat Jul 7 17:09:44 2012 (r238198) @@ -77,19 +77,15 @@ g_bde_orphan(struct g_consumer *cp) struct g_geom *gp; struct g_provider *pp; struct g_bde_softc *sc; - int error; g_trace(G_T_TOPOLOGY, "g_bde_orphan(%p/%s)", cp, cp->provider->name); g_topology_assert(); - KASSERT(cp->provider->error != 0, - ("g_bde_orphan with error == 0")); gp = cp->geom; sc = gp->softc; gp->flags |= G_GEOM_WITHER; - error = cp->provider->error; LIST_FOREACH(pp, &gp->provider, provider) - g_orphan_provider(pp, error); + g_orphan_provider(pp, ENXIO); bzero(sc, sizeof(struct g_bde_softc)); /* destroy evidence */ return; } Modified: head/sys/geom/geom_aes.c ============================================================================== --- head/sys/geom/geom_aes.c Sat Jul 7 17:05:55 2012 (r238197) +++ head/sys/geom/geom_aes.c Sat Jul 7 17:09:44 2012 (r238198) @@ -241,12 +241,10 @@ g_aes_orphan(struct g_consumer *cp) g_trace(G_T_TOPOLOGY, "g_aes_orphan(%p/%s)", cp, cp->provider->name); g_topology_assert(); - KASSERT(cp->provider->error != 0, - ("g_aes_orphan with error == 0")); gp = cp->geom; sc = gp->softc; - g_wither_geom(gp, cp->provider->error); + g_wither_geom(gp, ENXIO); bzero(sc, sizeof(struct g_aes_softc)); /* destroy evidence */ g_free(sc); return; Modified: head/sys/geom/geom_slice.c ============================================================================== --- head/sys/geom/geom_slice.c Sat Jul 7 17:05:55 2012 (r238197) +++ head/sys/geom/geom_slice.c Sat Jul 7 17:09:44 2012 (r238198) @@ -522,10 +522,8 @@ g_slice_orphan(struct g_consumer *cp) g_trace(G_T_TOPOLOGY, "g_slice_orphan(%p/%s)", cp, cp->provider->name); g_topology_assert(); - KASSERT(cp->provider->error != 0, - ("g_slice_orphan with error == 0")); /* XXX: Not good enough we leak the softc and its suballocations */ g_slice_free(cp->geom->softc); - g_wither_geom(cp->geom, cp->provider->error); + g_wither_geom(cp->geom, ENXIO); } Modified: head/sys/geom/uncompress/g_uncompress.c ============================================================================== --- head/sys/geom/uncompress/g_uncompress.c Sat Jul 7 17:05:55 2012 (r238197) +++ head/sys/geom/uncompress/g_uncompress.c Sat Jul 7 17:09:44 2012 (r238198) @@ -406,13 +406,11 @@ g_uncompress_orphan(struct g_consumer *c g_trace(G_T_TOPOLOGY, "%s(%p/%s)", __func__, cp, cp->provider->name); g_topology_assert(); - KASSERT(cp->provider->error != 0, - ("g_uncompress_orphan with error == 0")); gp = cp->geom; g_uncompress_softc_free(gp->softc, gp); gp->softc = NULL; - g_wither_geom(gp, cp->provider->error); + g_wither_geom(gp, ENXIO); } static int Modified: head/sys/geom/uzip/g_uzip.c ============================================================================== --- head/sys/geom/uzip/g_uzip.c Sat Jul 7 17:05:55 2012 (r238197) +++ head/sys/geom/uzip/g_uzip.c Sat Jul 7 17:09:44 2012 (r238198) @@ -313,13 +313,11 @@ g_uzip_orphan(struct g_consumer *cp) g_trace(G_T_TOPOLOGY, "g_uzip_orphan(%p/%s)", cp, cp->provider->name); g_topology_assert(); - KASSERT(cp->provider->error != 0, - ("g_uzip_orphan with error == 0")); gp = cp->geom; g_uzip_softc_free(gp->softc, gp); gp->softc = NULL; - g_wither_geom(gp, cp->provider->error); + g_wither_geom(gp, ENXIO); } static int From owner-svn-src-all@FreeBSD.ORG Sat Jul 7 17:13:09 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AE2F41065672; Sat, 7 Jul 2012 17:13:09 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 99E538FC15; Sat, 7 Jul 2012 17:13:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q67HD9QD067836; Sat, 7 Jul 2012 17:13:09 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q67HD90G067834; Sat, 7 Jul 2012 17:13:09 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201207071713.q67HD90G067834@svn.freebsd.org> From: Eitan Adler Date: Sat, 7 Jul 2012 17:13:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238199 - head/sys/dev/acpica X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jul 2012 17:13:09 -0000 Author: eadler Date: Sat Jul 7 17:13:09 2012 New Revision: 238199 URL: http://svn.freebsd.org/changeset/base/238199 Log: Remove variables which are initialized but never used thereafter reported by gcc46 warning Approved by: cperciva MFC after: 1 week Modified: head/sys/dev/acpica/acpi_powerres.c Modified: head/sys/dev/acpica/acpi_powerres.c ============================================================================== --- head/sys/dev/acpica/acpi_powerres.c Sat Jul 7 17:09:44 2012 (r238198) +++ head/sys/dev/acpica/acpi_powerres.c Sat Jul 7 17:13:09 2012 (r238199) @@ -314,7 +314,6 @@ acpi_pwr_switch_consumer(ACPI_HANDLE con ACPI_OBJECT *reslist_object; ACPI_STATUS status; char *method_name, *reslist_name; - int res_changed; ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); @@ -445,7 +444,7 @@ acpi_pwr_switch_consumer(ACPI_HANDLE con * Now we are ready to switch, so kill off any current power * resource references. */ - res_changed = acpi_pwr_dereference_resource(pc); + acpi_pwr_dereference_resource(pc); /* * Add new power resource references, if we have any. Traverse the @@ -457,7 +456,6 @@ acpi_pwr_switch_consumer(ACPI_HANDLE con reslist_object->Package.Count)); acpi_ForeachPackageObject(reslist_object, acpi_pwr_reference_resource, pc); - res_changed = 1; } /* From owner-svn-src-all@FreeBSD.ORG Sat Jul 7 17:17:44 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 441F9106564A; Sat, 7 Jul 2012 17:17:44 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2F4D28FC08; Sat, 7 Jul 2012 17:17:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q67HHiYU068248; Sat, 7 Jul 2012 17:17:44 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q67HHh5s068245; Sat, 7 Jul 2012 17:17:43 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201207071717.q67HHh5s068245@svn.freebsd.org> From: Eitan Adler Date: Sat, 7 Jul 2012 17:17:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238200 - head/sys/cam/scsi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jul 2012 17:17:44 -0000 Author: eadler Date: Sat Jul 7 17:17:43 2012 New Revision: 238200 URL: http://svn.freebsd.org/changeset/base/238200 Log: Remove variables which are initialized but never used thereafter reported by gcc46 warning Reviewed by: scottl Approved by: cperciva MFC after: 1 week Modified: head/sys/cam/scsi/scsi_all.c head/sys/cam/scsi/scsi_ch.c Modified: head/sys/cam/scsi/scsi_all.c ============================================================================== --- head/sys/cam/scsi/scsi_all.c Sat Jul 7 17:13:09 2012 (r238199) +++ head/sys/cam/scsi/scsi_all.c Sat Jul 7 17:17:43 2012 (r238200) @@ -4147,9 +4147,9 @@ scsi_sense_desc_sbuf(struct sbuf *sb, st struct scsi_inquiry_data *inq_data, struct scsi_sense_desc_header *header) { - int i, found; + int i; - for (i = 0, found = 0; i < (sizeof(scsi_sense_printers) / + for (i = 0; i < (sizeof(scsi_sense_printers) / sizeof(scsi_sense_printers[0])); i++) { struct scsi_sense_desc_printer *printer; Modified: head/sys/cam/scsi/scsi_ch.c ============================================================================== --- head/sys/cam/scsi/scsi_ch.c Sat Jul 7 17:13:09 2012 (r238199) +++ head/sys/cam/scsi/scsi_ch.c Sat Jul 7 17:17:43 2012 (r238200) @@ -433,17 +433,11 @@ static int chclose(struct cdev *dev, int flag, int fmt, struct thread *td) { struct cam_periph *periph; - struct ch_softc *softc; - int error; - - error = 0; periph = (struct cam_periph *)dev->si_drv1; if (periph == NULL) return(ENXIO); - softc = (struct ch_softc *)periph->softc; - cam_periph_release(periph); return(0); From owner-svn-src-all@FreeBSD.ORG Sat Jul 7 17:20:24 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AAD3B1065670; Sat, 7 Jul 2012 17:20:24 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 965A48FC0C; Sat, 7 Jul 2012 17:20:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q67HKOaD068490; Sat, 7 Jul 2012 17:20:24 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q67HKOm4068488; Sat, 7 Jul 2012 17:20:24 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201207071720.q67HKOm4068488@svn.freebsd.org> From: Eitan Adler Date: Sat, 7 Jul 2012 17:20:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238201 - head/sys/dev/aac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jul 2012 17:20:24 -0000 Author: eadler Date: Sat Jul 7 17:20:24 2012 New Revision: 238201 URL: http://svn.freebsd.org/changeset/base/238201 Log: Remove variables which are initialized but never used thereafter reported by gcc46 warning Approved by: cperciva MFC after: 1 week Modified: head/sys/dev/aac/aac_disk.c Modified: head/sys/dev/aac/aac_disk.c ============================================================================== --- head/sys/dev/aac/aac_disk.c Sat Jul 7 17:17:43 2012 (r238200) +++ head/sys/dev/aac/aac_disk.c Sat Jul 7 17:20:24 2012 (r238201) @@ -332,9 +332,6 @@ aac_disk_dump(void *arg, void *virtual, void aac_biodone(struct bio *bp) { - struct aac_disk *sc; - - sc = (struct aac_disk *)bp->bio_disk->d_drv1; fwprintf(NULL, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); if (bp->bio_flags & BIO_ERROR) From owner-svn-src-all@FreeBSD.ORG Sat Jul 7 17:20:28 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9E528106564A; Sat, 7 Jul 2012 17:20:28 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8906D8FC0A; Sat, 7 Jul 2012 17:20:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q67HKSEH068531; Sat, 7 Jul 2012 17:20:28 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q67HKS93068528; Sat, 7 Jul 2012 17:20:28 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201207071720.q67HKS93068528@svn.freebsd.org> From: Eitan Adler Date: Sat, 7 Jul 2012 17:20:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238202 - in head: . sbin/mdconfig X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jul 2012 17:20:28 -0000 Author: eadler Date: Sat Jul 7 17:20:27 2012 New Revision: 238202 URL: http://svn.freebsd.org/changeset/base/238202 Log: Remove ancient vnconfig symlink Submitted by: ak Approved by: cperciva MFC after: 1 week Modified: head/ObsoleteFiles.inc head/sbin/mdconfig/Makefile Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Sat Jul 7 17:20:24 2012 (r238201) +++ head/ObsoleteFiles.inc Sat Jul 7 17:20:27 2012 (r238202) @@ -38,6 +38,8 @@ # xargs -n1 | sort | uniq -d; # done +# 20120621: remove old man page +OLD_FILES+=usr/share/man/man8/vnconfig.8.gz # 20120613: auth.conf removed OLD_FILES+=etc/auth.conf OLD_FILES+=usr/share/examples/etc/auth.conf Modified: head/sbin/mdconfig/Makefile ============================================================================== --- head/sbin/mdconfig/Makefile Sat Jul 7 17:20:24 2012 (r238201) +++ head/sbin/mdconfig/Makefile Sat Jul 7 17:20:27 2012 (r238202) @@ -2,7 +2,6 @@ PROG= mdconfig MAN= mdconfig.8 -MLINKS= mdconfig.8 vnconfig.8 DPADD= ${LIBUTIL} ${LIBGEOM} ${LIBBSDXML} ${LIBSBUF} LDADD= -lutil -lgeom -lbsdxml -lsbuf From owner-svn-src-all@FreeBSD.ORG Sat Jul 7 17:20:53 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9577C10656F6; Sat, 7 Jul 2012 17:20:53 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8027A8FC16; Sat, 7 Jul 2012 17:20:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q67HKrmq068597; Sat, 7 Jul 2012 17:20:53 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q67HKr5N068595; Sat, 7 Jul 2012 17:20:53 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201207071720.q67HKr5N068595@svn.freebsd.org> From: Eitan Adler Date: Sat, 7 Jul 2012 17:20:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238203 - head/sys/dev/ata/chipsets X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jul 2012 17:20:53 -0000 Author: eadler Date: Sat Jul 7 17:20:52 2012 New Revision: 238203 URL: http://svn.freebsd.org/changeset/base/238203 Log: Remove variables which are initialized but never used thereafter reported by gcc46 warning Approved by: cperciva MFC after: 1 week Modified: head/sys/dev/ata/chipsets/ata-via.c Modified: head/sys/dev/ata/chipsets/ata-via.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-via.c Sat Jul 7 17:20:27 2012 (r238202) +++ head/sys/dev/ata/chipsets/ata-via.c Sat Jul 7 17:20:52 2012 (r238203) @@ -472,12 +472,10 @@ ata_via_sata_reset(device_t dev) static int ata_via_sata_scr_read(device_t dev, int port, int reg, u_int32_t *result) { - struct ata_channel *ch; device_t parent; uint32_t val; parent = device_get_parent(dev); - ch = device_get_softc(dev); port = (port == 1) ? 1 : 0; switch (reg) { case ATA_SSTATUS: @@ -520,12 +518,10 @@ ata_via_sata_scr_read(device_t dev, int static int ata_via_sata_scr_write(device_t dev, int port, int reg, u_int32_t value) { - struct ata_channel *ch; device_t parent; uint32_t val; parent = device_get_parent(dev); - ch = device_get_softc(dev); port = (port == 1) ? 1 : 0; switch (reg) { case ATA_SERROR: From owner-svn-src-all@FreeBSD.ORG Sat Jul 7 17:25:37 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5F3611065670; Sat, 7 Jul 2012 17:25:37 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 495918FC0C; Sat, 7 Jul 2012 17:25:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q67HPbLo069025; Sat, 7 Jul 2012 17:25:37 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q67HPbSP069023; Sat, 7 Jul 2012 17:25:37 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201207071725.q67HPbSP069023@svn.freebsd.org> From: Eitan Adler Date: Sat, 7 Jul 2012 17:25:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238204 - head/sbin/growfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jul 2012 17:25:37 -0000 Author: eadler Date: Sat Jul 7 17:25:36 2012 New Revision: 238204 URL: http://svn.freebsd.org/changeset/base/238204 Log: Remove unneeded variable reported by gcc46 which stopped being used in r234178. Approved by: cperciva MFC after: 3 days Modified: head/sbin/growfs/growfs.c Modified: head/sbin/growfs/growfs.c ============================================================================== --- head/sbin/growfs/growfs.c Sat Jul 7 17:20:52 2012 (r238203) +++ head/sbin/growfs/growfs.c Sat Jul 7 17:25:36 2012 (r238204) @@ -803,7 +803,6 @@ updcsloc(time_t modtime, int fsi, int fs DBG_FUNC("updcsloc") struct csum *cs; int ocscg, ncscg; - int blocks; ufs2_daddr_t d; int lcs = 0; int block; @@ -820,8 +819,6 @@ updcsloc(time_t modtime, int fsi, int fs } ocscg = dtog(&osblock, osblock.fs_csaddr); cs = fscs + ocscg; - blocks = 1 + howmany(sblock.fs_cssize, sblock.fs_bsize) - - howmany(osblock.fs_cssize, osblock.fs_bsize); /* * Read original cylinder group from disk, and make a copy. From owner-svn-src-all@FreeBSD.ORG Sat Jul 7 17:35:35 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 42E0D106566C; Sat, 7 Jul 2012 17:35:35 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2E4858FC08; Sat, 7 Jul 2012 17:35:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q67HZZi1069866; Sat, 7 Jul 2012 17:35:35 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q67HZYkw069864; Sat, 7 Jul 2012 17:35:34 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201207071735.q67HZYkw069864@svn.freebsd.org> From: Eitan Adler Date: Sat, 7 Jul 2012 17:35:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238205 - head/share/syscons/keymaps X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jul 2012 17:35:35 -0000 Author: eadler Date: Sat Jul 7 17:35:34 2012 New Revision: 238205 URL: http://svn.freebsd.org/changeset/base/238205 Log: Add a description of the Spanish Dvorak keymap added in r235251 PR: conf/160235 Submitted by: gavin Approved by: cperciva MFC after: 3 days Modified: head/share/syscons/keymaps/INDEX.keymaps Modified: head/share/syscons/keymaps/INDEX.keymaps ============================================================================== --- head/share/syscons/keymaps/INDEX.keymaps Sat Jul 7 17:25:36 2012 (r238204) +++ head/share/syscons/keymaps/INDEX.keymaps Sat Jul 7 17:35:34 2012 (r238205) @@ -378,6 +378,8 @@ ru.koi8-r.win.kbd:pt:Russo koi8-r (winke ru.koi8-r.win.kbd:es:Ruso koi8-r (winkeys) ru.koi8-r.win.kbd:uk:òÏÓ¦ÊÓØËÁ koi8-r (winkeys) +spanish.dvorak.kbd:en:Spanish Dvorak + spanish.iso.kbd:en:Spanish ISO-8859-1 spanish.iso.kbd:de:Spanisch ISO-8859-1 spanish.iso.kbd:fr:Espagnol ISO-8859-1 From owner-svn-src-all@FreeBSD.ORG Sat Jul 7 17:46:12 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 99E1E106566B; Sat, 7 Jul 2012 17:46:12 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0FC078FC15; Sat, 7 Jul 2012 17:46:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q67HkBJf070758; Sat, 7 Jul 2012 17:46:11 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q67HkBbn070756; Sat, 7 Jul 2012 17:46:11 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201207071746.q67HkBbn070756@svn.freebsd.org> From: Eitan Adler Date: Sat, 7 Jul 2012 17:46:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238206 - head/sys/vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jul 2012 17:46:12 -0000 Author: eadler Date: Sat Jul 7 17:46:11 2012 New Revision: 238206 URL: http://svn.freebsd.org/changeset/base/238206 Log: Add missing sleep stat increase PR: kern/168211 Submitted by: linimon Reviewed by: alc Approved by: cperciva MFC after: 3 days Modified: head/sys/vm/uma_core.c Modified: head/sys/vm/uma_core.c ============================================================================== --- head/sys/vm/uma_core.c Sat Jul 7 17:35:34 2012 (r238205) +++ head/sys/vm/uma_core.c Sat Jul 7 17:46:11 2012 (r238206) @@ -2193,6 +2193,7 @@ keg_fetch_slab(uma_keg_t keg, uma_zone_t zone->uz_flags |= UMA_ZFLAG_FULL; if (flags & M_NOWAIT) break; + zone->uz_sleeps++; msleep(keg, &keg->uk_lock, PVM, "keglimit", 0); continue; } From owner-svn-src-all@FreeBSD.ORG Sat Jul 7 18:35:44 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4CAE2106564A for ; Sat, 7 Jul 2012 18:35:44 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-ob0-f182.google.com (mail-ob0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 03DBE8FC0C for ; Sat, 7 Jul 2012 18:35:43 +0000 (UTC) Received: by obbun3 with SMTP id un3so21301245obb.13 for ; Sat, 07 Jul 2012 11:35:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=bojCk6ZGsLap2GUw7j34urO6HCgZiCacJHsAiw1hEqs=; b=qiXj1Jttd07FVe3I7ynxwUDKPXEKbkKVk1/CXPafcodBkmR2wI3CEa0Dg2cfGUCwB3 HdhlwM8SRLa/XjhL0GB1otchwsrMmxZQpnZ9NY+FIiBoYFzkNgHxrybI0S3tCeMJAYVK Az4LEBDpHJtcqMgQPwfkUamJQDXkyXM+7RnqM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :x-gm-message-state; bh=bojCk6ZGsLap2GUw7j34urO6HCgZiCacJHsAiw1hEqs=; b=mES4hxoc06kacUPK2JUcWGa+LJfbi5XwSpGPzvxm0hezBtjLoAkRiq8dsG+PLRO1KJ aJhCH0cjlpLdBKrO3uW4U1hNhkqv+pWQlh6AoaPTDmKA8nqtjtQ9/U9ReYqcjdxSgJqg k+q27WWNoU6bj3SOoMCm3a/dXCHQ0zYAPlmMHY6/ON/UzJNG38Y4lpZ60cZ1vfXUAbfk GnDueX9SP7fr9rcn6eXW/RenVj/wTtBqrg46YPy+LUJ9TgX7JWo9fzjl+EhvrYGsI29C ijvmN6cMVKCnkJZCCyDGKAeWOFOZYa5LAeF3+axqb7EICO3vQ/L3uED2RIYDD1qrY/06 R05Q== Received: by 10.182.216.99 with SMTP id op3mr8881461obc.30.1341686143494; Sat, 07 Jul 2012 11:35:43 -0700 (PDT) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.182.125.70 with HTTP; Sat, 7 Jul 2012 11:35:13 -0700 (PDT) In-Reply-To: <4FF7F63C.40501@daemonic.se> References: <201207070414.q674ETpZ010784@svn.freebsd.org> <4FF7F63C.40501@daemonic.se> From: Eitan Adler Date: Sat, 7 Jul 2012 11:35:13 -0700 X-Google-Sender-Auth: SZEoL4qm2F0R2yAV0z8Guu2ru0A Message-ID: To: Niclas Zeising Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQmmUllZHtlKBcbdi60jJn/KLTE06c5tyBGPRH7NcFWDdBFvNDsg1rNh46YtMR/lWZvRO+pF Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Tim Kientzle , src-committers@freebsd.org Subject: Re: svn commit: r238185 - head/usr.bin/mkesdb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jul 2012 18:35:44 -0000 On 7 July 2012 01:41, Niclas Zeising wrote: > On 07/07/12 06:14, Tim Kientzle wrote: >> >> Author: kientzle >> Date: Sat Jul 7 04:14:28 2012 >> New Revision: 238185 >> URL: http://svn.freebsd.org/changeset/base/238185 >> >> Log: >> Unbreak building WITH_ICONV=yes and new yacc. >> >> Modified: >> head/usr.bin/mkesdb/ldef.h >> > > Can you please have a look at > http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/167481 > as well? I am.... -- Eitan Adler Source & Ports committer X11, Bugbusting teams From owner-svn-src-all@FreeBSD.ORG Sat Jul 7 19:39:09 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 62967106566C; Sat, 7 Jul 2012 19:39:09 +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 42CA38FC0C; Sat, 7 Jul 2012 19:39:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q67Jd9eV080111; Sat, 7 Jul 2012 19:39:09 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q67Jd9lq080108; Sat, 7 Jul 2012 19:39:09 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201207071939.q67Jd9lq080108@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 7 Jul 2012 19:39:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238212 - in head/sys: sys vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jul 2012 19:39:09 -0000 Author: kib Date: Sat Jul 7 19:39:08 2012 New Revision: 238212 URL: http://svn.freebsd.org/changeset/base/238212 Log: Drop page queues mutex on each iteration of vm_pageout_scan over the inactive queue, unless busy page is found. Dropping the mutex often should allow the other lock acquires to proceed without waiting for whole inactive scan to finish. On machines with lot of physical memory scan often need to iterate a lot before it finishes or finds a page which requires laundring, causing high latency for other lock waiters. Suggested and reviewed by: alc MFC after: 3 weeks Modified: head/sys/sys/vmmeter.h head/sys/vm/vm_pageout.c Modified: head/sys/sys/vmmeter.h ============================================================================== --- head/sys/sys/vmmeter.h Sat Jul 7 19:12:15 2012 (r238211) +++ head/sys/sys/vmmeter.h Sat Jul 7 19:39:08 2012 (r238212) @@ -79,7 +79,7 @@ struct vmmeter { u_int v_pdpages; /* (q) pages analyzed by daemon */ u_int v_tcached; /* (p) total pages cached */ - u_int v_dfree; /* (q) pages freed by daemon */ + u_int v_dfree; /* (p) pages freed by daemon */ u_int v_pfree; /* (p) pages freed by exiting processes */ u_int v_tfree; /* (p) total pages freed */ /* Modified: head/sys/vm/vm_pageout.c ============================================================================== --- head/sys/vm/vm_pageout.c Sat Jul 7 19:12:15 2012 (r238211) +++ head/sys/vm/vm_pageout.c Sat Jul 7 19:39:08 2012 (r238212) @@ -743,6 +743,7 @@ vm_pageout_scan(int pass) int actcount; int vnodes_skipped = 0; int maxlaunder; + boolean_t queues_locked; /* * Decrease registered cache sizes. @@ -784,6 +785,7 @@ vm_pageout_scan(int pass) if (pass) maxlaunder = 10000; vm_page_lock_queues(); + queues_locked = TRUE; rescan0: addl_page_shortage = addl_page_shortage_init; maxscan = cnt.v_inactive_count; @@ -791,6 +793,8 @@ rescan0: for (m = TAILQ_FIRST(&vm_page_queues[PQ_INACTIVE].pl); m != NULL && maxscan-- > 0 && page_shortage > 0; m = next) { + KASSERT(queues_locked, ("unlocked queues")); + mtx_assert(&vm_page_queue_mtx, MA_OWNED); cnt.v_pdpages++; @@ -850,6 +854,16 @@ rescan0: } /* + * We unlock vm_page_queue_mtx, invalidating the + * 'next' pointer. Use our marker to remember our + * place. + */ + TAILQ_INSERT_AFTER(&vm_page_queues[PQ_INACTIVE].pl, + m, &marker, pageq); + vm_page_unlock_queues(); + queues_locked = FALSE; + + /* * If the object is not being used, we ignore previous * references. */ @@ -873,7 +887,7 @@ rescan0: vm_page_unlock(m); m->act_count += actcount + ACT_ADVANCE; VM_OBJECT_UNLOCK(object); - continue; + goto relock_queues; } /* @@ -889,7 +903,7 @@ rescan0: vm_page_unlock(m); m->act_count += actcount + ACT_ADVANCE + 1; VM_OBJECT_UNLOCK(object); - continue; + goto relock_queues; } /* @@ -924,7 +938,7 @@ rescan0: * Invalid pages can be easily freed */ vm_page_free(m); - cnt.v_dfree++; + PCPU_INC(cnt.v_dfree); --page_shortage; } else if (m->dirty == 0) { /* @@ -947,6 +961,8 @@ rescan0: * the thrash point for a heavily loaded machine. */ m->flags |= PG_WINATCFLS; + vm_page_lock_queues(); + queues_locked = TRUE; vm_page_requeue(m); } else if (maxlaunder > 0) { /* @@ -976,21 +992,13 @@ rescan0: if (!swap_pageouts_ok || (object->flags & OBJ_DEAD)) { vm_page_unlock(m); VM_OBJECT_UNLOCK(object); + vm_page_lock_queues(); + queues_locked = TRUE; vm_page_requeue(m); - continue; + goto relock_queues; } /* - * Following operations may unlock - * vm_page_queue_mtx, invalidating the 'next' - * pointer. To prevent an inordinate number - * of restarts we use our marker to remember - * our place. - * - */ - TAILQ_INSERT_AFTER(&vm_page_queues[PQ_INACTIVE].pl, - m, &marker, pageq); - /* * The object is already known NOT to be dead. It * is possible for the vget() to block the whole * pageout daemon, but the new low-memory handling @@ -1014,7 +1022,6 @@ rescan0: * of time. */ if (object->type == OBJT_VNODE) { - vm_page_unlock_queues(); vm_page_unlock(m); vp = object->handle; if (vp->v_type == VREG && @@ -1044,6 +1051,7 @@ rescan0: VM_OBJECT_LOCK(object); vm_page_lock(m); vm_page_lock_queues(); + queues_locked = TRUE; /* * The page might have been moved to another * queue during potential blocking in vget() @@ -1075,6 +1083,8 @@ rescan0: * be undergoing I/O, so skip it */ if (m->hold_count) { + vm_page_lock_queues(); + queues_locked = TRUE; vm_page_unlock(m); vm_page_requeue(m); if (object->flags & OBJ_MIGHTBEDIRTY) @@ -1093,32 +1103,37 @@ rescan0: * the (future) cleaned page. Otherwise we could wind * up laundering or cleaning too many pages. */ - vm_page_unlock_queues(); if (vm_pageout_clean(m) != 0) { --page_shortage; --maxlaunder; } - vm_page_lock_queues(); unlock_and_continue: vm_page_lock_assert(m, MA_NOTOWNED); VM_OBJECT_UNLOCK(object); if (mp != NULL) { - vm_page_unlock_queues(); + if (queues_locked) { + vm_page_unlock_queues(); + queues_locked = FALSE; + } if (vp != NULL) vput(vp); VFS_UNLOCK_GIANT(vfslocked); vm_object_deallocate(object); vn_finished_write(mp); - vm_page_lock_queues(); } - next = TAILQ_NEXT(&marker, pageq); - TAILQ_REMOVE(&vm_page_queues[PQ_INACTIVE].pl, - &marker, pageq); vm_page_lock_assert(m, MA_NOTOWNED); - continue; + goto relock_queues; } vm_page_unlock(m); VM_OBJECT_UNLOCK(object); +relock_queues: + if (!queues_locked) { + vm_page_lock_queues(); + queues_locked = TRUE; + } + next = TAILQ_NEXT(&marker, pageq); + TAILQ_REMOVE(&vm_page_queues[PQ_INACTIVE].pl, + &marker, pageq); } /* From owner-svn-src-all@FreeBSD.ORG Sat Jul 7 20:13:41 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 818E6106564A; Sat, 7 Jul 2012 20:13:41 +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 6C1938FC0A; Sat, 7 Jul 2012 20:13:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q67KDfAN082946; Sat, 7 Jul 2012 20:13:41 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q67KDfHN082943; Sat, 7 Jul 2012 20:13:41 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201207072013.q67KDfHN082943@svn.freebsd.org> From: Edward Tomasz Napierala Date: Sat, 7 Jul 2012 20:13:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238213 - head/sys/geom X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jul 2012 20:13:41 -0000 Author: trasz Date: Sat Jul 7 20:13:40 2012 New Revision: 238213 URL: http://svn.freebsd.org/changeset/base/238213 Log: Add a new GEOM method, resize(), which is called after provider size changes. Add a new routine, g_resize_provider(), to use to notify GEOM about provider change. Reviewed by: mav Sponsored by: FreeBSD Foundation Modified: head/sys/geom/geom.h head/sys/geom/geom_subr.c Modified: head/sys/geom/geom.h ============================================================================== --- head/sys/geom/geom.h Sat Jul 7 19:39:08 2012 (r238212) +++ head/sys/geom/geom.h Sat Jul 7 20:13:40 2012 (r238213) @@ -79,6 +79,7 @@ typedef void g_attrchanged_t (struct g_c typedef void g_provgone_t (struct g_provider *); typedef void g_dumpconf_t (struct sbuf *, const char *indent, struct g_geom *, struct g_consumer *, struct g_provider *); +typedef void g_resize_t(struct g_consumer *cp); /* * The g_class structure describes a transformation class. In other words @@ -108,7 +109,7 @@ struct g_class { g_orphan_t *orphan; g_ioctl_t *ioctl; g_provgone_t *providergone; - void *spare2; + g_resize_t *resize; /* * The remaining elements are private */ @@ -139,7 +140,7 @@ struct g_geom { g_orphan_t *orphan; g_ioctl_t *ioctl; g_provgone_t *providergone; - void *spare1; + g_resize_t *resize; void *softc; unsigned flags; #define G_GEOM_WITHER 1 @@ -265,6 +266,7 @@ int g_handleattr_str(struct bio *bp, con struct g_consumer * g_new_consumer(struct g_geom *gp); struct g_geom * g_new_geomf(struct g_class *mp, const char *fmt, ...); struct g_provider * g_new_providerf(struct g_geom *gp, const char *fmt, ...); +void g_resize_provider(struct g_provider *pp, off_t size); int g_retaste(struct g_class *mp); void g_spoil(struct g_provider *pp, struct g_consumer *cp); int g_std_access(struct g_provider *pp, int dr, int dw, int de); Modified: head/sys/geom/geom_subr.c ============================================================================== --- head/sys/geom/geom_subr.c Sat Jul 7 19:39:08 2012 (r238212) +++ head/sys/geom/geom_subr.c Sat Jul 7 20:13:40 2012 (r238213) @@ -68,9 +68,11 @@ static struct g_tailq_head geoms = TAILQ char *g_wait_event, *g_wait_up, *g_wait_down, *g_wait_sim; struct g_hh00 { - struct g_class *mp; - int error; - int post; + struct g_class *mp; + struct g_provider *pp; + off_t size; + int error; + int post; }; /* @@ -356,6 +358,7 @@ g_new_geomf(struct g_class *mp, const ch gp->access = mp->access; gp->orphan = mp->orphan; gp->ioctl = mp->ioctl; + gp->resize = mp->resize; return (gp); } @@ -601,6 +604,76 @@ g_error_provider(struct g_provider *pp, pp->error = error; } +static void +g_resize_provider_event(void *arg, int flag) +{ + struct g_hh00 *hh; + struct g_class *mp; + struct g_geom *gp; + struct g_provider *pp; + struct g_consumer *cp, *cp2; + off_t size; + + g_topology_assert(); + if (flag == EV_CANCEL) + return; + if (g_shutdown) + return; + + hh = arg; + pp = hh->pp; + size = hh->size; + + G_VALID_PROVIDER(pp); + g_trace(G_T_TOPOLOGY, "g_resize_provider_event(%p)", pp); + + LIST_FOREACH_SAFE(cp, &pp->consumers, consumers, cp2) { + gp = cp->geom; + if (gp->resize == NULL && size < pp->mediasize) + cp->geom->orphan(cp); + } + + pp->mediasize = size; + + LIST_FOREACH_SAFE(cp, &pp->consumers, consumers, cp2) { + gp = cp->geom; + if (gp->resize != NULL) + gp->resize(cp); + } + + /* + * After resizing, the previously invalid GEOM class metadata + * might become valid. This means we should retaste. + */ + LIST_FOREACH(mp, &g_classes, class) { + if (mp->taste == NULL) + continue; + LIST_FOREACH(cp, &pp->consumers, consumers) + if (cp->geom->class == mp) + break; + if (cp != NULL) + continue; + mp->taste(mp, pp, 0); + g_topology_assert(); + } +} + +void +g_resize_provider(struct g_provider *pp, off_t size) +{ + struct g_hh00 *hh; + + G_VALID_PROVIDER(pp); + + if (size == pp->mediasize) + return; + + hh = g_malloc(sizeof *hh, M_WAITOK | M_ZERO); + hh->pp = pp; + hh->size = size; + g_post_event(g_resize_provider_event, hh, M_WAITOK, NULL); +} + struct g_provider * g_provider_by_name(char const *arg) { From owner-svn-src-all@FreeBSD.ORG Sat Jul 7 20:21:06 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A0309106564A; Sat, 7 Jul 2012 20:21:06 +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 802068FC12; Sat, 7 Jul 2012 20:21:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q67KL6SX083774; Sat, 7 Jul 2012 20:21:06 GMT (envelope-from jfv@svn.freebsd.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q67KL6qc083771; Sat, 7 Jul 2012 20:21:06 GMT (envelope-from jfv@svn.freebsd.org) Message-Id: <201207072021.q67KL6qc083771@svn.freebsd.org> From: Jack F Vogel Date: Sat, 7 Jul 2012 20:21:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238214 - head/sys/dev/e1000 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jul 2012 20:21:06 -0000 Author: jfv Date: Sat Jul 7 20:21:05 2012 New Revision: 238214 URL: http://svn.freebsd.org/changeset/base/238214 Log: Change the interface to the Energy Efficient Ethernet (EEE) setting in the igb and em driver. This was necessitated by a shared code change that I was given late in the game, a data type changed from bool to int, in the last update I dealt with it by a cast, but it was pointed out (thanks jhb) that there was a potential problem with this. John suggested this safer approach, and it is fine with me... MFC after:2 days (to catch the 9.1 update) Modified: head/sys/dev/e1000/if_em.c head/sys/dev/e1000/if_igb.c Modified: head/sys/dev/e1000/if_em.c ============================================================================== --- head/sys/dev/e1000/if_em.c Sat Jul 7 20:13:40 2012 (r238213) +++ head/sys/dev/e1000/if_em.c Sat Jul 7 20:21:05 2012 (r238214) @@ -289,6 +289,7 @@ static void em_handle_link(void *context static void em_set_sysctl_value(struct adapter *, const char *, const char *, int *, int); static int em_set_flowcntl(SYSCTL_HANDLER_ARGS); +static int em_sysctl_eee(SYSCTL_HANDLER_ARGS); static __inline void em_rx_discard(struct rx_ring *, int); @@ -389,7 +390,7 @@ SYSCTL_INT(_hw_em, OID_AUTO, rx_process_ "at a time, -1 means unlimited"); /* Energy efficient ethernet - default to OFF */ -static int eee_setting = 0; +static int eee_setting = 1; TUNABLE_INT("hw.em.eee_setting", &eee_setting); SYSCTL_INT(_hw_em, OID_AUTO, eee_setting, CTLFLAG_RDTUN, &eee_setting, 0, "Enable Energy Efficient Ethernet"); @@ -636,9 +637,12 @@ em_attach(device_t dev) " due to SOL/IDER session.\n"); /* Sysctl for setting Energy Efficient Ethernet */ - em_set_sysctl_value(adapter, "eee_control", - "enable Energy Efficient Ethernet", - (int *)&hw->dev_spec.ich8lan.eee_disable, eee_setting); + hw->dev_spec.ich8lan.eee_disable = eee_setting; + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, "eee_control", CTLTYPE_INT|CTLFLAG_RW, + adapter, 0, em_sysctl_eee, "I", + "Disable Energy Efficient Ethernet"); /* ** Start from a known state, this is @@ -5695,6 +5699,27 @@ em_set_flowcntl(SYSCTL_HANDLER_ARGS) return (error); } +/* +** Manage Energy Efficient Ethernet: +** Control values: +** 0/1 - enabled/disabled +*/ +static int +em_sysctl_eee(SYSCTL_HANDLER_ARGS) +{ + struct adapter *adapter = (struct adapter *) arg1; + int error, value; + + value = adapter->hw.dev_spec.ich8lan.eee_disable; + error = sysctl_handle_int(oidp, &value, 0, req); + if (error || req->newptr == NULL) + return (error); + EM_CORE_LOCK(adapter); + adapter->hw.dev_spec.ich8lan.eee_disable = (value != 0); + em_init_locked(adapter); + EM_CORE_UNLOCK(adapter); + return (0); +} static int em_sysctl_debug_info(SYSCTL_HANDLER_ARGS) Modified: head/sys/dev/e1000/if_igb.c ============================================================================== --- head/sys/dev/e1000/if_igb.c Sat Jul 7 20:13:40 2012 (r238213) +++ head/sys/dev/e1000/if_igb.c Sat Jul 7 20:21:05 2012 (r238214) @@ -277,6 +277,7 @@ static void igb_set_sysctl_value(struct const char *, int *, int); static int igb_set_flowcntl(SYSCTL_HANDLER_ARGS); static int igb_sysctl_dmac(SYSCTL_HANDLER_ARGS); +static int igb_sysctl_eee(SYSCTL_HANDLER_ARGS); #ifdef DEVICE_POLLING static poll_handler_t igb_poll; @@ -586,10 +587,11 @@ igb_attach(device_t dev) SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "dmac", CTLTYPE_INT|CTLFLAG_RW, adapter, 0, igb_sysctl_dmac, "I", "DMA Coalesce"); - igb_set_sysctl_value(adapter, "eee_disabled", - "enable Energy Efficient Ethernet", - (int *)&adapter->hw.dev_spec._82575.eee_disable, - TRUE); + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, "eee_disabled", CTLTYPE_INT|CTLFLAG_RW, + adapter, 0, igb_sysctl_eee, "I", + "Disable Energy Efficient Ethernet"); if (adapter->hw.phy.media_type == e1000_media_type_copper) e1000_set_eee_i350(&adapter->hw); } @@ -5988,3 +5990,25 @@ igb_sysctl_dmac(SYSCTL_HANDLER_ARGS) igb_init(adapter); return (error); } + +/* +** Manage Energy Efficient Ethernet: +** Control values: +** 0/1 - enabled/disabled +*/ +static int +igb_sysctl_eee(SYSCTL_HANDLER_ARGS) +{ + struct adapter *adapter = (struct adapter *) arg1; + int error, value; + + value = adapter->hw.dev_spec._82575.eee_disable; + error = sysctl_handle_int(oidp, &value, 0, req); + if (error || req->newptr == NULL) + return (error); + IGB_CORE_LOCK(adapter); + adapter->hw.dev_spec._82575.eee_disable = (value != 0); + igb_init_locked(adapter); + IGB_CORE_UNLOCK(adapter); + return (0); +} From owner-svn-src-all@FreeBSD.ORG Sat Jul 7 20:32:21 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B4F2E1065675; Sat, 7 Jul 2012 20:32:21 +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 9E9458FC14; Sat, 7 Jul 2012 20:32:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q67KWL9p084780; Sat, 7 Jul 2012 20:32:21 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q67KWLt8084775; Sat, 7 Jul 2012 20:32:21 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201207072032.q67KWLt8084775@svn.freebsd.org> From: Edward Tomasz Napierala Date: Sat, 7 Jul 2012 20:32:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238215 - in head: sbin/mdconfig sys/dev/md sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jul 2012 20:32:21 -0000 Author: trasz Date: Sat Jul 7 20:32:21 2012 New Revision: 238215 URL: http://svn.freebsd.org/changeset/base/238215 Log: Make it possible to resize md(4) devices. Reviewed by: kib Sponsored by: FreeBSD Foundation Modified: head/sbin/mdconfig/mdconfig.8 head/sbin/mdconfig/mdconfig.c head/sys/dev/md/md.c head/sys/sys/mdioctl.h Modified: head/sbin/mdconfig/mdconfig.8 ============================================================================== --- head/sbin/mdconfig/mdconfig.8 Sat Jul 7 20:21:05 2012 (r238214) +++ head/sbin/mdconfig/mdconfig.8 Sat Jul 7 20:32:21 2012 (r238215) @@ -64,6 +64,11 @@ .Fl u Ar unit .Op Fl o Oo Cm no Oc Ns Ar force .Nm +.Fl r +.Fl u Ar unit +.Fl s Ar size +.Op Fl o Oo Cm no Oc Ns Ar force +.Nm .Fl l .Op Fl n .Op Fl v @@ -85,6 +90,8 @@ This will configure and attach a memory parameters specified and attach it to the system. .It Fl d Detach a memory disk from the system and release all resources. +.It Fl r +Resize a memory disk. .It Fl t Ar type Select the type of the memory disk. .Bl -tag -width "malloc" Modified: head/sbin/mdconfig/mdconfig.c ============================================================================== --- head/sbin/mdconfig/mdconfig.c Sat Jul 7 20:21:05 2012 (r238214) +++ head/sbin/mdconfig/mdconfig.c Sat Jul 7 20:32:21 2012 (r238215) @@ -54,7 +54,7 @@ #include static struct md_ioctl mdio; -static enum {UNSET, ATTACH, DETACH, LIST} action = UNSET; +static enum {UNSET, ATTACH, DETACH, RESIZE, LIST} action = UNSET; static int nflag; static void usage(void); @@ -81,6 +81,7 @@ usage(void) " [-s size] [-S sectorsize] [-u unit]\n" " [-x sectors/track] [-y heads/cylinder]\n" " mdconfig -d -u unit [-o [no]force]\n" +" mdconfig -r -u unit -s size [-o [no]force]\n" " mdconfig -l [-v] [-n] [-u unit]\n" " mdconfig file\n"); fprintf(stderr, "\t\ttype = {malloc, preload, vnode, swap}\n"); @@ -96,7 +97,7 @@ main(int argc, char **argv) { int ch, fd, i, vflag; char *p; - char *fflag = NULL, *tflag = NULL, *uflag = NULL; + char *fflag = NULL, *sflag = NULL, *tflag = NULL, *uflag = NULL; bzero(&mdio, sizeof(mdio)); mdio.md_file = malloc(PATH_MAX); @@ -108,25 +109,32 @@ main(int argc, char **argv) if (argc == 1) usage(); - while ((ch = getopt(argc, argv, "ab:df:lno:s:S:t:u:vx:y:")) != -1) { + while ((ch = getopt(argc, argv, "ab:df:lno:rs:S:t:u:vx:y:")) != -1) { switch (ch) { case 'a': if (action != UNSET && action != ATTACH) - errx(1, - "-a is mutually exclusive with -d and -l"); + errx(1, "-a is mutually exclusive " + "with -d, -r, and -l"); action = ATTACH; break; case 'd': if (action != UNSET && action != DETACH) - errx(1, - "-d is mutually exclusive with -a and -l"); + errx(1, "-d is mutually exclusive " + "with -a, -r, and -l"); action = DETACH; mdio.md_options |= MD_AUTOUNIT; break; + case 'r': + if (action != UNSET && action != RESIZE) + errx(1, "-r is mutually exclusive " + "with -a, -d, and -l"); + action = RESIZE; + mdio.md_options |= MD_AUTOUNIT; + break; case 'l': if (action != UNSET && action != LIST) - errx(1, - "-l is mutually exclusive with -a and -d"); + errx(1, "-l is mutually exclusive " + "with -a, -r, and -d"); action = LIST; mdio.md_options |= MD_AUTOUNIT; break; @@ -188,6 +196,9 @@ main(int argc, char **argv) mdio.md_sectorsize = strtoul(optarg, &p, 0); break; case 's': + if (sflag != NULL) + errx(1, "-s can be passed only once"); + sflag = optarg; mdio.md_mediasize = (off_t)strtoumax(optarg, &p, 0); if (p == NULL || *p == '\0') mdio.md_mediasize *= DEV_BSIZE; @@ -242,7 +253,7 @@ main(int argc, char **argv) mdio.md_type = MD_VNODE; mdio.md_options |= MD_CLUSTER | MD_AUTOUNIT | MD_COMPRESS; - } else if (mdio.md_mediasize != 0) { + } else if (sflag != NULL) { /* Imply ``-t swap'' */ mdio.md_type = MD_SWAP; mdio.md_options |= MD_CLUSTER | MD_AUTOUNIT | @@ -276,15 +287,15 @@ main(int argc, char **argv) } if ((mdio.md_type == MD_MALLOC || mdio.md_type == MD_SWAP) && - mdio.md_mediasize == 0) + sflag == NULL) errx(1, "must specify -s for -t malloc or -t swap"); if (mdio.md_type == MD_VNODE && mdio.md_file[0] == '\0') errx(1, "must specify -f for -t vnode"); } else { if (mdio.md_sectorsize != 0) errx(1, "-S can only be used with -a"); - if (mdio.md_mediasize != 0) - errx(1, "-s can only be used with -a"); + if (action != RESIZE && sflag != NULL) + errx(1, "-s can only be used with -a and -r"); if (mdio.md_fwsectors != 0) errx(1, "-x can only be used with -a"); if (mdio.md_fwheads != 0) @@ -295,13 +306,20 @@ main(int argc, char **argv) errx(1, "-t can only be used with -a"); if (argc > 0) errx(1, "file can only be used with -a"); - if (action != DETACH && (mdio.md_options & ~MD_AUTOUNIT) != 0) - errx(1, "-o can only be used with -a and -d"); + if ((action != DETACH && action != RESIZE) && + (mdio.md_options & ~MD_AUTOUNIT) != 0) + errx(1, "-o can only be used with -a, -d, and -r"); if (action == DETACH && (mdio.md_options & ~(MD_FORCE | MD_AUTOUNIT)) != 0) errx(1, "only -o [no]force can be used with -d"); + if (action == RESIZE && + (mdio.md_options & ~(MD_FORCE | MD_RESERVE | MD_AUTOUNIT)) != 0) + errx(1, "only -o [no]force and -o [no]reserve can be used with -r"); } + if (action == RESIZE && sflag == NULL) + errx(1, "must specify -s for -r"); + if (action != LIST && vflag == OPT_VERBOSE) errx(1, "-v can only be used with -l"); @@ -333,6 +351,12 @@ main(int argc, char **argv) i = ioctl(fd, MDIOCDETACH, &mdio); if (i < 0) err(1, "ioctl(/dev/%s)", MDCTL_NAME); + } else if (action == RESIZE) { + if (mdio.md_options & MD_AUTOUNIT) + errx(1, "-r requires -u"); + i = ioctl(fd, MDIOCRESIZE, &mdio); + if (i < 0) + err(1, "ioctl(/dev/%s)", MDCTL_NAME); } else if (action == LIST) { if (mdio.md_options & MD_AUTOUNIT) { /* @@ -342,7 +366,6 @@ main(int argc, char **argv) md_list(NULL, OPT_LIST | vflag); } else return (md_query(uflag)); - } else usage(); close(fd); Modified: head/sys/dev/md/md.c ============================================================================== --- head/sys/dev/md/md.c Sat Jul 7 20:21:05 2012 (r238214) +++ head/sys/dev/md/md.c Sat Jul 7 20:32:21 2012 (r238215) @@ -1081,6 +1081,64 @@ mddestroy(struct md_s *sc, struct thread } static int +mdresize(struct md_s *sc, struct md_ioctl *mdio) +{ + int error, res; + vm_pindex_t oldpages, newpages; + + switch (sc->type) { + case MD_VNODE: + break; + case MD_SWAP: + if (mdio->md_mediasize == 0 || + (mdio->md_mediasize % PAGE_SIZE) != 0) + return (EDOM); + oldpages = OFF_TO_IDX(round_page(sc->mediasize)); + newpages = OFF_TO_IDX(round_page(mdio->md_mediasize)); + if (newpages < oldpages) { + VM_OBJECT_LOCK(sc->object); + vm_object_page_remove(sc->object, newpages, 0, 0); + swap_pager_freespace(sc->object, newpages, + oldpages - newpages); + swap_release_by_cred(IDX_TO_OFF(oldpages - + newpages), sc->cred); + sc->object->charge = IDX_TO_OFF(newpages); + sc->object->size = newpages; + VM_OBJECT_UNLOCK(sc->object); + } else if (newpages > oldpages) { + res = swap_reserve_by_cred(IDX_TO_OFF(newpages - + oldpages), sc->cred); + if (!res) + return (ENOMEM); + if ((mdio->md_options & MD_RESERVE) || + (sc->flags & MD_RESERVE)) { + error = swap_pager_reserve(sc->object, + oldpages, newpages - oldpages); + if (error < 0) { + swap_release_by_cred( + IDX_TO_OFF(newpages - oldpages), + sc->cred); + return (EDOM); + } + } + VM_OBJECT_LOCK(sc->object); + sc->object->charge = IDX_TO_OFF(newpages); + sc->object->size = newpages; + VM_OBJECT_UNLOCK(sc->object); + } + break; + default: + return (EOPNOTSUPP); + } + + sc->mediasize = mdio->md_mediasize; + g_topology_lock(); + g_resize_provider(sc->pp, sc->mediasize); + g_topology_unlock(); + return (0); +} + +static int mdcreate_swap(struct md_s *sc, struct md_ioctl *mdio, struct thread *td) { vm_ooffset_t npage; @@ -1108,7 +1166,7 @@ mdcreate_swap(struct md_s *sc, struct md VM_PROT_DEFAULT, 0, td->td_ucred); if (sc->object == NULL) return (ENOMEM); - sc->flags = mdio->md_options & MD_FORCE; + sc->flags = mdio->md_options & (MD_FORCE | MD_RESERVE); if (mdio->md_options & MD_RESERVE) { if (swap_pager_reserve(sc->object, 0, npage) < 0) { error = EDOM; @@ -1217,6 +1275,18 @@ xmdctlioctl(struct cdev *dev, u_long cmd !(mdio->md_options & MD_FORCE)) return (EBUSY); return (mddestroy(sc, td)); + case MDIOCRESIZE: + if ((mdio->md_options & ~(MD_FORCE | MD_RESERVE)) != 0) + return (EINVAL); + + sc = mdfind(mdio->md_unit); + if (sc == NULL) + return (ENOENT); + if (mdio->md_mediasize < sc->mediasize && + !(sc->flags & MD_FORCE) && + !(mdio->md_options & MD_FORCE)) + return (EBUSY); + return (mdresize(sc, mdio)); case MDIOCQUERY: sc = mdfind(mdio->md_unit); if (sc == NULL) Modified: head/sys/sys/mdioctl.h ============================================================================== --- head/sys/sys/mdioctl.h Sat Jul 7 20:21:05 2012 (r238214) +++ head/sys/sys/mdioctl.h Sat Jul 7 20:32:21 2012 (r238215) @@ -79,6 +79,7 @@ struct md_ioctl { #define MDIOCDETACH _IOWR('m', 1, struct md_ioctl) /* detach disk */ #define MDIOCQUERY _IOWR('m', 2, struct md_ioctl) /* query status */ #define MDIOCLIST _IOWR('m', 3, struct md_ioctl) /* query status */ +#define MDIOCRESIZE _IOWR('m', 4, struct md_ioctl) /* resize disk */ #define MD_CLUSTER 0x01 /* Don't cluster */ #define MD_RESERVE 0x02 /* Pre-reserve swap */ From owner-svn-src-all@FreeBSD.ORG Sat Jul 7 21:28:32 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 15092106566B; Sat, 7 Jul 2012 21:28:32 +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 DA9AD8FC08; Sat, 7 Jul 2012 21:28:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q67LSVGe089359; Sat, 7 Jul 2012 21:28:31 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q67LSVGh089356; Sat, 7 Jul 2012 21:28:31 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201207072128.q67LSVGh089356@svn.freebsd.org> From: Edward Tomasz Napierala Date: Sat, 7 Jul 2012 21:28:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238216 - head/sys/geom X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jul 2012 21:28:32 -0000 Author: trasz Date: Sat Jul 7 21:28:31 2012 New Revision: 238216 URL: http://svn.freebsd.org/changeset/base/238216 Log: Add disk_resize(), to make it possible for the disk drivers such as da(4) to notify GEOM about LUN size change. Reviewed by: mav (earlier version) Sponsored by: FreeBSD Foundation Modified: head/sys/geom/geom_disk.c head/sys/geom/geom_disk.h Modified: head/sys/geom/geom_disk.c ============================================================================== --- head/sys/geom/geom_disk.c Sat Jul 7 20:32:21 2012 (r238215) +++ head/sys/geom/geom_disk.c Sat Jul 7 21:28:31 2012 (r238216) @@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -65,6 +66,7 @@ struct g_disk_softc { struct sysctl_oid *sysctl_tree; char led[64]; uint32_t state; + struct task resize_task; }; static struct mtx g_disk_done_mtx; @@ -445,6 +447,27 @@ g_disk_dumpconf(struct sbuf *sb, const c } static void +g_disk_resize_task(void *context, int pending) +{ + struct g_geom *gp; + struct g_provider *pp; + struct disk *dp; + struct g_disk_softc *sc; + + sc = (struct g_disk_softc *)context; + dp = sc->dp; + gp = dp->d_geom; + + LIST_FOREACH(pp, &gp->provider, provider) { + if (pp->sectorsize != 0 && + pp->sectorsize != dp->d_sectorsize) + g_wither_provider(pp, ENXIO); + else + g_resize_provider(pp, dp->d_mediasize); + } +} + +static void g_disk_create(void *arg, int flag) { struct g_geom *gp; @@ -484,6 +507,7 @@ g_disk_create(void *arg, int flag) CTLFLAG_RW | CTLFLAG_TUN, sc->led, sizeof(sc->led), "LED name"); } + TASK_INIT(&sc->resize_task, 0, g_disk_resize_task, sc); pp->private = sc; dp->d_geom = gp; g_error_provider(pp, 0); @@ -635,6 +659,24 @@ disk_attr_changed(struct disk *dp, const (void)g_attr_changed(pp, attr, flag); } +void +disk_resize(struct disk *dp) +{ + struct g_geom *gp; + struct g_disk_softc *sc; + int error; + + gp = dp->d_geom; + + if (gp == NULL) + return; + + sc = gp->softc; + + error = taskqueue_enqueue(taskqueue_thread, &sc->resize_task); + KASSERT(error == 0, ("taskqueue_enqueue(9) failed.")); +} + static void g_kern_disks(void *p, int flag __unused) { Modified: head/sys/geom/geom_disk.h ============================================================================== --- head/sys/geom/geom_disk.h Sat Jul 7 20:32:21 2012 (r238215) +++ head/sys/geom/geom_disk.h Sat Jul 7 21:28:31 2012 (r238216) @@ -109,6 +109,7 @@ void disk_create(struct disk *disk, int void disk_destroy(struct disk *disk); void disk_gone(struct disk *disk); void disk_attr_changed(struct disk *dp, const char *attr, int flag); +void disk_resize(struct disk *dp); #define DISK_VERSION_00 0x58561059 #define DISK_VERSION_01 0x5856105a From owner-svn-src-all@FreeBSD.ORG Sat Jul 7 21:36:14 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 51CC3106566B; Sat, 7 Jul 2012 21:36:14 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) by mx1.freebsd.org (Postfix) with ESMTP id 107968FC12; Sat, 7 Jul 2012 21:36:14 +0000 (UTC) Received: from dhcp-128-232-132-170.eduroam.csx.cam.ac.uk (dhcp-128-232-132-170.eduroam.csx.cam.ac.uk [128.232.132.170]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPSA id 3385E25D3887; Sat, 7 Jul 2012 21:36:13 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Bjoern A. Zeeb" In-Reply-To: <201207040737.q647br5k096035@svn.freebsd.org> Date: Sat, 7 Jul 2012 21:36:11 +0000 Content-Transfer-Encoding: 7bit Message-Id: References: <201207040737.q647br5k096035@svn.freebsd.org> To: Gleb Smirnoff X-Mailer: Apple Mail (2.1084) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r238092 - in head/sys: net netinet netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jul 2012 21:36:14 -0000 On 4. Jul 2012, at 07:37 , Gleb Smirnoff wrote: > Author: glebius > Date: Wed Jul 4 07:37:53 2012 > New Revision: 238092 > URL: http://svn.freebsd.org/changeset/base/238092 > > Log: > When ip_output()/ip6_output() is supplied a struct route *ro argument, > it skips FLOWTABLE lookup. However, the non-NULL ro has dual meaning > here: it may be supplied to provide route, and it may be supplied to > store and return to caller the route that ip_output()/ip6_output() > finds. In the latter case skipping FLOWTABLE lookup is pessimisation. > > The difference between struct route filled by FLOWTABLE and filled > by rtalloc() family is that the former doesn't hold a reference on > its rtentry. Reference is hold by flow entry, and it is about to > be released in future. Thus, route filled by FLOWTABLE shouldn't > be passed to RTFREE() macro. > > - Introduce new flag for struct route/route_in6, that marks route > not holding a reference on rtentry. > - Introduce new macro RO_RTFREE() that cleans up a struct route > depending on its kind. > - All callers to ip_output()/ip6_output() that do supply non-NULL > but empty route should use RO_RTFREE() to free results of > lookup. > - ip_output()/ip6_output() now do FLOWTABLE lookup always when > ro->ro_rt == NULL. Just read the description but you realize that the proper fix is to make flowtable code a bit slower and do proper reference counting? Currently a cache flowtable entry might still be releases while a packet in being processed using it, right? If my memory serves me right the same is true for llentries cached from flowtable. Once that is fixed as well the proper way to free an lltable should be that the table does not go away while it still holds entry but if it's marked for deletion the cleanup of the last llentry should also free the table. This would revert parts of Kip's last commit and restore a proper teardown world order. /bz -- Bjoern A. Zeeb You have to have visions! It does not matter how good you are. It matters what good you do! From owner-svn-src-all@FreeBSD.ORG Sat Jul 7 21:56:42 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D97CA1065672; Sat, 7 Jul 2012 21:56:42 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.dawidek.net (60.wheelsystems.com [83.12.187.60]) by mx1.freebsd.org (Postfix) with ESMTP id 523D18FC0A; Sat, 7 Jul 2012 21:56:42 +0000 (UTC) Received: from localhost (89-73-195-149.dynamic.chello.pl [89.73.195.149]) by mail.dawidek.net (Postfix) with ESMTPSA id 6D43D58E; Sat, 7 Jul 2012 23:56:40 +0200 (CEST) Date: Sat, 7 Jul 2012 23:54:25 +0200 From: Pawel Jakub Dawidek To: Edward Tomasz Napierala Message-ID: <20120707215424.GE1437@garage.freebsd.pl> References: <201207072013.q67KDfHN082943@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="qOrJKOH36bD5yhNe" Content-Disposition: inline In-Reply-To: <201207072013.q67KDfHN082943@svn.freebsd.org> X-OS: FreeBSD 10.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r238213 - head/sys/geom X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jul 2012 21:56:43 -0000 --qOrJKOH36bD5yhNe Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Jul 07, 2012 at 08:13:41PM +0000, Edward Tomasz Napierala wrote: > Author: trasz > Date: Sat Jul 7 20:13:40 2012 > New Revision: 238213 > URL: http://svn.freebsd.org/changeset/base/238213 >=20 > Log: > Add a new GEOM method, resize(), which is called after provider size ch= anges. > Add a new routine, g_resize_provider(), to use to notify GEOM about pro= vider > change. > =20 > Reviewed by: mav > Sponsored by: FreeBSD Foundation [...] > - void *spare2; > + g_resize_t *resize; [...] > - void *spare1; > + g_resize_t *resize; [...] If you take the time to actually read the commit log from the change that added those spare fields, you will notice they were not added for you to consume them. You will also notice that one of those fields were left for more universal method to handle various provider's property changes (ie. provider's name, apart from its mediasize). The initial patch was even published a year ago: http://people.freebsd.org/~pjd/patches/geom_property_change.patch Even if it was somehow totally not reusable it would at least give you a hint that mediasize is not the only thing that can change and if we are making that change it should be done right. > +static void > +g_resize_provider_event(void *arg, int flag) > +{ [...] > + if (flag =3D=3D EV_CANCEL) > + return; How it can be canceled? Because I'm clearly missing something. You post this event without giving any pointers, so how g_cancel_event() can find this event can cancel it? > + hh =3D arg; > + pp =3D hh->pp; > + size =3D hh->size; Where do you free the memory allocated for 'hh'? > + G_VALID_PROVIDER(pp); Is this your protection from a provider going away? > + LIST_FOREACH_SAFE(cp, &pp->consumers, consumers, cp2) { > + gp =3D cp->geom; > + if (gp->resize =3D=3D NULL && size < pp->mediasize) > + cp->geom->orphan(cp); > + } Why is this safe to call the orphan method directly and not use g_orphan_provider()? I don't know if using g_orphan_provider() is safe to use here either, but I'm under impression that you assume no orphan method will ever drop the topology lock? We have tools to assert that, no need to introduce such weak assumptions. > +void > +g_resize_provider(struct g_provider *pp, off_t size) > +{ > + struct g_hh00 *hh; > + > + G_VALID_PROVIDER(pp); > + > + if (size =3D=3D pp->mediasize) > + return; > + > + hh =3D g_malloc(sizeof *hh, M_WAITOK | M_ZERO); > + hh->pp =3D pp; Care to explain why the provider can't disappear between now and the event thread calling g_resize_provider_event()? > + hh->size =3D size; > + g_post_event(g_resize_provider_event, hh, M_WAITOK, NULL); --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://tupytaj.pl --qOrJKOH36bD5yhNe Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAk/4sBAACgkQForvXbEpPzTuBgCg5ONWpK+E0E3m67EjNXYif4YZ bREAoIeDpaV+3k3CFUYa+0yTeJkuz13D =WhYV -----END PGP SIGNATURE----- --qOrJKOH36bD5yhNe-- From owner-svn-src-all@FreeBSD.ORG Sat Jul 7 22:19:51 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E3588106564A; Sat, 7 Jul 2012 22:19:51 +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 CE8918FC08; Sat, 7 Jul 2012 22:19:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q67MJpmB093573; Sat, 7 Jul 2012 22:19:51 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q67MJpvW093571; Sat, 7 Jul 2012 22:19:51 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201207072219.q67MJpvW093571@svn.freebsd.org> From: Edward Tomasz Napierala Date: Sat, 7 Jul 2012 22:19:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238217 - head/sys/cam/scsi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jul 2012 22:19:52 -0000 Author: trasz Date: Sat Jul 7 22:19:51 2012 New Revision: 238217 URL: http://svn.freebsd.org/changeset/base/238217 Log: Make the da(4) driver notify GEOM about LUN size change. Reviewed by: mav Sponsored by: FreeBSD Foundation Modified: head/sys/cam/scsi/scsi_da.c Modified: head/sys/cam/scsi/scsi_da.c ============================================================================== --- head/sys/cam/scsi/scsi_da.c Sat Jul 7 21:28:31 2012 (r238216) +++ head/sys/cam/scsi/scsi_da.c Sat Jul 7 22:19:51 2012 (r238217) @@ -2644,6 +2644,8 @@ dasetgeom(struct cam_periph *periph, uin softc->disk->d_flags |= DISKFLAG_CANDELETE; else softc->disk->d_flags &= ~DISKFLAG_CANDELETE; + + disk_resize(softc->disk); } static void From owner-svn-src-all@FreeBSD.ORG Sat Jul 7 22:20:48 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5FD561065673; Sat, 7 Jul 2012 22:20:48 +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 4B4488FC15; Sat, 7 Jul 2012 22:20:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q67MKmHV093675; Sat, 7 Jul 2012 22:20:48 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q67MKmg5093673; Sat, 7 Jul 2012 22:20:48 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201207072220.q67MKmg5093673@svn.freebsd.org> From: Edward Tomasz Napierala Date: Sat, 7 Jul 2012 22:20:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238218 - head/sys/geom/mountver X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jul 2012 22:20:48 -0000 Author: trasz Date: Sat Jul 7 22:20:47 2012 New Revision: 238218 URL: http://svn.freebsd.org/changeset/base/238218 Log: Add trivial resize handling to gmountver(8). Reviewed by: mav Sponsored by: FreeBSD Foundation Modified: head/sys/geom/mountver/g_mountver.c Modified: head/sys/geom/mountver/g_mountver.c ============================================================================== --- head/sys/geom/mountver/g_mountver.c Sat Jul 7 22:19:51 2012 (r238217) +++ head/sys/geom/mountver/g_mountver.c Sat Jul 7 22:20:47 2012 (r238218) @@ -59,6 +59,7 @@ static eventhandler_tag g_mountver_pre_s static void g_mountver_queue(struct bio *bp); static void g_mountver_orphan(struct g_consumer *cp); +static void g_mountver_resize(struct g_consumer *cp); static int g_mountver_destroy(struct g_geom *gp, boolean_t force); static g_taste_t g_mountver_taste; static int g_mountver_destroy_geom(struct gctl_req *req, struct g_class *mp, @@ -257,6 +258,7 @@ g_mountver_create(struct gctl_req *req, gp->softc = sc; gp->start = g_mountver_start; gp->orphan = g_mountver_orphan; + gp->resize = g_mountver_resize; gp->access = g_mountver_access; gp->dumpconf = g_mountver_dumpconf; @@ -457,6 +459,18 @@ g_mountver_orphan(struct g_consumer *cp) G_MOUNTVER_DEBUG(0, "%s is offline. Mount verification in progress.", sc->sc_provider_name); } +static void +g_mountver_resize(struct g_consumer *cp) +{ + struct g_geom *gp; + struct g_provider *pp; + + gp = cp->geom; + + LIST_FOREACH(pp, &gp->provider, provider) + g_resize_provider(pp, cp->provider->mediasize); +} + static int g_mountver_ident_matches(struct g_geom *gp) { From owner-svn-src-all@FreeBSD.ORG Sat Jul 7 22:22:14 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9FCAC1065672; Sat, 7 Jul 2012 22:22:14 +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 713158FC1B; Sat, 7 Jul 2012 22:22:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q67MME8m093833; Sat, 7 Jul 2012 22:22:14 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q67MMEYE093830; Sat, 7 Jul 2012 22:22:14 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201207072222.q67MMEYE093830@svn.freebsd.org> From: Edward Tomasz Napierala Date: Sat, 7 Jul 2012 22:22:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238219 - head/sys/geom/nop X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jul 2012 22:22:14 -0000 Author: trasz Date: Sat Jul 7 22:22:13 2012 New Revision: 238219 URL: http://svn.freebsd.org/changeset/base/238219 Log: Add trivial resize handling to gnop(8). Reviewed by: mav Sponsored by: FreeBSD Foundation Modified: head/sys/geom/nop/g_nop.c head/sys/geom/nop/g_nop.h Modified: head/sys/geom/nop/g_nop.c ============================================================================== --- head/sys/geom/nop/g_nop.c Sat Jul 7 22:20:47 2012 (r238218) +++ head/sys/geom/nop/g_nop.c Sat Jul 7 22:22:13 2012 (r238219) @@ -72,6 +72,30 @@ g_nop_orphan(struct g_consumer *cp) } static void +g_nop_resize(struct g_consumer *cp) +{ + struct g_nop_softc *sc; + struct g_geom *gp; + struct g_provider *pp; + off_t size; + + g_topology_assert(); + + gp = cp->geom; + sc = gp->softc; + + if (sc->sc_explicitsize != 0) + return; + if (cp->provider->mediasize < sc->sc_offset) { + g_nop_destroy(gp, 1); + return; + } + size = cp->provider->mediasize - sc->sc_offset; + LIST_FOREACH(pp, &gp->provider, provider) + g_resize_provider(pp, size); +} + +static void g_nop_start(struct bio *bp) { struct g_nop_softc *sc; @@ -146,6 +170,7 @@ g_nop_create(struct gctl_req *req, struc struct g_consumer *cp; char name[64]; int error; + off_t explicitsize; g_topology_assert(); @@ -165,6 +190,7 @@ g_nop_create(struct gctl_req *req, struc gctl_error(req, "Invalid offset for provider %s.", pp->name); return (EINVAL); } + explicitsize = size; if (size == 0) size = pp->mediasize - offset; if (offset + size > pp->mediasize) { @@ -192,6 +218,7 @@ g_nop_create(struct gctl_req *req, struc gp = g_new_geomf(mp, name); sc = g_malloc(sizeof(*sc), M_WAITOK); sc->sc_offset = offset; + sc->sc_explicitsize = explicitsize; sc->sc_error = ioerror; sc->sc_rfailprob = rfailprob; sc->sc_wfailprob = wfailprob; @@ -202,6 +229,7 @@ g_nop_create(struct gctl_req *req, struc gp->softc = sc; gp->start = g_nop_start; gp->orphan = g_nop_orphan; + gp->resize = g_nop_resize; gp->access = g_nop_access; gp->dumpconf = g_nop_dumpconf; Modified: head/sys/geom/nop/g_nop.h ============================================================================== --- head/sys/geom/nop/g_nop.h Sat Jul 7 22:20:47 2012 (r238218) +++ head/sys/geom/nop/g_nop.h Sat Jul 7 22:22:13 2012 (r238219) @@ -57,6 +57,7 @@ struct g_nop_softc { int sc_error; off_t sc_offset; + off_t sc_explicitsize; u_int sc_rfailprob; u_int sc_wfailprob; uintmax_t sc_reads; From owner-svn-src-all@FreeBSD.ORG Sat Jul 7 22:53:43 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 90C30106564A; Sat, 7 Jul 2012 22:53:43 +0000 (UTC) (envelope-from etnapierala@googlemail.com) Received: from mail-we0-f182.google.com (mail-we0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 90A9E8FC19; Sat, 7 Jul 2012 22:53:42 +0000 (UTC) Received: by werp13 with SMTP id p13so6873866wer.13 for ; Sat, 07 Jul 2012 15:53:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=sender:subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; bh=WnGBx6JrrG5XDkGySBNV7y2mTSj1mRJTUIHGlRV365M=; b=0e+FY/WZQiEDdurkQGeutpbhysKTy7ND/pWOxXH82DkDJT77jTmsw51VQ03gr9THlX ntKeypI7F9EuqsZvbvxqet65LPtIAxNEzN0QO5m01UUf6/Od65jwO/Ss52iJBg2b1CdR 5gWj2jcfP+dsnWw3mBQIO0atVwC4tUg8gnT8s9GmpdYdgZ0B8y4G6PPswHjE42hDLQnH 0hkg/ofOan9VYX43KKC/gilmMpChgFjd5rw0hmSBsqyW8t5FSd+CPGz6DhfvRckV8ZQZ evwUBPA39JXSNz/9X8X2ZNlFAqfilL51NjggHWqdk3kwdrZq/K6iAkzZPAM1xYQdwHg/ /taw== Received: by 10.180.105.163 with SMTP id gn3mr18110951wib.2.1341701621340; Sat, 07 Jul 2012 15:53:41 -0700 (PDT) Received: from [192.168.119.14] (gate19.robnet.pl. [194.105.132.219]) by mx.google.com with ESMTPS id j6sm21308287wiy.4.2012.07.07.15.53.39 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 07 Jul 2012 15:53:40 -0700 (PDT) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Mime-Version: 1.0 (Apple Message framework v1278) Content-Type: text/plain; charset=iso-8859-2 From: =?iso-8859-2?Q?Edward_Tomasz_Napiera=B3a?= In-Reply-To: <20120707215424.GE1437@garage.freebsd.pl> Date: Sun, 8 Jul 2012 00:53:37 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <280C8AEE-F7E8-4AAE-87BF-E59D0249B74F@FreeBSD.org> References: <201207072013.q67KDfHN082943@svn.freebsd.org> <20120707215424.GE1437@garage.freebsd.pl> To: Pawel Jakub Dawidek X-Mailer: Apple Mail (2.1278) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r238213 - head/sys/geom X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jul 2012 22:53:43 -0000 Wiadomo=B6=E6 napisana przez Pawel Jakub Dawidek w dniu 7 lip 2012, o = godz. 23:54: > On Sat, Jul 07, 2012 at 08:13:41PM +0000, Edward Tomasz Napierala = wrote: >> Author: trasz >> Date: Sat Jul 7 20:13:40 2012 >> New Revision: 238213 >> URL: http://svn.freebsd.org/changeset/base/238213 >>=20 >> Log: >> Add a new GEOM method, resize(), which is called after provider size = changes. >> Add a new routine, g_resize_provider(), to use to notify GEOM about = provider >> change. >>=20 >> Reviewed by: mav >> Sponsored by: FreeBSD Foundation > [...] >> - void *spare2; >> + g_resize_t *resize; > [...] >> - void *spare1; >> + g_resize_t *resize; > [...] >=20 > If you take the time to actually read the commit log from the change > that added those spare fields, you will notice they were not added for > you to consume them. Perhaps it wasn't your original intent, but they are spares. One of = these was already reused for some other task, btw. > You will also notice that one of those fields were left for more > universal method to handle various provider's property changes (ie. > provider's name, apart from its mediasize). The initial patch was even > published a year ago: >=20 > = http://people.freebsd.org/~pjd/patches/geom_property_change.patch >=20 > Even if it was somehow totally not reusable it would at least give you = a > hint that mediasize is not the only thing that can change and if we = are > making that change it should be done right. I was not aware of that patch. What I've considered was to use = attributes instead, but that would complicate notifying consumers about resizing and would require some special-casing in the attribute code. >> +static void >> +g_resize_provider_event(void *arg, int flag) >> +{ > [...] >> + if (flag =3D=3D EV_CANCEL) >> + return; >=20 > How it can be canceled? Because I'm clearly missing something. You = post > this event without giving any pointers, so how g_cancel_event() can = find > this event can cancel it? Copy-pasto, my bad. Thanks for spotting this. >> + hh =3D arg; >> + pp =3D hh->pp; >> + size =3D hh->size; >=20 > Where do you free the memory allocated for 'hh'? It should be here, and it will be added soon. >> + G_VALID_PROVIDER(pp); >=20 > Is this your protection from a provider going away? Can you suggest a way to do it in a safe way that doesn't involve rewriting most of GEOM? >> + LIST_FOREACH_SAFE(cp, &pp->consumers, consumers, cp2) { >> + gp =3D cp->geom; >> + if (gp->resize =3D=3D NULL && size < pp->mediasize) >> + cp->geom->orphan(cp); >> + } >=20 > Why is this safe to call the orphan method directly and not use > g_orphan_provider()? I don't know if using g_orphan_provider() is safe > to use here either, but I'm under impression that you assume no orphan > method will ever drop the topology lock? We have tools to assert that, > no need to introduce such weak assumptions. It's not that using g_orphan_provider() would be safer here - it simply wouldn't work. The way it works is by adding providers to a queue (g_doorstep). _Providers_, and we need to orphan individual consumers. So, this would involve rewriting the orphanisation mechanism. Also, most of the classes were fixed by mav@ to handle this correctly, IIRC. >> +void >> +g_resize_provider(struct g_provider *pp, off_t size) >> +{ >> + struct g_hh00 *hh; >> + >> + G_VALID_PROVIDER(pp); >> + >> + if (size =3D=3D pp->mediasize) >> + return; >> + >> + hh =3D g_malloc(sizeof *hh, M_WAITOK | M_ZERO); >> + hh->pp =3D pp; >=20 > Care to explain why the provider can't disappear between now and the > event thread calling g_resize_provider_event()? See above. --=20 If you cut off my head, what would I say? Me and my head, or me and my = body?