From owner-svn-src-head@FreeBSD.ORG Sun Mar 28 00:10:10 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EDA62106566B; Sun, 28 Mar 2010 00:10:09 +0000 (UTC) (envelope-from gibbs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DCDFE8FC08; Sun, 28 Mar 2010 00:10:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2S0A9KI041573; Sun, 28 Mar 2010 00:10:09 GMT (envelope-from gibbs@svn.freebsd.org) Received: (from gibbs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2S0A9fX041570; Sun, 28 Mar 2010 00:10:09 GMT (envelope-from gibbs@svn.freebsd.org) Message-Id: <201003280010.o2S0A9fX041570@svn.freebsd.org> From: "Justin T. Gibbs" Date: Sun, 28 Mar 2010 00:10: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: r205781 - head/sys/dev/bktr X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Mar 2010 00:10:10 -0000 Author: gibbs Date: Sun Mar 28 00:10:09 2010 New Revision: 205781 URL: http://svn.freebsd.org/changeset/base/205781 Log: Use standard types in preference to BSD types so that these header files can be used in applications compiled with only POSIX types visible. MFC after: 2 weeks Modified: head/sys/dev/bktr/ioctl_bt848.h head/sys/dev/bktr/ioctl_meteor.h Modified: head/sys/dev/bktr/ioctl_bt848.h ============================================================================== --- head/sys/dev/bktr/ioctl_bt848.h Sat Mar 27 23:58:53 2010 (r205780) +++ head/sys/dev/bktr/ioctl_bt848.h Sun Mar 28 00:10:09 2010 (r205781) @@ -89,9 +89,9 @@ * EEProm stuff */ struct eeProm { - short offset; - short count; - u_char bytes[ 256 ]; + short offset; + short count; + unsigned char bytes[ 256 ]; }; @@ -147,7 +147,7 @@ struct eeProm { * b23-b16: i2c addr (write) * b31-b24: 1 = write, 0 = read */ -#define BT848_I2CWR _IOWR('x', 57, u_long) /* i2c read-write */ +#define BT848_I2CWR _IOWR('x', 57, unsigned long) /* i2c read-write */ struct bktr_msp_control { unsigned char function; @@ -192,10 +192,10 @@ typedef enum { METEOR_PIXTYPE_RGB, METEO struct meteor_pixfmt { - u_int index; /* Index in supported pixfmt list */ + unsigned int index; /* Index in supported pixfmt list */ METEOR_PIXTYPE type; /* What's the board gonna feed us */ - u_int Bpp; /* Bytes per pixel */ - u_long masks[3]; /* R,G,B or Y,U,V masks, respectively */ + unsigned int Bpp; /* Bytes per pixel */ + unsigned long masks[3]; /* R,G,B or Y,U,V masks, respectively */ unsigned swap_bytes :1; /* Bytes swapped within shorts */ unsigned swap_shorts:1; /* Shorts swapped within longs */ }; Modified: head/sys/dev/bktr/ioctl_meteor.h ============================================================================== --- head/sys/dev/bktr/ioctl_meteor.h Sat Mar 27 23:58:53 2010 (r205780) +++ head/sys/dev/bktr/ioctl_meteor.h Sun Mar 28 00:10:09 2010 (r205781) @@ -50,27 +50,27 @@ struct meteor_capframe { /* structure for METEOR[GS]ETGEO - get/set geometry */ struct meteor_geomet { - u_short rows; - u_short columns; - u_short frames; - u_long oformat; + unsigned short rows; + unsigned short columns; + unsigned short frames; + unsigned long oformat; } ; /* structure for METEORGCOUNT-get count of frames, fifo errors and dma errors */ struct meteor_counts { - u_long fifo_errors; /* count of fifo errors since open */ - u_long dma_errors; /* count of dma errors since open */ - u_long frames_captured; /* count of frames captured since open */ - u_long even_fields_captured; /* count of even fields captured */ - u_long odd_fields_captured; /* count of odd fields captured */ + unsigned long fifo_errors; /* count of fifo errors since open */ + unsigned long dma_errors; /* count of dma errors since open */ + unsigned long frames_captured; /* count of frames captured since open */ + unsigned long even_fields_captured; /* count of even fields captured */ + unsigned long odd_fields_captured; /* count of odd fields captured */ } ; /* structure for getting and setting direct transfers to vram */ struct meteor_video { - u_long addr; /* Address of location to dma to */ - u_long width; /* Width of memory area */ - u_long banksize; /* Size of Vram bank */ - u_long ramsize; /* Size of Vram */ + unsigned long addr; /* Address of location to dma to */ + unsigned long width; /* Width of memory area */ + unsigned long banksize; /* Size of Vram bank */ + unsigned long ramsize; /* Size of Vram */ }; #define METEORCAPTUR _IOW('x', 1, int) /* capture a frame */ From owner-svn-src-head@FreeBSD.ORG Sun Mar 28 06:51:51 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2128F1065672; Sun, 28 Mar 2010 06:51:51 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0FF0B8FC0A; Sun, 28 Mar 2010 06:51:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2S6poRP030063; Sun, 28 Mar 2010 06:51:50 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2S6po7B030061; Sun, 28 Mar 2010 06:51:50 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201003280651.o2S6po7B030061@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 28 Mar 2010 06:51: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: r205789 - head/sys/netipsec X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Mar 2010 06:51:51 -0000 Author: bz Date: Sun Mar 28 06:51:50 2010 New Revision: 205789 URL: http://svn.freebsd.org/changeset/base/205789 Log: When tearing down IPsec as part of a (virtual) network stack, do not try to free the same list twice but free both the acquiring list and the security policy acquiring list. Reviewed by: anchie MFC after: 3 days Modified: head/sys/netipsec/key.c Modified: head/sys/netipsec/key.c ============================================================================== --- head/sys/netipsec/key.c Sun Mar 28 03:00:18 2010 (r205788) +++ head/sys/netipsec/key.c Sun Mar 28 06:51:50 2010 (r205789) @@ -7779,7 +7779,8 @@ void key_destroy(void) { struct secpolicy *sp, *nextsp; - struct secspacq *acq, *nextacq; + struct secacq *acq, *nextacq; + struct secspacq *spacq, *nextspacq; struct secashead *sah, *nextsah; struct secreg *reg; int i; @@ -7820,7 +7821,7 @@ key_destroy(void) REGTREE_UNLOCK(); ACQ_LOCK(); - for (acq = LIST_FIRST(&V_spacqtree); acq != NULL; acq = nextacq) { + for (acq = LIST_FIRST(&V_acqtree); acq != NULL; acq = nextacq) { nextacq = LIST_NEXT(acq, chain); if (__LIST_CHAINED(acq)) { LIST_REMOVE(acq, chain); @@ -7830,11 +7831,12 @@ key_destroy(void) ACQ_UNLOCK(); SPACQ_LOCK(); - for (acq = LIST_FIRST(&V_spacqtree); acq != NULL; acq = nextacq) { - nextacq = LIST_NEXT(acq, chain); - if (__LIST_CHAINED(acq)) { - LIST_REMOVE(acq, chain); - free(acq, M_IPSEC_SAQ); + for (spacq = LIST_FIRST(&V_spacqtree); spacq != NULL; + spacq = nextspacq) { + nextspacq = LIST_NEXT(spacq, chain); + if (__LIST_CHAINED(spacq)) { + LIST_REMOVE(spacq, chain); + free(spacq, M_IPSEC_SAQ); } } SPACQ_UNLOCK(); From owner-svn-src-head@FreeBSD.ORG Sun Mar 28 12:55:31 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EC372106566C; Sun, 28 Mar 2010 12:55:31 +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 DC2AB8FC15; Sun, 28 Mar 2010 12:55:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2SCtVDt027466; Sun, 28 Mar 2010 12:55:31 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2SCtVeQ027464; Sun, 28 Mar 2010 12:55:31 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201003281255.o2SCtVeQ027464@svn.freebsd.org> From: Rui Paulo Date: Sun, 28 Mar 2010 12:55: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: r205791 - head/sys/net80211 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Mar 2010 12:55:32 -0000 Author: rpaulo Date: Sun Mar 28 12:55:31 2010 New Revision: 205791 URL: http://svn.freebsd.org/changeset/base/205791 Log: Add a comment explaining the previous commit. Submitted by: sam > Description of fields to fill in above: 76 columns --| > PR: If a GNATS PR is affected by the change. > Submitted by: If someone else sent in the change. > Reviewed by: If someone else reviewed your modification. > Approved by: If you needed approval for this commit. > Obtained from: If the change is from a third party. > MFC after: N [day[s]|week[s]|month[s]]. Request a reminder email. > Security: Vulnerability reference (one per line) or description. > Empty fields above will be automatically removed. M ieee80211_hostap.c Modified: head/sys/net80211/ieee80211_hostap.c Modified: head/sys/net80211/ieee80211_hostap.c ============================================================================== --- head/sys/net80211/ieee80211_hostap.c Sun Mar 28 11:22:38 2010 (r205790) +++ head/sys/net80211/ieee80211_hostap.c Sun Mar 28 12:55:31 2010 (r205791) @@ -883,6 +883,11 @@ hostap_input(struct ieee80211_node *ni, wh = mtod(m, struct ieee80211_frame *); wh->i_fc[1] &= ~IEEE80211_FC1_WEP; } + /* + * Pass the packet to radiotap before calling iv_recv_mgmt(). + * Otherwise iv_recv_mgmt() might pass another packet to + * radiotap, resulting in out of order packet captures. + */ if (ieee80211_radiotap_active_vap(vap)) ieee80211_radiotap_rx(vap, m); need_tap = 0; From owner-svn-src-head@FreeBSD.ORG Sun Mar 28 13:13:23 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 21B961065670; Sun, 28 Mar 2010 13:13:23 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0EA2A8FC17; Sun, 28 Mar 2010 13:13:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2SDDNmT031427; Sun, 28 Mar 2010 13:13:23 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2SDDMh4031408; Sun, 28 Mar 2010 13:13:22 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201003281313.o2SDDMh4031408@svn.freebsd.org> From: Ed Schouten Date: Sun, 28 Mar 2010 13:13: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: r205792 - in head: lib/libc/sys sys/amd64/linux32 sys/compat/freebsd32 sys/compat/linux sys/compat/svr4 sys/i386/ibcs2 sys/i386/linux sys/kern sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Mar 2010 13:13:23 -0000 Author: ed Date: Sun Mar 28 13:13:22 2010 New Revision: 205792 URL: http://svn.freebsd.org/changeset/base/205792 Log: Rename st_*timespec fields to st_*tim for POSIX 2008 compliance. A nice thing about POSIX 2008 is that it finally standardizes a way to obtain file access/modification/change times in sub-second precision, namely using struct timespec, which we already have for a very long time. Unfortunately POSIX uses different names. This commit adds compatibility macros, so existing code should still build properly. Also change all source code in the kernel to work without any of the compatibility macros. This makes it all a less ambiguous. I am also renaming st_birthtime to st_birthtim, even though it was a local extension anyway. It seems Cygwin also has a st_birthtim. Modified: head/lib/libc/sys/stat.2 head/sys/amd64/linux32/linux.h head/sys/compat/freebsd32/freebsd32.h head/sys/compat/freebsd32/freebsd32_misc.c head/sys/compat/linux/linux_stats.c head/sys/compat/svr4/svr4_stat.c head/sys/i386/ibcs2/ibcs2_stat.c head/sys/i386/linux/linux.h head/sys/kern/sys_pipe.c head/sys/kern/tty_pts.c head/sys/kern/uipc_mqueue.c head/sys/kern/uipc_sem.c head/sys/kern/uipc_shm.c head/sys/kern/vfs_syscalls.c head/sys/kern/vfs_vnops.c head/sys/sys/_timespec.h head/sys/sys/stat.h head/sys/sys/timespec.h Modified: head/lib/libc/sys/stat.2 ============================================================================== --- head/lib/libc/sys/stat.2 Sun Mar 28 12:55:31 2010 (r205791) +++ head/lib/libc/sys/stat.2 Sun Mar 28 13:13:22 2010 (r205792) @@ -149,8 +149,8 @@ fields together identify the file unique The time-related fields of .Vt "struct stat" are as follows: -.Bl -tag -width ".Va st_birthtime" -.It Va st_atime +.Bl -tag -width ".Va st_birthtim" +.It Va st_atim Time when file data last accessed. Changed by the .Xr mknod 2 , @@ -159,7 +159,7 @@ Changed by the and .Xr readv 2 system calls. -.It Va st_mtime +.It Va st_mtim Time when file data last modified. Changed by the .Xr mkdir 2 , @@ -170,7 +170,7 @@ Changed by the and .Xr writev 2 system calls. -.It Va st_ctime +.It Va st_ctim Time when file status was last changed (inode data modification). Changed by the .Xr chflags 2 , @@ -191,18 +191,24 @@ Changed by the and .Xr writev 2 system calls. -.It Va st_birthtime +.It Va st_birthtim Time when the inode was created. .El .Pp -If -.Dv _POSIX_SOURCE -is not defined, the time-related fields are defined as: +The following time-related macros are defined for compatibility: .Bd -literal +#define st_atime st_atim.tv_sec +#define st_mtime st_mtim.tv_sec +#define st_ctime st_ctim.tv_sec #ifndef _POSIX_SOURCE -#define st_atime st_atimespec.tv_sec -#define st_mtime st_mtimespec.tv_sec -#define st_ctime st_ctimespec.tv_sec +#define st_birthtime st_birthtim.tv_sec +#endif + +#ifndef _POSIX_SOURCE +#define st_atimespec st_atim +#define st_mtimespec st_mtim +#define st_ctimespec st_ctim +#define st_birthtimespec st_birthtim #endif .Ed .Pp Modified: head/sys/amd64/linux32/linux.h ============================================================================== --- head/sys/amd64/linux32/linux.h Sun Mar 28 12:55:31 2010 (r205791) +++ head/sys/amd64/linux32/linux.h Sun Mar 28 13:13:22 2010 (r205792) @@ -203,9 +203,9 @@ struct l_newstat { l_ulong st_size; l_ulong st_blksize; l_ulong st_blocks; - struct l_timespec st_atimespec; - struct l_timespec st_mtimespec; - struct l_timespec st_ctimespec; + struct l_timespec st_atim; + struct l_timespec st_mtim; + struct l_timespec st_ctim; l_ulong __unused4; l_ulong __unused5; } __packed; @@ -219,9 +219,9 @@ struct l_stat { l_ushort st_gid; l_ushort st_rdev; l_long st_size; - struct l_timespec st_atimespec; - struct l_timespec st_mtimespec; - struct l_timespec st_ctimespec; + struct l_timespec st_atim; + struct l_timespec st_mtim; + struct l_timespec st_ctim; l_long st_blksize; l_long st_blocks; l_ulong st_flags; @@ -242,9 +242,9 @@ struct l_stat64 { l_ulong st_blksize; l_ulong st_blocks; l_ulong __pad4; - struct l_timespec st_atimespec; - struct l_timespec st_mtimespec; - struct l_timespec st_ctimespec; + struct l_timespec st_atim; + struct l_timespec st_mtim; + struct l_timespec st_ctim; l_ulonglong st_ino; } __packed; Modified: head/sys/compat/freebsd32/freebsd32.h ============================================================================== --- head/sys/compat/freebsd32/freebsd32.h Sun Mar 28 12:55:31 2010 (r205791) +++ head/sys/compat/freebsd32/freebsd32.h Sun Mar 28 13:13:22 2010 (r205792) @@ -143,15 +143,15 @@ struct stat32 { uid_t st_uid; gid_t st_gid; dev_t st_rdev; - struct timespec32 st_atimespec; - struct timespec32 st_mtimespec; - struct timespec32 st_ctimespec; + struct timespec32 st_atim; + struct timespec32 st_mtim; + struct timespec32 st_ctim; off_t st_size; int64_t st_blocks; u_int32_t st_blksize; u_int32_t st_flags; u_int32_t st_gen; - struct timespec32 st_birthtimespec; + struct timespec32 st_birthtim; unsigned int :(8 / 2) * (16 - (int)sizeof(struct timespec32)); unsigned int :(8 / 2) * (16 - (int)sizeof(struct timespec32)); }; Modified: head/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_misc.c Sun Mar 28 12:55:31 2010 (r205791) +++ head/sys/compat/freebsd32/freebsd32_misc.c Sun Mar 28 13:13:22 2010 (r205792) @@ -1634,9 +1634,9 @@ copy_stat( struct stat *in, struct stat3 CP(*in, *out, st_uid); CP(*in, *out, st_gid); CP(*in, *out, st_rdev); - TS_CP(*in, *out, st_atimespec); - TS_CP(*in, *out, st_mtimespec); - TS_CP(*in, *out, st_ctimespec); + TS_CP(*in, *out, st_atim); + TS_CP(*in, *out, st_mtim); + TS_CP(*in, *out, st_ctim); CP(*in, *out, st_size); CP(*in, *out, st_blocks); CP(*in, *out, st_blksize); Modified: head/sys/compat/linux/linux_stats.c ============================================================================== --- head/sys/compat/linux/linux_stats.c Sun Mar 28 12:55:31 2010 (r205791) +++ head/sys/compat/linux/linux_stats.c Sun Mar 28 13:13:22 2010 (r205792) @@ -173,9 +173,12 @@ newstat_copyout(struct stat *buf, void * tbuf.st_gid = buf->st_gid; tbuf.st_rdev = buf->st_rdev; tbuf.st_size = buf->st_size; - tbuf.st_atime = buf->st_atime; - tbuf.st_mtime = buf->st_mtime; - tbuf.st_ctime = buf->st_ctime; + tbuf.st_atim.tv_sec = buf->st_atim.tv_sec; + tbuf.st_atim.tv_nsec = buf->st_atim.tv_nsec; + tbuf.st_mtim.tv_sec = buf->st_mtim.tv_sec; + tbuf.st_mtim.tv_nsec = buf->st_mtim.tv_nsec; + tbuf.st_ctim.tv_sec = buf->st_ctim.tv_sec; + tbuf.st_ctim.tv_nsec = buf->st_ctim.tv_nsec; tbuf.st_blksize = buf->st_blksize; tbuf.st_blocks = buf->st_blocks; @@ -260,9 +263,12 @@ stat_copyout(struct stat *buf, void *ubu lbuf.st_size = buf->st_size; else lbuf.st_size = -2; - lbuf.st_atime = buf->st_atime; - lbuf.st_mtime = buf->st_mtime; - lbuf.st_ctime = buf->st_ctime; + lbuf.st_atim.tv_sec = buf->st_atim.tv_sec; + lbuf.st_atim.tv_nsec = buf->st_atim.tv_nsec; + lbuf.st_mtim.tv_sec = buf->st_mtim.tv_sec; + lbuf.st_mtim.tv_nsec = buf->st_mtim.tv_nsec; + lbuf.st_ctim.tv_sec = buf->st_ctim.tv_sec; + lbuf.st_ctim.tv_nsec = buf->st_ctim.tv_nsec; lbuf.st_blksize = buf->st_blksize; lbuf.st_blocks = buf->st_blocks; lbuf.st_flags = buf->st_flags; @@ -498,9 +504,12 @@ stat64_copyout(struct stat *buf, void *u lbuf.st_gid = buf->st_gid; lbuf.st_rdev = buf->st_rdev; lbuf.st_size = buf->st_size; - lbuf.st_atime = buf->st_atime; - lbuf.st_mtime = buf->st_mtime; - lbuf.st_ctime = buf->st_ctime; + lbuf.st_atim.tv_sec = buf->st_atim.tv_sec; + lbuf.st_atim.tv_nsec = buf->st_atim.tv_nsec; + lbuf.st_mtim.tv_sec = buf->st_mtim.tv_sec; + lbuf.st_mtim.tv_nsec = buf->st_mtim.tv_nsec; + lbuf.st_ctim.tv_sec = buf->st_ctim.tv_sec; + lbuf.st_ctim.tv_nsec = buf->st_ctim.tv_nsec; lbuf.st_blksize = buf->st_blksize; lbuf.st_blocks = buf->st_blocks; Modified: head/sys/compat/svr4/svr4_stat.c ============================================================================== --- head/sys/compat/svr4/svr4_stat.c Sun Mar 28 12:55:31 2010 (r205791) +++ head/sys/compat/svr4/svr4_stat.c Sun Mar 28 13:13:22 2010 (r205792) @@ -106,9 +106,9 @@ bsd_to_svr4_stat(st, st4) st4->st_gid = st->st_gid; st4->st_rdev = bsd_to_svr4_odev_t(st->st_rdev); st4->st_size = st->st_size; - st4->st_atim = st->st_atimespec.tv_sec; - st4->st_mtim = st->st_mtimespec.tv_sec; - st4->st_ctim = st->st_ctimespec.tv_sec; + st4->st_atim = st->st_atim.tv_sec; + st4->st_mtim = st->st_mtim.tv_sec; + st4->st_ctim = st->st_ctim.tv_sec; } #endif @@ -127,9 +127,9 @@ bsd_to_svr4_xstat(st, st4) st4->st_gid = st->st_gid; st4->st_rdev = bsd_to_svr4_dev_t(st->st_rdev); st4->st_size = st->st_size; - st4->st_atim = st->st_atimespec; - st4->st_mtim = st->st_mtimespec; - st4->st_ctim = st->st_ctimespec; + st4->st_atim = st->st_atim; + st4->st_mtim = st->st_mtim; + st4->st_ctim = st->st_ctim; st4->st_blksize = st->st_blksize; st4->st_blocks = st->st_blocks; strcpy(st4->st_fstype, "unknown"); @@ -150,9 +150,9 @@ bsd_to_svr4_stat64(st, st4) st4->st_gid = st->st_gid; st4->st_rdev = bsd_to_svr4_dev_t(st->st_rdev); st4->st_size = st->st_size; - st4->st_atim = st->st_atimespec; - st4->st_mtim = st->st_mtimespec; - st4->st_ctim = st->st_ctimespec; + st4->st_atim = st->st_atim; + st4->st_mtim = st->st_mtim; + st4->st_ctim = st->st_ctim; st4->st_blksize = st->st_blksize; st4->st_blocks = st->st_blocks; strcpy(st4->st_fstype, "unknown"); Modified: head/sys/i386/ibcs2/ibcs2_stat.c ============================================================================== --- head/sys/i386/ibcs2/ibcs2_stat.c Sun Mar 28 12:55:31 2010 (r205791) +++ head/sys/i386/ibcs2/ibcs2_stat.c Sun Mar 28 13:13:22 2010 (r205792) @@ -72,9 +72,9 @@ bsd_stat2ibcs_stat(st, st4) st4->st_size = (ibcs2_off_t)st->st_size; else st4->st_size = -2; - st4->st_atim = (ibcs2_time_t)st->st_atime; - st4->st_mtim = (ibcs2_time_t)st->st_mtime; - st4->st_ctim = (ibcs2_time_t)st->st_ctime; + st4->st_atim = (ibcs2_time_t)st->st_atim.tv_sec; + st4->st_mtim = (ibcs2_time_t)st->st_mtim.tv_sec; + st4->st_ctim = (ibcs2_time_t)st->st_ctim.tv_sec; } static int Modified: head/sys/i386/linux/linux.h ============================================================================== --- head/sys/i386/linux/linux.h Sun Mar 28 12:55:31 2010 (r205791) +++ head/sys/i386/linux/linux.h Sun Mar 28 13:13:22 2010 (r205792) @@ -178,9 +178,9 @@ struct l_newstat { l_ulong st_size; l_ulong st_blksize; l_ulong st_blocks; - struct l_timespec st_atimespec; - struct l_timespec st_mtimespec; - struct l_timespec st_ctimespec; + struct l_timespec st_atim; + struct l_timespec st_mtim; + struct l_timespec st_ctim; l_ulong __unused4; l_ulong __unused5; }; @@ -194,9 +194,9 @@ struct l_stat { l_ushort st_gid; l_ushort st_rdev; l_long st_size; - struct l_timespec st_atimespec; - struct l_timespec st_mtimespec; - struct l_timespec st_ctimespec; + struct l_timespec st_atim; + struct l_timespec st_mtim; + struct l_timespec st_ctim; l_long st_blksize; l_long st_blocks; l_ulong st_flags; @@ -217,9 +217,9 @@ struct l_stat64 { l_ulong st_blksize; l_ulong st_blocks; l_ulong __pad4; - struct l_timespec st_atimespec; - struct l_timespec st_mtimespec; - struct l_timespec st_ctimespec; + struct l_timespec st_atim; + struct l_timespec st_mtim; + struct l_timespec st_ctim; l_ulonglong st_ino; }; Modified: head/sys/kern/sys_pipe.c ============================================================================== --- head/sys/kern/sys_pipe.c Sun Mar 28 12:55:31 2010 (r205791) +++ head/sys/kern/sys_pipe.c Sun Mar 28 13:13:22 2010 (r205792) @@ -1428,9 +1428,9 @@ pipe_stat(fp, ub, active_cred, td) else ub->st_size = pipe->pipe_buffer.cnt; ub->st_blocks = (ub->st_size + ub->st_blksize - 1) / ub->st_blksize; - ub->st_atimespec = pipe->pipe_atime; - ub->st_mtimespec = pipe->pipe_mtime; - ub->st_ctimespec = pipe->pipe_ctime; + ub->st_atim = pipe->pipe_atime; + ub->st_mtim = pipe->pipe_mtime; + ub->st_ctim = pipe->pipe_ctime; ub->st_uid = fp->f_cred->cr_uid; ub->st_gid = fp->f_cred->cr_gid; /* Modified: head/sys/kern/tty_pts.c ============================================================================== --- head/sys/kern/tty_pts.c Sun Mar 28 12:55:31 2010 (r205791) +++ head/sys/kern/tty_pts.c Sun Mar 28 13:13:22 2010 (r205792) @@ -556,9 +556,9 @@ ptsdev_stat(struct file *fp, struct stat #endif /* PTS_EXTERNAL */ sb->st_ino = sb->st_rdev = tty_udev(tp); - sb->st_atimespec = dev->si_atime; - sb->st_ctimespec = dev->si_ctime; - sb->st_mtimespec = dev->si_mtime; + sb->st_atim = dev->si_atime; + sb->st_ctim = dev->si_ctime; + sb->st_mtim = dev->si_mtime; sb->st_uid = dev->si_uid; sb->st_gid = dev->si_gid; sb->st_mode = dev->si_mode | S_IFCHR; Modified: head/sys/kern/uipc_mqueue.c ============================================================================== --- head/sys/kern/uipc_mqueue.c Sun Mar 28 12:55:31 2010 (r205791) +++ head/sys/kern/uipc_mqueue.c Sun Mar 28 13:13:22 2010 (r205792) @@ -2447,10 +2447,10 @@ mqf_stat(struct file *fp, struct stat *s struct mqfs_node *pn = fp->f_data; bzero(st, sizeof *st); - st->st_atimespec = pn->mn_atime; - st->st_mtimespec = pn->mn_mtime; - st->st_ctimespec = pn->mn_ctime; - st->st_birthtimespec = pn->mn_birth; + st->st_atim = pn->mn_atime; + st->st_mtim = pn->mn_mtime; + st->st_ctim = pn->mn_ctime; + st->st_birthtim = pn->mn_birth; st->st_uid = pn->mn_uid; st->st_gid = pn->mn_gid; st->st_mode = S_IFIFO | pn->mn_mode; Modified: head/sys/kern/uipc_sem.c ============================================================================== --- head/sys/kern/uipc_sem.c Sun Mar 28 12:55:31 2010 (r205791) +++ head/sys/kern/uipc_sem.c Sun Mar 28 13:13:22 2010 (r205792) @@ -219,10 +219,10 @@ ksem_stat(struct file *fp, struct stat * bzero(sb, sizeof(*sb)); sb->st_mode = S_IFREG | ks->ks_mode; /* XXX */ - sb->st_atimespec = ks->ks_atime; - sb->st_ctimespec = ks->ks_ctime; - sb->st_mtimespec = ks->ks_mtime; - sb->st_birthtimespec = ks->ks_birthtime; + sb->st_atim = ks->ks_atime; + sb->st_ctim = ks->ks_ctime; + sb->st_mtim = ks->ks_mtime; + sb->st_birthtim = ks->ks_birthtime; sb->st_uid = ks->ks_uid; sb->st_gid = ks->ks_gid; Modified: head/sys/kern/uipc_shm.c ============================================================================== --- head/sys/kern/uipc_shm.c Sun Mar 28 12:55:31 2010 (r205791) +++ head/sys/kern/uipc_shm.c Sun Mar 28 13:13:22 2010 (r205792) @@ -219,10 +219,10 @@ shm_stat(struct file *fp, struct stat *s sb->st_blksize = PAGE_SIZE; sb->st_size = shmfd->shm_size; sb->st_blocks = (sb->st_size + sb->st_blksize - 1) / sb->st_blksize; - sb->st_atimespec = shmfd->shm_atime; - sb->st_ctimespec = shmfd->shm_ctime; - sb->st_mtimespec = shmfd->shm_mtime; - sb->st_birthtimespec = shmfd->shm_birthtime; + sb->st_atim = shmfd->shm_atime; + sb->st_ctim = shmfd->shm_ctime; + sb->st_mtim = shmfd->shm_mtime; + sb->st_birthtim = shmfd->shm_birthtime; sb->st_uid = shmfd->shm_uid; sb->st_gid = shmfd->shm_gid; Modified: head/sys/kern/vfs_syscalls.c ============================================================================== --- head/sys/kern/vfs_syscalls.c Sun Mar 28 12:55:31 2010 (r205791) +++ head/sys/kern/vfs_syscalls.c Sun Mar 28 13:13:22 2010 (r205792) @@ -2269,9 +2269,9 @@ cvtstat(st, ost) ost->st_size = st->st_size; else ost->st_size = -2; - ost->st_atime = st->st_atime; - ost->st_mtime = st->st_mtime; - ost->st_ctime = st->st_ctime; + ost->st_atim = st->st_atim; + ost->st_mtim = st->st_mtim; + ost->st_ctim = st->st_ctim; ost->st_blksize = st->st_blksize; ost->st_blocks = st->st_blocks; ost->st_flags = st->st_flags; @@ -2431,15 +2431,15 @@ cvtnstat(sb, nsb) nsb->st_uid = sb->st_uid; nsb->st_gid = sb->st_gid; nsb->st_rdev = sb->st_rdev; - nsb->st_atimespec = sb->st_atimespec; - nsb->st_mtimespec = sb->st_mtimespec; - nsb->st_ctimespec = sb->st_ctimespec; + nsb->st_atim = sb->st_atim; + nsb->st_mtim = sb->st_mtim; + nsb->st_ctim = sb->st_ctim; nsb->st_size = sb->st_size; nsb->st_blocks = sb->st_blocks; nsb->st_blksize = sb->st_blksize; nsb->st_flags = sb->st_flags; nsb->st_gen = sb->st_gen; - nsb->st_birthtimespec = sb->st_birthtimespec; + nsb->st_birthtim = sb->st_birthtim; } #ifndef _SYS_SYSPROTO_H_ Modified: head/sys/kern/vfs_vnops.c ============================================================================== --- head/sys/kern/vfs_vnops.c Sun Mar 28 12:55:31 2010 (r205791) +++ head/sys/kern/vfs_vnops.c Sun Mar 28 13:13:22 2010 (r205792) @@ -782,10 +782,10 @@ vn_stat(vp, sb, active_cred, file_cred, if (vap->va_size > OFF_MAX) return (EOVERFLOW); sb->st_size = vap->va_size; - sb->st_atimespec = vap->va_atime; - sb->st_mtimespec = vap->va_mtime; - sb->st_ctimespec = vap->va_ctime; - sb->st_birthtimespec = vap->va_birthtime; + sb->st_atim = vap->va_atime; + sb->st_mtim = vap->va_mtime; + sb->st_ctim = vap->va_ctime; + sb->st_birthtim = vap->va_birthtime; /* * According to www.opengroup.org, the meaning of st_blksize is Modified: head/sys/sys/_timespec.h ============================================================================== --- head/sys/sys/_timespec.h Sun Mar 28 12:55:31 2010 (r205791) +++ head/sys/sys/_timespec.h Sun Mar 28 13:13:22 2010 (r205792) @@ -31,26 +31,18 @@ * $FreeBSD$ */ -/* - * Prerequisite: - * - * This file must be kept synchronized with . - * It defines a structure which must be a type pun for - * `struct timespec'; this structure is used in header files where - * the ABI uses a `struct timespec' but standards prohibit its - * definition. (Currently only .) - * - * XXX should just declare struct __timespec as necessary. It's simple, - * so is easy to keep synchronized, and hopefully not needed in as many - * places as struct timespec, so we don't need this extra header. - * Perhaps we don't need timespec.h either. - */ - #ifndef _SYS__TIMESPEC_H_ #define _SYS__TIMESPEC_H_ -struct __timespec { - __time_t tv_sec; /* seconds */ +#include + +#ifndef _TIME_T_DECLARED +typedef __time_t time_t; +#define _TIME_T_DECLARED +#endif + +struct timespec { + time_t tv_sec; /* seconds */ long tv_nsec; /* and nanoseconds */ }; Modified: head/sys/sys/stat.h ============================================================================== --- head/sys/sys/stat.h Sun Mar 28 12:55:31 2010 (r205791) +++ head/sys/sys/stat.h Sun Mar 28 13:13:22 2010 (r205792) @@ -39,6 +39,7 @@ #define _SYS_STAT_H_ #include +#include #include #ifndef _BLKSIZE_T_DECLARED @@ -86,11 +87,6 @@ typedef __off_t off_t; #define _OFF_T_DECLARED #endif -#ifndef _TIME_T_DECLARED -typedef __time_t time_t; -#define _TIME_T_DECLARED -#endif - #ifndef _UID_T_DECLARED typedef __uid_t uid_t; #define _UID_T_DECLARED @@ -98,16 +94,11 @@ typedef __uid_t uid_t; #if !defined(_KERNEL) && __BSD_VISIBLE /* - * XXX we need this for struct timespec. We get miscellaneous namespace - * pollution with it. + * XXX We get miscellaneous namespace pollution with this. */ #include #endif -#if !__BSD_VISIBLE -#include -#endif - #if __BSD_VISIBLE struct ostat { __uint16_t st_dev; /* inode's device */ @@ -118,9 +109,9 @@ struct ostat { __uint16_t st_gid; /* group ID of the file's group */ __uint16_t st_rdev; /* device type */ __int32_t st_size; /* file size, in bytes */ - struct timespec st_atimespec; /* time of last access */ - struct timespec st_mtimespec; /* time of last data modification */ - struct timespec st_ctimespec; /* time of last file status change */ + struct timespec st_atim; /* time of last access */ + struct timespec st_mtim; /* time of last data modification */ + struct timespec st_ctim; /* time of last file status change */ __int32_t st_blksize; /* optimal blocksize for I/O */ __int32_t st_blocks; /* blocks allocated for file */ fflags_t st_flags; /* user defined flags for file */ @@ -136,28 +127,18 @@ struct stat { uid_t st_uid; /* user ID of the file's owner */ gid_t st_gid; /* group ID of the file's group */ __dev_t st_rdev; /* device type */ -#if __BSD_VISIBLE - struct timespec st_atimespec; /* time of last access */ - struct timespec st_mtimespec; /* time of last data modification */ - struct timespec st_ctimespec; /* time of last file status change */ -#else - time_t st_atime; /* time of last access */ - long __st_atimensec; /* nsec of last access */ - time_t st_mtime; /* time of last data modification */ - long __st_mtimensec; /* nsec of last data modification */ - time_t st_ctime; /* time of last file status change */ - long __st_ctimensec; /* nsec of last file status change */ -#endif + struct timespec st_atim; /* time of last access */ + struct timespec st_mtim; /* time of last data modification */ + struct timespec st_ctim; /* time of last file status change */ off_t st_size; /* file size, in bytes */ blkcnt_t st_blocks; /* blocks allocated for file */ blksize_t st_blksize; /* optimal blocksize for I/O */ fflags_t st_flags; /* user defined flags for file */ __uint32_t st_gen; /* file generation number */ __int32_t st_lspare; -#if __BSD_VISIBLE - struct timespec st_birthtimespec; /* time of file creation */ + struct timespec st_birthtim; /* time of file creation */ /* - * Explicitly pad st_birthtimespec to 16 bytes so that the size of + * Explicitly pad st_birthtim to 16 bytes so that the size of * struct stat is backwards compatible. We use bitfields instead * of an array of chars so that this doesn't require a C99 compiler * to compile if the size of the padding is 0. We use 2 bitfields @@ -166,12 +147,6 @@ struct stat { */ unsigned int :(8 / 2) * (16 - (int)sizeof(struct timespec)); unsigned int :(8 / 2) * (16 - (int)sizeof(struct timespec)); -#else - time_t st_birthtime; /* time of file creation */ - long st_birthtimensec; /* nsec of file creation */ - unsigned int :(8 / 2) * (16 - (int)sizeof(struct __timespec)); - unsigned int :(8 / 2) * (16 - (int)sizeof(struct __timespec)); -#endif }; #if __BSD_VISIBLE @@ -183,15 +158,15 @@ struct nstat { uid_t st_uid; /* user ID of the file's owner */ gid_t st_gid; /* group ID of the file's group */ __dev_t st_rdev; /* device type */ - struct timespec st_atimespec; /* time of last access */ - struct timespec st_mtimespec; /* time of last data modification */ - struct timespec st_ctimespec; /* time of last file status change */ + struct timespec st_atim; /* time of last access */ + struct timespec st_mtim; /* time of last data modification */ + struct timespec st_ctim; /* time of last file status change */ off_t st_size; /* file size, in bytes */ blkcnt_t st_blocks; /* blocks allocated for file */ blksize_t st_blksize; /* optimal blocksize for I/O */ fflags_t st_flags; /* user defined flags for file */ __uint32_t st_gen; /* file generation number */ - struct timespec st_birthtimespec; /* time of file creation */ + struct timespec st_birthtim; /* time of file creation */ /* * See above about the following padding. */ @@ -200,13 +175,23 @@ struct nstat { }; #endif +#ifndef _KERNEL +#define st_atime st_atim.tv_sec +#define st_mtime st_mtim.tv_sec +#define st_ctime st_ctim.tv_sec #if __BSD_VISIBLE -#define st_atime st_atimespec.tv_sec -#define st_mtime st_mtimespec.tv_sec -#define st_ctime st_ctimespec.tv_sec -#define st_birthtime st_birthtimespec.tv_sec +#define st_birthtime st_birthtim.tv_sec #endif +/* For compatibility. */ +#if __BSD_VISIBLE +#define st_atimespec st_atim +#define st_mtimespec st_mtim +#define st_ctimespec st_ctim +#define st_birthtimespec st_birthtim +#endif +#endif /* !_KERNEL */ + #define S_ISUID 0004000 /* set user id on execution */ #define S_ISGID 0002000 /* set group id on execution */ #if __BSD_VISIBLE Modified: head/sys/sys/timespec.h ============================================================================== --- head/sys/sys/timespec.h Sun Mar 28 12:55:31 2010 (r205791) +++ head/sys/sys/timespec.h Sun Mar 28 13:13:22 2010 (r205792) @@ -31,22 +31,11 @@ * $FreeBSD$ */ -/* - * Prerequisites: , - */ - #ifndef _SYS_TIMESPEC_H_ #define _SYS_TIMESPEC_H_ -#ifndef _TIME_T_DECLARED -typedef __time_t time_t; -#define _TIME_T_DECLARED -#endif - -struct timespec { - time_t tv_sec; /* seconds */ - long tv_nsec; /* and nanoseconds */ -}; +#include +#include #if __BSD_VISIBLE #define TIMEVAL_TO_TIMESPEC(tv, ts) \ From owner-svn-src-head@FreeBSD.ORG Sun Mar 28 13:16:09 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E3047106566C; Sun, 28 Mar 2010 13:16:08 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CF6278FC0C; Sun, 28 Mar 2010 13:16:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2SDG889032057; Sun, 28 Mar 2010 13:16:08 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2SDG8oo032043; Sun, 28 Mar 2010 13:16:08 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201003281316.o2SDG8oo032043@svn.freebsd.org> From: Ed Schouten Date: Sun, 28 Mar 2010 13:16: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: r205793 - in head: bin/cp bin/ls bin/rcp bin/test gnu/usr.bin/diff usr.bin/compress usr.bin/gzip usr.bin/kdump usr.bin/mail usr.bin/touch usr.sbin/mtree X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Mar 2010 13:16:09 -0000 Author: ed Date: Sun Mar 28 13:16:08 2010 New Revision: 205793 URL: http://svn.freebsd.org/changeset/base/205793 Log: Change all our own code to use st_*tim instead of st_*timespec. Also remove some local patches to diff(1) which are now unneeded. Modified: head/bin/cp/utils.c head/bin/ls/cmp.c head/bin/rcp/rcp.c head/bin/test/test.c head/gnu/usr.bin/diff/context.c.diff head/gnu/usr.bin/diff/diff.c.diff head/usr.bin/compress/compress.c head/usr.bin/gzip/gzip.c head/usr.bin/kdump/kdump.c head/usr.bin/mail/util.c head/usr.bin/touch/touch.c head/usr.sbin/mtree/compare.c head/usr.sbin/mtree/create.c Modified: head/bin/cp/utils.c ============================================================================== --- head/bin/cp/utils.c Sun Mar 28 13:13:22 2010 (r205792) +++ head/bin/cp/utils.c Sun Mar 28 13:16:08 2010 (r205793) @@ -323,8 +323,8 @@ setfile(struct stat *fs, int fd) fs->st_mode &= S_ISUID | S_ISGID | S_ISVTX | S_IRWXU | S_IRWXG | S_IRWXO; - TIMESPEC_TO_TIMEVAL(&tv[0], &fs->st_atimespec); - TIMESPEC_TO_TIMEVAL(&tv[1], &fs->st_mtimespec); + TIMESPEC_TO_TIMEVAL(&tv[0], &fs->st_atim); + TIMESPEC_TO_TIMEVAL(&tv[1], &fs->st_mtim); if (islink ? lutimes(to.p_path, tv) : utimes(to.p_path, tv)) { warn("%sutimes: %s", islink ? "l" : "", to.p_path); rval = 1; Modified: head/bin/ls/cmp.c ============================================================================== --- head/bin/ls/cmp.c Sun Mar 28 13:13:22 2010 (r205792) +++ head/bin/ls/cmp.c Sun Mar 28 13:16:08 2010 (r205793) @@ -66,17 +66,17 @@ int modcmp(const FTSENT *a, const FTSENT *b) { - if (b->fts_statp->st_mtimespec.tv_sec > - a->fts_statp->st_mtimespec.tv_sec) + if (b->fts_statp->st_mtim.tv_sec > + a->fts_statp->st_mtim.tv_sec) return (1); - if (b->fts_statp->st_mtimespec.tv_sec < - a->fts_statp->st_mtimespec.tv_sec) + if (b->fts_statp->st_mtim.tv_sec < + a->fts_statp->st_mtim.tv_sec) return (-1); - if (b->fts_statp->st_mtimespec.tv_nsec > - a->fts_statp->st_mtimespec.tv_nsec) + if (b->fts_statp->st_mtim.tv_nsec > + a->fts_statp->st_mtim.tv_nsec) return (1); - if (b->fts_statp->st_mtimespec.tv_nsec < - a->fts_statp->st_mtimespec.tv_nsec) + if (b->fts_statp->st_mtim.tv_nsec < + a->fts_statp->st_mtim.tv_nsec) return (-1); return (strcoll(a->fts_name, b->fts_name)); } @@ -92,17 +92,17 @@ int acccmp(const FTSENT *a, const FTSENT *b) { - if (b->fts_statp->st_atimespec.tv_sec > - a->fts_statp->st_atimespec.tv_sec) + if (b->fts_statp->st_atim.tv_sec > + a->fts_statp->st_atim.tv_sec) return (1); - if (b->fts_statp->st_atimespec.tv_sec < - a->fts_statp->st_atimespec.tv_sec) + if (b->fts_statp->st_atim.tv_sec < + a->fts_statp->st_atim.tv_sec) return (-1); - if (b->fts_statp->st_atimespec.tv_nsec > - a->fts_statp->st_atimespec.tv_nsec) + if (b->fts_statp->st_atim.tv_nsec > + a->fts_statp->st_atim.tv_nsec) return (1); - if (b->fts_statp->st_atimespec.tv_nsec < - a->fts_statp->st_atimespec.tv_nsec) + if (b->fts_statp->st_atim.tv_nsec < + a->fts_statp->st_atim.tv_nsec) return (-1); return (strcoll(a->fts_name, b->fts_name)); } @@ -118,17 +118,17 @@ int birthcmp(const FTSENT *a, const FTSENT *b) { - if (b->fts_statp->st_birthtimespec.tv_sec > - a->fts_statp->st_birthtimespec.tv_sec) + if (b->fts_statp->st_birthtim.tv_sec > + a->fts_statp->st_birthtim.tv_sec) return (1); - if (b->fts_statp->st_birthtimespec.tv_sec < - a->fts_statp->st_birthtimespec.tv_sec) + if (b->fts_statp->st_birthtim.tv_sec < + a->fts_statp->st_birthtim.tv_sec) return (-1); - if (b->fts_statp->st_birthtimespec.tv_nsec > - a->fts_statp->st_birthtimespec.tv_nsec) + if (b->fts_statp->st_birthtim.tv_nsec > + a->fts_statp->st_birthtim.tv_nsec) return (1); - if (b->fts_statp->st_birthtimespec.tv_nsec < - a->fts_statp->st_birthtimespec.tv_nsec) + if (b->fts_statp->st_birthtim.tv_nsec < + a->fts_statp->st_birthtim.tv_nsec) return (-1); return (strcoll(a->fts_name, b->fts_name)); } @@ -144,17 +144,17 @@ int statcmp(const FTSENT *a, const FTSENT *b) { - if (b->fts_statp->st_ctimespec.tv_sec > - a->fts_statp->st_ctimespec.tv_sec) + if (b->fts_statp->st_ctim.tv_sec > + a->fts_statp->st_ctim.tv_sec) return (1); - if (b->fts_statp->st_ctimespec.tv_sec < - a->fts_statp->st_ctimespec.tv_sec) + if (b->fts_statp->st_ctim.tv_sec < + a->fts_statp->st_ctim.tv_sec) return (-1); - if (b->fts_statp->st_ctimespec.tv_nsec > - a->fts_statp->st_ctimespec.tv_nsec) + if (b->fts_statp->st_ctim.tv_nsec > + a->fts_statp->st_ctim.tv_nsec) return (1); - if (b->fts_statp->st_ctimespec.tv_nsec < - a->fts_statp->st_ctimespec.tv_nsec) + if (b->fts_statp->st_ctim.tv_nsec < + a->fts_statp->st_ctim.tv_nsec) return (-1); return (strcoll(a->fts_name, b->fts_name)); } Modified: head/bin/rcp/rcp.c ============================================================================== --- head/bin/rcp/rcp.c Sun Mar 28 13:13:22 2010 (r205792) +++ head/bin/rcp/rcp.c Sun Mar 28 13:16:08 2010 (r205793) @@ -390,8 +390,8 @@ syserr: run_err("%s: %s", name, strerr * versions expecting microseconds. */ (void)snprintf(buf, sizeof(buf), "T%ld 0 %ld 0\n", - (long)stb.st_mtimespec.tv_sec, - (long)stb.st_atimespec.tv_sec); + (long)stb.st_mtim.tv_sec, + (long)stb.st_atim.tv_sec); (void)write(rem, buf, strlen(buf)); if (response() < 0) goto next; @@ -454,8 +454,8 @@ rsource(char *name, struct stat *statp) last++; if (pflag) { (void)snprintf(path, sizeof(path), "T%ld 0 %ld 0\n", - (long)statp->st_mtimespec.tv_sec, - (long)statp->st_atimespec.tv_sec); + (long)statp->st_mtim.tv_sec, + (long)statp->st_atim.tv_sec); (void)write(rem, path, strlen(path)); if (response() < 0) { closedir(dirp); Modified: head/bin/test/test.c ============================================================================== --- head/bin/test/test.c Sun Mar 28 13:13:22 2010 (r205792) +++ head/bin/test/test.c Sun Mar 28 13:16:08 2010 (r205793) @@ -572,12 +572,12 @@ newerf (const char *f1, const char *f2) if (stat(f1, &b1) != 0 || stat(f2, &b2) != 0) return 0; - if (b1.st_mtimespec.tv_sec > b2.st_mtimespec.tv_sec) + if (b1.st_mtim.tv_sec > b2.st_mtim.tv_sec) return 1; - if (b1.st_mtimespec.tv_sec < b2.st_mtimespec.tv_sec) + if (b1.st_mtim.tv_sec < b2.st_mtim.tv_sec) return 0; - return (b1.st_mtimespec.tv_nsec > b2.st_mtimespec.tv_nsec); + return (b1.st_mtim.tv_nsec > b2.st_mtim.tv_nsec); } static int Modified: head/gnu/usr.bin/diff/context.c.diff ============================================================================== --- head/gnu/usr.bin/diff/context.c.diff Sun Mar 28 13:13:22 2010 (r205792) +++ head/gnu/usr.bin/diff/context.c.diff Sun Mar 28 13:16:08 2010 (r205793) @@ -15,7 +15,7 @@ $FreeBSD$ INT_STRLEN_BOUND (time_t) + 11)]; struct tm const *tm = localtime (&inf->stat.st_mtime); - int nsec = TIMESPEC_NS (inf->stat.st_mtim); -+ long nsec = TIMESPEC_NS (inf->stat.st_mtimespec); ++ long nsec = TIMESPEC_NS (inf->stat.st_mtim); if (! (tm && nstrftime (buf, sizeof buf, time_format, tm, 0, nsec))) { - long int sec = inf->stat.st_mtime; Modified: head/gnu/usr.bin/diff/diff.c.diff ============================================================================== --- head/gnu/usr.bin/diff/diff.c.diff Sun Mar 28 13:13:22 2010 (r205792) +++ head/gnu/usr.bin/diff/diff.c.diff Sun Mar 28 13:16:08 2010 (r205793) @@ -49,21 +49,3 @@ $FreeBSD$ output_style = style; } } -@@ -997,7 +1001,7 @@ - #ifdef ST_MTIM_NSEC - - # if HAVE_CLOCK_GETTIME && defined CLOCK_REALTIME -- if (clock_gettime (CLOCK_REALTIME, &st->st_mtim) == 0) -+ if (clock_gettime (CLOCK_REALTIME, &st->st_mtimespec) == 0) - return; - # endif - -@@ -1007,7 +1011,7 @@ - if (gettimeofday (&timeval, 0) == 0) - { - st->st_mtime = timeval.tv_sec; -- st->st_mtim.ST_MTIM_NSEC = timeval.tv_usec * 1000; -+ st->st_mtimespec.ST_MTIM_NSEC = timeval.tv_usec * 1000; - return; - } - } Modified: head/usr.bin/compress/compress.c ============================================================================== --- head/usr.bin/compress/compress.c Sun Mar 28 13:13:22 2010 (r205792) +++ head/usr.bin/compress/compress.c Sun Mar 28 13:16:08 2010 (r205793) @@ -368,8 +368,8 @@ setfile(const char *name, struct stat *f fs->st_mode &= S_ISUID|S_ISGID|S_IRWXU|S_IRWXG|S_IRWXO; - TIMESPEC_TO_TIMEVAL(&tv[0], &fs->st_atimespec); - TIMESPEC_TO_TIMEVAL(&tv[1], &fs->st_mtimespec); + TIMESPEC_TO_TIMEVAL(&tv[0], &fs->st_atim); + TIMESPEC_TO_TIMEVAL(&tv[1], &fs->st_mtim); if (utimes(name, tv)) cwarn("utimes: %s", name); Modified: head/usr.bin/gzip/gzip.c ============================================================================== --- head/usr.bin/gzip/gzip.c Sun Mar 28 13:13:22 2010 (r205792) +++ head/usr.bin/gzip/gzip.c Sun Mar 28 13:16:08 2010 (r205793) @@ -1088,8 +1088,8 @@ copymodes(int fd, const struct stat *sbp if (fchmod(fd, sb.st_mode) < 0) maybe_warn("couldn't fchmod: %s", file); - TIMESPEC_TO_TIMEVAL(×[0], &sb.st_atimespec); - TIMESPEC_TO_TIMEVAL(×[1], &sb.st_mtimespec); + TIMESPEC_TO_TIMEVAL(×[0], &sb.st_atim); + TIMESPEC_TO_TIMEVAL(×[1], &sb.st_mtim); if (futimes(fd, times) < 0) maybe_warn("couldn't utimes: %s", file); Modified: head/usr.bin/kdump/kdump.c ============================================================================== --- head/usr.bin/kdump/kdump.c Sun Mar 28 13:13:22 2010 (r205792) +++ head/usr.bin/kdump/kdump.c Sun Mar 28 13:16:08 2010 (r205793) @@ -1270,50 +1270,50 @@ ktrstat(struct stat *statp) printf("rdev=%ju, ", (uintmax_t)statp->st_rdev); printf("atime="); if (resolv == 0) - printf("%jd", (intmax_t)statp->st_atimespec.tv_sec); + printf("%jd", (intmax_t)statp->st_atim.tv_sec); else { - tm = localtime(&statp->st_atimespec.tv_sec); + tm = localtime(&statp->st_atim.tv_sec); (void)strftime(timestr, sizeof(timestr), TIME_FORMAT, tm); printf("\"%s\"", timestr); } - if (statp->st_atimespec.tv_nsec != 0) - printf(".%09ld, ", statp->st_atimespec.tv_nsec); + if (statp->st_atim.tv_nsec != 0) + printf(".%09ld, ", statp->st_atim.tv_nsec); else printf(", "); printf("stime="); if (resolv == 0) - printf("%jd", (intmax_t)statp->st_mtimespec.tv_sec); + printf("%jd", (intmax_t)statp->st_mtim.tv_sec); else { - tm = localtime(&statp->st_mtimespec.tv_sec); + tm = localtime(&statp->st_mtim.tv_sec); (void)strftime(timestr, sizeof(timestr), TIME_FORMAT, tm); printf("\"%s\"", timestr); } - if (statp->st_mtimespec.tv_nsec != 0) - printf(".%09ld, ", statp->st_mtimespec.tv_nsec); + if (statp->st_mtim.tv_nsec != 0) + printf(".%09ld, ", statp->st_mtim.tv_nsec); else printf(", "); printf("ctime="); if (resolv == 0) - printf("%jd", (intmax_t)statp->st_ctimespec.tv_sec); + printf("%jd", (intmax_t)statp->st_ctim.tv_sec); else { - tm = localtime(&statp->st_ctimespec.tv_sec); + tm = localtime(&statp->st_ctim.tv_sec); (void)strftime(timestr, sizeof(timestr), TIME_FORMAT, tm); printf("\"%s\"", timestr); } - if (statp->st_ctimespec.tv_nsec != 0) - printf(".%09ld, ", statp->st_ctimespec.tv_nsec); + if (statp->st_ctim.tv_nsec != 0) + printf(".%09ld, ", statp->st_ctim.tv_nsec); else printf(", "); printf("birthtime="); if (resolv == 0) - printf("%jd", (intmax_t)statp->st_birthtimespec.tv_sec); + printf("%jd", (intmax_t)statp->st_birthtim.tv_sec); else { - tm = localtime(&statp->st_birthtimespec.tv_sec); + tm = localtime(&statp->st_birthtim.tv_sec); (void)strftime(timestr, sizeof(timestr), TIME_FORMAT, tm); printf("\"%s\"", timestr); } - if (statp->st_birthtimespec.tv_nsec != 0) - printf(".%09ld, ", statp->st_birthtimespec.tv_nsec); + if (statp->st_birthtim.tv_nsec != 0) + printf(".%09ld, ", statp->st_birthtim.tv_nsec); else printf(", "); printf("size=%jd, blksize=%ju, blocks=%jd, flags=0x%x", Modified: head/usr.bin/mail/util.c ============================================================================== --- head/usr.bin/mail/util.c Sun Mar 28 13:13:22 2010 (r205792) +++ head/usr.bin/mail/util.c Sun Mar 28 13:16:08 2010 (r205793) @@ -349,7 +349,7 @@ alter(name) return; (void)gettimeofday(&tv[0], (struct timezone *)NULL); tv[0].tv_sec++; - TIMESPEC_TO_TIMEVAL(&tv[1], &sb.st_mtimespec); + TIMESPEC_TO_TIMEVAL(&tv[1], &sb.st_mtim); (void)utimes(name, tv); } Modified: head/usr.bin/touch/touch.c ============================================================================== --- head/usr.bin/touch/touch.c Sun Mar 28 13:13:22 2010 (r205792) +++ head/usr.bin/touch/touch.c Sun Mar 28 13:16:08 2010 (r205793) @@ -187,9 +187,9 @@ main(int argc, char *argv[]) } if (!aflag) - TIMESPEC_TO_TIMEVAL(&tv[0], &sb.st_atimespec); + TIMESPEC_TO_TIMEVAL(&tv[0], &sb.st_atim); if (!mflag) - TIMESPEC_TO_TIMEVAL(&tv[1], &sb.st_mtimespec); + TIMESPEC_TO_TIMEVAL(&tv[1], &sb.st_mtim); /* * We're adjusting the times based on the file times, not a @@ -197,11 +197,11 @@ main(int argc, char *argv[]) */ if (Aflag) { if (aflag) { - TIMESPEC_TO_TIMEVAL(&tv[0], &sb.st_atimespec); + TIMESPEC_TO_TIMEVAL(&tv[0], &sb.st_atim); tv[0].tv_sec += Aflag; } if (mflag) { - TIMESPEC_TO_TIMEVAL(&tv[1], &sb.st_mtimespec); + TIMESPEC_TO_TIMEVAL(&tv[1], &sb.st_mtim); tv[1].tv_sec += Aflag; } } @@ -368,8 +368,8 @@ stime_file(char *fname, struct timeval * if (stat(fname, &sb)) err(1, "%s", fname); - TIMESPEC_TO_TIMEVAL(tvp, &sb.st_atimespec); - TIMESPEC_TO_TIMEVAL(tvp + 1, &sb.st_mtimespec); + TIMESPEC_TO_TIMEVAL(tvp, &sb.st_atim); + TIMESPEC_TO_TIMEVAL(tvp + 1, &sb.st_mtim); } int Modified: head/usr.sbin/mtree/compare.c ============================================================================== --- head/usr.sbin/mtree/compare.c Sun Mar 28 13:13:22 2010 (r205792) +++ head/usr.sbin/mtree/compare.c Sun Mar 28 13:16:08 2010 (r205793) @@ -181,13 +181,13 @@ typeerr: LABEL; * Catches nano-second differences, but doesn't display them. */ if ((s->flags & F_TIME) && - ((s->st_mtimespec.tv_sec != p->fts_statp->st_mtimespec.tv_sec) || - (s->st_mtimespec.tv_nsec != p->fts_statp->st_mtimespec.tv_nsec))) { + ((s->st_mtimespec.tv_sec != p->fts_statp->st_mtim.tv_sec) || + (s->st_mtimespec.tv_nsec != p->fts_statp->st_mtim.tv_nsec))) { LABEL; (void)printf("%smodification time expected %.24s ", tab, ctime(&s->st_mtimespec.tv_sec)); (void)printf("found %.24s", - ctime(&p->fts_statp->st_mtimespec.tv_sec)); + ctime(&p->fts_statp->st_mtim.tv_sec)); if (uflag) { tv[0].tv_sec = s->st_mtimespec.tv_sec; tv[0].tv_usec = s->st_mtimespec.tv_nsec / 1000; Modified: head/usr.sbin/mtree/create.c ============================================================================== --- head/usr.sbin/mtree/create.c Sun Mar 28 13:13:22 2010 (r205792) +++ head/usr.sbin/mtree/create.c Sun Mar 28 13:16:08 2010 (r205793) @@ -213,8 +213,8 @@ statf(int indent, FTSENT *p) (intmax_t)p->fts_statp->st_size); if (keys & F_TIME) output(indent, &offset, "time=%ld.%09ld", - (long)p->fts_statp->st_mtimespec.tv_sec, - p->fts_statp->st_mtimespec.tv_nsec); + (long)p->fts_statp->st_mtim.tv_sec, + p->fts_statp->st_mtim.tv_nsec); if (keys & F_CKSUM && S_ISREG(p->fts_statp->st_mode)) { if ((fd = open(p->fts_accpath, O_RDONLY, 0)) < 0 || crc(fd, &val, &len)) From owner-svn-src-head@FreeBSD.ORG Sun Mar 28 13:40:16 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 21DF91065676; Sun, 28 Mar 2010 13:40:16 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EA7018FC1E; Sun, 28 Mar 2010 13:40:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2SDeFCn037426; Sun, 28 Mar 2010 13:40:15 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2SDeFXD037424; Sun, 28 Mar 2010 13:40:15 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201003281340.o2SDeFXD037424@svn.freebsd.org> From: Ed Schouten Date: Sun, 28 Mar 2010 13:40: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: r205794 - head/lib/libc/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Mar 2010 13:40:16 -0000 Author: ed Date: Sun Mar 28 13:40:13 2010 New Revision: 205794 URL: http://svn.freebsd.org/changeset/base/205794 Log: Don't forget to bump the date in the man page. Modified: head/lib/libc/sys/stat.2 Modified: head/lib/libc/sys/stat.2 ============================================================================== --- head/lib/libc/sys/stat.2 Sun Mar 28 13:16:08 2010 (r205793) +++ head/lib/libc/sys/stat.2 Sun Mar 28 13:40:13 2010 (r205794) @@ -28,7 +28,7 @@ .\" @(#)stat.2 8.4 (Berkeley) 5/1/95 .\" $FreeBSD$ .\" -.Dd April 10, 2008 +.Dd March 28, 2010 .Dt STAT 2 .Os .Sh NAME From owner-svn-src-head@FreeBSD.ORG Sun Mar 28 17:17:33 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1D7F5106564A; Sun, 28 Mar 2010 17:17:33 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0BC378FC26; Sun, 28 Mar 2010 17:17:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2SHHWP3085203; Sun, 28 Mar 2010 17:17:32 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2SHHW4f085202; Sun, 28 Mar 2010 17:17:32 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201003281717.o2SHHW4f085202@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 28 Mar 2010 17:17: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: r205795 - head/sys/powerpc/ofw X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Mar 2010 17:17:33 -0000 Author: nwhitehorn Date: Sun Mar 28 17:17:32 2010 New Revision: 205795 URL: http://svn.freebsd.org/changeset/base/205795 Log: Set hw.ofwfb.relax_mmap=1 by default. While these checks may be a good idea in principle, X does not work without them on basically any hardware, and this is probably the most frequent problem people run into on PowerPC. Prodded by: rnoland MFC after: 1 week Modified: head/sys/powerpc/ofw/ofw_syscons.c Modified: head/sys/powerpc/ofw/ofw_syscons.c ============================================================================== --- head/sys/powerpc/ofw/ofw_syscons.c Sun Mar 28 13:40:13 2010 (r205794) +++ head/sys/powerpc/ofw/ofw_syscons.c Sun Mar 28 17:17:32 2010 (r205795) @@ -55,10 +55,10 @@ __FBSDID("$FreeBSD$"); #include #include -static int ofwfb_ignore_mmap_checks; +static int ofwfb_ignore_mmap_checks = 1; SYSCTL_NODE(_hw, OID_AUTO, ofwfb, CTLFLAG_RD, 0, "ofwfb"); SYSCTL_INT(_hw_ofwfb, OID_AUTO, relax_mmap, CTLFLAG_RW, - &ofwfb_ignore_mmap_checks, 0, "relax mmap bounds checking"); + &ofwfb_ignore_mmap_checks, 0, "relaxed mmap bounds checking"); extern u_char dflt_font_16[]; extern u_char dflt_font_14[]; From owner-svn-src-head@FreeBSD.ORG Sun Mar 28 17:29:15 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DFBE7106566C; Sun, 28 Mar 2010 17:29:15 +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 CE20F8FC13; Sun, 28 Mar 2010 17:29:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2SHTF3m087816; Sun, 28 Mar 2010 17:29:15 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2SHTFg3087814; Sun, 28 Mar 2010 17:29:15 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201003281729.o2SHTFg3087814@svn.freebsd.org> From: Edward Tomasz Napierala Date: Sun, 28 Mar 2010 17:29: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: r205796 - head/lib/libc/posix1e X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Mar 2010 17:29:16 -0000 Author: trasz Date: Sun Mar 28 17:29:15 2010 New Revision: 205796 URL: http://svn.freebsd.org/changeset/base/205796 Log: Make acl_to_text_np(3) not crash on long group or user names in NFSv4 ACLs. PR: amd64/145091 MFC after: 2 weeks Modified: head/lib/libc/posix1e/acl_to_text_nfs4.c Modified: head/lib/libc/posix1e/acl_to_text_nfs4.c ============================================================================== --- head/lib/libc/posix1e/acl_to_text_nfs4.c Sun Mar 28 17:17:32 2010 (r205795) +++ head/lib/libc/posix1e/acl_to_text_nfs4.c Sun Mar 28 17:29:15 2010 (r205796) @@ -167,7 +167,7 @@ format_additional_id(char *str, size_t s static int format_entry(char *str, size_t size, const acl_entry_t entry, int flags) { - size_t off = 0, padding_length, maximum_who_field_length = 18; + size_t off = 0, min_who_field_length = 18; acl_permset_t permset; acl_flagset_t flagset; int error, len; @@ -188,12 +188,9 @@ format_entry(char *str, size_t size, con if (error) return (error); len = strlen(buf); - padding_length = maximum_who_field_length - len; - if (padding_length > 0) { - memset(str, ' ', padding_length); - off += padding_length; - } - off += snprintf(str + off, size - off, "%s:", buf); + if (len < min_who_field_length) + len = min_who_field_length; + off += snprintf(str + off, size - off, "%*s:", len, buf); error = _nfs4_format_access_mask(buf, sizeof(buf), *permset, flags & ACL_TEXT_VERBOSE); From owner-svn-src-head@FreeBSD.ORG Sun Mar 28 20:02:14 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 01534106566B; Sun, 28 Mar 2010 20:02:14 +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 E5B1F8FC14; Sun, 28 Mar 2010 20:02:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2SK2DLf029785; Sun, 28 Mar 2010 20:02:13 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2SK2DMo029783; Sun, 28 Mar 2010 20:02:13 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201003282002.o2SK2DMo029783@svn.freebsd.org> From: Andrew Thompson Date: Sun, 28 Mar 2010 20: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: r205801 - head/sys/dev/usb X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Mar 2010 20:02:14 -0000 Author: thompsa Date: Sun Mar 28 20:02:13 2010 New Revision: 205801 URL: http://svn.freebsd.org/changeset/base/205801 Log: Add a couple of usb product IDs. Submitted by: Dmitry Luhtionov @ gmail.com Modified: head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Sun Mar 28 19:34:57 2010 (r205800) +++ head/sys/dev/usb/usbdevs Sun Mar 28 20:02:13 2010 (r205801) @@ -2516,12 +2516,14 @@ product QUALCOMMINC E2003 0x2003 3G mode /* Quanta products */ /* Quanta products */ +product QUANTA RW6815_1 0x00ce HP iPAQ rw6815 product QUANTA RT3070 0x0304 RT3070 product QUANTA Q101 0xea02 HSDPA modem product QUANTA Q111 0xea03 HSDPA modem product QUANTA GLX 0xea04 HSDPA modem product QUANTA GKE 0xea05 HSDPA modem product QUANTA GLE 0xea06 HSDPA modem +product QUANTA RW6815_2 0xf003 HP iPAQ rw6815 /* Qtronix products */ product QTRONIX 980N 0x2011 Scorpion-980N keyboard @@ -2729,6 +2731,7 @@ product SIERRA AIRCARD875 0x6820 Aircard product SIERRA TRUINSTALL 0x0fff Aircard Tru Installer /* Sigmatel products */ +product SIGMATEL WBT_3052 0x4200 WBT-3052 IrDA/USB Bridge product SIGMATEL I_BEAD100 0x8008 i-Bead 100 MP3 Player /* SIIG products */ From owner-svn-src-head@FreeBSD.ORG Sun Mar 28 20:02:50 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 92A1B106564A; Sun, 28 Mar 2010 20:02:50 +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 82C568FC0A; Sun, 28 Mar 2010 20:02:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2SK2obv029952; Sun, 28 Mar 2010 20:02:50 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2SK2oG2029949; Sun, 28 Mar 2010 20:02:50 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201003282002.o2SK2oG2029949@svn.freebsd.org> From: Andrew Thompson Date: Sun, 28 Mar 2010 20:02: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: r205802 - head/sys/dev/usb/controller X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Mar 2010 20:02:50 -0000 Author: thompsa Date: Sun Mar 28 20:02:50 2010 New Revision: 205802 URL: http://svn.freebsd.org/changeset/base/205802 Log: Add PCI IDs for two more nForce controllers. Submitted by: Dmitry Luhtionov @ gmail.com Modified: head/sys/dev/usb/controller/ehci_pci.c head/sys/dev/usb/controller/ohci_pci.c Modified: head/sys/dev/usb/controller/ehci_pci.c ============================================================================== --- head/sys/dev/usb/controller/ehci_pci.c Sun Mar 28 20:02:13 2010 (r205801) +++ head/sys/dev/usb/controller/ehci_pci.c Sun Mar 28 20:02:50 2010 (r205802) @@ -208,6 +208,8 @@ ehci_pci_match(device_t self) return "NVIDIA nForce3 250 USB 2.0 controller"; case 0x005b10de: return "NVIDIA nForce4 USB 2.0 controller"; + case 0x036d10de: + return "NVIDIA nForce MCP55 USB 2.0 controller"; case 0x03f210de: return "NVIDIA nForce MCP61 USB 2.0 controller"; case 0x0aa610de: Modified: head/sys/dev/usb/controller/ohci_pci.c ============================================================================== --- head/sys/dev/usb/controller/ohci_pci.c Sun Mar 28 20:02:13 2010 (r205801) +++ head/sys/dev/usb/controller/ohci_pci.c Sun Mar 28 20:02:50 2010 (r205802) @@ -166,6 +166,8 @@ ohci_pci_match(device_t self) case 0x00d710de: return ("nVidia nForce3 USB Controller"); + case 0x036c10de: + return ("nVidia nForce MCP55 USB Controller"); case 0x03f110de: return ("nVidia nForce MCP61 USB Controller"); case 0x0aa510de: From owner-svn-src-head@FreeBSD.ORG Sun Mar 28 20:04:03 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C66CC106564A; Sun, 28 Mar 2010 20:04:03 +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 B70428FC14; Sun, 28 Mar 2010 20:04:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2SK43xe030258; Sun, 28 Mar 2010 20:04:03 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2SK43TN030256; Sun, 28 Mar 2010 20:04:03 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201003282004.o2SK43TN030256@svn.freebsd.org> From: Andrew Thompson Date: Sun, 28 Mar 2010 20:04: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: r205803 - head/sys/dev/usb X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Mar 2010 20:04:03 -0000 Author: thompsa Date: Sun Mar 28 20:04:03 2010 New Revision: 205803 URL: http://svn.freebsd.org/changeset/base/205803 Log: Make sure the bsd_urb_list gets initialised and that new URB's are queued at the end of the list. Submitted by: Hans Petter Selasky Modified: head/sys/dev/usb/usb_compat_linux.c Modified: head/sys/dev/usb/usb_compat_linux.c ============================================================================== --- head/sys/dev/usb/usb_compat_linux.c Sun Mar 28 20:02:50 2010 (r205802) +++ head/sys/dev/usb/usb_compat_linux.c Sun Mar 28 20:04:03 2010 (r205803) @@ -435,7 +435,7 @@ usb_submit_urb(struct urb *urb, uint16_t uhe->bsd_xfer[1]) { /* we are ready! */ - TAILQ_INSERT_HEAD(&uhe->bsd_urb_list, urb, bsd_urb_list); + TAILQ_INSERT_TAIL(&uhe->bsd_urb_list, urb, bsd_urb_list); urb->status = -EINPROGRESS; @@ -908,6 +908,7 @@ usb_linux_create_usb_device(struct usb_d if (p_uhe) { bcopy(ed, &p_uhe->desc, sizeof(p_uhe->desc)); p_uhe->bsd_iface_index = iface_index - 1; + TAILQ_INIT(&p_uhe->bsd_urb_list); p_uhe++; } if (p_uhi) { From owner-svn-src-head@FreeBSD.ORG Sun Mar 28 20:07:09 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 34333106564A; Sun, 28 Mar 2010 20:07:09 +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 249128FC0C; Sun, 28 Mar 2010 20:07:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2SK79TJ030972; Sun, 28 Mar 2010 20:07:09 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2SK79h2030970; Sun, 28 Mar 2010 20:07:09 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201003282007.o2SK79h2030970@svn.freebsd.org> From: Andrew Thompson Date: Sun, 28 Mar 2010 20:07: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: r205804 - head/sys/dev/usb/input X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Mar 2010 20:07:09 -0000 Author: thompsa Date: Sun Mar 28 20:07:08 2010 New Revision: 205804 URL: http://svn.freebsd.org/changeset/base/205804 Log: Do not swap Apple keys when detecting Apple-FN keyboards. Reported by: Steven Noonan Submitted by: Hans Petter Selasky Modified: head/sys/dev/usb/input/ukbd.c Modified: head/sys/dev/usb/input/ukbd.c ============================================================================== --- head/sys/dev/usb/input/ukbd.c Sun Mar 28 20:04:03 2010 (r205803) +++ head/sys/dev/usb/input/ukbd.c Sun Mar 28 20:07:08 2010 (r205804) @@ -896,8 +896,7 @@ ukbd_attach(device_t dev) hid_input, 0, &sc->sc_loc_apple_fn, &flags, &temp_id)) { if (flags & HIO_VARIABLE) - sc->sc_flags |= UKBD_FLAG_APPLE_FN | - UKBD_FLAG_APPLE_SWAP; + sc->sc_flags |= UKBD_FLAG_APPLE_FN; DPRINTFN(1, "Found Apple FN-key\n"); apple_keys = 1; sc->sc_kbd_id = temp_id; From owner-svn-src-head@FreeBSD.ORG Sun Mar 28 20:09:05 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 28752106566C; Sun, 28 Mar 2010 20:09:05 +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 18BF08FC08; Sun, 28 Mar 2010 20:09:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2SK94jd031410; Sun, 28 Mar 2010 20:09:04 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2SK94ZR031407; Sun, 28 Mar 2010 20:09:04 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201003282009.o2SK94ZR031407@svn.freebsd.org> From: Andrew Thompson Date: Sun, 28 Mar 2010 20:09: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: r205805 - in head/sys/dev/usb: . quirk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Mar 2010 20:09:05 -0000 Author: thompsa Date: Sun Mar 28 20:09:04 2010 New Revision: 205805 URL: http://svn.freebsd.org/changeset/base/205805 Log: Do not sync cache for the PL2506 PR: usb/144915 Submitted by: Monty Hall 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 Sun Mar 28 20:07:08 2010 (r205804) +++ head/sys/dev/usb/quirk/usb_quirk.c Sun Mar 28 20:09:04 2010 (r205805) @@ -318,6 +318,8 @@ static struct usb_quirk_entry usb_quirks USB_QUIRK(PNY, ATTACHE2, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_IGNORE_RESIDUE, UQ_MSC_NO_START_STOP), + USB_QUIRK(PROLIFIC, PL2506, 0x0000, 0xffff, + UQ_MSC_NO_SYNC_CACHE), USB_QUIRK_VP(USB_VENDOR_SAMSUNG_TECHWIN, USB_PRODUCT_SAMSUNG_TECHWIN_DIGIMAX_410, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_INQUIRY), Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Sun Mar 28 20:07:08 2010 (r205804) +++ head/sys/dev/usb/usbdevs Sun Mar 28 20:09:04 2010 (r205805) @@ -2416,6 +2416,7 @@ product PROLIFIC PL2303 0x2303 PL2303 S product PROLIFIC PL2305 0x2305 Parallel printer product PROLIFIC ATAPI4 0x2307 ATAPI-4 Controller product PROLIFIC PL2501 0x2501 PL2501 Host-Host interface +product PROLIFIC PL2506 0x2506 PL2506 USB to IDE Bridge product PROLIFIC PHAROS 0xaaa0 Prolific Pharos product PROLIFIC RSAQ3 0xaaa2 PL2303 Serial Adapter (IODATA USB-RSAQ3) product PROLIFIC2 WSIM 0x2001 Willcom WSIM From owner-svn-src-head@FreeBSD.ORG Sun Mar 28 22:46:57 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 32D181065672; Sun, 28 Mar 2010 22:46:57 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 22D858FC13; Sun, 28 Mar 2010 22:46:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2SMkuxj069307; Sun, 28 Mar 2010 22:46:56 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2SMkuJw069305; Sun, 28 Mar 2010 22:46:56 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <201003282246.o2SMkuJw069305@svn.freebsd.org> From: Fabien Thomas Date: Sun, 28 Mar 2010 22:46: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: r205809 - head/usr.sbin/pmcstat X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Mar 2010 22:46:57 -0000 Author: fabient Date: Sun Mar 28 22:46:56 2010 New Revision: 205809 URL: http://svn.freebsd.org/changeset/base/205809 Log: Wait for pmc name in the log before displaying data. This will solve an abort in case of low throughput PMCs. MFC after: 3days Modified: head/usr.sbin/pmcstat/pmcstat_log.c Modified: head/usr.sbin/pmcstat/pmcstat_log.c ============================================================================== --- head/usr.sbin/pmcstat/pmcstat_log.c Sun Mar 28 22:30:14 2010 (r205808) +++ head/usr.sbin/pmcstat/pmcstat_log.c Sun Mar 28 22:46:56 2010 (r205809) @@ -1049,7 +1049,6 @@ pmcstat_pmcindex_to_name(int pmcin) if (pr->pr_pmcin == pmcin) return pmcstat_string_unintern(pr->pr_pmcname); - err(EX_SOFTWARE, "ERROR: cannot find pmcid name"); return NULL; } @@ -1789,19 +1788,23 @@ static void pmcstat_refresh_top(void) { char pmcname[40]; + const char *s; /* If in pause mode do not refresh display. */ if (pmcstat_pause) return; + /* Wait until PMC pop in the log. */ + s = pmcstat_pmcindex_to_name(pmcstat_pmcinfilter); + if (s == NULL) + return; + /* Format PMC name. */ if (pmcstat_mergepmc) - snprintf(pmcname, sizeof(pmcname), "[%s]", - pmcstat_pmcindex_to_name(pmcstat_pmcinfilter)); + snprintf(pmcname, sizeof(pmcname), "[%s]", s); else snprintf(pmcname, sizeof(pmcname), "%s.%d", - pmcstat_pmcindex_to_name(pmcstat_pmcinfilter), - pmcstat_pmcinfilter); + s, pmcstat_pmcinfilter); PMCSTAT_PRINTBEGIN(); PMCSTAT_PRINTW("PMC: %s Samples: %u processed, %u invalid\n\n", From owner-svn-src-head@FreeBSD.ORG Sun Mar 28 23:03:40 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D2A141065673 for ; Sun, 28 Mar 2010 23:03:40 +0000 (UTC) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.187]) by mx1.freebsd.org (Postfix) with ESMTP id 7D2C58FC15 for ; Sun, 28 Mar 2010 23:03:40 +0000 (UTC) Received: from vampire.homelinux.org (dslb-088-066-054-138.pools.arcor-ip.net [88.66.54.138]) by mrelayeu.kundenserver.de (node=mreu1) with ESMTP (Nemesis) id 0MKdmN-1Nu6dp2uPf-002ABu; Mon, 29 Mar 2010 01:03:38 +0200 Received: (qmail 72763 invoked from network); 28 Mar 2010 23:03:38 -0000 Received: from f8x64.laiers.local (192.168.4.188) by mx.laiers.local with SMTP; 28 Mar 2010 23:03:38 -0000 From: Max Laier Organization: FreeBSD To: Jack F Vogel Date: Mon, 29 Mar 2010 01:03:37 +0200 User-Agent: KMail/1.12.4 (FreeBSD/8.0-RELEASE-p2; KDE/4.3.5; amd64; ; ) References: <201003270021.o2R0LebO003969@svn.freebsd.org> In-Reply-To: <201003270021.o2R0LebO003969@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201003290103.37621.max@love2party.net> X-Provags-ID: V01U2FsdGVkX1/IypjpClFU18zdaeeorSAHG/v0jMVo4ho0I/r VJD0gyYDQLCt+CsC378o81XIGEOk0UnnmKD5Xo3PaT6qRyqpRQ ciXkNnIIek0TKHeCCUk1g== Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r205720 - in head/sys: dev/ixgbe modules/ixgbe X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Mar 2010 23:03:40 -0000 On Saturday 27 March 2010 01:21:40 Jack F Vogel wrote: > Author: jfv > Date: Sat Mar 27 00:21:40 2010 > New Revision: 205720 > URL: http://svn.freebsd.org/changeset/base/205720 > > Log: > Update the driver to Intel version 2.1.6 > - add some new hardware support for 82599 > - Big change to interrupt architecture, it now > uses a queue which contains an RX/TX pair as > the recipient of the interrupt. This will reduce > overall system interrupts/msix usage. > - Improved RX mbuf handling: the old get_buf routine > is no longer synchronized with rxeof, this allows > the elimination of packet discards due to mbuf > allocation failure. > - Much simplified and improved AIM code, it now > happens in the queue interrupt context and takes > into account both the traffic on the RX AND TX > side. > - variety of small tweaks, like ring size, that have > been seen as performance improvements. > - Thanks to those that provided feedback or suggested > changes, I hope I've caught all of them. This seems to introduce the same error in drbr handling that I just fixed for e1000 & friend - c.f. r203834. This results in ALTQ not working on these interfaces. Let me know if you have any questions, more details in-line. > Modified: head/sys/dev/ixgbe/ixgbe.c > =========================================================================== > === --- head/sys/dev/ixgbe/ixgbe.c Fri Mar 26 23:44:51 2010 (r205719) > +++ head/sys/dev/ixgbe/ixgbe.c Sat Mar 27 00:21:40 2010 (r205720) ... > @@ -849,59 +817,43 @@ ixgbe_mq_start_locked(struct ifnet *ifp, > { > struct adapter *adapter = txr->adapter; > struct mbuf *next; > - int err = 0; > + int enqueued, err = 0; > > - if (((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) || > - (!adapter->link_active)) { > - err = drbr_enqueue(ifp, txr->br, m); > + if ((ifp->if_drv_flags & (IFF_DRV_RUNNING | IFF_DRV_OACTIVE)) != > + IFF_DRV_RUNNING || adapter->link_active == 0) { > + if (m != NULL) > + err = drbr_enqueue(ifp, txr->br, m); > return (err); > } > > - if (m == NULL) /* Called by tasklet */ > - goto process; > - > - /* If nothing queued go right to xmit */ > - if (!drbr_needs_enqueue(ifp, txr->br)) { > - if ((err = ixgbe_xmit(txr, &m)) != 0) { > - if (m != NULL) > - err = drbr_enqueue(ifp, txr->br, m); > - return (err); > - } else { > - /* Success, update stats */ > - drbr_stats_update(ifp, m->m_pkthdr.len, m->m_flags); > - /* Send a copy of the frame to the BPF listener */ > - ETHER_BPF_MTAP(ifp, m); > - /* Set the watchdog */ > - txr->watchdog_check = TRUE; > - } > - > - } else if ((err = drbr_enqueue(ifp, txr->br, m)) != 0) > - return (err); > - > -process: > - if (drbr_empty(ifp, txr->br)) > - return (err); > + enqueued = 0; > + if (m == NULL) > + next = drbr_dequeue(ifp, txr->br); > + else > + next = m; The new start_locked logic looks like the old igb. An adaption of my diff: http://svn.freebsd.org/viewvc/base/head/sys/dev/e1000/if_igb.c?r1=203834&r2=203833&pathrev=203834 should make things work. > /* Process the queue */ > - while (TRUE) { > - if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) > - break; > - next = drbr_dequeue(ifp, txr->br); > - if (next == NULL) > - break; > + while (next != NULL) { > if ((err = ixgbe_xmit(txr, &next)) != 0) { > if (next != NULL) > err = drbr_enqueue(ifp, txr->br, next); > break; > } > + enqueued++; > drbr_stats_update(ifp, next->m_pkthdr.len, next->m_flags); > + /* Send a copy of the frame to the BPF listener */ > ETHER_BPF_MTAP(ifp, next); > - /* Set the watchdog */ > - txr->watchdog_check = TRUE; > + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) > + break; > + if (txr->tx_avail <= IXGBE_TX_OP_THRESHOLD) { > + ifp->if_drv_flags |= IFF_DRV_OACTIVE; > + break; > + } > + next = drbr_dequeue(ifp, txr->br); > } > - > - if (txr->tx_avail <= IXGBE_TX_OP_THRESHOLD) > - ifp->if_drv_flags |= IFF_DRV_OACTIVE; > + > + if (enqueued > 0) > + txr->watchdog_check = TRUE; > > return (err); > } Regards, Max From owner-svn-src-head@FreeBSD.ORG Mon Mar 29 06:49:20 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AA0CD1065670; Mon, 29 Mar 2010 06:49:20 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 97B8D8FC0C; Mon, 29 Mar 2010 06:49:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2T6nK02075973; Mon, 29 Mar 2010 06:49:20 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2T6nKbH075965; Mon, 29 Mar 2010 06:49:20 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201003290649.o2T6nKbH075965@svn.freebsd.org> From: Edwin Groothuis Date: Mon, 29 Mar 2010 06:49: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: r205821 - head/usr.bin/calendar X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Mar 2010 06:49:20 -0000 Author: edwin Date: Mon Mar 29 06:49:20 2010 New Revision: 205821 URL: http://svn.freebsd.org/changeset/base/205821 Log: Long awaited update to the calendar system: - Repeating events which span multiple years (because of -A, -B or just the three days before the end of the year). - Support for lunar events (full moon, new moon) and solar events (equinox and solstice, chinese new year). Because of this, the options -U (UTC offset) and -l (longitude) are available to compensate if reality doesn't match the calculated values. MFC after: 1 month Added: head/usr.bin/calendar/dates.c (contents, props changed) head/usr.bin/calendar/events.c (contents, props changed) head/usr.bin/calendar/locale.c (contents, props changed) head/usr.bin/calendar/parsedata.c (contents, props changed) head/usr.bin/calendar/pom.c (contents, props changed) head/usr.bin/calendar/sunpos.c (contents, props changed) Modified: head/usr.bin/calendar/Makefile head/usr.bin/calendar/calendar.1 head/usr.bin/calendar/calendar.c head/usr.bin/calendar/calendar.h head/usr.bin/calendar/day.c head/usr.bin/calendar/io.c head/usr.bin/calendar/ostern.c head/usr.bin/calendar/paskha.c head/usr.bin/calendar/pathnames.h Modified: head/usr.bin/calendar/Makefile ============================================================================== --- head/usr.bin/calendar/Makefile Mon Mar 29 06:31:58 2010 (r205820) +++ head/usr.bin/calendar/Makefile Mon Mar 29 06:49:20 2010 (r205821) @@ -2,7 +2,9 @@ # $FreeBSD$ PROG= calendar -SRCS= calendar.c io.c day.c ostern.c paskha.c +SRCS= calendar.c locale.c events.c dates.c parsedata.c io.c day.c \ + ostern.c paskha.c pom.c sunpos.c +LDADD= -lm INTER= de_AT.ISO_8859-15 de_DE.ISO8859-1 fr_FR.ISO8859-1 \ hr_HR.ISO8859-2 hu_HU.ISO8859-2 ru_RU.KOI8-R uk_UA.KOI8-U DE_LINKS= de_DE.ISO8859-15 Modified: head/usr.bin/calendar/calendar.1 ============================================================================== --- head/usr.bin/calendar/calendar.1 Mon Mar 29 06:31:58 2010 (r205820) +++ head/usr.bin/calendar/calendar.1 Mon Mar 29 06:49:20 2010 (r205821) @@ -54,6 +54,8 @@ .Ek .Oc .Op Fl W Ar num +.Op Fl U Ar UTC-offset +.Op Fl l Ar longitude .Sh DESCRIPTION The .Nm @@ -93,6 +95,12 @@ as the default calendar file. .Sm on .Xc For test purposes only: set date directly to argument values. +.It Fl l Ar longitude , Fl U Ar UTC-offset +Only one is needed: +Perform lunar and solar calculations from this longitude or from +this UTC offset. +If neither is specified, the calculations will be based on the +difference between UTC time and localtime. .It Fl W Ar num Print lines from today and the next .Ar num @@ -103,12 +111,36 @@ Ignore weekends when calculating the num To handle calendars in your national code table you can specify .Dq LANG= in the calendar file as early as possible. -To handle national Easter -names in the calendars -.Dq Easter= -(for Catholic Easter) or -.Dq Paskha= -(for Orthodox Easter) can be used. +.Pp +To handle the local name of sequences, you can specify them as: +.Dq SEQUENCE= +in the calendar file as early as possible. +.Pp +The names of the following special days are recognized: +.Bl -tag -width 123456789012345 -compact +.It Easter +Catholic Easter. +.It Paskha +Orthodox Easter. +.It NewMoon +The lunar New Moon. +.It FullMoon +The lunar Full Moon. +.It MarEquinox +The solar equinox in March. +.It JunSolstice +The solar solstice in June. +.It SepEquinox +The solar equinox in March. +.It DecSolstice +The solar solstice in December. +.It ChineseNewYear +The first day of the Chinese year. +.El +These names may be reassigned to their local names via an assignment +like +.Dq Easter=Pasen +in the calendar file. .Pp Other lines should begin with a month and day. They may be entered in almost any format, either numeric or as character @@ -122,11 +154,11 @@ Two numbers default to the month followe Lines with leading tabs default to the last entered date, allowing multiple line specifications for a single date. .Pp -``Easter'', is Easter for this year, and may be followed by a positive -or negative integer. -.Pp -``Paskha'', is Orthodox Easter for this year, and may be followed by a -positive or negative integer. +The names of the recognized special days may be followed by a +positive or negative integer, like: +.Dq Easter+3 +or +.Dq Pashka-4 . .Pp Weekdays may be followed by ``-4'' ...\& ``+5'' (aliases for last, first, second, third, fourth) for moving events like @@ -191,7 +223,8 @@ calendar file to use if no calendar file do not send mail if this file exists. .El .Pp -The following default calendar files are provided: +The following default calendar files are provided in +.Pa /usr/share/calendars: .Pp .Bl -tag -width calendar.southafrica -compact .It Pa calendar.all @@ -208,6 +241,8 @@ so that roving holidays are set correctl Days of special significance to computer people. .It Pa calendar.croatian Calendar of events in Croatia. +.It Pa calendar.dutch +Calendar of events in the Netherlands. .It Pa calendar.freebsd Birthdays of .Fx @@ -259,7 +294,28 @@ A .Nm command appeared in .At v7 . +.Sh NOTES +Chinese New Year is calculated at 120 degrees east of Greenwich, +which roughly corresponds with the east coast of China. +For people west of China, this might result that the start of Chinese +New Year and the day of the related new moon might differ. +.Pp +The phases of the moon and the longitude of the sun are calculated +against the local position which corresponds with 30 degrees times +the time-difference towards Greenwich. +.Pp +The new and full moons are happening on the day indicated: They +might happen in the time period in the early night or in the late +evening. +It doesn't indicate that they are starting in the night on that date. +.Pp +Because of minor differences between the output of the formulas +used and other sources on the Internet, Druids and Werewolves should +double-check the start and end time of solar and lunar events. .Sh BUGS The .Nm -utility does not handle Jewish holidays and moon phases. +utility does not handle Jewish holidays. +.Pp +There is no possibility to properly specify the local position +needed for solar and lunar calculations. Modified: head/usr.bin/calendar/calendar.c ============================================================================== --- head/usr.bin/calendar/calendar.c Mon Mar 29 06:31:58 2010 (r205820) +++ head/usr.bin/calendar/calendar.c Mon Mar 29 06:49:20 2010 (r205821) @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1989, 1993, 1994 * The Regents of the University of California. All rights reserved. * @@ -52,29 +52,38 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include "calendar.h" +#define UTCOFFSET_NOTSET 100 /* Expected between -24 and +24 */ +#define LONGITUDE_NOTSET 1000 /* Expected between -360 and +360 */ + struct passwd *pw; int doall = 0; +int debug = 0; +char *DEBUG = NULL; time_t f_time = 0; - -int f_dayAfter = 0; /* days after current date */ -int f_dayBefore = 0; /* days before current date */ -int Friday = 5; /* day before weekend */ +double UTCOffset = UTCOFFSET_NOTSET; +int EastLongitude = LONGITUDE_NOTSET; static void usage(void) __dead2; int main(int argc, char *argv[]) { + int f_dayAfter = 0; /* days after current date */ + int f_dayBefore = 0; /* days before current date */ + int Friday = 5; /* day before weekend */ + int ch; + struct tm tp1, tp2; (void)setlocale(LC_ALL, ""); - while ((ch = getopt(argc, argv, "-A:aB:F:f:t:W:")) != -1) + while ((ch = getopt(argc, argv, "-A:aB:dD:F:f:l:t:U:W:")) != -1) switch (ch) { case '-': /* backward contemptible */ case 'a': @@ -89,14 +98,10 @@ main(int argc, char *argv[]) calendarFile = optarg; break; - case 't': /* other date, undocumented, for tests */ - f_time = Mktime(optarg); - break; - case 'W': /* we don't need no steenking Fridays */ Friday = -1; - /* FALLTHROUGH */ + case 'A': /* days after current date */ f_dayAfter = atoi(optarg); break; @@ -105,9 +110,25 @@ main(int argc, char *argv[]) f_dayBefore = atoi(optarg); break; - case 'F': + case 'F': /* Change the time: When does weekend start? */ Friday = atoi(optarg); break; + case 'l': /* Change longitudal position */ + EastLongitude = strtol(optarg, NULL, 10); + break; + case 'U': /* Change UTC offset */ + UTCOffset = strtod(optarg, NULL); + break; + + case 'd': + debug = 1; + break; + case 'D': + DEBUG = optarg; + break; + case 't': /* other date, undocumented, for tests */ + f_time = Mktime(optarg); + break; case '?': default: @@ -124,7 +145,60 @@ main(int argc, char *argv[]) if (f_time <= 0) (void)time(&f_time); - settime(f_time); + /* if not set, determine where I could be */ + { + if (UTCOffset == UTCOFFSET_NOTSET && + EastLongitude == LONGITUDE_NOTSET) { + /* Calculate on difference between here and UTC */ + time_t t; + struct tm tm; + long utcoffset, hh, mm, ss; + double uo; + + time(&t); + localtime_r(&t, &tm); + utcoffset = tm.tm_gmtoff; + /* seconds -> hh:mm:ss */ + hh = utcoffset / SECSPERHOUR; + utcoffset %= SECSPERHOUR; + mm = utcoffset / SECSPERMINUTE; + utcoffset %= SECSPERMINUTE; + ss = utcoffset; + + /* hh:mm:ss -> hh.mmss */ + uo = mm + (100.0 * (ss / 60.0)); + uo /= 60.0 / 100.0; + uo = hh + uo / 100; + + UTCOffset = uo; + EastLongitude = UTCOffset * 15; + } else if (UTCOffset == UTCOFFSET_NOTSET) { + /* Base on information given */ + UTCOffset = EastLongitude / 15; + } else if (EastLongitude == LONGITUDE_NOTSET) { + /* Base on information given */ + EastLongitude = UTCOffset * 15; + } + } + + settimes(f_time, f_dayBefore, f_dayAfter, Friday, &tp1, &tp2); + generatedates(&tp1, &tp2); + + /* + * FROM now on, we are working in UTC. + * This will only affect moon and sun related events anyway. + */ + if (setenv("TZ", "UTC", 1) != 0) + errx(1, "setenv: %s", strerror(errno)); + tzset(); + + if (debug) + dumpdates(); + + if (DEBUG != NULL) { + dodebug(DEBUG); + exit(0); + } if (doall) while ((pw = getpwent()) != NULL) { @@ -145,9 +219,11 @@ static void __dead2 usage(void) { - fprintf(stderr, "%s\n%s\n", + fprintf(stderr, "%s\n%s\n%s\n", "usage: calendar [-a] [-A days] [-B days] [-F friday] " "[-f calendarfile]", - " [-t dd[.mm[.year]]] [-W days]"); + " [-d] [-t dd[.mm[.year]]] [-W days]", + " [-U utcoffset] [-l longitude]" + ); exit(1); } Modified: head/usr.bin/calendar/calendar.h ============================================================================== --- head/usr.bin/calendar/calendar.h Mon Mar 29 06:31:58 2010 (r205820) +++ head/usr.bin/calendar/calendar.h Mon Mar 29 06:49:20 2010 (r205821) @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1989, 1993, 1994 * The Regents of the University of California. All rights reserved. * @@ -36,43 +36,163 @@ #include #include +#define SECSPERDAY (24 * 60 * 60) +#define SECSPERHOUR (60 * 60) +#define SECSPERMINUTE (60) +#define MINSPERHOUR (60) +#define HOURSPERDAY (24) +#define FSECSPERDAY (24.0 * 60.0 * 60.0) +#define FSECSPERHOUR (60.0 * 60.0) +#define FSECSPERMINUTE (60.0) +#define FMINSPERHOUR (60.0) +#define FHOURSPERDAY (24.0) + +#define DAYSPERYEAR 365 +#define DAYSPERLEAPYEAR 366 + +/* Not yet categorized */ + extern struct passwd *pw; extern int doall; -extern struct iovec header[]; -extern struct tm *tp; +extern time_t t1, t2; extern const char *calendarFile; -extern int *cumdays; extern int yrdays; -extern struct fixs neaster, npaskha; - -void cal(void); -void closecal(FILE *); -int getday(char *); -int getdayvar(char *); -int getfield(char *, char **, int *); -int getmonth(char *); -int geteaster(char *, int); -int getpaskha(char *, int); -int easter(int); -int isnow(char *, int *, int *, int *); -FILE *opencal(void); -void settime(time_t); -time_t Mktime(char *); -void setnnames(void); +extern struct fixs neaster, npaskha, ncny, nfullmoon, nnewmoon; +extern struct fixs nmarequinox, nsepequinox, njunsolstice, ndecsolstice; +extern double UTCOffset; +extern int EastLongitude; #define isleap(y) ((((y) % 4) == 0 && ((y) % 100) != 0) || ((y) % 400) == 0) -/* some flags */ -#define F_ISMONTH 0x01 /* month (January ...) */ -#define F_ISDAY 0x02 /* day of week (Sun, Mon, ...) */ -#define F_ISDAYVAR 0x04 /* variables day of week, like SundayLast */ -#define F_EASTER 0x08 /* Easter or easter depending days */ - -extern int f_dayAfter; /* days after current date */ -extern int f_dayBefore; /* days before current date */ -extern int Friday; /* day before weekend */ +/* Flags to determine the returned values by determinestyle() in parsedata.c */ +#define F_NONE 0x00000 +#define F_MONTH 0x00001 +#define F_DAYOFWEEK 0x00002 +#define F_DAYOFMONTH 0x00004 +#define F_MODIFIERINDEX 0x00008 +#define F_MODIFIEROFFSET 0x00010 +#define F_SPECIALDAY 0x00020 +#define F_ALLMONTH 0x00040 +#define F_ALLDAY 0x00080 +#define F_VARIABLE 0x00100 +#define F_EASTER 0x00200 +#define F_CNY 0x00400 +#define F_PASKHA 0x00800 +#define F_NEWMOON 0x01000 +#define F_FULLMOON 0x02000 +#define F_MAREQUINOX 0x04000 +#define F_SEPEQUINOX 0x08000 +#define F_JUNSOLSTICE 0x10000 +#define F_DECSOLSTICE 0x20000 + +#define STRING_EASTER "Easter" +#define STRING_PASKHA "Paskha" +#define STRING_CNY "ChineseNewYear" +#define STRING_NEWMOON "NewMoon" +#define STRING_FULLMOON "FullMoon" +#define STRING_MAREQUINOX "MarEquinox" +#define STRING_SEPEQUINOX "SepEquinox" +#define STRING_JUNSOLSTICE "JunSolstice" +#define STRING_DECSOLSTICE "DecSolstice" + +#define MAXCOUNT 125 /* Random number of maximum number of + * repeats of an event. Should be 52 + * (number of weeks per year), if you + * want to show two years then it + * should be 104. If you are seeing + * more than this you are using this + * program wrong. + */ + +/* + * All the astronomical calculations are carried out for the meridian 120 + * degrees east of Greenwich. + */ +#define UTCOFFSET_CNY 8.0 + +extern int debug; /* show parsing of the input */ +extern int year1, year2; + +/* events.c */ +/* + * Event sorting related functions: + * - Use event_add() to create a new event + * - Use event_continue() to add more text to the last added event + * - Use event_print_all() to display them in time chronological order + */ +struct event *event_add(int, int, int, char *, int, char *, char *); +void event_continue(struct event *events, char *txt); +void event_print_all(FILE *fp); +struct event { + int year; + int month; + int day; + int var; + char *date; + char *text; + char *extra; + struct event *next; +}; + +/* locale.c */ struct fixs { char *name; - int len; + size_t len; }; + +extern const char *days[]; +extern const char *fdays[]; +extern const char *fmonths[]; +extern const char *months[]; +extern const char *sequences[]; +extern struct fixs fndays[8]; /* full national days names */ +extern struct fixs fnmonths[13]; /* full national months names */ +extern struct fixs ndays[8]; /* short national days names */ +extern struct fixs nmonths[13]; /* short national month names */ +extern struct fixs nsequences[10]; + +void setnnames(void); +void setnsequences(char *); + +/* day.c */ +extern const struct tm tm0; +extern char dayname[]; +void settimes(time_t,int before, int after, int friday, struct tm *tp1, struct tm *tp2); +time_t Mktime(char *); + +/* parsedata.c */ +int parsedaymonth(char *, int *, int *, int *, int *, char **); +void dodebug(char *type); + +/* io.c */ +void cal(void); +void closecal(FILE *); +FILE *opencal(void); + +/* ostern.c / pashka.c */ +int paskha(int); +int easter(int); + +/* dates.c */ +extern int cumdaytab[][14]; +extern int mondaytab[][14]; +extern int debug_remember; +void generatedates(struct tm *tp1, struct tm *tp2); +void dumpdates(void); +int remember_ymd(int y, int m, int d); +int remember_yd(int y, int d, int *rm, int *rd); +int first_dayofweek_of_year(int y); +int first_dayofweek_of_month(int y, int m); +int walkthrough_dates(struct event **e); +void addtodate(struct event *e, int year, int month, int day); + +/* pom.c */ +#define MAXMOONS 18 +void pom(int year, double UTCoffset, int *fms, int *nms); +void fpom(int year, double utcoffset, double *ffms, double *fnms); + +/* sunpos.c */ +void equinoxsolstice(int year, double UTCoffset, int *equinoxdays, int *solsticedays); +void fequinoxsolstice(int year, double UTCoffset, double *equinoxdays, double *solsticedays); +int calculatesunlongitude30(int year, int degreeGMToffset, int *ichinesemonths); Added: head/usr.bin/calendar/dates.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/calendar/dates.c Mon Mar 29 06:49:20 2010 (r205821) @@ -0,0 +1,451 @@ +/*- + * Copyright (c) 1992-2009 Edwin Groothuis. 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 + +#include "calendar.h" + +struct cal_year { + int year; /* 19xx, 20xx, 21xx */ + int easter; /* Julian day */ + int paskha; /* Julian day */ + int cny; /* Julian day */ + int firstdayofweek; /* 0 .. 6 */ + struct cal_month *months; + struct cal_year *nextyear; +} cal_year; + +struct cal_month { + int month; /* 01 .. 12 */ + int firstdayjulian; /* 000 .. 366 */ + int firstdayofweek; /* 0 .. 6 */ + struct cal_year *year; /* points back */ + struct cal_day *days; + struct cal_month *nextmonth; +} cal_month; + +struct cal_day { + int dayofmonth; /* 01 .. 31 */ + int julianday; /* 000 .. 366 */ + int dayofweek; /* 0 .. 6 */ + struct cal_day *nextday; + struct cal_month *month; /* points back */ + struct cal_year *year; /* points back */ + struct event *events; +} cal_day; + +int debug_remember = 0; +struct cal_year *hyear = NULL; + +/* 1-based month, 0-based days, cumulative */ +int *cumdays; +int cumdaytab[][14] = { + {0, -1, 30, 58, 89, 119, 150, 180, 211, 242, 272, 303, 333, 364}, + {0, -1, 30, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365}, +}; +/* 1-based month, individual */ +int *mondays; +int mondaytab[][14] = { + {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31, 30}, + {0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31, 30}, +}; + +static struct cal_day * find_day(int yy, int mm, int dd); + +static void +createdate(int y, int m, int d) +{ + struct cal_year *py, *pyp; + struct cal_month *pm, *pmp; + struct cal_day *pd, *pdp; + int *cumday; + + pyp = NULL; + py = hyear; + while (py != NULL) { + if (py->year == y + 1900) + break; + pyp = py; + py = py->nextyear; + } + + if (py == NULL) { + struct tm td; + time_t t; + py = (struct cal_year *)calloc(1, sizeof(struct cal_year)); + py->year = y + 1900; + py->easter = easter(y); + py->paskha = paskha(y); + + td = tm0; + td.tm_year = y; + td.tm_mday = 1; + t = mktime(&td); + localtime_r(&t, &td); + py->firstdayofweek = td.tm_wday; + + if (pyp != NULL) + pyp->nextyear = py; + } + if (pyp == NULL) { + /* The very very very first one */ + hyear = py; + } + + pmp = NULL; + pm = py->months; + while (pm != NULL) { + if (pm->month == m) + break; + pmp = pm; + pm = pm->nextmonth; + } + + if (pm == NULL) { + pm = (struct cal_month *)calloc(1, sizeof(struct cal_month)); + pm->year = py; + pm->month = m; + cumday = cumdaytab[isleap(y)]; + pm->firstdayjulian = cumday[m] + 2; + pm->firstdayofweek = + (py->firstdayofweek + pm->firstdayjulian -1) % 7; + if (pmp != NULL) + pmp->nextmonth = pm; + } + if (pmp == NULL) + py->months = pm; + + pdp = NULL; + pd = pm->days; + while (pd != NULL) { + pdp = pd; + pd = pd->nextday; + } + + if (pd == NULL) { /* Always true */ + pd = (struct cal_day *)calloc(1, sizeof(struct cal_day)); + pd->month = pm; + pd->year = py; + pd->dayofmonth = d; + pd->julianday = pm->firstdayjulian + d - 1; + pd->dayofweek = (pm->firstdayofweek + d - 1) % 7; + if (pdp != NULL) + pdp->nextday = pd; + } + if (pdp == NULL) + pm->days = pd; +} + +void +generatedates(struct tm *tp1, struct tm *tp2) +{ + int y1, m1, d1; + int y2, m2, d2; + int y, m, d; + + y1 = tp1->tm_year; + m1 = tp1->tm_mon + 1; + d1 = tp1->tm_mday; + y2 = tp2->tm_year; + m2 = tp2->tm_mon + 1; + d2 = tp2->tm_mday; + + if (y1 == y2) { + if (m1 == m2) { + /* Same year, same month. Easy! */ + for (d = d1; d <= d2; d++) + createdate(y1, m1, d); + return; + } + /* + * Same year, different month. + * - Take the leftover days from m1 + * - Take all days from + * - Take the first days from m2 + */ + mondays = mondaytab[isleap(y1)]; + for (d = d1; d <= mondays[m1]; d++) + createdate(y1, m1, d); + for (m = m1 + 1; m < m2; m++) + for (d = 1; d <= mondays[m]; d++) + createdate(y1, m, d); + for (d = 1; d <= d2; d++) + createdate(y1, m2, d); + return; + } + /* + * Different year, different month. + * - Take the leftover days from y1-m1 + * - Take all days from y1- + * - Take all days from y2-[1 .. m2> + * - Take the first days of y2-m2 + */ + mondays = mondaytab[isleap(y1)]; + for (d = d1; d <= mondays[m1]; d++) + createdate(y1, m1, d); + for (m = m1 + 1; m <= 12; m++) + for (d = 1; d <= mondays[m]; d++) + createdate(y1, m, d); + for (y = y1 + 1; y < y2; y++) { + mondays = mondaytab[isleap(y)]; + for (m = 1; m <= 12; m++) + for (d = 1; d <= mondays[m]; d++) + createdate(y, m, d); + } + mondays = mondaytab[isleap(y2)]; + for (m = 1; m < m2; m++) + for (d = 1; d <= mondays[m]; d++) + createdate(y2, m, d); + for (d = 1; d <= d2; d++) + createdate(y2, m2, d); +} + +void +dumpdates(void) +{ + struct cal_year *y; + struct cal_month *m; + struct cal_day *d; + + y = hyear; + while (y != NULL) { + printf("%-5d (wday:%d)\n", y->year, y->firstdayofweek); + m = y->months; + while (m != NULL) { + printf("-- %-5d (julian:%d, dow:%d)\n", m->month, + m->firstdayjulian, m->firstdayofweek); + d = m->days; + while (d != NULL) { + printf(" -- %-5d (julian:%d, dow:%d)\n", + d->dayofmonth, d->julianday, d->dayofweek); + d = d->nextday; + } + m = m->nextmonth; + } + y = y->nextyear; + } +} + +int +remember_ymd(int yy, int mm, int dd) +{ + struct cal_year *y; + struct cal_month *m; + struct cal_day *d; + + if (debug_remember) + printf("remember_ymd: %d - %d - %d\n", yy, mm, dd); + + y = hyear; + while (y != NULL) { + if (y->year != yy) { + y = y->nextyear; + continue; + } + m = y->months; + while (m != NULL) { + if (m->month != mm) { + m = m->nextmonth; + continue; + } + d = m->days; + while (d != NULL) { + if (d->dayofmonth == dd) + return (1); + d = d->nextday; + continue; + } + return (0); + } + return (0); + } + return (0); +} + +int +remember_yd(int yy, int dd, int *rm, int *rd) +{ + struct cal_year *y; + struct cal_month *m; + struct cal_day *d; + + if (debug_remember) + printf("remember_yd: %d - %d\n", yy, dd); + + y = hyear; + while (y != NULL) { + if (y->year != yy) { + y = y->nextyear; + continue; + } + m = y->months; + while (m != NULL) { + d = m->days; + while (d != NULL) { + if (d->julianday == dd) { + *rm = m->month; + *rd = d->dayofmonth; + return (1); + } + d = d->nextday; + } + m = m->nextmonth; + } + return (0); + } + return (0); +} + +int +first_dayofweek_of_year(int yy) +{ + struct cal_year *y; + + y = hyear; + while (y != NULL) { + if (y->year == yy) + return (y->firstdayofweek); + y = y->nextyear; + } + + /* Should not happen */ + return (-1); +} + +int +first_dayofweek_of_month(int yy, int mm) +{ + struct cal_year *y; + struct cal_month *m; + + y = hyear; + while (y != NULL) { + if (y->year != yy) { + y = y->nextyear; + continue; + } + m = y->months; + while (m != NULL) { + if (m->month == mm) + return (m->firstdayofweek); + m = m->nextmonth; + } + /* Should not happen */ + return (-1); + } + + /* Should not happen */ + return (-1); +} + +int +walkthrough_dates(struct event **e) +{ + static struct cal_year *y = NULL; + static struct cal_month *m = NULL; + static struct cal_day *d = NULL; + + if (y == NULL) { + y = hyear; + m = y->months; + d = m->days; + *e = d->events; + return (1); + }; + if (d->nextday != NULL) { + d = d->nextday; + *e = d->events; + return (1); + } + if (m->nextmonth != NULL) { + m = m->nextmonth; + d = m->days; + *e = d->events; + return (1); + } + if (y->nextyear != NULL) { + y = y->nextyear; + m = y->months; + d = m->days; + *e = d->events; + return (1); + } + + return (0); +} + +static struct cal_day * +find_day(int yy, int mm, int dd) +{ + struct cal_year *y; + struct cal_month *m; + struct cal_day *d; + + if (debug_remember) + printf("remember_ymd: %d - %d - %d\n", yy, mm, dd); + + y = hyear; + while (y != NULL) { + if (y->year != yy) { + y = y->nextyear; + continue; + } + m = y->months; + while (m != NULL) { + if (m->month != mm) { + m = m->nextmonth; + continue; + } + d = m->days; + while (d != NULL) { + if (d->dayofmonth == dd) + return (d); + d = d->nextday; + continue; + } + return (NULL); + } + return (NULL); + } + return (NULL); +} + +void +addtodate(struct event *e, int year, int month, int day) +{ + struct cal_day *d; + + d = find_day(year, month, day); + e->next = d->events; + d->events = e; +} Modified: head/usr.bin/calendar/day.c ============================================================================== --- head/usr.bin/calendar/day.c Mon Mar 29 06:31:58 2010 (r205820) +++ head/usr.bin/calendar/day.c Mon Mar 29 06:49:20 2010 (r205821) @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1989, 1993, 1994 * The Regents of the University of California. All rights reserved. * @@ -34,9 +34,6 @@ #include __FBSDID("$FreeBSD$"); -#include -#include -#include #include #include #include @@ -46,120 +43,38 @@ __FBSDID("$FreeBSD$"); #include "calendar.h" -struct tm *tp; -static const struct tm tm0; -int *cumdays, yrdays; -char dayname[10]; - - *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Mon Mar 29 07:08:48 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0D4CD1065670; Mon, 29 Mar 2010 07:08:48 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F0FDC8FC24; Mon, 29 Mar 2010 07:08:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2T78lkB080509; Mon, 29 Mar 2010 07:08:47 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2T78lrw080507; Mon, 29 Mar 2010 07:08:47 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201003290708.o2T78lrw080507@svn.freebsd.org> From: Edwin Groothuis Date: Mon, 29 Mar 2010 07: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: r205827 - head/usr.bin/calendar X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Mar 2010 07:08:48 -0000 Author: edwin Date: Mon Mar 29 07:08:47 2010 New Revision: 205827 URL: http://svn.freebsd.org/changeset/base/205827 Log: Bump WARNS to 7 Modified: head/usr.bin/calendar/Makefile Modified: head/usr.bin/calendar/Makefile ============================================================================== --- head/usr.bin/calendar/Makefile Mon Mar 29 06:59:08 2010 (r205826) +++ head/usr.bin/calendar/Makefile Mon Mar 29 07:08:47 2010 (r205827) @@ -11,7 +11,7 @@ DE_LINKS= de_DE.ISO8859-15 FR_LINKS= fr_FR.ISO8859-15 TEXTMODE?= 444 -WARNS?= 3 +WARNS?= 7 beforeinstall: ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${TEXTMODE} \ From owner-svn-src-head@FreeBSD.ORG Mon Mar 29 07:09:28 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 42F60106566C; Mon, 29 Mar 2010 07:09:28 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3258F8FC2F; Mon, 29 Mar 2010 07:09:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2T79SKD080677; Mon, 29 Mar 2010 07:09:28 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2T79Sr4080675; Mon, 29 Mar 2010 07:09:28 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201003290709.o2T79Sr4080675@svn.freebsd.org> From: Edwin Groothuis Date: Mon, 29 Mar 2010 07:09: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: r205828 - head/usr.bin/calendar/calendars X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Mar 2010 07:09:28 -0000 Author: edwin Date: Mon Mar 29 07:09:27 2010 New Revision: 205828 URL: http://svn.freebsd.org/changeset/base/205828 Log: Use new syntax for the dutch calendar: Use local month names instead of english ones. Modified: head/usr.bin/calendar/calendars/calendar.dutch Modified: head/usr.bin/calendar/calendars/calendar.dutch ============================================================================== --- head/usr.bin/calendar/calendars/calendar.dutch Mon Mar 29 07:08:47 2010 (r205827) +++ head/usr.bin/calendar/calendars/calendar.dutch Mon Mar 29 07:09:27 2010 (r205828) @@ -10,25 +10,25 @@ Easter=Pasen /* * Feestdagen */ -01/01 Nieuwjaar -01/06 Driekoningen -04/01 Een April -04/30 Koninginendag -05/01 Dag van de Arbeid -05/04 Dodenherdenking -05/05 Bevrijdingsdag -10/04 Dierendag -11/01 Allerheilingen -11/02 Allerzielen -11/11 Sint Maarten -11/11 Elfde-van-de-elfde -12/05 Sinterklaas avond -12/15 Koninkrijksdag -12/24 Kerstavond -12/25 Eerste kerstdag -12/26 Tweede kerstdag -12/28 Feest der Onnozele Kinderen -12/31 Oudjaar +jan/01 Nieuwjaar +jan/06 Driekoningen +apr/01 1 april +apr/30 Koninginnedag +mei/01 Dag van de Arbeid +mei/04 Dodenherdenking +mei/05 Bevrijdingsdag +okt/04 Dierendag +nov/01 Allerheilingen +nov/02 Allerzielen +nov/11 Sint Maarten +nov/11 Elfde-van-de-elfde +dec/05 Sinterklaas avond +dec/15 Koninkrijksdag +dec/24 Kerstavond +dec/25 Eerste kerstdag +dec/26 Tweede kerstdag +dec/28 Feest der Onnozele Kinderen +dec/31 Oudjaar /* * Pasen gerelateerd @@ -38,12 +38,12 @@ Pasen-49 Carnaval Pasen-48 Carnaval Pasen-47 Carnaval (Vastenavond) Pasen-46 Aswoensdag -Pasen-7 Palmzondag -Pasen-3 Witte Donderdag -Pasen-2 Goede vrijdag -Pasen-1 Stille zaterdag +Pasen-7 Palmzondag +Pasen-3 Witte Donderdag +Pasen-2 Goede vrijdag +Pasen-1 Stille zaterdag Pasen Eerste paasdag -Pasen+1 Tweede paasdag +Pasen+1 Tweede paasdag Pasen+39 Hemelvaartsdag Pasen+49 Eerste Pinksterdag Pasen+50 Tweede Pinksterdag @@ -52,28 +52,28 @@ Pasen+56 Trinitatis /* * Misc */ -05/SunSecond Moederdag -06/SunThird Vaderdag -09/TueThird Prinsjesdag +mei/SunSecond Moederdag +jun/SunThird Vaderdag +sep/TueThird Prinsjesdag /* * Het koningshuis */ -01/19 Prinses Margriet (1943) -01/31 Koningin Beatrix (1938) -02/17 Prins Willem III (1817 - 1890) -02/18 Prinses Christina (1947) -04/10 Prinses Ariane (2007) -04/19 Prins Hendrik (1876 - 1934) -04/27 Kroonprins Willem Alexander (1967) -04/30 Koningin Juliana (1909 - 2004) -04/30 Mr. Pieter van Vollenhoven (1939) -05/17 Prinses Maxima (1971) -06/26 Prinses Alexia (2005) -06/29 Prins Bernhard (1911 - 2004) -08/05 Prinses Irene (1939) -08/31 Prinses Wilhelmina (1880 - 1962) -09/06 Prins Claus (1925 - 2002) -09/25 Prins Johan Friso (1968) -10/11 Prins Constantijn (1969) -12/07 Prinses Catharina-Amalia (2003) +jan/19 Prinses Margriet (1943) +jan/31 Koningin Beatrix (1938) +feb/17 Prins Willem III (1817 - 1890) +feb/18 Prinses Christina (1947) +apr/10 Prinses Ariane (2007) +apr/19 Prins Hendrik (1876 - 1934) +apr/27 Kroonprins Willem Alexander (1967) +apr/30 Koningin Juliana (1909 - 2004) +apr/30 Mr. Pieter van Vollenhoven (1939) +mei/17 Prinses Maxima (1971) +jun/26 Prinses Alexia (2005) +jun/29 Prins Bernhard (1911 - 2004) +aug/05 Prinses Irene (1939) +aug/31 Prinses Wilhelmina (1880 - 1962) +sep/06 Prins Claus (1925 - 2002) +sep/25 Prins Johan Friso (1968) +okt/11 Prins Constantijn (1969) +dec/07 Prinses Catharina-Amalia (2003) From owner-svn-src-head@FreeBSD.ORG Mon Mar 29 12:19:23 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 834ED106566B; Mon, 29 Mar 2010 12:19:23 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 720E08FC25; Mon, 29 Mar 2010 12:19:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2TCJNi3052721; Mon, 29 Mar 2010 12:19:23 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2TCJNE6052719; Mon, 29 Mar 2010 12:19:23 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201003291219.o2TCJNE6052719@svn.freebsd.org> From: Luigi Rizzo Date: Mon, 29 Mar 2010 12:19: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: r205830 - head/sys/netinet/ipfw X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Mar 2010 12:19:23 -0000 Author: luigi Date: Mon Mar 29 12:19:23 2010 New Revision: 205830 URL: http://svn.freebsd.org/changeset/base/205830 Log: Fix handling of set manipulations. This patch has two fixes for potential kernel panics (one wrong index, one access to the wrong lock) and two fixes to wrong logic in a conditional. The potential panics are also on stable/8, so I am going to MFC the fix quickly. Modified: head/sys/netinet/ipfw/ip_fw_sockopt.c Modified: head/sys/netinet/ipfw/ip_fw_sockopt.c ============================================================================== --- head/sys/netinet/ipfw/ip_fw_sockopt.c Mon Mar 29 07:54:20 2010 (r205829) +++ head/sys/netinet/ipfw/ip_fw_sockopt.c Mon Mar 29 12:19:23 2010 (r205830) @@ -270,23 +270,24 @@ del_entry(struct ip_fw_chain *chain, u_i return EINVAL; } - IPFW_UH_WLOCK(chain); /* prevent conflicts among the writers */ + IPFW_UH_WLOCK(chain); /* arbitrate writers */ chain->reap = NULL; /* prepare for deletions */ switch (cmd) { - case 0: /* delete rules with given number (0 is special means all) */ - case 1: /* delete all rules with given set number, rule->set == rulenum */ - case 5: /* delete rules with given number and with given set number. - * rulenum - given rule number; - * new_set - given set number. - */ - /* locate first rule to delete (start), the one after the - * last one (end), and count how many rules to delete (n) + case 0: /* delete rules number N (N == 0 means all) */ + case 1: /* delete all rules in set N */ + case 5: /* delete rules with number N and set "new_set". */ + + /* + * Locate first rule to delete (start), the rule after + * the last one to delete (end), and count how many + * rules to delete (n) */ n = 0; if (cmd == 1) { /* look for a specific set, must scan all */ + new_set = rulenum; for (start = -1, i = 0; i < chain->n_rules; i++) { - if (chain->map[start]->set != rulenum) + if (chain->map[i]->set != rulenum) continue; if (start < 0) start = i; @@ -314,32 +315,42 @@ del_entry(struct ip_fw_chain *chain, u_i error = EINVAL; break; } - /* copy the initial part of the map */ + /* + * bcopy the initial part of the map, then individually + * copy all matching entries between start and end, + * and then bcopy the final part. + * Once we are done we can swap maps and clean up the + * deleted rules (unfortunately we need to repeat a + * convoluted test). + */ if (start > 0) bcopy(chain->map, map, start * sizeof(struct ip_fw *)); - /* copy active rules between start and end */ for (i = ofs = start; i < end; i++) { rule = chain->map[i]; - if (!(rule->set != RESVD_SET && - (cmd == 0 || rule->set == new_set) )) + if (rule->set == RESVD_SET || cmd == 0 || + (rule->set == new_set && + (cmd == 1 || rule->rulenum == rulenum))) map[ofs++] = chain->map[i]; } - /* finally the tail */ bcopy(chain->map + end, map + ofs, (chain->n_rules - end) * sizeof(struct ip_fw *)); + map = swap_map(chain, map, chain->n_rules - n); /* now remove the rules deleted */ for (i = start; i < end; i++) { + int l; rule = map[i]; - if (rule->set != RESVD_SET && - (cmd == 0 || rule->set == new_set) ) { - int l = RULESIZE(rule); - - chain->static_len -= l; - ipfw_remove_dyn_children(rule); - rule->x_next = chain->reap; - chain->reap = rule; - } + /* same test as above */ + if (rule->set == RESVD_SET || cmd == 0 || + (rule->set == new_set && + (cmd == 1 || rule->rulenum == rulenum))) + continue; + + l = RULESIZE(rule); + chain->static_len -= l; + ipfw_remove_dyn_children(rule); + rule->x_next = chain->reap; + chain->reap = rule; } break; @@ -446,7 +457,7 @@ zero_entry(struct ip_fw_chain *chain, u_ break; } if (!cleared) { /* we did not find any matching rules */ - IPFW_WUNLOCK(chain); + IPFW_UH_RUNLOCK(chain); return (EINVAL); } msg = log_only ? "logging count reset" : "cleared"; From owner-svn-src-head@FreeBSD.ORG Mon Mar 29 12:27:49 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C0881106566B; Mon, 29 Mar 2010 12:27:49 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AF6A08FC08; Mon, 29 Mar 2010 12:27:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2TCRndh054630; Mon, 29 Mar 2010 12:27:49 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2TCRn9i054628; Mon, 29 Mar 2010 12:27:49 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201003291227.o2TCRn9i054628@svn.freebsd.org> From: Luigi Rizzo Date: Mon, 29 Mar 2010 12:27: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: r205831 - head/sys/netinet/ipfw X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Mar 2010 12:27:49 -0000 Author: luigi Date: Mon Mar 29 12:27:49 2010 New Revision: 205831 URL: http://svn.freebsd.org/changeset/base/205831 Log: remove a leftover debugging message Modified: head/sys/netinet/ipfw/ip_dn_io.c Modified: head/sys/netinet/ipfw/ip_dn_io.c ============================================================================== --- head/sys/netinet/ipfw/ip_dn_io.c Mon Mar 29 12:19:23 2010 (r205830) +++ head/sys/netinet/ipfw/ip_dn_io.c Mon Mar 29 12:27:49 2010 (r205831) @@ -731,7 +731,6 @@ dummynet_io(struct mbuf **m0, int dir, s goto dropit; } if (fs->sched->fp->enqueue(si, q, m)) { - printf("%s dropped by enqueue\n", __FUNCTION__); /* packet was dropped by enqueue() */ m = *m0 = NULL; goto dropit; From owner-svn-src-head@FreeBSD.ORG Mon Mar 29 13:20:53 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 01D37106564A; Mon, 29 Mar 2010 13:20:53 +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 E494A8FC15; Mon, 29 Mar 2010 13:20:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2TDKqJA066478; Mon, 29 Mar 2010 13:20:52 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2TDKqfe066476; Mon, 29 Mar 2010 13:20:52 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201003291320.o2TDKqfe066476@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Mon, 29 Mar 2010 13:20: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: r205834 - head/usr.bin/calendar X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Mar 2010 13:20:53 -0000 Author: des Date: Mon Mar 29 13:20:52 2010 New Revision: 205834 URL: http://svn.freebsd.org/changeset/base/205834 Log: size_t is not equivalent to int on 64-bit platforms. Pointy hat to: edwin@ Modified: head/usr.bin/calendar/parsedata.c Modified: head/usr.bin/calendar/parsedata.c ============================================================================== --- head/usr.bin/calendar/parsedata.c Mon Mar 29 12:32:16 2010 (r205833) +++ head/usr.bin/calendar/parsedata.c Mon Mar 29 13:20:52 2010 (r205834) @@ -39,9 +39,9 @@ __FBSDID("$FreeBSD$"); static char *showflags(int flags); static int isonlydigits(char *s, int nostar); static const char *getmonthname(int i); -static int checkmonth(char *s, int *len, int *offset, const char **month); +static int checkmonth(char *s, size_t *len, size_t *offset, const char **month); static const char *getdayofweekname(int i); -static int checkdayofweek(char *s, int *len, int *offset, const char **dow); +static int checkdayofweek(char *s, size_t *len, size_t *offset, const char **dow); static int indextooffset(char *s); static int parseoffset(char *s); static char *floattoday(int year, double f); @@ -771,7 +771,7 @@ getmonthname(int i) } static int -checkmonth(char *s, int *len, int *offset, const char **month) +checkmonth(char *s, size_t *len, size_t *offset, const char **month) { struct fixs *n; int i; @@ -822,7 +822,7 @@ getdayofweekname(int i) } static int -checkdayofweek(char *s, int *len, int *offset, const char **dow) +checkdayofweek(char *s, size_t *len, size_t *offset, const char **dow) { struct fixs *n; int i; From owner-svn-src-head@FreeBSD.ORG Mon Mar 29 15:59:46 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 86FF5106580F; Mon, 29 Mar 2010 15:59:45 +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 185EF8FC1E; Mon, 29 Mar 2010 15:59:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2TFxiN3001945; Mon, 29 Mar 2010 15:59:44 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2TFxii5001943; Mon, 29 Mar 2010 15:59:44 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201003291559.o2TFxii5001943@svn.freebsd.org> From: Warner Losh Date: Mon, 29 Mar 2010 15:59: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: r205838 - head/sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Mar 2010 15:59:46 -0000 Author: imp Date: Mon Mar 29 15:59:44 2010 New Revision: 205838 URL: http://svn.freebsd.org/changeset/base/205838 Log: Mark the vtoc.h structure as packed so that it is the right size and layout on arm. MFC after: 7 days Modified: head/sys/sys/vtoc.h Modified: head/sys/sys/vtoc.h ============================================================================== --- head/sys/sys/vtoc.h Mon Mar 29 15:59:37 2010 (r205837) +++ head/sys/sys/vtoc.h Mon Mar 29 15:59:44 2010 (r205838) @@ -97,7 +97,7 @@ struct vtoc8 { } map[VTOC8_NPARTS]; uint16_t magic; uint16_t cksum; -}; +} __packed; #ifdef CTASSERT CTASSERT(sizeof(struct vtoc8) == 512); From owner-svn-src-head@FreeBSD.ORG Mon Mar 29 17:09:05 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4D2ED106566B; Mon, 29 Mar 2010 17:09:05 +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 3C6568FC08; Mon, 29 Mar 2010 17:09:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2TH95b1018083; Mon, 29 Mar 2010 17:09:05 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2TH95LL018081; Mon, 29 Mar 2010 17:09:05 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201003291709.o2TH95LL018081@svn.freebsd.org> From: Rui Paulo Date: Mon, 29 Mar 2010 17:09: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: r205841 - head/sys/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Mar 2010 17:09:05 -0000 Author: rpaulo Date: Mon Mar 29 17:09:04 2010 New Revision: 205841 URL: http://svn.freebsd.org/changeset/base/205841 Log: Add AR9285. Sponsored by: iXsystems, inc Modified: head/sys/conf/NOTES Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Mon Mar 29 16:22:09 2010 (r205840) +++ head/sys/conf/NOTES Mon Mar 29 17:09:04 2010 (r205841) @@ -2091,6 +2091,7 @@ device ath_hal # pci/cardbus chip supp options AH_SUPPORT_AR5416 # enable AR5416 tx/rx descriptors #device ath_ar9160 # AR9160 chips #device ath_ar9280 # AR9280 chips +#device ath_ar9285 # AR9285 chips device ath_rate_sample # SampleRate tx rate control for ath device bwi # Broadcom BCM430* BCM431* device bwn # Broadcom BCM43xx From owner-svn-src-head@FreeBSD.ORG Mon Mar 29 17:24:23 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6F4A610656A8; Mon, 29 Mar 2010 17:24:23 +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 5D1858FC1F; Mon, 29 Mar 2010 17:24:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2THONmM021473; Mon, 29 Mar 2010 17:24:23 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2THONbX021471; Mon, 29 Mar 2010 17:24:23 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201003291724.o2THONbX021471@svn.freebsd.org> From: Warner Losh Date: Mon, 29 Mar 2010 17:24: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: r205842 - head/sys/dev/firewire X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Mar 2010 17:24:23 -0000 Author: imp Date: Mon Mar 29 17:24:23 2010 New Revision: 205842 URL: http://svn.freebsd.org/changeset/base/205842 Log: Cast a bus_size_t to a (size_t) to use %zd specifier. Not quite the right thing to do, but it is in compat code I don't want to sort out at the moment. Modified: head/sys/dev/firewire/sbp.c Modified: head/sys/dev/firewire/sbp.c ============================================================================== --- head/sys/dev/firewire/sbp.c Mon Mar 29 17:09:04 2010 (r205841) +++ head/sys/dev/firewire/sbp.c Mon Mar 29 17:24:23 2010 (r205842) @@ -2698,7 +2698,7 @@ SBP_DEBUG(0) #else "segment length(%zd) is less than 16." #endif - "(seg=%d/%d)\n", s->ds_len, i+1, seg); + "(seg=%d/%d)\n", (size_t)s->ds_len, i+1, seg); END_DEBUG if (s->ds_len > SBP_SEG_MAX) panic("ds_len > SBP_SEG_MAX, fix busdma code"); From owner-svn-src-head@FreeBSD.ORG Mon Mar 29 17:25:06 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 902CD106566C; Mon, 29 Mar 2010 17:25:06 +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 7FC708FC15; Mon, 29 Mar 2010 17:25:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2THP6pd021680; Mon, 29 Mar 2010 17:25:06 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2THP6a4021678; Mon, 29 Mar 2010 17:25:06 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201003291725.o2THP6a4021678@svn.freebsd.org> From: Warner Losh Date: Mon, 29 Mar 2010 17:25: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: r205843 - head/sys/dev/malo X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Mar 2010 17:25:06 -0000 Author: imp Date: Mon Mar 29 17:25:06 2010 New Revision: 205843 URL: http://svn.freebsd.org/changeset/base/205843 Log: Cast bus_space_t to a intmax_t and use %j to print it instead of assuming it is size_t sized and using %z. Modified: head/sys/dev/malo/if_malo.c Modified: head/sys/dev/malo/if_malo.c ============================================================================== --- head/sys/dev/malo/if_malo.c Mon Mar 29 17:24:23 2010 (r205842) +++ head/sys/dev/malo/if_malo.c Mon Mar 29 17:25:06 2010 (r205843) @@ -168,8 +168,8 @@ malo_bar0_read4(struct malo_softc *sc, b static void malo_bar0_write4(struct malo_softc *sc, bus_size_t off, uint32_t val) { - DPRINTF(sc, MALO_DEBUG_FW, "%s: off 0x%zx val 0x%x\n", - __func__, off, val); + DPRINTF(sc, MALO_DEBUG_FW, "%s: off 0x%jx val 0x%x\n", + __func__, (intmax_t)off, val); bus_space_write_4(sc->malo_io0t, sc->malo_io0h, off, val); } From owner-svn-src-head@FreeBSD.ORG Mon Mar 29 17:26:24 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AAB981065676; Mon, 29 Mar 2010 17:26:24 +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 9A3ED8FC18; Mon, 29 Mar 2010 17:26:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2THQOHD022005; Mon, 29 Mar 2010 17:26:24 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2THQOvI022003; Mon, 29 Mar 2010 17:26:24 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201003291726.o2THQOvI022003@svn.freebsd.org> From: Warner Losh Date: Mon, 29 Mar 2010 17:26: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: r205844 - head/sys/dev/ubsec X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Mar 2010 17:26:24 -0000 Author: imp Date: Mon Mar 29 17:26:24 2010 New Revision: 205844 URL: http://svn.freebsd.org/changeset/base/205844 Log: Cast the bus_size_t to a intmax_t rather than assuming type-punning to a size_t. Switch from %z to %j. Modified: head/sys/dev/ubsec/ubsec.c Modified: head/sys/dev/ubsec/ubsec.c ============================================================================== --- head/sys/dev/ubsec/ubsec.c Mon Mar 29 17:25:06 2010 (r205843) +++ head/sys/dev/ubsec/ubsec.c Mon Mar 29 17:26:24 2010 (r205844) @@ -1886,8 +1886,8 @@ ubsec_dma_malloc( BUS_DMA_NOWAIT, &dma->dma_map); if (r != 0) { device_printf(sc->sc_dev, "ubsec_dma_malloc: " - "bus_dmammem_alloc failed; size %zu, error %u\n", - size, r); + "bus_dmammem_alloc failed; size %ju, error %u\n", + (intmax_t)size, r); goto fail_2; } From owner-svn-src-head@FreeBSD.ORG Mon Mar 29 17:31:55 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DDE11106566C; Mon, 29 Mar 2010 17:31:55 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B25808FC0C; Mon, 29 Mar 2010 17:31:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2THVtDO023214; Mon, 29 Mar 2010 17:31:55 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2THVtlV023212; Mon, 29 Mar 2010 17:31:55 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201003291731.o2THVtlV023212@svn.freebsd.org> From: Warner Losh Date: Mon, 29 Mar 2010 17:31: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: r205845 - head/sys/modules X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Mar 2010 17:31:56 -0000 Author: imp Date: Mon Mar 29 17:31:55 2010 New Revision: 205845 URL: http://svn.freebsd.org/changeset/base/205845 Log: Make all the modules build on arm (modulo ipfilter, which I'm looking into): o Don't build vpo and syscons on mips or arm either o Add a section for mips and arm breakages, and document why. This is easier than opting in on all the other architectures: # no BUS_SPACE_UNSPECIFIED: bce, bwi, bwn, mfi, mpt, siba_bwn # No barrier instruction support (specific to this driver): sym # no uart_cpu_$MACHINE_ARCH: uart (mips has, by inspection, the same issues as arm, so ditto for it) MFC after: 7 days Modified: head/sys/modules/Makefile Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Mon Mar 29 17:26:24 2010 (r205844) +++ head/sys/modules/Makefile Mon Mar 29 17:31:55 2010 (r205845) @@ -34,15 +34,15 @@ SUBDIR= ${_3dfx} \ ata \ ath \ ${_auxio} \ - bce \ + ${_bce} \ bfe \ bge \ ${_bios} \ ${_bktr} \ ${_bm} \ bridgestp \ - bwi \ - bwn \ + ${_bwi} \ + ${_bwn} \ cam \ ${_canbepm} \ ${_canbus} \ @@ -66,7 +66,7 @@ SUBDIR= ${_3dfx} \ ${_cryptodev} \ ${_cs} \ ${_ctau} \ - cxgb \ + ${_cxgb} \ ${_cyclic} \ dc \ dcons \ @@ -175,13 +175,13 @@ SUBDIR= ${_3dfx} \ mcd \ md \ mem \ - mfi \ + ${_mfi} \ mii \ mlx \ ${_mly} \ mmc \ mmcsd \ - mpt \ + ${_mpt} \ mqueue \ msdosfs \ msdosfs_iconv \ @@ -251,7 +251,7 @@ SUBDIR= ${_3dfx} \ sdhci \ sem \ sf \ - siba_bwn \ + ${_siba_bwn} \ siis \ sis \ sk \ @@ -268,7 +268,7 @@ SUBDIR= ${_3dfx} \ stge \ ${_streams} \ ${_svr4} \ - sym \ + ${_sym} \ ${_syscons} \ sysvipc \ ti \ @@ -279,7 +279,7 @@ SUBDIR= ${_3dfx} \ twe \ tx \ txp \ - uart \ + ${_uart} \ ubsec \ udf \ udf_iconv \ @@ -312,11 +312,26 @@ SUBDIR= ${_3dfx} \ ${_zfs} \ zlib \ -.if ${MACHINE_ARCH} != "powerpc" +.if ${MACHINE_ARCH} != "powerpc" && ${MACHINE_ARCH} != "arm" && \ + ${MACHINE_ARCH} != "mips" _syscons= syscons _vpo= vpo .endif +.if ${MACHINE_ARCH} != "arm" && ${MACHINE_ARCH} != "mips" +# no BUS_SPACE_UNSPECIFIED +_bce= bce +_bwi= bwi +_bwn= bwn +_mfi= mfi +_mpt= mpt +_siba_bwn= siba_bwn +# No barrier instruction support (specific to this driver) +_sym= sym +# no uart_cpu_$MACHINE_ARCH +_uart= uart +.endif + .if ${MK_CRYPT} != "no" || defined(ALL_MODULES) .if exists(${.CURDIR}/../opencrypto) _crypto= crypto From owner-svn-src-head@FreeBSD.ORG Mon Mar 29 17:39:39 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 02FC1106564A; Mon, 29 Mar 2010 17:39: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 E5BCE8FC15; Mon, 29 Mar 2010 17:39:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2THdcZ2024951; Mon, 29 Mar 2010 17:39:38 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2THdcOs024945; Mon, 29 Mar 2010 17:39:38 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201003291739.o2THdcOs024945@svn.freebsd.org> From: Edward Tomasz Napierala Date: Mon, 29 Mar 2010 17:39: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: r205846 - head/share/man/man9 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Mar 2010 17:39:39 -0000 Author: trasz Date: Mon Mar 29 17:39:38 2010 New Revision: 205846 URL: http://svn.freebsd.org/changeset/base/205846 Log: Fix references. Modified: head/share/man/man9/ieee80211.9 head/share/man/man9/ieee80211_crypto.9 head/share/man/man9/ieee80211_node.9 head/share/man/man9/ieee80211_output.9 head/share/man/man9/ieee80211_scan.9 Modified: head/share/man/man9/ieee80211.9 ============================================================================== --- head/share/man/man9/ieee80211.9 Mon Mar 29 17:31:55 2010 (r205845) +++ head/share/man/man9/ieee80211.9 Mon Mar 29 17:39:38 2010 (r205846) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 4, 2009 +.Dd March 29, 2010 .Dt NET80211 9 .Os .Sh NAME @@ -551,11 +551,18 @@ Device supports Reduced Inter Frame Spac .Sh SEE ALSO .Xr ioctl 2 , .Xr ndis 4 , +.Xr ieee80211_amrr 9 , +.Xr ieee80211_beacon 9 , +.Xr ieee80211_bmiss 9 , +.Xr ieee80211_crypto 9 , +.Xr ieee80211_ddb 9 , .Xr ieee80211_input 9 , -.Xr ieee80211_input_all 9 , -.Xr ieee80211_scan_next 9 , -.Xr ieee80211_recv_action 9 , -.Xr ieee80211_send_action 9 , -.Xr ieee80211_radiotap_attach 9 , +.Xr ieee80211_node 9 , +.Xr ieee80211_output 9 , +.Xr ieee80211_proto 9 , +.Xr ieee80211_radiotap 9 , +.Xr ieee80211_regdomain 9 , +.Xr ieee80211_scan 9 , +.Xr ieee80211_vap 9 , .Xr ifnet 9 , .Xr malloc 9 Modified: head/share/man/man9/ieee80211_crypto.9 ============================================================================== --- head/share/man/man9/ieee80211_crypto.9 Mon Mar 29 17:31:55 2010 (r205845) +++ head/share/man/man9/ieee80211_crypto.9 Mon Mar 29 17:39:38 2010 (r205846) @@ -27,7 +27,7 @@ .\" $FreeBSD$ .\" $Id: ieee80211_crypto.9,v 1.3 2004/03/04 10:42:56 bruce Exp $ .\" -.Dd August 4, 2009 +.Dd March 29, 2010 .Dt IEEE80211_CRYPTO 9 .Os .Sh NAME @@ -253,6 +253,7 @@ and These calls also synchronize hardware key state update when receive traffic is active. .Sh SEE ALSO +.Xr ieee80211 9 , .Xr ioctl 2 , .Xr wlan_ccmp 4 , .Xr wlan_tkip 4 , Modified: head/share/man/man9/ieee80211_node.9 ============================================================================== --- head/share/man/man9/ieee80211_node.9 Mon Mar 29 17:31:55 2010 (r205845) +++ head/share/man/man9/ieee80211_node.9 Mon Mar 29 17:39:38 2010 (r205846) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 4, 2009 +.Dd March 29, 2010 .Dt IEEE80211_NODE 9 .Os .Sh NAME @@ -246,6 +246,6 @@ If the specified index is .Dv IEEE80211_KEYIX_NONE then a normal lookup is done without a table update. .Sh SEE ALSO -.Xr ddb 9 +.Xr ddb 9 , .Xr ieee80211 9 , .Xr ieee80211_proto 9 Modified: head/share/man/man9/ieee80211_output.9 ============================================================================== --- head/share/man/man9/ieee80211_output.9 Mon Mar 29 17:31:55 2010 (r205845) +++ head/share/man/man9/ieee80211_output.9 Mon Mar 29 17:39:38 2010 (r205846) @@ -27,7 +27,7 @@ .\" $FreeBSD$ .\" $Id: ieee80211_output.9,v 1.5 2004/03/04 12:31:18 bruce Exp $ .\" -.Dd August 4, 2009 +.Dd March 29, 2010 .Dt IEEE80211_OUTPUT 9 .Os .Sh NAME @@ -189,6 +189,6 @@ a device may not report if an ACK frame transmit requests in its hardware and only report status on whether the frame was successfully queued. .Sh SEE ALSO -.Xr bpf 4 +.Xr bpf 4 , .Xr ieee80211 9 , .Xr ifnet 9 Modified: head/share/man/man9/ieee80211_scan.9 ============================================================================== --- head/share/man/man9/ieee80211_scan.9 Mon Mar 29 17:31:55 2010 (r205845) +++ head/share/man/man9/ieee80211_scan.9 Mon Mar 29 17:39:38 2010 (r205846) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 20, 2010 +.Dd March 29, 2010 .Dt IEEE80211_SCAN 9 .Os .Sh NAME @@ -346,5 +346,5 @@ applications through the request. .Sh SEE ALSO .Xr ioctl 2 , -.Xr ieee80211 9 . +.Xr ieee80211 9 , .Xr ieee80211_proto 9 From owner-svn-src-head@FreeBSD.ORG Mon Mar 29 18:04:06 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D59001065672; Mon, 29 Mar 2010 18:04:06 +0000 (UTC) (envelope-from mjacob@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C2F0E8FC18; Mon, 29 Mar 2010 18:04:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2TI46Ah030436; Mon, 29 Mar 2010 18:04:06 GMT (envelope-from mjacob@svn.freebsd.org) Received: (from mjacob@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2TI46uN030433; Mon, 29 Mar 2010 18:04:06 GMT (envelope-from mjacob@svn.freebsd.org) Message-Id: <201003291804.o2TI46uN030433@svn.freebsd.org> From: Matt Jacob Date: Mon, 29 Mar 2010 18:04: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: r205847 - in head: sbin/geom/class/multipath sys/geom/multipath X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Mar 2010 18:04:06 -0000 Author: mjacob Date: Mon Mar 29 18:04:06 2010 New Revision: 205847 URL: http://svn.freebsd.org/changeset/base/205847 Log: Change how multipath labels are created and managed. This makes it easier to support various storage boxes which really aren't active-active. We only write the label on the *first* provider. For all other providers we just "add" the disk. This also allows for an "add" verb. A usage implication is that you should specificy the currently active storage path as the first provider. Note that this does not add RDAC-like functionality, but better allows for autovolumefailover configurations (additional checkins elsewhere will support this). Sponsored by: Panasas MFC after: 1 month Modified: head/sbin/geom/class/multipath/geom_multipath.c head/sys/geom/multipath/g_multipath.c Modified: head/sbin/geom/class/multipath/geom_multipath.c ============================================================================== --- head/sbin/geom/class/multipath/geom_multipath.c Mon Mar 29 17:39:38 2010 (r205846) +++ head/sbin/geom/class/multipath/geom_multipath.c Mon Mar 29 18:04:06 2010 (r205847) @@ -48,6 +48,7 @@ uint32_t version = G_MULTIPATH_VERSION; static void mp_main(struct gctl_req *, unsigned int); static void mp_label(struct gctl_req *); static void mp_clear(struct gctl_req *); +static void mp_add(struct gctl_req *); struct g_command class_commands[] = { { @@ -55,6 +56,10 @@ struct g_command class_commands[] = { NULL, "[-v] name prov ..." }, { + "add", G_FLAG_VERBOSE | G_FLAG_LOADKLD, mp_main, G_NULL_OPTS, + NULL, "[-v] name prov ..." + }, + { "destroy", G_FLAG_VERBOSE, NULL, G_NULL_OPTS, NULL, "[-v] prov ..." }, @@ -85,6 +90,8 @@ mp_main(struct gctl_req *req, unsigned i } if (strcmp(name, "label") == 0) { mp_label(req); + } else if (strcmp(name, "add") == 0) { + mp_add(req); } else if (strcmp(name, "clear") == 0) { mp_clear(req); } else { @@ -101,7 +108,7 @@ mp_label(struct gctl_req *req) char *ptr; uuid_t uuid; uint32_t secsize = 0, ssize, status; - const char *name; + const char *name, *mpname; int error, i, nargs; nargs = gctl_get_int(req, "nargs"); @@ -156,8 +163,8 @@ mp_label(struct gctl_req *req) */ strlcpy(md.md_magic, G_MULTIPATH_MAGIC, sizeof(md.md_magic)); md.md_version = G_MULTIPATH_VERSION; - name = gctl_get_ascii(req, "arg0"); - strlcpy(md.md_name, name, sizeof(md.md_name)); + mpname = gctl_get_ascii(req, "arg0"); + strlcpy(md.md_name, mpname, sizeof(md.md_name)); md.md_size = disksiz; md.md_sectorsize = secsize; uuid_create(&uuid, &status); @@ -174,46 +181,44 @@ mp_label(struct gctl_req *req) free(ptr); /* - * Clear last sector first for each provider to spoil anything extant + * Clear metadata on initial provider first. */ - for (i = 1; i < nargs; i++) { - name = gctl_get_ascii(req, "arg%d", i); - error = g_metadata_clear(name, NULL); - if (error != 0) { - gctl_error(req, "cannot clear metadata on %s: %s.", - name, strerror(error)); - return; - } + name = gctl_get_ascii(req, "arg1"); + error = g_metadata_clear(name, NULL); + if (error != 0) { + gctl_error(req, "cannot clear metadata on %s: %s.", name, strerror(error)); + return; } + /* + * encode the metadata + */ multipath_metadata_encode(&md, sector); /* - * Ok, store metadata. + * Store metadata on the initial provider. */ - for (i = 1; i < nargs; i++) { - name = gctl_get_ascii(req, "arg%d", i); - error = g_metadata_store(name, sector, secsize); - if (error != 0) { - fprintf(stderr, "Can't store metadata on %s: %s.\n", - name, strerror(error)); - goto fail; - } + error = g_metadata_store(name, sector, secsize); + if (error != 0) { + gctl_error(req, "cannot store metadata on %s: %s.", name, strerror(error)); + return; } - return; -fail: /* - * Clear last sector first for each provider to spoil anything extant + * Now add the rest of the providers. */ - for (i = 1; i < nargs; i++) { - name = gctl_get_ascii(req, "arg%d", i); - error = g_metadata_clear(name, NULL); - if (error != 0) { - gctl_error(req, "cannot clear metadata on %s: %s.", - name, strerror(error)); + error = gctl_change_param(req, "verb", -1, "add"); + if (error) { + gctl_error(req, "unable to change verb to \"add\": %s.", strerror(error)); + return; + } + for (i = 2; i < nargs; i++) { + error = gctl_change_param(req, "arg1", -1, gctl_get_ascii(req, "arg%d", i)); + if (error) { + gctl_error(req, "unable to add %s to %s: %s.", gctl_get_ascii(req, "arg%d", i), mpname, strerror(error)); continue; } + mp_add(req); } } @@ -221,22 +226,23 @@ static void mp_clear(struct gctl_req *req) { const char *name; - int error, i, nargs; + int error; - nargs = gctl_get_int(req, "nargs"); - if (nargs < 1) { - gctl_error(req, "Too few arguments."); - return; + name = gctl_get_ascii(req, "arg1"); + error = g_metadata_clear(name, G_MULTIPATH_MAGIC); + if (error != 0) { + fprintf(stderr, "Can't clear metadata on %s: %s.\n", name, strerror(error)); + gctl_error(req, "Not fully done."); } +} - for (i = 0; i < nargs; i++) { - name = gctl_get_ascii(req, "arg%d", i); - error = g_metadata_clear(name, G_MULTIPATH_MAGIC); - if (error != 0) { - fprintf(stderr, "Can't clear metadata on %s: %s.\n", - name, strerror(error)); - gctl_error(req, "Not fully done."); - continue; - } - } +static void +mp_add(struct gctl_req *req) +{ + const char *errstr; + + errstr = gctl_issue(req); + if (errstr != NULL && errstr[0] != '\0') { + gctl_error(req, "%s", errstr); + } } Modified: head/sys/geom/multipath/g_multipath.c ============================================================================== --- head/sys/geom/multipath/g_multipath.c Mon Mar 29 17:39:38 2010 (r205846) +++ head/sys/geom/multipath/g_multipath.c Mon Mar 29 18:04:06 2010 (r205847) @@ -70,6 +70,7 @@ static int g_multipath_destroy(struct g_ static int g_multipath_destroy_geom(struct gctl_req *, struct g_class *, struct g_geom *); +static struct g_geom *g_multipath_find_geom(struct g_class *, const char *); static int g_multipath_rotate(struct g_geom *); static g_taste_t g_multipath_taste; @@ -602,14 +603,13 @@ g_multipath_taste(struct g_class *mp, st } static void -g_multipath_ctl_create(struct gctl_req *req, struct g_class *mp) +g_multipath_ctl_add(struct gctl_req *req, struct g_class *mp) { struct g_geom *gp; - struct g_provider *pp0, *pp1; - struct g_multipath_metadata md; - const char *name, *mpname, *uuid; + struct g_consumer *cp; + struct g_provider *pp, *pp0; + const char *name, *mpname; static const char devpf[6] = "/dev/"; - int *nargs, error; g_topology_assert(); @@ -618,14 +618,9 @@ g_multipath_ctl_create(struct gctl_req * gctl_error(req, "No 'arg0' argument"); return; } - - nargs = gctl_get_paraml(req, "nargs", sizeof(*nargs)); - if (nargs == NULL) { - gctl_error(req, "No 'nargs' argument"); - return; - } - if (*nargs != 4) { - gctl_error(req, "missing device or uuid arguments"); + gp = g_multipath_find_geom(mp, mpname); + if (gp == NULL) { + gctl_error(req, "Device %s is invalid", mpname); return; } @@ -636,78 +631,45 @@ g_multipath_ctl_create(struct gctl_req * } if (strncmp(name, devpf, 5) == 0) name += 5; - pp0 = g_provider_by_name(name); - if (pp0 == NULL) { - gctl_error(req, "Provider %s is invalid", name); - return; - } - - name = gctl_get_asciiparam(req, "arg2"); - if (name == NULL) { - gctl_error(req, "No 'arg2' argument"); - return; - } - if (strncmp(name, devpf, 5) == 0) - name += 5; - pp1 = g_provider_by_name(name); - if (pp1 == NULL) { + pp = g_provider_by_name(name); + if (pp == NULL) { gctl_error(req, "Provider %s is invalid", name); return; } - uuid = gctl_get_asciiparam(req, "arg3"); - if (uuid == NULL) { - gctl_error(req, "No uuid argument"); - return; - } - if (strlen(uuid) != 36) { - gctl_error(req, "Malformed uuid argument"); - return; - } - /* - * Check to make sure parameters from the two providers are the same + * Check to make sure parameters match, if we already have one. */ - if (pp0 == pp1) { - gctl_error(req, "providers %s and %s are the same", - pp0->name, pp1->name); - return; - } - if (pp0->mediasize != pp1->mediasize) { - gctl_error(req, "Provider %s is %jd; Provider %s is %jd", - pp0->name, (intmax_t) pp0->mediasize, - pp1->name, (intmax_t) pp1->mediasize); - return; + cp = LIST_FIRST(&gp->consumer); + if (cp) { + pp0 = cp->provider; + } else { + pp0 = NULL; } - if (pp0->sectorsize != pp1->sectorsize) { - gctl_error(req, "Provider %s has sectorsize %u; Provider %s " - "has sectorsize %u", pp0->name, pp0->sectorsize, - pp1->name, pp1->sectorsize); - return; + if (pp0) { + if (pp0 == pp) { + gctl_error(req, "providers %s and %s are the same", + pp0->name, pp->name); + return; + } + if (pp0->mediasize != pp->mediasize) { + gctl_error(req, "Provider %s is %jd; Provider %s is %jd", + pp0->name, (intmax_t) pp0->mediasize, + pp->name, (intmax_t) pp->mediasize); + return; + } + if (pp0->sectorsize != pp->sectorsize) { + gctl_error(req, "Provider %s has sectorsize %u; Provider %s " + "has sectorsize %u", pp0->name, pp0->sectorsize, + pp->name, pp->sectorsize); + return; + } } /* - * cons up enough of a metadata structure to use. + * Now add.... */ - memset(&md, 0, sizeof(md)); - md.md_size = pp0->mediasize; - md.md_sectorsize = pp0->sectorsize; - strlcpy(md.md_name, mpname, sizeof(md.md_name)); - strlcpy(md.md_uuid, uuid, sizeof(md.md_uuid)); - - gp = g_multipath_create(mp, &md); - if (gp == NULL) - return; - error = g_multipath_add_disk(gp, pp0); - if (error) { - g_multipath_destroy(gp); - return; - } - error = g_multipath_add_disk(gp, pp1); - if (error) { - g_multipath_destroy(gp); - return; - } + (void) g_multipath_add_disk(gp, pp); } static struct g_geom * @@ -815,8 +777,8 @@ g_multipath_config(struct gctl_req *req, gctl_error(req, "No 'version' argument"); } else if (*version != G_MULTIPATH_VERSION) { gctl_error(req, "Userland and kernel parts are out of sync"); - } else if (strcmp(verb, "create") == 0) { - g_multipath_ctl_create(req, mp); + } else if (strcmp(verb, "add") == 0) { + g_multipath_ctl_add(req, mp); } else if (strcmp(verb, "destroy") == 0) { g_multipath_ctl_destroy(req, mp); } else if (strcmp(verb, "rotate") == 0) { From owner-svn-src-head@FreeBSD.ORG Mon Mar 29 18:18:41 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ADAED106564A; Mon, 29 Mar 2010 18:18:41 +0000 (UTC) (envelope-from nparhar@gmail.com) Received: from mail-pw0-f54.google.com (mail-pw0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 6C3AC8FC19; Mon, 29 Mar 2010 18:18:41 +0000 (UTC) Received: by pwj4 with SMTP id 4so8693725pwj.13 for ; Mon, 29 Mar 2010 11:18:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:mail-followup-to:references:mime-version:content-type :content-disposition:in-reply-to:user-agent; bh=mrGIBlIhzNSyBlzuLGQ7xUK0IGBo3iJqdxp0z+ckXsY=; b=na9ezlPjLGdYyN9414M0ShhyrAgH3oEmc4+In2nelZLdNrqt/x4oIby1XpROfymMRb e3eh83A2JWzIB1643CTsD+UcW+z/PBnTzL6OF8PmLRLtBOvGgqzBHGrHXonDBkxLfaBu azvRYrAYjmE96Fiqdqj5W2BWftHiD7zkv/olM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; b=PhxmJuXb+HP1F/7iMjygl1cWeLPTsMhDK+FjEslnKObQoo9tT/Tj1RWQNDISFcnULR xs1sdXbC+7zM6x2otMKsmler7tYPN9lJw0pzG39kE7NeaB1Bd2kz9Hc+lmHixwUPQg/N jT1oscq8sUoX8p9ro2DwhYEa0U/dWf2Ov6k3I= Received: by 10.141.105.10 with SMTP id h10mr1298748rvm.45.1269886720462; Mon, 29 Mar 2010 11:18:40 -0700 (PDT) Received: from gypsy (c-67-161-10-127.hsd1.ca.comcast.net [67.161.10.127]) by mx.google.com with ESMTPS id r27sm1474878rvq.17.2010.03.29.11.18.37 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 29 Mar 2010 11:18:39 -0700 (PDT) Date: Mon, 29 Mar 2010 11:18:31 -0700 From: Navdeep Parhar To: Warner Losh Message-ID: <20100329181831.GA14698@gypsy> Mail-Followup-To: Warner Losh , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201003291731.o2THVtlV023212@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201003291731.o2THVtlV023212@svn.freebsd.org> 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: r205845 - head/sys/modules X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Mar 2010 18:18:41 -0000 This commit has unplugged cxgb from the build, even for the (!arm && !mips) case. Please fix. Regards, Navdeep On Mon, Mar 29, 2010 at 05:31:55PM +0000, Warner Losh wrote: > Author: imp > Date: Mon Mar 29 17:31:55 2010 > New Revision: 205845 > URL: http://svn.freebsd.org/changeset/base/205845 > > Log: > Make all the modules build on arm (modulo ipfilter, which I'm looking > into): > > o Don't build vpo and syscons on mips or arm either > o Add a section for mips and arm breakages, and document why. > This is easier than opting in on all the other architectures: > # no BUS_SPACE_UNSPECIFIED: bce, bwi, bwn, mfi, mpt, siba_bwn > # No barrier instruction support (specific to this driver): sym > # no uart_cpu_$MACHINE_ARCH: uart > > (mips has, by inspection, the same issues as arm, so ditto for it) > > MFC after: 7 days > > Modified: > head/sys/modules/Makefile > > Modified: head/sys/modules/Makefile > ============================================================================== > --- head/sys/modules/Makefile Mon Mar 29 17:26:24 2010 (r205844) > +++ head/sys/modules/Makefile Mon Mar 29 17:31:55 2010 (r205845) > @@ -34,15 +34,15 @@ SUBDIR= ${_3dfx} \ > ata \ > ath \ > ${_auxio} \ > - bce \ > + ${_bce} \ > bfe \ > bge \ > ${_bios} \ > ${_bktr} \ > ${_bm} \ > bridgestp \ > - bwi \ > - bwn \ > + ${_bwi} \ > + ${_bwn} \ > cam \ > ${_canbepm} \ > ${_canbus} \ > @@ -66,7 +66,7 @@ SUBDIR= ${_3dfx} \ > ${_cryptodev} \ > ${_cs} \ > ${_ctau} \ > - cxgb \ > + ${_cxgb} \ > ${_cyclic} \ > dc \ > dcons \ > @@ -175,13 +175,13 @@ SUBDIR= ${_3dfx} \ > mcd \ > md \ > mem \ > - mfi \ > + ${_mfi} \ > mii \ > mlx \ > ${_mly} \ > mmc \ > mmcsd \ > - mpt \ > + ${_mpt} \ > mqueue \ > msdosfs \ > msdosfs_iconv \ > @@ -251,7 +251,7 @@ SUBDIR= ${_3dfx} \ > sdhci \ > sem \ > sf \ > - siba_bwn \ > + ${_siba_bwn} \ > siis \ > sis \ > sk \ > @@ -268,7 +268,7 @@ SUBDIR= ${_3dfx} \ > stge \ > ${_streams} \ > ${_svr4} \ > - sym \ > + ${_sym} \ > ${_syscons} \ > sysvipc \ > ti \ > @@ -279,7 +279,7 @@ SUBDIR= ${_3dfx} \ > twe \ > tx \ > txp \ > - uart \ > + ${_uart} \ > ubsec \ > udf \ > udf_iconv \ > @@ -312,11 +312,26 @@ SUBDIR= ${_3dfx} \ > ${_zfs} \ > zlib \ > > -.if ${MACHINE_ARCH} != "powerpc" > +.if ${MACHINE_ARCH} != "powerpc" && ${MACHINE_ARCH} != "arm" && \ > + ${MACHINE_ARCH} != "mips" > _syscons= syscons > _vpo= vpo > .endif > > +.if ${MACHINE_ARCH} != "arm" && ${MACHINE_ARCH} != "mips" > +# no BUS_SPACE_UNSPECIFIED > +_bce= bce > +_bwi= bwi > +_bwn= bwn > +_mfi= mfi > +_mpt= mpt > +_siba_bwn= siba_bwn > +# No barrier instruction support (specific to this driver) > +_sym= sym > +# no uart_cpu_$MACHINE_ARCH > +_uart= uart > +.endif > + > .if ${MK_CRYPT} != "no" || defined(ALL_MODULES) > .if exists(${.CURDIR}/../opencrypto) > _crypto= crypto > _______________________________________________ > svn-src-all@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-svn-src-head@FreeBSD.ORG Mon Mar 29 18:47:04 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AE2E1106566B; Mon, 29 Mar 2010 18:47:04 +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 9DF588FC08; Mon, 29 Mar 2010 18:47:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2TIl4I8040188; Mon, 29 Mar 2010 18:47:04 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2TIl4Pa040186; Mon, 29 Mar 2010 18:47:04 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201003291847.o2TIl4Pa040186@svn.freebsd.org> From: John Baldwin Date: Mon, 29 Mar 2010 18:47: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: r205850 - head/sys/amd64/include X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Mar 2010 18:47:04 -0000 Author: jhb Date: Mon Mar 29 18:47:04 2010 New Revision: 205850 URL: http://svn.freebsd.org/changeset/base/205850 Log: Cosmetic tweak to use a type suffix instead of a cast to force a constant to be a long. Modified: head/sys/amd64/include/reg.h Modified: head/sys/amd64/include/reg.h ============================================================================== --- head/sys/amd64/include/reg.h Mon Mar 29 18:35:55 2010 (r205849) +++ head/sys/amd64/include/reg.h Mon Mar 29 18:47:04 2010 (r205850) @@ -109,7 +109,7 @@ struct dbreg { #define DBREG_DR7_EXEC 0x00 /* break on execute */ #define DBREG_DR7_WRONLY 0x01 /* break on write */ #define DBREG_DR7_RDWR 0x03 /* break on read or write */ -#define DBREG_DR7_MASK(i) ((u_long)0xf << ((i) * 4 + 16) | 0x3 << (i) * 2) +#define DBREG_DR7_MASK(i) (0xful << ((i) * 4 + 16) | 0x3 << (i) * 2) #define DBREG_DR7_SET(i, len, access, enable) \ ((u_long)((len) << 2 | (access)) << ((i) * 4 + 16) | (enable) << (i) * 2) #define DBREG_DR7_GD 0x2000 From owner-svn-src-head@FreeBSD.ORG Mon Mar 29 19:13:35 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8696B1065675; Mon, 29 Mar 2010 19:13:35 +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 746A18FC15; Mon, 29 Mar 2010 19:13:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2TJDZAq046157; Mon, 29 Mar 2010 19:13:35 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2TJDZmU046152; Mon, 29 Mar 2010 19:13:35 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201003291913.o2TJDZmU046152@svn.freebsd.org> From: John Baldwin Date: Mon, 29 Mar 2010 19:13: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: r205851 - in head/sys: amd64/amd64 amd64/include i386/i386 i386/include X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Mar 2010 19:13:35 -0000 Author: jhb Date: Mon Mar 29 19:13:34 2010 New Revision: 205851 URL: http://svn.freebsd.org/changeset/base/205851 Log: Add a handler for the local APIC error interrupt. For now it just prints out the current value of the local APIC error register when the interrupt fires. MFC after: 1 week Modified: head/sys/amd64/amd64/apic_vector.S head/sys/amd64/amd64/local_apic.c head/sys/amd64/include/apicvar.h head/sys/i386/i386/apic_vector.s head/sys/i386/i386/local_apic.c head/sys/i386/include/apicvar.h Modified: head/sys/amd64/amd64/apic_vector.S ============================================================================== --- head/sys/amd64/amd64/apic_vector.S Mon Mar 29 18:47:04 2010 (r205850) +++ head/sys/amd64/amd64/apic_vector.S Mon Mar 29 19:13:34 2010 (r205851) @@ -104,6 +104,18 @@ IDTVEC(timerint) MEXITCOUNT jmp doreti +/* + * Local APIC error interrupt handler. + */ + .text + SUPERALIGN_TEXT +IDTVEC(errorint) + PUSH_FRAME + FAKE_MCOUNT(TF_RIP(%rsp)) + call lapic_handle_error + MEXITCOUNT + jmp doreti + #ifdef SMP /* * Global address space TLB shootdown. Modified: head/sys/amd64/amd64/local_apic.c ============================================================================== --- head/sys/amd64/amd64/local_apic.c Mon Mar 29 18:47:04 2010 (r205850) +++ head/sys/amd64/amd64/local_apic.c Mon Mar 29 19:13:34 2010 (r205851) @@ -115,14 +115,12 @@ struct lapic { int la_ioint_irqs[APIC_NUM_IOINTS + 1]; } static lapics[MAX_APIC_ID + 1]; -/* XXX: should thermal be an NMI? */ - /* Global defaults for local APIC LVT entries. */ static struct lvt lvts[LVT_MAX + 1] = { { 1, 1, 1, 1, APIC_LVT_DM_EXTINT, 0 }, /* LINT0: masked ExtINT */ { 1, 1, 0, 1, APIC_LVT_DM_NMI, 0 }, /* LINT1: NMI */ { 1, 1, 1, 1, APIC_LVT_DM_FIXED, APIC_TIMER_INT }, /* Timer */ - { 1, 1, 1, 1, APIC_LVT_DM_FIXED, APIC_ERROR_INT }, /* Error */ + { 1, 1, 0, 1, APIC_LVT_DM_FIXED, APIC_ERROR_INT }, /* Error */ { 1, 1, 1, 1, APIC_LVT_DM_NMI, 0 }, /* PMC */ { 1, 1, 1, 1, APIC_LVT_DM_FIXED, APIC_THERMAL_INT }, /* Thermal */ }; @@ -225,7 +223,10 @@ lapic_init(vm_paddr_t addr) /* Local APIC timer interrupt. */ setidt(APIC_TIMER_INT, IDTVEC(timerint), SDT_SYSIGT, SEL_KPL, 0); - /* XXX: error/thermal interrupts */ + /* Local APIC error interrupt. */ + setidt(APIC_ERROR_INT, IDTVEC(errorint), SDT_SYSIGT, SEL_KPL, 0); + + /* XXX: Thermal interrupt */ } /* @@ -278,7 +279,7 @@ lapic_dump(const char* str) lapic->id, lapic->version, lapic->ldr, lapic->dfr); printf(" lint0: 0x%08x lint1: 0x%08x TPR: 0x%08x SVR: 0x%08x\n", lapic->lvt_lint0, lapic->lvt_lint1, lapic->tpr, lapic->svr); - printf(" timer: 0x%08x therm: 0x%08x err: 0x%08x pcm: 0x%08x\n", + printf(" timer: 0x%08x therm: 0x%08x err: 0x%08x pmc: 0x%08x\n", lapic->lvt_timer, lapic->lvt_thermal, lapic->lvt_error, lapic->lvt_pcint); } @@ -326,7 +327,11 @@ lapic_setup(int boot) lapic_timer_enable_intr(); } - /* XXX: Error and thermal LVTs */ + /* Program error LVT and clear any existing errors. */ + lapic->lvt_error = lvt_mode(la, LVT_ERROR, lapic->lvt_error); + lapic->esr = 0; + + /* XXX: Thermal LVT */ intr_restore(eflags); } @@ -725,18 +730,6 @@ lapic_eoi(void) lapic->eoi = 0; } -/* - * Read the contents of the error status register. We have to write - * to the register first before reading from it. - */ -u_int -lapic_error(void) -{ - - lapic->esr = 0; - return (lapic->esr); -} - void lapic_handle_intr(int vector, struct trapframe *frame) { @@ -863,6 +856,24 @@ lapic_timer_enable_intr(void) lapic->lvt_timer = value; } +void +lapic_handle_error(void) +{ + u_int32_t esr; + + /* + * Read the contents of the error status register. Write to + * the register first before reading from it to force the APIC + * to update its value to indicate any errors that have + * occurred since the previous write to the register. + */ + lapic->esr = 0; + esr = lapic->esr; + + printf("CPU%d: local APIC error 0x%x\n", PCPU_GET(cpuid), esr); + lapic_eoi(); +} + u_int apic_cpuid(u_int apic_id) { Modified: head/sys/amd64/include/apicvar.h ============================================================================== --- head/sys/amd64/include/apicvar.h Mon Mar 29 18:47:04 2010 (r205850) +++ head/sys/amd64/include/apicvar.h Mon Mar 29 19:13:34 2010 (r205851) @@ -179,7 +179,8 @@ struct apic_enumerator { inthand_t IDTVEC(apic_isr1), IDTVEC(apic_isr2), IDTVEC(apic_isr3), IDTVEC(apic_isr4), IDTVEC(apic_isr5), IDTVEC(apic_isr6), - IDTVEC(apic_isr7), IDTVEC(spuriousint), IDTVEC(timerint); + IDTVEC(apic_isr7), IDTVEC(errorint), IDTVEC(spuriousint), + IDTVEC(timerint); extern vm_paddr_t lapic_paddr; extern int apic_cpuids[]; @@ -211,13 +212,13 @@ void lapic_disable_pmc(void); void lapic_dump(const char *str); int lapic_enable_pmc(void); void lapic_eoi(void); -u_int lapic_error(void); int lapic_id(void); void lapic_init(vm_paddr_t addr); int lapic_intr_pending(u_int vector); void lapic_ipi_raw(register_t icrlo, u_int dest); void lapic_ipi_vectored(u_int vector, int dest); int lapic_ipi_wait(int delay); +void lapic_handle_error(void); void lapic_handle_intr(int vector, struct trapframe *frame); void lapic_handle_timer(struct trapframe *frame); void lapic_reenable_pmc(void); Modified: head/sys/i386/i386/apic_vector.s ============================================================================== --- head/sys/i386/i386/apic_vector.s Mon Mar 29 18:47:04 2010 (r205850) +++ head/sys/i386/i386/apic_vector.s Mon Mar 29 19:13:34 2010 (r205851) @@ -110,6 +110,19 @@ IDTVEC(timerint) MEXITCOUNT jmp doreti +/* + * Local APIC error interrupt handler. + */ + .text + SUPERALIGN_TEXT +IDTVEC(errorint) + PUSH_FRAME + SET_KERNEL_SREGS + FAKE_MCOUNT(TF_EIP(%esp)) + call lapic_handle_error + MEXITCOUNT + jmp doreti + #ifdef SMP /* * Global address space TLB shootdown. Modified: head/sys/i386/i386/local_apic.c ============================================================================== --- head/sys/i386/i386/local_apic.c Mon Mar 29 18:47:04 2010 (r205850) +++ head/sys/i386/i386/local_apic.c Mon Mar 29 19:13:34 2010 (r205851) @@ -116,14 +116,12 @@ struct lapic { int la_ioint_irqs[APIC_NUM_IOINTS + 1]; } static lapics[MAX_APIC_ID + 1]; -/* XXX: should thermal be an NMI? */ - /* Global defaults for local APIC LVT entries. */ static struct lvt lvts[LVT_MAX + 1] = { { 1, 1, 1, 1, APIC_LVT_DM_EXTINT, 0 }, /* LINT0: masked ExtINT */ { 1, 1, 0, 1, APIC_LVT_DM_NMI, 0 }, /* LINT1: NMI */ { 1, 1, 1, 1, APIC_LVT_DM_FIXED, APIC_TIMER_INT }, /* Timer */ - { 1, 1, 1, 1, APIC_LVT_DM_FIXED, APIC_ERROR_INT }, /* Error */ + { 1, 1, 0, 1, APIC_LVT_DM_FIXED, APIC_ERROR_INT }, /* Error */ { 1, 1, 1, 1, APIC_LVT_DM_NMI, 0 }, /* PMC */ { 1, 1, 1, 1, APIC_LVT_DM_FIXED, APIC_THERMAL_INT }, /* Thermal */ }; @@ -228,7 +226,11 @@ lapic_init(vm_paddr_t addr) setidt(APIC_TIMER_INT, IDTVEC(timerint), SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL)); - /* XXX: error/thermal interrupts */ + /* Local APIC error interrupt. */ + setidt(APIC_ERROR_INT, IDTVEC(errorint), SDT_SYS386IGT, SEL_KPL, + GSEL(GCODE_SEL, SEL_KPL)); + + /* XXX: Thermal interrupt */ } /* @@ -281,7 +283,7 @@ lapic_dump(const char* str) lapic->id, lapic->version, lapic->ldr, lapic->dfr); printf(" lint0: 0x%08x lint1: 0x%08x TPR: 0x%08x SVR: 0x%08x\n", lapic->lvt_lint0, lapic->lvt_lint1, lapic->tpr, lapic->svr); - printf(" timer: 0x%08x therm: 0x%08x err: 0x%08x pcm: 0x%08x\n", + printf(" timer: 0x%08x therm: 0x%08x err: 0x%08x pmc: 0x%08x\n", lapic->lvt_timer, lapic->lvt_thermal, lapic->lvt_error, lapic->lvt_pcint); } @@ -329,7 +331,11 @@ lapic_setup(int boot) lapic_timer_enable_intr(); } - /* XXX: Error and thermal LVTs */ + /* Program error LVT and clear any existing errors. */ + lapic->lvt_error = lvt_mode(la, LVT_ERROR, lapic->lvt_error); + lapic->esr = 0; + + /* XXX: Thermal LVT */ intr_restore(eflags); } @@ -725,18 +731,6 @@ lapic_eoi(void) lapic->eoi = 0; } -/* - * Read the contents of the error status register. We have to write - * to the register first before reading from it. - */ -u_int -lapic_error(void) -{ - - lapic->esr = 0; - return (lapic->esr); -} - void lapic_handle_intr(int vector, struct trapframe *frame) { @@ -863,6 +857,24 @@ lapic_timer_enable_intr(void) lapic->lvt_timer = value; } +void +lapic_handle_error(void) +{ + u_int32_t esr; + + /* + * Read the contents of the error status register. Write to + * the register first before reading from it to force the APIC + * to update its value to indicate any errors that have + * occurred since the previous write to the register. + */ + lapic->esr = 0; + esr = lapic->esr; + + printf("CPU%d: local APIC error 0x%x\n", PCPU_GET(cpuid), esr); + lapic_eoi(); +} + u_int apic_cpuid(u_int apic_id) { Modified: head/sys/i386/include/apicvar.h ============================================================================== --- head/sys/i386/include/apicvar.h Mon Mar 29 18:47:04 2010 (r205850) +++ head/sys/i386/include/apicvar.h Mon Mar 29 19:13:34 2010 (r205851) @@ -208,7 +208,8 @@ struct apic_enumerator { inthand_t IDTVEC(apic_isr1), IDTVEC(apic_isr2), IDTVEC(apic_isr3), IDTVEC(apic_isr4), IDTVEC(apic_isr5), IDTVEC(apic_isr6), - IDTVEC(apic_isr7), IDTVEC(spuriousint), IDTVEC(timerint); + IDTVEC(apic_isr7), IDTVEC(errorint), IDTVEC(spuriousint), + IDTVEC(timerint); extern vm_paddr_t lapic_paddr; extern int apic_cpuids[]; @@ -240,13 +241,13 @@ void lapic_disable_pmc(void); void lapic_dump(const char *str); int lapic_enable_pmc(void); void lapic_eoi(void); -u_int lapic_error(void); int lapic_id(void); void lapic_init(vm_paddr_t addr); int lapic_intr_pending(u_int vector); void lapic_ipi_raw(register_t icrlo, u_int dest); void lapic_ipi_vectored(u_int vector, int dest); int lapic_ipi_wait(int delay); +void lapic_handle_error(void); void lapic_handle_intr(int vector, struct trapframe *frame); void lapic_handle_timer(struct trapframe *frame); void lapic_reenable_pmc(void); From owner-svn-src-head@FreeBSD.ORG Mon Mar 29 19:36:38 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 11783106566B; Mon, 29 Mar 2010 19:36:38 +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 011BE8FC16; Mon, 29 Mar 2010 19:36:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2TJabPK051296; Mon, 29 Mar 2010 19:36:37 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2TJabtY051294; Mon, 29 Mar 2010 19:36:37 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201003291936.o2TJabtY051294@svn.freebsd.org> From: Warner Losh Date: Mon, 29 Mar 2010 19:36: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: r205852 - head/sys/modules X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Mar 2010 19:36:38 -0000 Author: imp Date: Mon Mar 29 19:36:37 2010 New Revision: 205852 URL: http://svn.freebsd.org/changeset/base/205852 Log: Arm defines intr_disable() as a macro, which causes problems for cxgb. Rather than remove it for all architectures (which was a botch in r205845), remove it only for arm and mips until that can be sorted out. Pointy Hat: imp Submitted by: Navdeep Parhar MFC after: 7 days Modified: head/sys/modules/Makefile Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Mon Mar 29 19:13:34 2010 (r205851) +++ head/sys/modules/Makefile Mon Mar 29 19:36:37 2010 (r205852) @@ -330,6 +330,8 @@ _siba_bwn= siba_bwn _sym= sym # no uart_cpu_$MACHINE_ARCH _uart= uart +# intr_disable() is a macro, causes problems +_cxgb= cxgb .endif .if ${MK_CRYPT} != "no" || defined(ALL_MODULES) From owner-svn-src-head@FreeBSD.ORG Mon Mar 29 19:40:35 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D94FE1065672; Mon, 29 Mar 2010 19:40:35 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 820828FC22; Mon, 29 Mar 2010 19:40:35 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o2TJVwsu068470; Mon, 29 Mar 2010 13:31:59 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Mon, 29 Mar 2010 13:32:03 -0600 (MDT) Message-Id: <20100329.133203.951491966289476190.imp@bsdimp.com> To: nparhar@gmail.com From: "M. Warner Losh" In-Reply-To: <20100329181831.GA14698@gypsy> References: <201003291731.o2THVtlV023212@svn.freebsd.org> <20100329181831.GA14698@gypsy> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r205845 - head/sys/modules X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Mar 2010 19:40:35 -0000 In message: <20100329181831.GA14698@gypsy> Navdeep Parhar writes: : This commit has unplugged cxgb from the build, even for the : (!arm && !mips) case. Please fix. Doh! Will do ASAP. Thanks! Warner From owner-svn-src-head@FreeBSD.ORG Mon Mar 29 19:41:45 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4ED96106566B; Mon, 29 Mar 2010 19:41:45 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 208218FC1A; Mon, 29 Mar 2010 19:41:45 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id B30D946B37; Mon, 29 Mar 2010 15:41:44 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 00E238A01F; Mon, 29 Mar 2010 15:41:44 -0400 (EDT) From: John Baldwin To: src-committers@freebsd.org Date: Mon, 29 Mar 2010 15:41:14 -0400 User-Agent: KMail/1.12.1 (FreeBSD/7.3-CBSD-20100217; KDE/4.3.1; amd64; ; ) References: <201003291913.o2TJDZmU046152@svn.freebsd.org> In-Reply-To: <201003291913.o2TJDZmU046152@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201003291541.14485.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Mon, 29 Mar 2010 15:41:44 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.7 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r205851 - in head/sys: amd64/amd64 amd64/include i386/i386 i386/include X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Mar 2010 19:41:45 -0000 On Monday 29 March 2010 3:13:34 pm John Baldwin wrote: > Author: jhb > Date: Mon Mar 29 19:13:34 2010 > New Revision: 205851 > URL: http://svn.freebsd.org/changeset/base/205851 > > Log: > Add a handler for the local APIC error interrupt. For now it just prints > out the current value of the local APIC error register when the interrupt > fires. In practice I don't expect this to ever fire. Doing so probably indicates a bug. It is nice to have an extra warning fire to help detect future bugs though. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Mon Mar 29 19:52:37 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 387FE1065677; Mon, 29 Mar 2010 19:52:37 +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 2798D8FC0C; Mon, 29 Mar 2010 19:52:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2TJqbOE054803; Mon, 29 Mar 2010 19:52:37 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2TJqbTp054801; Mon, 29 Mar 2010 19:52:37 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201003291952.o2TJqbTp054801@svn.freebsd.org> From: Edward Tomasz Napierala Date: Mon, 29 Mar 2010 19:52: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: r205853 - head/usr.bin/calendar/calendars X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Mar 2010 19:52:37 -0000 Author: trasz Date: Mon Mar 29 19:52:36 2010 New Revision: 205853 URL: http://svn.freebsd.org/changeset/base/205853 Log: Add myself. MFC after: 2 weeks Modified: head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Mon Mar 29 19:36:37 2010 (r205852) +++ head/usr.bin/calendar/calendars/calendar.freebsd Mon Mar 29 19:52:36 2010 (r205853) @@ -107,6 +107,7 @@ 04/03 Tong Liu born in Beijing, People's Republic of China, 1981 04/03 Gabor Pali born in Kunhegyes, Hungary, 1982 04/05 Stacey Son born in Burley, Idaho, United States. 1967 +04/07 Edward Tomasz Napierala born in Wolsztyn, Poland, 1981 04/08 Jordan K. Hubbard born in Honolulu, Hawaii, United States, 1963 04/09 Ceri Davies born in Haverfordwest, Pembrokeshire, United Kingdom, 1976 04/11 Bruce A. Mah born in Fresno, California, United States, 1969 From owner-svn-src-head@FreeBSD.ORG Mon Mar 29 20:04:02 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2C45B1065674; Mon, 29 Mar 2010 20:04: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 1B65A8FC1D; Mon, 29 Mar 2010 20:04:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2TK41Ln057413; Mon, 29 Mar 2010 20:04:01 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2TK41WO057411; Mon, 29 Mar 2010 20:04:01 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201003292004.o2TK41WO057411@svn.freebsd.org> From: Andriy Gapon Date: Mon, 29 Mar 2010 20:04: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: r205854 - head/usr.bin/calendar/calendars X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Mar 2010 20:04:02 -0000 Author: avg Date: Mon Mar 29 20:04:01 2010 New Revision: 205854 URL: http://svn.freebsd.org/changeset/base/205854 Log: calendar.freebsd: add my entry MFC after: 4 days Modified: head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Mon Mar 29 19:52:36 2010 (r205853) +++ head/usr.bin/calendar/calendars/calendar.freebsd Mon Mar 29 20:04:01 2010 (r205854) @@ -207,6 +207,7 @@ 07/23 Sergey A. Osokin born in Krasnogorsky, Stepnogorsk, Akmolinskaya region, Kazakhstan, 1972 07/24 Alexander Nedotsukov born in Ulyanovsk, Russian Federation, 1974 07/24 Alberto Villa born in Vercelli, Italy, 1987 +07/27 Andriy Gapon born in Kyrykivka, Sumy region, Ukraine, 1976 07/28 Jim Mock born in Bethlehem, Pennsylvania, United States, 1974 07/28 Tom Hukins born in Manchester, United Kingdom, 1976 07/29 Dirk Meyer born in Kassel, Hessen, Germany, 1965 From owner-svn-src-head@FreeBSD.ORG Mon Mar 29 20:12:44 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9B0101065740; Mon, 29 Mar 2010 20:12: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 8A2478FC1D; Mon, 29 Mar 2010 20:12:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2TKCi5P059385; Mon, 29 Mar 2010 20:12:44 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2TKCiEa059383; Mon, 29 Mar 2010 20:12:44 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201003292012.o2TKCiEa059383@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 29 Mar 2010 20:12: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: r205855 - head/usr.sbin/vidcontrol X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Mar 2010 20:12:44 -0000 Author: jkim Date: Mon Mar 29 20:12:44 2010 New Revision: 205855 URL: http://svn.freebsd.org/changeset/base/205855 Log: Print memory model of the video mode except for planar memory model. 'P', 'D', 'C', 'H', 'V' mean packed pixel, direct color, CGA, Hercules, VGA X memory models respectively where they have fixed number of planes. Modified: head/usr.sbin/vidcontrol/vidcontrol.c Modified: head/usr.sbin/vidcontrol/vidcontrol.c ============================================================================== --- head/usr.sbin/vidcontrol/vidcontrol.c Mon Mar 29 20:04:01 2010 (r205854) +++ head/usr.sbin/vidcontrol/vidcontrol.c Mon Mar 29 20:12:44 2010 (r205855) @@ -950,10 +950,11 @@ show_adapter_info(void) static void show_mode_info(void) { - struct video_info _info; char buf[80]; - int mode; + struct video_info _info; int c; + int mm; + int mode; printf(" mode# flags type size " "font window linear buffer\n"); @@ -972,9 +973,35 @@ show_mode_info(void) if (_info.vi_flags & V_INFO_GRAPHICS) { c = 'G'; - snprintf(buf, sizeof(buf), "%dx%dx%d %d", - _info.vi_width, _info.vi_height, - _info.vi_depth, _info.vi_planes); + if (_info.vi_mem_model == V_INFO_MM_PLANAR) + snprintf(buf, sizeof(buf), "%dx%dx%d %d", + _info.vi_width, _info.vi_height, + _info.vi_depth, _info.vi_planes); + else { + switch (_info.vi_mem_model) { + case V_INFO_MM_PACKED: + mm = 'P'; + break; + case V_INFO_MM_DIRECT: + mm = 'D'; + break; + case V_INFO_MM_CGA: + mm = 'C'; + break; + case V_INFO_MM_HGC: + mm = 'H'; + break; + case V_INFO_MM_VGAX: + mm = 'V'; + break; + default: + mm = ' '; + break; + } + snprintf(buf, sizeof(buf), "%dx%dx%d %c", + _info.vi_width, _info.vi_height, + _info.vi_depth, mm); + } } else { c = 'T'; From owner-svn-src-head@FreeBSD.ORG Mon Mar 29 20:24:04 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 14B51106566B; Mon, 29 Mar 2010 20:24:04 +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 043E08FC15; Mon, 29 Mar 2010 20:24:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2TKO3BV062019; Mon, 29 Mar 2010 20:24:03 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2TKO3Er062017; Mon, 29 Mar 2010 20:24:03 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201003292024.o2TKO3Er062017@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 29 Mar 2010 20:24: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: r205858 - head/sys/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Mar 2010 20:24:04 -0000 Author: jkim Date: Mon Mar 29 20:24:03 2010 New Revision: 205858 URL: http://svn.freebsd.org/changeset/base/205858 Log: Check the pointer to JIT binary filter before its de-allocation. Submitted by: Alexander Sack (asack at niksun dot com) MFC after: 3 days Modified: head/sys/net/bpf.c Modified: head/sys/net/bpf.c ============================================================================== --- head/sys/net/bpf.c Mon Mar 29 20:16:04 2010 (r205857) +++ head/sys/net/bpf.c Mon Mar 29 20:24:03 2010 (r205858) @@ -1867,13 +1867,14 @@ bpf_freed(struct bpf_d *d) * free. */ bpf_free(d); - if (d->bd_rfilter) { + if (d->bd_rfilter != NULL) { free((caddr_t)d->bd_rfilter, M_BPF); #ifdef BPF_JITTER - bpf_destroy_jit_filter(d->bd_bfilter); + if (d->bd_bfilter != NULL) + bpf_destroy_jit_filter(d->bd_bfilter); #endif } - if (d->bd_wfilter) + if (d->bd_wfilter != NULL) free((caddr_t)d->bd_wfilter, M_BPF); mtx_destroy(&d->bd_mtx); } From owner-svn-src-head@FreeBSD.ORG Mon Mar 29 20:27:17 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AF1C51065675; Mon, 29 Mar 2010 20:27:17 +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 9E3858FC17; Mon, 29 Mar 2010 20:27:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2TKRHIh062807; Mon, 29 Mar 2010 20:27:17 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2TKRHwD062800; Mon, 29 Mar 2010 20:27:17 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201003292027.o2TKRHwD062800@svn.freebsd.org> From: Joel Dahl Date: Mon, 29 Mar 2010 20:27: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: r205859 - head/sys/dev/sound/pci X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Mar 2010 20:27:17 -0000 Author: joel (doc committer) Date: Mon Mar 29 20:27:17 2010 New Revision: 205859 URL: http://svn.freebsd.org/changeset/base/205859 Log: Start copyright notices with /*- Modified: head/sys/dev/sound/pci/envy24.c head/sys/dev/sound/pci/envy24.h head/sys/dev/sound/pci/envy24ht.c head/sys/dev/sound/pci/envy24ht.h head/sys/dev/sound/pci/spicds.c head/sys/dev/sound/pci/spicds.h Modified: head/sys/dev/sound/pci/envy24.c ============================================================================== --- head/sys/dev/sound/pci/envy24.c Mon Mar 29 20:24:03 2010 (r205858) +++ head/sys/dev/sound/pci/envy24.c Mon Mar 29 20:27:17 2010 (r205859) @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2001 Katsurajima Naoto * All rights reserved. * Modified: head/sys/dev/sound/pci/envy24.h ============================================================================== --- head/sys/dev/sound/pci/envy24.h Mon Mar 29 20:24:03 2010 (r205858) +++ head/sys/dev/sound/pci/envy24.h Mon Mar 29 20:27:17 2010 (r205859) @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2001 Katsurajima Naoto * All rights reserved. * Modified: head/sys/dev/sound/pci/envy24ht.c ============================================================================== --- head/sys/dev/sound/pci/envy24ht.c Mon Mar 29 20:24:03 2010 (r205858) +++ head/sys/dev/sound/pci/envy24ht.c Mon Mar 29 20:27:17 2010 (r205859) @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2006 Konstantin Dimitrov * Copyright (c) 2001 Katsurajima Naoto * All rights reserved. Modified: head/sys/dev/sound/pci/envy24ht.h ============================================================================== --- head/sys/dev/sound/pci/envy24ht.h Mon Mar 29 20:24:03 2010 (r205858) +++ head/sys/dev/sound/pci/envy24ht.h Mon Mar 29 20:27:17 2010 (r205859) @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2006 Konstantin Dimitrov * Copyright (c) 2001 Katsurajima Naoto * All rights reserved. Modified: head/sys/dev/sound/pci/spicds.c ============================================================================== --- head/sys/dev/sound/pci/spicds.c Mon Mar 29 20:24:03 2010 (r205858) +++ head/sys/dev/sound/pci/spicds.c Mon Mar 29 20:27:17 2010 (r205859) @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2006 Konstantin Dimitrov * Copyright (c) 2001 Katsurajima Naoto * All rights reserved. Modified: head/sys/dev/sound/pci/spicds.h ============================================================================== --- head/sys/dev/sound/pci/spicds.h Mon Mar 29 20:24:03 2010 (r205858) +++ head/sys/dev/sound/pci/spicds.h Mon Mar 29 20:27:17 2010 (r205859) @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2006 Konstantin Dimitrov * Copyright (c) 2001 Katsurajima Naoto * All rights reserved. From owner-svn-src-head@FreeBSD.ORG Mon Mar 29 20:34:25 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 701AD106566C; Mon, 29 Mar 2010 20:34:25 +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 5F61D8FC12; Mon, 29 Mar 2010 20:34:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2TKYPlb064441; Mon, 29 Mar 2010 20:34:25 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2TKYPVI064439; Mon, 29 Mar 2010 20:34:25 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201003292034.o2TKYPVI064439@svn.freebsd.org> From: Andriy Gapon Date: Mon, 29 Mar 2010 20:34: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: r205860 - head/sys/geom X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Mar 2010 20:34:25 -0000 Author: avg Date: Mon Mar 29 20:34:25 2010 New Revision: 205860 URL: http://svn.freebsd.org/changeset/base/205860 Log: g_vfs_open: correctly set devvp.v_bufobj.bo_bsize to DEV_BSIZE Because of how breadn -> bufstrategy -> g_vfs_strategy are currently implemented, bread on devvp always expects DEV_BSIZE block size. Thus, devvp bo_bsize must always be DEV_BSIZE irrespective of media properties or filesystem implementation details. Reviewed by: mckusick MFC after: 2 weeks Modified: head/sys/geom/geom_vfs.c Modified: head/sys/geom/geom_vfs.c ============================================================================== --- head/sys/geom/geom_vfs.c Mon Mar 29 20:27:17 2010 (r205859) +++ head/sys/geom/geom_vfs.c Mon Mar 29 20:34:25 2010 (r205860) @@ -179,7 +179,7 @@ g_vfs_open(struct vnode *vp, struct g_co bo = &vp->v_bufobj; bo->bo_ops = g_vfs_bufops; bo->bo_private = cp; - bo->bo_bsize = pp->sectorsize; + bo->bo_bsize = DEV_BSIZE; gp->softc = bo; return (error); From owner-svn-src-head@FreeBSD.ORG Mon Mar 29 21:17:04 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3DFE1106566B; Mon, 29 Mar 2010 21:17:04 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 128108FC0A; Mon, 29 Mar 2010 21:17:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2TLH3wR073830; Mon, 29 Mar 2010 21:17:03 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2TLH3KB073828; Mon, 29 Mar 2010 21:17:03 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201003292117.o2TLH3KB073828@svn.freebsd.org> From: Edwin Groothuis Date: Mon, 29 Mar 2010 21: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: r205862 - head/usr.bin/calendar/calendars X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Mar 2010 21:17:04 -0000 Author: edwin Date: Mon Mar 29 21:17:03 2010 New Revision: 205862 URL: http://svn.freebsd.org/changeset/base/205862 Log: Update the Australian calendar WRT DST. Layout changes. Modified: head/usr.bin/calendar/calendars/calendar.australia Modified: head/usr.bin/calendar/calendars/calendar.australia ============================================================================== --- head/usr.bin/calendar/calendars/calendar.australia Mon Mar 29 21:12:23 2010 (r205861) +++ head/usr.bin/calendar/calendars/calendar.australia Mon Mar 29 21:17:03 2010 (r205862) @@ -10,49 +10,49 @@ LANG=en_AU.ISO8859-1 /* Australia */ -Jan 26 Australia Day -Mar/SunLast Daylight Savings Time ends in ACT, NSW, SA, TAS and VIC. -Apr 25 Anzac Day +Jan 26 Australia Day +Apr/SunFirst Daylight Savings Time ends in ACT, NSW, SA, TAS and VIC. +Apr 25 Anzac Day Jun/MonSecond Queen's Birthday Holiday (Australia, except WA) -Oct/SunLast Daylight Savings Time starts in ACT, NSW, SA and VIC. +Oct/SunFirst Daylight Savings Time starts in ACT, NSW, SA and VIC. /* ACT, NSW, common */ -Mar 18 Canberra Day (ACT) -8/MonFirst Bank Holiday (ACT, NSW) -10/MonFirst Labour Day (ACT, NSW, SA) +Mar 18 Canberra Day (ACT) +Sep/MonLast Family & Community Day (ACT) +Aug/MonFirst Bank Holiday (ACT, NSW) +Oct/MonFirst Labour Day (ACT, NSW, SA) /* Victoria */ -3/MonSecond Labour Day (Vic) -Nov/TueFirst Melbourne Cup (Vic) +Mar/MonSecond Labour Day (VIC) +Nov/TueFirst Melbourne Cup (VIC) /* Tasmania */ -Feb 11 Regatta Day (Tas) -Feb 27 Launceston Cup (Tas) -Mar 11 Eight Hours Day (Tas) -Oct/SunFirst Daylight Savings Time starts in TAS. -Oct 10 Launceston Show Day (Tas) -Oct 24 Hobart Show Day (Tas) -Nov 04 Recreation Day (N Tas) +Feb 11 Regatta Day (TAS) +Feb 27 Launceston Cup (TAS) +Mar 11 Eight Hours Day (TAS) +Oct 10 Launceston Show Day (TAS) +Oct 24 Hobart Show Day (TAS) +Nov 04 Recreation Day (N TAS) /* South Australia */ May/MonThird Adelaide Cup (SA) -Dec 26 Proclamation Day holiday (SA) +Dec 26 Proclamation Day holiday (SA) /* Western Australia */ -3/MonFirst Labour Day (WA) -6/MonFirst Foundation Day (WA) -Sep 30 Queen's Birthday (WA) +Mar/MonFirst Labour Day (WA) +Jun/MonFirst Foundation Day (WA) +Sep 30 Queen's Birthday (WA) /* Northern Territory */ -5/MonFirst May Day (NT) -7/FriFirst Alice Springs Show Day (NT) -7/FriSecond Tennant Creek Show Day (NT) -7/FriThird Katherine Show Day (NT) -7/FriLast Darwin Show Day (NT) -8/MonFirst Picnic Day (NT) +May/MonFirst May Day (NT) +Jul/FriFirst Alice Springs Show Day (NT) +Jul/FriSecond Tennant Creek Show Day (NT) +Jul/FriThird Katherine Show Day (NT) +Jul/FriLast Darwin Show Day (NT) +Aug/MonFirst Picnic Day (NT) /* Queensland */ -5/MonFirst Labour Day (Qld) -Aug 14 RNA Show Day (Brisbane metro) +May/MonFirst Labour Day (QLD) +Aug 14 RNA Show Day (Brisbane metro) #endif From owner-svn-src-head@FreeBSD.ORG Mon Mar 29 22:03:55 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5D581106566C; Mon, 29 Mar 2010 22:03:55 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4C4EB8FC14; Mon, 29 Mar 2010 22:03:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2TM3tuX084188; Mon, 29 Mar 2010 22:03:55 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2TM3tAI084186; Mon, 29 Mar 2010 22:03:55 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201003292203.o2TM3tAI084186@svn.freebsd.org> From: Warner Losh Date: Mon, 29 Mar 2010 22:03: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: r205863 - head/sys/mips/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Mar 2010 22:03:55 -0000 Author: imp Date: Mon Mar 29 22:03:55 2010 New Revision: 205863 URL: http://svn.freebsd.org/changeset/base/205863 Log: Enable module builds now that the build completes for them. This should get them into the universe rotation. Modified: head/sys/mips/conf/AR71XX Modified: head/sys/mips/conf/AR71XX ============================================================================== --- head/sys/mips/conf/AR71XX Mon Mar 29 21:17:03 2010 (r205862) +++ head/sys/mips/conf/AR71XX Mon Mar 29 22:03:55 2010 (r205863) @@ -15,7 +15,7 @@ files "../atheros/files.ar71xx" hints "AR71XX.hints" makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols -makeoptions MODULES_OVERRIDE="" +#makeoptions MODULES_OVERRIDE="" options DDB options KDB From owner-svn-src-head@FreeBSD.ORG Mon Mar 29 22:29:42 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B518A106564A; Mon, 29 Mar 2010 22:29: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 A41008FC0C; Mon, 29 Mar 2010 22:29:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2TMTgv0090003; Mon, 29 Mar 2010 22:29:42 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2TMTgZR090002; Mon, 29 Mar 2010 22:29:42 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201003292229.o2TMTgZR090002@svn.freebsd.org> From: Warner Losh Date: Mon, 29 Mar 2010 22:29: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: r205864 - head/sys/arm/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Mar 2010 22:29:42 -0000 Author: imp Date: Mon Mar 29 22:29:41 2010 New Revision: 205864 URL: http://svn.freebsd.org/changeset/base/205864 Log: Build modules for this config to make sure they stay buildable... Modified: head/sys/arm/conf/KB920X Modified: head/sys/arm/conf/KB920X ============================================================================== --- head/sys/arm/conf/KB920X Mon Mar 29 22:03:55 2010 (r205863) +++ head/sys/arm/conf/KB920X Mon Mar 29 22:29:41 2010 (r205864) @@ -24,7 +24,7 @@ include "../at91/std.kb920x" # The AT91 platform doesn't use /boot/loader, so we have to statically wire # hints. hints "KB920X.hints" -makeoptions MODULES_OVERRIDE="" +#makeoptions MODULES_OVERRIDE="" makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols options DDB From owner-svn-src-head@FreeBSD.ORG Mon Mar 29 22:41:31 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 32051106564A; Mon, 29 Mar 2010 22:41:31 +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 20A1C8FC08; Mon, 29 Mar 2010 22:41:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2TMfV3T092643; Mon, 29 Mar 2010 22:41:31 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2TMfUVu092640; Mon, 29 Mar 2010 22:41:30 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201003292241.o2TMfUVu092640@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 29 Mar 2010 22:41: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: r205865 - head/sys/dev/syscons X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Mar 2010 22:41:31 -0000 Author: jkim Date: Mon Mar 29 22:41:30 2010 New Revision: 205865 URL: http://svn.freebsd.org/changeset/base/205865 Log: Refine r204265. We want the standard VGA palette for packed pixel mode. Modified: head/sys/dev/syscons/scvidctl.c head/sys/dev/syscons/syscons.c Modified: head/sys/dev/syscons/scvidctl.c ============================================================================== --- head/sys/dev/syscons/scvidctl.c Mon Mar 29 22:29:41 2010 (r205864) +++ head/sys/dev/syscons/scvidctl.c Mon Mar 29 22:41:30 2010 (r205865) @@ -741,7 +741,7 @@ sc_vid_ioctl(struct tty *tp, u_long cmd, #ifndef SC_NO_PALETTE_LOADING #ifdef SC_PIXEL_MODE - if ((adp->va_flags & V_ADP_DAC8) != 0) + if (adp->va_info.vi_mem_model == V_INFO_MM_DIRECT) vidd_load_palette(adp, scp->sc->palette2); else #endif @@ -802,7 +802,7 @@ sc_vid_ioctl(struct tty *tp, u_long cmd, if (scp == scp->sc->cur_scp) { set_mode(scp); #ifndef SC_NO_PALETTE_LOADING - if ((adp->va_flags & V_ADP_DAC8) != 0) + if (adp->va_info.vi_mem_model == V_INFO_MM_DIRECT) vidd_load_palette(adp, scp->sc->palette2); else vidd_load_palette(adp, scp->sc->palette); Modified: head/sys/dev/syscons/syscons.c ============================================================================== --- head/sys/dev/syscons/syscons.c Mon Mar 29 22:29:41 2010 (r205864) +++ head/sys/dev/syscons/syscons.c Mon Mar 29 22:41:30 2010 (r205865) @@ -2131,7 +2131,7 @@ restore_scrn_saver_mode(scr_stat *scp, i if (set_mode(scp) == 0) { #ifndef SC_NO_PALETTE_LOADING #ifdef SC_PIXEL_MODE - if ((scp->sc->adp->va_flags & V_ADP_DAC8) != 0) + if (scp->sc->adp->va_info.vi_mem_model == V_INFO_MM_DIRECT) vidd_load_palette(scp->sc->adp, scp->sc->palette2); else #endif @@ -2540,7 +2540,7 @@ exchange_scr(sc_softc_t *sc) #ifndef SC_NO_PALETTE_LOADING if (ISGRAPHSC(sc->old_scp)) { #ifdef SC_PIXEL_MODE - if ((sc->adp->va_flags & V_ADP_DAC8) != 0) + if (sc->adp->va_info.vi_mem_model == V_INFO_MM_DIRECT) vidd_load_palette(sc->adp, sc->palette2); else #endif From owner-svn-src-head@FreeBSD.ORG Mon Mar 29 23:36:34 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D7DEF1065672; Mon, 29 Mar 2010 23:36:34 +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 C4C348FC15; Mon, 29 Mar 2010 23:36:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2TNaYWd005016; Mon, 29 Mar 2010 23:36:34 GMT (envelope-from jfv@svn.freebsd.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2TNaYvB005000; Mon, 29 Mar 2010 23:36:34 GMT (envelope-from jfv@svn.freebsd.org) Message-Id: <201003292336.o2TNaYvB005000@svn.freebsd.org> From: Jack F Vogel Date: Mon, 29 Mar 2010 23:36: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: r205869 - in head/sys: conf dev/e1000 modules/em X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Mar 2010 23:36:35 -0000 Author: jfv Date: Mon Mar 29 23:36:34 2010 New Revision: 205869 URL: http://svn.freebsd.org/changeset/base/205869 Log: Update to igb and em: em revision 7.0.0: - Using driver devclass, seperate legacy (pre-pcie) code into a seperate source file. This will at least help protect against regression issues. It compiles along with em, and is transparent to end use, devices in each appear to be 'emX'. When using em in a modular form this also allows the legacy stuff to be defined out. - Add tx and rx rings as in igb, in the 82574 this becomes actual multiqueue for the first time (2 queues) while in other PCIE adapters its just make code cleaner. - Add RX mbuf handling logic that matches igb, this will eliminate packet drops due to temporary mbuf shortage. igb revision 1.9.3: - Following the ixgbe code, use a new approach in what was called 'get_buf', the routine now has been made independent of rxeof, it now does the update to the engine TDT register, this design allows temporary mbuf resources to become non-critical, not requiring a packet to be discarded, instead it just returns and does not increment the tail pointer. - With the above change it was also unnecessary to keep 'spare' maps around, since we do not have the discard issue. - Performance tweaks and improvements to the code also. MFC in a week Added: head/sys/dev/e1000/if_lem.c (contents, props changed) head/sys/dev/e1000/if_lem.h (contents, props changed) Modified: head/sys/conf/files head/sys/dev/e1000/e1000_80003es2lan.c head/sys/dev/e1000/e1000_82571.c head/sys/dev/e1000/e1000_82575.c head/sys/dev/e1000/e1000_82575.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_ich8lan.h head/sys/dev/e1000/e1000_mac.c head/sys/dev/e1000/e1000_manage.c head/sys/dev/e1000/e1000_phy.c head/sys/dev/e1000/e1000_regs.h head/sys/dev/e1000/if_em.c head/sys/dev/e1000/if_em.h head/sys/dev/e1000/if_igb.c head/sys/dev/e1000/if_igb.h head/sys/modules/em/Makefile Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Mon Mar 29 23:00:45 2010 (r205868) +++ head/sys/conf/files Mon Mar 29 23:36:34 2010 (r205869) @@ -912,6 +912,8 @@ dev/eisa/eisa_if.m standard dev/eisa/eisaconf.c optional eisa dev/e1000/if_em.c optional em inet \ compile-with "${NORMAL_C} -I$S/dev/e1000" +dev/e1000/if_lem.c optional em inet \ + compile-with "${NORMAL_C} -I$S/dev/e1000" dev/e1000/if_igb.c optional igb inet \ compile-with "${NORMAL_C} -I$S/dev/e1000" dev/e1000/e1000_80003es2lan.c optional em | igb \ Modified: head/sys/dev/e1000/e1000_80003es2lan.c ============================================================================== --- head/sys/dev/e1000/e1000_80003es2lan.c Mon Mar 29 23:00:45 2010 (r205868) +++ head/sys/dev/e1000/e1000_80003es2lan.c Mon Mar 29 23:36:34 2010 (r205869) @@ -231,7 +231,9 @@ static s32 e1000_init_mac_params_80003es mac->rar_entry_count = E1000_RAR_ENTRIES; /* Set if part includes ASF firmware */ mac->asf_firmware_present = TRUE; - /* Set if manageability features are enabled. */ + /* FWSM register */ + 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; Modified: head/sys/dev/e1000/e1000_82571.c ============================================================================== --- head/sys/dev/e1000/e1000_82571.c Mon Mar 29 23:00:45 2010 (r205868) +++ head/sys/dev/e1000/e1000_82571.c Mon Mar 29 23:36:34 2010 (r205869) @@ -313,10 +313,6 @@ static s32 e1000_init_mac_params_82571(s mac->rar_entry_count = E1000_RAR_ENTRIES; /* Set if part includes ASF firmware */ mac->asf_firmware_present = TRUE; - /* Set if manageability features are enabled. */ - mac->arc_subsystem_valid = - (E1000_READ_REG(hw, E1000_FWSM) & E1000_FWSM_MODE_MASK) - ? TRUE : FALSE; /* Adaptive IFS supported */ mac->adaptive_ifs = TRUE; @@ -357,6 +353,16 @@ static s32 e1000_init_mac_params_82571(s mac->ops.set_lan_id = e1000_set_lan_id_single_port; mac->ops.check_mng_mode = e1000_check_mng_mode_generic; mac->ops.led_on = e1000_led_on_generic; + + /* FWSM register */ + 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; break; case e1000_82574: case e1000_82583: @@ -367,6 +373,9 @@ static s32 e1000_init_mac_params_82571(s default: mac->ops.check_mng_mode = e1000_check_mng_mode_generic; mac->ops.led_on = e1000_led_on_generic; + + /* FWSM register */ + mac->has_fwsm = TRUE; break; } @@ -1076,9 +1085,10 @@ static s32 e1000_init_hw_82571(struct e1 /* ...for both queues. */ switch (mac->type) { case e1000_82573: + e1000_enable_tx_pkt_filtering_generic(hw); + /* fall through */ case e1000_82574: case e1000_82583: - e1000_enable_tx_pkt_filtering_generic(hw); reg_data = E1000_READ_REG(hw, E1000_GCR); reg_data |= E1000_GCR_L1_ACT_WITHOUT_L0S_RX; E1000_WRITE_REG(hw, E1000_GCR, reg_data); @@ -1364,7 +1374,7 @@ static s32 e1000_setup_link_82571(struct static s32 e1000_setup_copper_link_82571(struct e1000_hw *hw) { u32 ctrl; - s32 ret_val; + s32 ret_val; DEBUGFUNC("e1000_setup_copper_link_82571"); Modified: head/sys/dev/e1000/e1000_82575.c ============================================================================== --- head/sys/dev/e1000/e1000_82575.c Mon Mar 29 23:00:45 2010 (r205868) +++ head/sys/dev/e1000/e1000_82575.c Mon Mar 29 23:36:34 2010 (r205869) @@ -289,7 +289,9 @@ static s32 e1000_init_mac_params_82575(s mac->rar_entry_count = E1000_RAR_ENTRIES_82580; /* Set if part includes ASF firmware */ mac->asf_firmware_present = TRUE; - /* Set if manageability features are enabled. */ + /* FWSM register */ + 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; @@ -1435,13 +1437,12 @@ static void e1000_config_collision_dist_ static void e1000_power_down_phy_copper_82575(struct e1000_hw *hw) { struct e1000_phy_info *phy = &hw->phy; - struct e1000_mac_info *mac = &hw->mac; if (!(phy->ops.check_reset_block)) return; /* If the management interface is not enabled, then power down */ - if (!(mac->ops.check_mng_mode(hw) || phy->ops.check_reset_block(hw))) + if (!(e1000_enable_mng_pass_thru(hw) || phy->ops.check_reset_block(hw))) e1000_power_down_phy_copper(hw); return; @@ -1646,14 +1647,23 @@ out: **/ void e1000_vmdq_set_loopback_pf(struct e1000_hw *hw, bool enable) { - u32 dtxswc = E1000_READ_REG(hw, E1000_DTXSWC); + u32 dtxswc; + + switch (hw->mac.type) { + case e1000_82576: + dtxswc = E1000_READ_REG(hw, E1000_DTXSWC); + if (enable) + dtxswc |= E1000_DTXSWC_VMDQ_LOOPBACK_EN; + else + dtxswc &= ~E1000_DTXSWC_VMDQ_LOOPBACK_EN; + E1000_WRITE_REG(hw, E1000_DTXSWC, dtxswc); + break; + default: + /* Currently no other hardware supports loopback */ + break; + } - if (enable) - dtxswc |= E1000_DTXSWC_VMDQ_LOOPBACK_EN; - else - dtxswc &= ~E1000_DTXSWC_VMDQ_LOOPBACK_EN; - E1000_WRITE_REG(hw, E1000_DTXSWC, dtxswc); } /** Modified: head/sys/dev/e1000/e1000_82575.h ============================================================================== --- head/sys/dev/e1000/e1000_82575.h Mon Mar 29 23:00:45 2010 (r205868) +++ head/sys/dev/e1000/e1000_82575.h Mon Mar 29 23:36:34 2010 (r205869) @@ -49,8 +49,8 @@ * For 82576, there are an additional set of RARs that begin at an offset * separate from the first set of RARs. */ -#define E1000_RAR_ENTRIES_82575 16 -#define E1000_RAR_ENTRIES_82576 24 +#define E1000_RAR_ENTRIES_82575 16 +#define E1000_RAR_ENTRIES_82576 24 #define E1000_RAR_ENTRIES_82580 24 #define E1000_SW_SYNCH_MB 0x00000100 #define E1000_STAT_DEV_RST_SET 0x00100000 @@ -425,6 +425,7 @@ struct e1000_adv_tx_context_desc { #define E1000_VMOLR_STRVLAN 0x40000000 /* Vlan stripping enable */ #define E1000_VMOLR_STRCRC 0x80000000 /* CRC stripping enable */ + #define E1000_VLVF_ARRAY_SIZE 32 #define E1000_VLVF_VLANID_MASK 0x00000FFF #define E1000_VLVF_POOLSEL_SHIFT 12 Modified: head/sys/dev/e1000/e1000_defines.h ============================================================================== --- head/sys/dev/e1000/e1000_defines.h Mon Mar 29 23:00:45 2010 (r205868) +++ head/sys/dev/e1000/e1000_defines.h Mon Mar 29 23:36:34 2010 (r205869) @@ -314,6 +314,11 @@ #define E1000_MANC_SMB_DATA_OUT_SHIFT 28 /* SMBus Data Out Shift */ #define E1000_MANC_SMB_CLK_OUT_SHIFT 29 /* SMBus Clock Out Shift */ +#define E1000_MANC2H_PORT_623 0x00000020 /* Port 0x26f */ +#define E1000_MANC2H_PORT_664 0x00000040 /* Port 0x298 */ +#define E1000_MDEF_PORT_623 0x00000800 /* Port 0x26f */ +#define E1000_MDEF_PORT_664 0x00000400 /* Port 0x298 */ + /* Receive Control */ #define E1000_RCTL_RST 0x00000001 /* Software reset */ #define E1000_RCTL_EN 0x00000002 /* enable */ @@ -418,6 +423,8 @@ * PHYRST_N pin */ #define E1000_CTRL_EXT_LINK_EN 0x00010000 /* enable link status from external * LINK_0 and LINK_1 pins */ +#define E1000_CTRL_LANPHYPC_OVERRIDE 0x00010000 /* SW control of LANPHYPC */ +#define E1000_CTRL_LANPHYPC_VALUE 0x00020000 /* SW value of LANPHYPC */ #define E1000_CTRL_SWDPIN0 0x00040000 /* SWDPIN 0 value */ #define E1000_CTRL_SWDPIN1 0x00080000 /* SWDPIN 1 value */ #define E1000_CTRL_SWDPIN2 0x00100000 /* SWDPIN 2 value */ @@ -953,6 +960,8 @@ #define E1000_EICS_OTHER E1000_EICR_OTHER /* Interrupt Cause Active */ #define E1000_EITR_ITR_INT_MASK 0x0000FFFF +/* E1000_EITR_CNT_IGNR is only for 82576 and newer */ +#define E1000_EITR_CNT_IGNR 0x80000000 /* Don't reset counters on write */ /* Transmit Descriptor Control */ #define E1000_TXDCTL_PTHRESH 0x0000003F /* TXDCTL Prefetch Threshold */ @@ -1380,6 +1389,9 @@ #define PCI_HEADER_TYPE_MULTIFUNC 0x80 #define PCIE_LINK_WIDTH_MASK 0x3F0 #define PCIE_LINK_WIDTH_SHIFT 4 +#define PCIE_LINK_SPEED_MASK 0x0F +#define PCIE_LINK_SPEED_2500 0x01 +#define PCIE_LINK_SPEED_5000 0x02 #define PCIE_DEVICE_CONTROL2_16ms 0x0005 #ifndef ETH_ADDR_LEN @@ -1410,7 +1422,7 @@ #define BME1000_E_PHY_ID_R2 0x01410CB1 #define I82577_E_PHY_ID 0x01540050 #define I82578_E_PHY_ID 0x004DD040 -#define I82580_I_PHY_ID 0x015403A0 +#define I82580_I_PHY_ID 0x015403A0 #define IGP04E1000_E_PHY_ID 0x02A80391 #define M88_VENDOR 0x0141 @@ -1507,6 +1519,7 @@ #define M88E1000_EPSCR_TX_CLK_25 0x0070 /* 25 MHz TX_CLK */ #define M88E1000_EPSCR_TX_CLK_0 0x0000 /* NO TX_CLK */ + /* M88EC018 Rev 2 specific DownShift settings */ #define M88EC018_EPSCR_DOWNSHIFT_COUNTER_MASK 0x0E00 #define M88EC018_EPSCR_DOWNSHIFT_COUNTER_1X 0x0000 Modified: head/sys/dev/e1000/e1000_hw.h ============================================================================== --- head/sys/dev/e1000/e1000_hw.h Mon Mar 29 23:00:45 2010 (r205868) +++ head/sys/dev/e1000/e1000_hw.h Mon Mar 29 23:36:34 2010 (r205869) @@ -122,6 +122,7 @@ struct e1000_hw; #define E1000_DEV_ID_ICH10_R_BM_V 0x10CE #define E1000_DEV_ID_ICH10_D_BM_LM 0x10DE #define E1000_DEV_ID_ICH10_D_BM_LF 0x10DF + #define E1000_DEV_ID_PCH_M_HV_LM 0x10EA #define E1000_DEV_ID_PCH_M_HV_LC 0x10EB #define E1000_DEV_ID_PCH_D_HV_DM 0x10EF @@ -682,6 +683,7 @@ struct e1000_mac_info { u8 forced_speed_duplex; bool adaptive_ifs; + bool has_fwsm; bool arc_subsystem_valid; bool asf_firmware_present; bool autoneg; Modified: head/sys/dev/e1000/e1000_ich8lan.c ============================================================================== --- head/sys/dev/e1000/e1000_ich8lan.c Mon Mar 29 23:00:45 2010 (r205868) +++ head/sys/dev/e1000/e1000_ich8lan.c Mon Mar 29 23:36:34 2010 (r205869) @@ -177,6 +177,7 @@ union ich8_hws_flash_regacc { static s32 e1000_init_phy_params_pchlan(struct e1000_hw *hw) { struct e1000_phy_info *phy = &hw->phy; + u32 ctrl; s32 ret_val = E1000_SUCCESS; DEBUGFUNC("e1000_init_phy_params_pchlan"); @@ -199,6 +200,35 @@ static s32 e1000_init_phy_params_pchlan( phy->ops.power_down = e1000_power_down_phy_copper_ich8lan; phy->autoneg_mask = AUTONEG_ADVERTISE_SPEED_DEFAULT; + if ((hw->mac.type == e1000_pchlan) && + (!(E1000_READ_REG(hw, E1000_FWSM) & E1000_ICH_FWSM_FW_VALID))) { + + /* + * The MAC-PHY interconnect may still be in SMBus mode + * after Sx->S0. Toggle the LANPHYPC Value bit to force + * the interconnect to PCIe mode, but only if there is no + * firmware present otherwise firmware will have done it. + */ + ctrl = E1000_READ_REG(hw, E1000_CTRL); + ctrl |= E1000_CTRL_LANPHYPC_OVERRIDE; + ctrl &= ~E1000_CTRL_LANPHYPC_VALUE; + E1000_WRITE_REG(hw, E1000_CTRL, ctrl); + usec_delay(10); + ctrl &= ~E1000_CTRL_LANPHYPC_OVERRIDE; + E1000_WRITE_REG(hw, E1000_CTRL, ctrl); + msec_delay(50); + } + + /* + * Reset the PHY before any acccess to it. Doing so, ensures that + * the PHY is in a known good state before we read/write PHY registers. + * The generic reset is sufficient here, because we haven't determined + * the PHY type yet. + */ + ret_val = e1000_phy_hw_reset_generic(hw); + if (ret_val) + goto out; + phy->id = e1000_phy_unknown; ret_val = e1000_get_phy_id(hw); if (ret_val) @@ -225,6 +255,7 @@ static s32 e1000_init_phy_params_pchlan( phy->ops.get_cable_length = e1000_get_cable_length_82577; phy->ops.get_info = e1000_get_phy_info_82577; phy->ops.commit = e1000_phy_sw_reset_generic; + break; case e1000_phy_82578: phy->ops.check_polarity = e1000_check_polarity_m88; phy->ops.force_speed_duplex = e1000_phy_force_speed_duplex_m88; @@ -431,8 +462,10 @@ static s32 e1000_init_mac_params_ich8lan mac->rar_entry_count--; /* Set if part includes ASF firmware */ mac->asf_firmware_present = TRUE; - /* Set if manageability features are enabled. */ - mac->arc_subsystem_valid = TRUE; + /* FWSM register */ + mac->has_fwsm = TRUE; + /* ARC subsystem not supported */ + mac->arc_subsystem_valid = FALSE; /* Adaptive IFS supported */ mac->adaptive_ifs = TRUE; @@ -764,6 +797,9 @@ static s32 e1000_check_reset_block_ich8l DEBUGFUNC("e1000_check_reset_block_ich8lan"); + if (hw->phy.reset_disable) + return E1000_BLK_PHY_RESET; + fwsm = E1000_READ_REG(hw, E1000_FWSM); return (fwsm & E1000_ICH_FWSM_RSPCIPHY) ? E1000_SUCCESS @@ -2684,6 +2720,7 @@ static s32 e1000_reset_hw_ich8lan(struct DEBUGOUT("Auto Read Done did not complete\n"); } } + /* Dummy read to clear the phy wakeup bit after lcd reset */ if (hw->mac.type == e1000_pchlan) hw->phy.ops.read_reg(hw, BM_WUC, ®); @@ -2857,6 +2894,14 @@ static void e1000_initialize_hw_bits_ich E1000_WRITE_REG(hw, E1000_STATUS, reg); } + /* + * work-around descriptor data corruption issue during nfs v2 udp + * traffic, just disable the nfs filtering capability + */ + reg = E1000_READ_REG(hw, E1000_RFCTL); + reg |= (E1000_RFCTL_NFSW_DIS | E1000_RFCTL_NFSR_DIS); + E1000_WRITE_REG(hw, E1000_RFCTL, reg); + return; } Modified: head/sys/dev/e1000/e1000_ich8lan.h ============================================================================== --- head/sys/dev/e1000/e1000_ich8lan.h Mon Mar 29 23:00:45 2010 (r205868) +++ head/sys/dev/e1000/e1000_ich8lan.h Mon Mar 29 23:36:34 2010 (r205869) @@ -167,6 +167,9 @@ #define HV_KMRN_MODE_CTRL PHY_REG(769, 16) #define HV_KMRN_MDIO_SLOW 0x0400 +/* PHY Power Management Control */ +#define HV_PM_CTRL PHY_REG(770, 17) + #define SW_FLAG_TIMEOUT 1000 /* SW Semaphore flag timeout in milliseconds */ /* @@ -192,7 +195,6 @@ #define E1000_RXDEXT_LINKSEC_ERROR_REPLAY_ERROR 0x40000000 #define E1000_RXDEXT_LINKSEC_ERROR_BAD_SIG 0x60000000 - void e1000_set_kmrn_lock_loss_workaround_ich8lan(struct e1000_hw *hw, bool state); void e1000_igp3_phy_powerdown_workaround_ich8lan(struct e1000_hw *hw); Modified: head/sys/dev/e1000/e1000_mac.c ============================================================================== --- head/sys/dev/e1000/e1000_mac.c Mon Mar 29 23:00:45 2010 (r205868) +++ head/sys/dev/e1000/e1000_mac.c Mon Mar 29 23:36:34 2010 (r205869) @@ -225,17 +225,30 @@ s32 e1000_get_bus_info_pcie_generic(stru DEBUGFUNC("e1000_get_bus_info_pcie_generic"); bus->type = e1000_bus_type_pci_express; - bus->speed = e1000_bus_speed_2500; ret_val = e1000_read_pcie_cap_reg(hw, PCIE_LINK_STATUS, &pcie_link_status); - if (ret_val) + if (ret_val) { bus->width = e1000_bus_width_unknown; - else + bus->speed = e1000_bus_speed_unknown; + } else { + switch (pcie_link_status & PCIE_LINK_SPEED_MASK) { + case PCIE_LINK_SPEED_2500: + bus->speed = e1000_bus_speed_2500; + break; + case PCIE_LINK_SPEED_5000: + bus->speed = e1000_bus_speed_5000; + break; + default: + bus->speed = e1000_bus_speed_unknown; + break; + } + bus->width = (enum e1000_bus_width)((pcie_link_status & PCIE_LINK_WIDTH_MASK) >> PCIE_LINK_WIDTH_SHIFT); + } mac->ops.set_lan_id(hw); Modified: head/sys/dev/e1000/e1000_manage.c ============================================================================== --- head/sys/dev/e1000/e1000_manage.c Mon Mar 29 23:00:45 2010 (r205868) +++ head/sys/dev/e1000/e1000_manage.c Mon Mar 29 23:36:34 2010 (r205869) @@ -78,6 +78,12 @@ s32 e1000_mng_enable_host_if_generic(str DEBUGFUNC("e1000_mng_enable_host_if_generic"); + if (!(hw->mac.arc_subsystem_valid)) { + DEBUGOUT("ARC subsystem not valid.\n"); + ret_val = -E1000_ERR_HOST_INTERFACE_COMMAND; + goto out; + } + /* Check that the host interface is enabled. */ hicr = E1000_READ_REG(hw, E1000_HICR); if ((hicr & E1000_HICR_EN) == 0) { @@ -365,7 +371,7 @@ bool e1000_enable_mng_pass_thru(struct e if (!(manc & E1000_MANC_RCV_TCO_EN)) goto out; - if (hw->mac.arc_subsystem_valid) { + if (hw->mac.has_fwsm) { fwsm = E1000_READ_REG(hw, E1000_FWSM); factps = E1000_READ_REG(hw, E1000_FACTPS); @@ -375,12 +381,23 @@ bool e1000_enable_mng_pass_thru(struct e ret_val = TRUE; goto out; } - } else { - if ((manc & E1000_MANC_SMBUS_EN) && - !(manc & E1000_MANC_ASF_EN)) { + } else if ((hw->mac.type == e1000_82574) || + (hw->mac.type == e1000_82583)) { + u16 data; + + factps = E1000_READ_REG(hw, E1000_FACTPS); + e1000_read_nvm(hw, NVM_INIT_CONTROL2_REG, 1, &data); + + if (!(factps & E1000_FACTPS_MNGCG) && + ((data & E1000_NVM_INIT_CTRL2_MNGM) == + (e1000_mng_mode_pt << 13))) { ret_val = TRUE; goto out; } + } else if ((manc & E1000_MANC_SMBUS_EN) && + !(manc & E1000_MANC_ASF_EN)) { + ret_val = TRUE; + goto out; } out: Modified: head/sys/dev/e1000/e1000_phy.c ============================================================================== --- head/sys/dev/e1000/e1000_phy.c Mon Mar 29 23:00:45 2010 (r205868) +++ head/sys/dev/e1000/e1000_phy.c Mon Mar 29 23:36:34 2010 (r205869) @@ -3402,9 +3402,7 @@ s32 e1000_check_polarity_82577(struct e1 * e1000_phy_force_speed_duplex_82577 - Force speed/duplex for I82577 PHY * @hw: pointer to the HW structure * - * Calls the PHY setup function to force speed and duplex. Clears the - * auto-crossover to force MDI manually. Waits for link and returns - * successful if link up is successful, else -E1000_ERR_PHY (-2). + * Calls the PHY setup function to force speed and duplex. **/ s32 e1000_phy_force_speed_duplex_82577(struct e1000_hw *hw) { @@ -3425,23 +3423,6 @@ s32 e1000_phy_force_speed_duplex_82577(s if (ret_val) goto out; - /* - * Clear Auto-Crossover to force MDI manually. 82577 requires MDI - * forced whenever speed and duplex are forced. - */ - ret_val = phy->ops.read_reg(hw, I82577_PHY_CTRL_2, &phy_data); - if (ret_val) - goto out; - - phy_data &= ~I82577_PHY_CTRL2_AUTO_MDIX; - phy_data &= ~I82577_PHY_CTRL2_FORCE_MDI_MDIX; - - ret_val = phy->ops.write_reg(hw, I82577_PHY_CTRL_2, phy_data); - if (ret_val) - goto out; - - DEBUGOUT1("I82577_PHY_CTRL_2: %X\n", phy_data); - usec_delay(1); if (phy->autoneg_wait_to_complete) { Modified: head/sys/dev/e1000/e1000_regs.h ============================================================================== --- head/sys/dev/e1000/e1000_regs.h Mon Mar 29 23:00:45 2010 (r205868) +++ head/sys/dev/e1000/e1000_regs.h Mon Mar 29 23:36:34 2010 (r205869) @@ -65,7 +65,7 @@ #define E1000_IAM 0x000E0 /* Interrupt Acknowledge Auto Mask */ #define E1000_IVAR 0x000E4 /* Interrupt Vector Allocation Register - RW */ #define E1000_SVCR 0x000F0 -#define E1000_SVT 0x000F4 +#define E1000_SVT 0x000F4 #define E1000_RCTL 0x00100 /* Rx Control - RW */ #define E1000_FCTTV 0x00170 /* Flow Control Transmit Timer Value - RW */ #define E1000_TXCW 0x00178 /* Tx Configuration Word - RW */ @@ -282,6 +282,17 @@ #define E1000_ICRXOC 0x04124 /* Interrupt Cause Receiver Overrun Count */ #define E1000_CRC_OFFSET 0x05F50 /* CRC Offset register */ +/* Virtualization statistical counters */ +#define E1000_PFVFGPRC(_n) (0x010010 + (0x100 * (_n))) +#define E1000_PFVFGPTC(_n) (0x010014 + (0x100 * (_n))) +#define E1000_PFVFGORC(_n) (0x010018 + (0x100 * (_n))) +#define E1000_PFVFGOTC(_n) (0x010034 + (0x100 * (_n))) +#define E1000_PFVFMPRC(_n) (0x010038 + (0x100 * (_n))) +#define E1000_PFVFGPRLBC(_n) (0x010040 + (0x100 * (_n))) +#define E1000_PFVFGPTLBC(_n) (0x010044 + (0x100 * (_n))) +#define E1000_PFVFGORLBC(_n) (0x010048 + (0x100 * (_n))) +#define E1000_PFVFGOTLBC(_n) (0x010050 + (0x100 * (_n))) + #define E1000_LSECTXUT 0x04300 /* LinkSec Tx Untagged Packet Count - OutPktsUntagged */ #define E1000_LSECTXPKTE 0x04304 /* LinkSec Encrypted Tx Packets Count - OutPktsEncrypted */ #define E1000_LSECTXPKTP 0x04308 /* LinkSec Protected Tx Packet Count - OutPktsProtected */ @@ -386,6 +397,7 @@ #define E1000_KMRNCTRLSTA 0x00034 /* MAC-PHY interface - RW */ #define E1000_MDPHYA 0x0003C /* PHY address - RW */ #define E1000_MANC2H 0x05860 /* Management Control To Host - RW */ +#define E1000_MDEF(_n) (0x05890 + (4 * (_n))) /* Mngmt Decision Filters */ #define E1000_SW_FW_SYNC 0x05B5C /* Software-Firmware Synchronization - RW */ #define E1000_CCMCTL 0x05B48 /* CCM Control Register */ #define E1000_GIOCTL 0x05B44 /* GIO Analog Control Register */ Modified: head/sys/dev/e1000/if_em.c ============================================================================== --- head/sys/dev/e1000/if_em.c Mon Mar 29 23:00:45 2010 (r205868) +++ head/sys/dev/e1000/if_em.c Mon Mar 29 23:36:34 2010 (r205869) @@ -35,7 +35,6 @@ #ifdef HAVE_KERNEL_OPTION_HEADERS #include "opt_device_polling.h" #include "opt_inet.h" -#include "opt_altq.h" #endif #include @@ -55,9 +54,7 @@ #include #include #include -#if __FreeBSD_version >= 700029 #include -#endif #include #include @@ -95,7 +92,7 @@ int em_display_debug_stats = 0; /********************************************************************* * Driver version: *********************************************************************/ -char em_driver_version[] = "6.9.25"; +char em_driver_version[] = "7.0.0"; /********************************************************************* @@ -111,51 +108,6 @@ char em_driver_version[] = "6.9.25"; static em_vendor_info_t em_vendor_info_array[] = { /* Intel(R) PRO/1000 Network Connection */ - { 0x8086, E1000_DEV_ID_82540EM, PCI_ANY_ID, PCI_ANY_ID, 0}, - { 0x8086, E1000_DEV_ID_82540EM_LOM, PCI_ANY_ID, PCI_ANY_ID, 0}, - { 0x8086, E1000_DEV_ID_82540EP, PCI_ANY_ID, PCI_ANY_ID, 0}, - { 0x8086, E1000_DEV_ID_82540EP_LOM, PCI_ANY_ID, PCI_ANY_ID, 0}, - { 0x8086, E1000_DEV_ID_82540EP_LP, PCI_ANY_ID, PCI_ANY_ID, 0}, - - { 0x8086, E1000_DEV_ID_82541EI, PCI_ANY_ID, PCI_ANY_ID, 0}, - { 0x8086, E1000_DEV_ID_82541ER, PCI_ANY_ID, PCI_ANY_ID, 0}, - { 0x8086, E1000_DEV_ID_82541ER_LOM, PCI_ANY_ID, PCI_ANY_ID, 0}, - { 0x8086, E1000_DEV_ID_82541EI_MOBILE, PCI_ANY_ID, PCI_ANY_ID, 0}, - { 0x8086, E1000_DEV_ID_82541GI, PCI_ANY_ID, PCI_ANY_ID, 0}, - { 0x8086, E1000_DEV_ID_82541GI_LF, PCI_ANY_ID, PCI_ANY_ID, 0}, - { 0x8086, E1000_DEV_ID_82541GI_MOBILE, PCI_ANY_ID, PCI_ANY_ID, 0}, - - { 0x8086, E1000_DEV_ID_82542, PCI_ANY_ID, PCI_ANY_ID, 0}, - - { 0x8086, E1000_DEV_ID_82543GC_FIBER, PCI_ANY_ID, PCI_ANY_ID, 0}, - { 0x8086, E1000_DEV_ID_82543GC_COPPER, PCI_ANY_ID, PCI_ANY_ID, 0}, - - { 0x8086, E1000_DEV_ID_82544EI_COPPER, PCI_ANY_ID, PCI_ANY_ID, 0}, - { 0x8086, E1000_DEV_ID_82544EI_FIBER, PCI_ANY_ID, PCI_ANY_ID, 0}, - { 0x8086, E1000_DEV_ID_82544GC_COPPER, PCI_ANY_ID, PCI_ANY_ID, 0}, - { 0x8086, E1000_DEV_ID_82544GC_LOM, PCI_ANY_ID, PCI_ANY_ID, 0}, - - { 0x8086, E1000_DEV_ID_82545EM_COPPER, PCI_ANY_ID, PCI_ANY_ID, 0}, - { 0x8086, E1000_DEV_ID_82545EM_FIBER, PCI_ANY_ID, PCI_ANY_ID, 0}, - { 0x8086, E1000_DEV_ID_82545GM_COPPER, PCI_ANY_ID, PCI_ANY_ID, 0}, - { 0x8086, E1000_DEV_ID_82545GM_FIBER, PCI_ANY_ID, PCI_ANY_ID, 0}, - { 0x8086, E1000_DEV_ID_82545GM_SERDES, PCI_ANY_ID, PCI_ANY_ID, 0}, - - { 0x8086, E1000_DEV_ID_82546EB_COPPER, PCI_ANY_ID, PCI_ANY_ID, 0}, - { 0x8086, E1000_DEV_ID_82546EB_FIBER, PCI_ANY_ID, PCI_ANY_ID, 0}, - { 0x8086, E1000_DEV_ID_82546EB_QUAD_COPPER, PCI_ANY_ID, PCI_ANY_ID, 0}, - { 0x8086, E1000_DEV_ID_82546GB_COPPER, PCI_ANY_ID, PCI_ANY_ID, 0}, - { 0x8086, E1000_DEV_ID_82546GB_FIBER, PCI_ANY_ID, PCI_ANY_ID, 0}, - { 0x8086, E1000_DEV_ID_82546GB_SERDES, PCI_ANY_ID, PCI_ANY_ID, 0}, - { 0x8086, E1000_DEV_ID_82546GB_PCIE, PCI_ANY_ID, PCI_ANY_ID, 0}, - { 0x8086, E1000_DEV_ID_82546GB_QUAD_COPPER, PCI_ANY_ID, PCI_ANY_ID, 0}, - { 0x8086, E1000_DEV_ID_82546GB_QUAD_COPPER_KSP3, - PCI_ANY_ID, PCI_ANY_ID, 0}, - - { 0x8086, E1000_DEV_ID_82547EI, PCI_ANY_ID, PCI_ANY_ID, 0}, - { 0x8086, E1000_DEV_ID_82547EI_MOBILE, PCI_ANY_ID, PCI_ANY_ID, 0}, - { 0x8086, E1000_DEV_ID_82547GI, PCI_ANY_ID, PCI_ANY_ID, 0}, - { 0x8086, E1000_DEV_ID_82571EB_COPPER, PCI_ANY_ID, PCI_ANY_ID, 0}, { 0x8086, E1000_DEV_ID_82571EB_FIBER, PCI_ANY_ID, PCI_ANY_ID, 0}, { 0x8086, E1000_DEV_ID_82571EB_SERDES, PCI_ANY_ID, PCI_ANY_ID, 0}, @@ -238,10 +190,11 @@ static int em_shutdown(device_t); static int em_suspend(device_t); static int em_resume(device_t); static void em_start(struct ifnet *); -static void em_start_locked(struct ifnet *ifp); +static void em_start_locked(struct ifnet *, struct tx_ring *); #if __FreeBSD_version >= 800000 static int em_mq_start(struct ifnet *, struct mbuf *); -static int em_mq_start_locked(struct ifnet *, struct mbuf *); +static int em_mq_start_locked(struct ifnet *, + struct tx_ring *, struct mbuf *); static void em_qflush(struct ifnet *); #endif static int em_ioctl(struct ifnet *, u_long, caddr_t); @@ -252,55 +205,49 @@ static void em_media_status(struct ifnet static int em_media_change(struct ifnet *); static void em_identify_hardware(struct adapter *); static int em_allocate_pci_resources(struct adapter *); -static int em_allocate_legacy(struct adapter *adapter); -static int em_allocate_msix(struct adapter *adapter); +static int em_allocate_legacy(struct adapter *); +static int em_allocate_msix(struct adapter *); +static int em_allocate_queues(struct adapter *); static int em_setup_msix(struct adapter *); static void em_free_pci_resources(struct adapter *); static void em_local_timer(void *); -static int em_hardware_init(struct adapter *); +static void em_reset(struct adapter *); static void em_setup_interface(device_t, struct adapter *); + static void em_setup_transmit_structures(struct adapter *); static void em_initialize_transmit_unit(struct adapter *); +static int em_allocate_transmit_buffers(struct tx_ring *); +static void em_free_transmit_structures(struct adapter *); +static void em_free_transmit_buffers(struct tx_ring *); + static int em_setup_receive_structures(struct adapter *); +static int em_allocate_receive_buffers(struct rx_ring *); static void em_initialize_receive_unit(struct adapter *); +static void em_free_receive_structures(struct adapter *); +static void em_free_receive_buffers(struct rx_ring *); + static void em_enable_intr(struct adapter *); static void em_disable_intr(struct adapter *); -static void em_free_transmit_structures(struct adapter *); -static void em_free_receive_structures(struct adapter *); static void em_update_stats_counters(struct adapter *); -static void em_txeof(struct adapter *); -static void em_tx_purge(struct adapter *); -static int em_allocate_receive_structures(struct adapter *); -static int em_allocate_transmit_structures(struct adapter *); -static int em_rxeof(struct adapter *, int); +static bool em_txeof(struct tx_ring *); +static int em_rxeof(struct rx_ring *, int); #ifndef __NO_STRICT_ALIGNMENT -static int em_fixup_rx(struct adapter *); +static int em_fixup_rx(struct rx_ring *); #endif -static void em_receive_checksum(struct adapter *, struct e1000_rx_desc *, - struct mbuf *); -static void em_transmit_checksum_setup(struct adapter *, struct mbuf *, - u32 *, u32 *); -#if __FreeBSD_version >= 700000 -static bool em_tso_setup(struct adapter *, struct mbuf *, +static void em_receive_checksum(struct e1000_rx_desc *, struct mbuf *); +static void em_transmit_checksum_setup(struct tx_ring *, struct mbuf *, u32 *, u32 *); -#endif /* FreeBSD_version >= 700000 */ +static bool em_tso_setup(struct tx_ring *, struct mbuf *, u32 *, u32 *); static void em_set_promisc(struct adapter *); static void em_disable_promisc(struct adapter *); static void em_set_multi(struct adapter *); static void em_print_hw_stats(struct adapter *); static void em_update_link_status(struct adapter *); -static int em_get_buf(struct adapter *, int); -#if __FreeBSD_version >= 700029 +static void em_refresh_mbufs(struct rx_ring *, int); static void em_register_vlan(void *, struct ifnet *, u16); static void em_unregister_vlan(void *, struct ifnet *, u16); static void em_setup_vlan_hw_support(struct adapter *); -#endif -static int em_xmit(struct adapter *, struct mbuf **); -static void em_smartspeed(struct adapter *); -static int em_82547_fifo_workaround(struct adapter *, int); -static void em_82547_update_fifo_head(struct adapter *, int); -static int em_82547_tx_fifo_reset(struct adapter *); -static void em_82547_move_tail(void *); +static int em_xmit(struct tx_ring *, struct mbuf **); static int em_dma_malloc(struct adapter *, bus_size_t, struct em_dma_alloc *, int); static void em_dma_free(struct adapter *, struct em_dma_alloc *); @@ -309,8 +256,6 @@ static void em_print_nvm_info(struct ada static int em_is_valid_ether_addr(u8 *); static int em_sysctl_stats(SYSCTL_HANDLER_ARGS); static int em_sysctl_debug_info(SYSCTL_HANDLER_ARGS); -static u32 em_fill_descriptors (bus_addr_t address, u32 length, - PDESC_ARRAY desc_array); static int em_sysctl_int_delay(SYSCTL_HANDLER_ARGS); static void em_add_int_delay_sysctl(struct adapter *, const char *, const char *, struct em_int_delay_info *, int, int); @@ -323,27 +268,18 @@ static void em_get_wakeup(device_t); static void em_enable_wakeup(device_t); static int em_enable_phy_wakeup(struct adapter *); -#ifdef EM_LEGACY_IRQ -static void em_intr(void *); -#else /* FAST IRQ */ -#if __FreeBSD_version < 700000 -static void em_irq_fast(void *); -#else static int em_irq_fast(void *); -#endif /* MSIX handlers */ static void em_msix_tx(void *); static void em_msix_rx(void *); static void em_msix_link(void *); -static void em_handle_rx(void *context, int pending); static void em_handle_tx(void *context, int pending); - -static void em_handle_rxtx(void *context, int pending); +static void em_handle_rx(void *context, int pending); static void em_handle_link(void *context, int pending); + static void em_add_rx_process_limit(struct adapter *, const char *, const char *, int *, int); -#endif /* ~EM_LEGACY_IRQ */ #ifdef DEVICE_POLLING static poll_handler_t em_poll; @@ -368,7 +304,7 @@ static driver_t em_driver = { "em", em_methods, sizeof(struct adapter), }; -static devclass_t em_devclass; +devclass_t em_devclass; DRIVER_MODULE(em, pci, em_driver, em_devclass, 0, 0); MODULE_DEPEND(em, pci, 1, 1, 1); MODULE_DEPEND(em, ether, 1, 1, 1); @@ -388,31 +324,35 @@ MODULE_DEPEND(em, ether, 1, 1, 1); static int em_tx_int_delay_dflt = EM_TICKS_TO_USECS(EM_TIDV); static int em_rx_int_delay_dflt = EM_TICKS_TO_USECS(EM_RDTR); -static int em_tx_abs_int_delay_dflt = EM_TICKS_TO_USECS(EM_TADV); -static int em_rx_abs_int_delay_dflt = EM_TICKS_TO_USECS(EM_RADV); -static int em_rxd = EM_DEFAULT_RXD; -static int em_txd = EM_DEFAULT_TXD; -static int em_smart_pwr_down = FALSE; -/* Controls whether promiscuous also shows bad packets */ -static int em_debug_sbp = FALSE; -/* Local switch for MSI/MSIX */ -static int em_enable_msi = TRUE; - TUNABLE_INT("hw.em.tx_int_delay", &em_tx_int_delay_dflt); TUNABLE_INT("hw.em.rx_int_delay", &em_rx_int_delay_dflt); + +static int em_tx_abs_int_delay_dflt = EM_TICKS_TO_USECS(EM_TADV); +static int em_rx_abs_int_delay_dflt = EM_TICKS_TO_USECS(EM_RADV); TUNABLE_INT("hw.em.tx_abs_int_delay", &em_tx_abs_int_delay_dflt); TUNABLE_INT("hw.em.rx_abs_int_delay", &em_rx_abs_int_delay_dflt); + +static int em_rxd = EM_DEFAULT_RXD; +static int em_txd = EM_DEFAULT_TXD; TUNABLE_INT("hw.em.rxd", &em_rxd); TUNABLE_INT("hw.em.txd", &em_txd); + +static int em_smart_pwr_down = FALSE; TUNABLE_INT("hw.em.smart_pwr_down", &em_smart_pwr_down); + +/* Controls whether promiscuous also shows bad packets */ +static int em_debug_sbp = FALSE; TUNABLE_INT("hw.em.sbp", &em_debug_sbp); -TUNABLE_INT("hw.em.enable_msi", &em_enable_msi); -#ifndef EM_LEGACY_IRQ +/* Local controls for MSI/MSIX */ +static int em_enable_msix = TRUE; +static int em_msix_queues = 2; /* for 82574, can be 1 or 2 */ +TUNABLE_INT("hw.em.enable_msix", &em_enable_msix); +TUNABLE_INT("hw.em.msix_queues", &em_msix_queues); + /* How many packets rxeof tries to clean at a time */ static int em_rx_process_limit = 100; TUNABLE_INT("hw.em.rx_process_limit", &em_rx_process_limit); -#endif /* Flow control setting - default to FULL */ static int em_fc_setting = e1000_fc_full; @@ -494,7 +434,6 @@ static int em_attach(device_t dev) { struct adapter *adapter; - int tsize, rsize; int error = 0; INIT_DEBUGOUT("em_attach: begin"); @@ -502,8 +441,6 @@ em_attach(device_t dev) adapter = device_get_softc(dev); adapter->dev = adapter->osdep.dev = dev; EM_CORE_LOCK_INIT(adapter, device_get_nameunit(dev)); - EM_TX_LOCK_INIT(adapter, device_get_nameunit(dev)); - EM_RX_LOCK_INIT(adapter, device_get_nameunit(dev)); /* SYSCTL stuff */ SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), @@ -517,7 +454,6 @@ em_attach(device_t dev) em_sysctl_stats, "I", "Statistics"); callout_init_mtx(&adapter->timer, &adapter->core_mtx, 0); - callout_init_mtx(&adapter->tx_fifo_timer, &adapter->tx_mtx, 0); /* Determine hardware and mac info */ em_identify_hardware(adapter); @@ -571,25 +507,21 @@ em_attach(device_t dev) em_add_int_delay_sysctl(adapter, "tx_int_delay", "transmit interrupt delay in usecs", &adapter->tx_int_delay, E1000_REGISTER(&adapter->hw, E1000_TIDV), em_tx_int_delay_dflt); - if (adapter->hw.mac.type >= e1000_82540) { - em_add_int_delay_sysctl(adapter, "rx_abs_int_delay", - "receive interrupt delay limit in usecs", - &adapter->rx_abs_int_delay, - E1000_REGISTER(&adapter->hw, E1000_RADV), - em_rx_abs_int_delay_dflt); - em_add_int_delay_sysctl(adapter, "tx_abs_int_delay", - "transmit interrupt delay limit in usecs", - &adapter->tx_abs_int_delay, - E1000_REGISTER(&adapter->hw, E1000_TADV), - em_tx_abs_int_delay_dflt); - } + em_add_int_delay_sysctl(adapter, "rx_abs_int_delay", + "receive interrupt delay limit in usecs", + &adapter->rx_abs_int_delay, + E1000_REGISTER(&adapter->hw, E1000_RADV), + em_rx_abs_int_delay_dflt); + em_add_int_delay_sysctl(adapter, "tx_abs_int_delay", + "transmit interrupt delay limit in usecs", + &adapter->tx_abs_int_delay, + E1000_REGISTER(&adapter->hw, E1000_TADV), + em_tx_abs_int_delay_dflt); -#ifndef EM_LEGACY_IRQ /* Sysctls for limiting the amount of work done in the taskqueue */ em_add_rx_process_limit(adapter, "rx_processing_limit", "max number of rx packets to process", &adapter->rx_process_limit, em_rx_process_limit); -#endif /* * Validate number of transmit and receive descriptors. It @@ -597,18 +529,15 @@ em_attach(device_t dev) * of E1000_DBA_ALIGN. */ if (((em_txd * sizeof(struct e1000_tx_desc)) % EM_DBA_ALIGN) != 0 || - (adapter->hw.mac.type >= e1000_82544 && em_txd > EM_MAX_TXD) || - (adapter->hw.mac.type < e1000_82544 && em_txd > EM_MAX_TXD_82543) || - (em_txd < EM_MIN_TXD)) { + (em_txd > EM_MAX_TXD) || (em_txd < EM_MIN_TXD)) { device_printf(dev, "Using %d TX descriptors instead of %d!\n", EM_DEFAULT_TXD, em_txd); adapter->num_tx_desc = EM_DEFAULT_TXD; } else adapter->num_tx_desc = em_txd; + if (((em_rxd * sizeof(struct e1000_rx_desc)) % EM_DBA_ALIGN) != 0 || - (adapter->hw.mac.type >= e1000_82544 && em_rxd > EM_MAX_RXD) || - (adapter->hw.mac.type < e1000_82544 && em_rxd > EM_MAX_RXD_82543) || - (em_rxd < EM_MIN_RXD)) { + (em_rxd > EM_MAX_RXD) || (em_rxd < EM_MIN_RXD)) { device_printf(dev, "Using %d RX descriptors instead of %d!\n", EM_DEFAULT_RXD, em_rxd); adapter->num_rx_desc = EM_DEFAULT_RXD; @@ -618,10 +547,6 @@ em_attach(device_t dev) adapter->hw.mac.autoneg = DO_AUTO_NEG; adapter->hw.phy.autoneg_wait_to_complete = FALSE; adapter->hw.phy.autoneg_advertised = AUTONEG_ADV_DEFAULT; - adapter->rx_buffer_len = 2048; - - e1000_init_script_state_82541(&adapter->hw, TRUE); - e1000_set_tbi_compatibility_82543(&adapter->hw, TRUE); /* Copper options */ if (adapter->hw.phy.media_type == e1000_media_type_copper) { @@ -643,29 +568,13 @@ em_attach(device_t dev) */ adapter->hw.mac.report_tx_early = 1; - tsize = roundup2(adapter->num_tx_desc * sizeof(struct e1000_tx_desc), - EM_DBA_ALIGN); - - /* Allocate Transmit Descriptor ring */ - if (em_dma_malloc(adapter, tsize, &adapter->txdma, BUS_DMA_NOWAIT)) { - device_printf(dev, "Unable to allocate tx_desc memory\n"); - error = ENOMEM; - goto err_tx_desc; - } - adapter->tx_desc_base = - (struct e1000_tx_desc *)adapter->txdma.dma_vaddr; - - rsize = roundup2(adapter->num_rx_desc * sizeof(struct e1000_rx_desc), - EM_DBA_ALIGN); - - /* Allocate Receive Descriptor ring */ - if (em_dma_malloc(adapter, rsize, &adapter->rxdma, BUS_DMA_NOWAIT)) { - device_printf(dev, "Unable to allocate rx_desc memory\n"); + /* + ** Get queue/ring memory + */ + if (em_allocate_queues(adapter)) { error = ENOMEM; - goto err_rx_desc; + goto err_pci; } - adapter->rx_desc_base = - (struct e1000_rx_desc *)adapter->rxdma.dma_vaddr; /* ** Start from a known state, this is @@ -685,7 +594,7 @@ em_attach(device_t dev) device_printf(dev, "The EEPROM Checksum Is Not Valid\n"); error = EIO; - goto err_hw_init; + goto err_late; } } @@ -694,45 +603,24 @@ em_attach(device_t dev) device_printf(dev, "EEPROM read error while reading MAC" " address\n"); error = EIO; - goto err_hw_init; + goto err_late; } if (!em_is_valid_ether_addr(adapter->hw.mac.addr)) { device_printf(dev, "Invalid MAC address\n"); error = EIO; - goto err_hw_init; - } - - /* Initialize the hardware */ - if (em_hardware_init(adapter)) { - device_printf(dev, "Unable to initialize the hardware\n"); - error = EIO; - goto err_hw_init; - } - - /* Allocate transmit descriptors and buffers */ - if (em_allocate_transmit_structures(adapter)) { - device_printf(dev, "Could not setup transmit structures\n"); - error = ENOMEM; - goto err_tx_struct; - } - - /* Allocate receive descriptors and buffers */ - if (em_allocate_receive_structures(adapter)) { - device_printf(dev, "Could not setup receive structures\n"); - error = ENOMEM; - goto err_rx_struct; + goto err_late; } /* ** Do interrupt configuration */ - if (adapter->msi > 1) /* Do MSI/X */ + if (adapter->msix > 1) /* Do MSIX */ error = em_allocate_msix(adapter); else /* MSI or Legacy */ error = em_allocate_legacy(adapter); if (error) - goto err_rx_struct; + goto err_late; /* * Get Wake-on-Lan and Management info for later use @@ -742,6 +630,8 @@ em_attach(device_t dev) /* Setup OS specific network interface */ em_setup_interface(dev, adapter); + em_reset(adapter); + /* Initialize statistics */ em_update_stats_counters(adapter); @@ -753,20 +643,11 @@ em_attach(device_t dev) device_printf(dev, "PHY reset is blocked due to SOL/IDER session.\n"); - /* Do we need workaround for 82544 PCI-X adapter? */ - if (adapter->hw.bus.type == e1000_bus_type_pcix && - adapter->hw.mac.type == e1000_82544) - adapter->pcix_82544 = TRUE; - else - adapter->pcix_82544 = FALSE; - -#if __FreeBSD_version >= 700029 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Tue Mar 30 03:01:27 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1A697106564A; Tue, 30 Mar 2010 03:01:27 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail09.syd.optusnet.com.au (mail09.syd.optusnet.com.au [211.29.132.190]) by mx1.freebsd.org (Postfix) with ESMTP id 59B678FC17; Tue, 30 Mar 2010 03:01:26 +0000 (UTC) Received: from c122-106-158-90.carlnfd1.nsw.optusnet.com.au (c122-106-158-90.carlnfd1.nsw.optusnet.com.au [122.106.158.90]) by mail09.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o2U31FfW002391 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 30 Mar 2010 14:01:18 +1100 Date: Tue, 30 Mar 2010 14:01:15 +1100 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Ed Schouten In-Reply-To: <201003281313.o2SDDMh4031408@svn.freebsd.org> Message-ID: <20100330114503.Y5269@delplex.bde.org> References: <201003281313.o2SDDMh4031408@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: r205792 - in head: lib/libc/sys sys/amd64/linux32 sys/compat/freebsd32 sys/compat/linux sys/compat/svr4 sys/i386/ibcs2 sys/i386/linux sys/kern sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Mar 2010 03:01:27 -0000 On Sun, 28 Mar 2010, Ed Schouten wrote: > Log: > Rename st_*timespec fields to st_*tim for POSIX 2008 compliance. > > A nice thing about POSIX 2008 is that it finally standardizes a way to > obtain file access/modification/change times in sub-second precision, > namely using struct timespec, which we already have for a very long > time. Unfortunately POSIX uses different names. > > This commit adds compatibility macros, so existing code should still > build properly. Also change all source code in the kernel to work > without any of the compatibility macros. This makes it all a less > ambiguous. > > I am also renaming st_birthtime to st_birthtim, even though it was a > local extension anyway. It seems Cygwin also has a st_birthtim. st_birthtime should have been st_btime (for the seconds part). Now st_btim for the timespec. Presumably POSIX chose to abbreviate "time" instead of expanding st_xtime when providing the new names so as to keep the names short, so a name like st_birthtim which is abbreviated but not short is especially bogus. > Modified: head/sys/kern/tty_pts.c > ============================================================================== > --- head/sys/kern/tty_pts.c Sun Mar 28 12:55:31 2010 (r205791) > +++ head/sys/kern/tty_pts.c Sun Mar 28 13:13:22 2010 (r205792) > @@ -556,9 +556,9 @@ ptsdev_stat(struct file *fp, struct stat > #endif /* PTS_EXTERNAL */ > sb->st_ino = sb->st_rdev = tty_udev(tp); > > - sb->st_atimespec = dev->si_atime; > - sb->st_ctimespec = dev->si_ctime; > - sb->st_mtimespec = dev->si_mtime; > + sb->st_atim = dev->si_atime; > + sb->st_ctim = dev->si_ctime; > + sb->st_mtim = dev->si_mtime; > sb->st_uid = dev->si_uid; > sb->st_gid = dev->si_gid; > sb->st_mode = dev->si_mode | S_IFCHR; > Should probably rename other xx_ytime's. But I don't like renaming. devfs is still missing support for st_btim, and this cannot be fixed here. > Modified: head/sys/kern/uipc_mqueue.c > ============================================================================== > --- head/sys/kern/uipc_mqueue.c Sun Mar 28 12:55:31 2010 (r205791) > +++ head/sys/kern/uipc_mqueue.c Sun Mar 28 13:13:22 2010 (r205792) > @@ -2447,10 +2447,10 @@ mqf_stat(struct file *fp, struct stat *s > struct mqfs_node *pn = fp->f_data; > > bzero(st, sizeof *st); > - st->st_atimespec = pn->mn_atime; > - st->st_mtimespec = pn->mn_mtime; > - st->st_ctimespec = pn->mn_ctime; > - st->st_birthtimespec = pn->mn_birth; > + st->st_atim = pn->mn_atime; > + st->st_mtim = pn->mn_mtime; > + st->st_ctim = pn->mn_ctime; > + st->st_birthtim = pn->mn_birth; > st->st_uid = pn->mn_uid; > st->st_gid = pn->mn_gid; > st->st_mode = S_IFIFO | pn->mn_mode; > As for si_ytime's, but not missing support for st_btim and different (more) bogus name for mn_btim. Similarly for some other xx_ytime's. > Modified: head/sys/sys/_timespec.h > ============================================================================== > --- head/sys/sys/_timespec.h Sun Mar 28 12:55:31 2010 (r205791) > +++ head/sys/sys/_timespec.h Sun Mar 28 13:13:22 2010 (r205792) > @@ -31,26 +31,18 @@ > * $FreeBSD$ > */ > > -/* > - * Prerequisite: > - * > - * This file must be kept synchronized with . > - * It defines a structure which must be a type pun for > - * `struct timespec'; this structure is used in header files where > - * the ABI uses a `struct timespec' but standards prohibit its > - * definition. (Currently only .) > - * > - * XXX should just declare struct __timespec as necessary. It's simple, > - * so is easy to keep synchronized, and hopefully not needed in as many > - * places as struct timespec, so we don't need this extra header. > - * Perhaps we don't need timespec.h either. > - */ The second paragraph still applies, even more than before. This file is more bogus than before. If the first comment (about "Currently only") was still correct, then this file is now completely bogus. In fact, the first comment was still correct -- this file is only included by . Thus this file is now bogus -- struct timespec is now standard pollution in . > - > #ifndef _SYS__TIMESPEC_H_ > #define _SYS__TIMESPEC_H_ > > -struct __timespec { > - __time_t tv_sec; /* seconds */ > +#include > + > +#ifndef _TIME_T_DECLARED > +typedef __time_t time_t; > +#define _TIME_T_DECLARED > +#endif > + > +struct timespec { > + time_t tv_sec; /* seconds */ > long tv_nsec; /* and nanoseconds */ > }; > As also mentioned in the deleted but still relevant comment, there yet another timespec file -- sys/timespec.h. It also declares struct timespec, and in the current organization it is the file that is supposed to be included to get the declaration of struct timespec when this declararation is not pollution. However, this file also declares struct itimerspec, and maybe that pollution is not yet permitted in by POSIX. POSIX's man page for sys/stat.h doesn't mention struct itimerspec. In fact, struct itimerspec seems to be just recent breakage (by pollution) of sys/timespec.h. There are currently only 3 other headers that include sys/timespec.h: time.h, sys/select.h and sys/time.h. None of these use struct itimerspec. struct itimerspec is only used in sys/timers.h, which pollutes itself by including sys/time.h (which itself is massively polluted by including ). OTOH, is non-polluted to a fault. In POSIX, struct itimerspec is supposed to be declared in , and so are the functions that use it. FreeBSD's and don't seem to be mentioned in POSIX, and 's lack of fault includes not including either of these, so the POSIX interfaces involving struct itimerspec can't be accessed in the normal way under FreeBSD. Bugs in this area used to be limited to the decomposition of and being almost perfectly backwards, with holding almost all time interfaces in POSIX and holding (via nested pollution) almost all time interfaces in FreeBSD. The first steps to untangle this would be: - move the declaration of struct itimerspec from sys/timespec.h to sys/timers.h, thus unpolluting the former - remove sys/_timespec.h, and use sys/timespec.h instead of it in the place where it is used (sys/stat.h). Although I was responsible for many of them, I don't like most of the little sys/_foo.h headers. They just avoid a few ifdefs and a few duplicates of struct declarations, at a cost of 10 times as much code consisting mainly of copyright comments and silly compile-time costs for many more includes and parsing of copyright comments... struct timespec is so simple that repeating its declaration is better. Ifdefs still tend to be needed for things like the time_t typedef and avoiding 1 ifdef for the struct doesn't provide much avoidance of duplication. > Modified: head/sys/sys/stat.h > ============================================================================== > --- head/sys/sys/stat.h Sun Mar 28 12:55:31 2010 (r205791) > +++ head/sys/sys/stat.h Sun Mar 28 13:13:22 2010 (r205792) > @@ -39,6 +39,7 @@ > #define _SYS_STAT_H_ > > #include > +#include Can include sys/timespec.h after fixing it. > #include > > #ifndef _BLKSIZE_T_DECLARED > @@ -86,11 +87,6 @@ typedef __off_t off_t; > #define _OFF_T_DECLARED > #endif > > -#ifndef _TIME_T_DECLARED > -typedef __time_t time_t; > -#define _TIME_T_DECLARED > -#endif > - Also not needed when sys/timespec.h is used. > #ifndef _UID_T_DECLARED > typedef __uid_t uid_t; > #define _UID_T_DECLARED > @@ -98,16 +94,11 @@ typedef __uid_t uid_t; > > #if !defined(_KERNEL) && __BSD_VISIBLE > /* > - * XXX we need this for struct timespec. We get miscellaneous namespace > - * pollution with it. > + * XXX We get miscellaneous namespace pollution with this. > */ > #include > #endif > > -#if !__BSD_VISIBLE > -#include > -#endif > - But this can't be fixed so simply. We now get namespace pollution from . struct timespec is only permitted here in recent versions of POSIX. There needs to be messy _POSIX_C_SOURCE >= 2008mumble ifdefs somewhere... > #if __BSD_VISIBLE > struct ostat { > __uint16_t st_dev; /* inode's device */ > @@ -118,9 +109,9 @@ struct ostat { > __uint16_t st_gid; /* group ID of the file's group */ > __uint16_t st_rdev; /* device type */ > __int32_t st_size; /* file size, in bytes */ > - struct timespec st_atimespec; /* time of last access */ > - struct timespec st_mtimespec; /* time of last data modification */ > - struct timespec st_ctimespec; /* time of last file status change */ > + struct timespec st_atim; /* time of last access */ > + struct timespec st_mtim; /* time of last data modification */ > + struct timespec st_ctim; /* time of last file status change */ > __int32_t st_blksize; /* optimal blocksize for I/O */ > __int32_t st_blocks; /* blocks allocated for file */ > fflags_t st_flags; /* user defined flags for file */ > @@ -136,28 +127,18 @@ struct stat { > uid_t st_uid; /* user ID of the file's owner */ > gid_t st_gid; /* group ID of the file's group */ > __dev_t st_rdev; /* device type */ > -#if __BSD_VISIBLE > - struct timespec st_atimespec; /* time of last access */ > - struct timespec st_mtimespec; /* time of last data modification */ > - struct timespec st_ctimespec; /* time of last file status change */ > -#else > - time_t st_atime; /* time of last access */ > - long __st_atimensec; /* nsec of last access */ > - time_t st_mtime; /* time of last data modification */ > - long __st_mtimensec; /* nsec of last data modification */ > - time_t st_ctime; /* time of last file status change */ > - long __st_ctimensec; /* nsec of last file status change */ > -#endif > + struct timespec st_atim; /* time of last access */ > + struct timespec st_mtim; /* time of last data modification */ > + struct timespec st_ctim; /* time of last file status change */ ... and the mess of ifdefs and compatibility cruft needs to become even larger here: - pre-POSIX-2008: something like the old code - post-POSIX-2008: something like the new code Since we only want to support old POSIX applications and not old FreeBSD applications, not quite such a large mess is needed -- struct timespec must not be visible for old POSIX, but there is no need to expose the nanoseconds parts for old POSIX/FreeBSD. Hmm, this was already quite broken, and sys/_timespec.h was already almost completely bogus, since the struct __timespec carefully declared in it was almost completely unused. The old code should have used __timespec instead of timespec in the above and then it wouldn't need visibility ifdefs, provided compilers aren't super-sensitive to the spelling of the struct tag. The new code can do something similar to avoid ifdefs. But don't have a sys/_timespec.h just to declare struct __timespec which is only used in this file. Note that we got the declaration of struct timespec via the massive namespace pollution in sys/time.h. My version fixed the pollution long ago, except it included sys/timespec.h to directly get the much smaller amount of pollution depended on by the above (sys.stat.h never didn't depend on any other pollution): % Index: stat.h % =================================================================== % RCS file: /home/ncvs/src/sys/sys/stat.h,v % retrieving revision 1.40 % diff -u -2 -r1.40 stat.h % --- stat.h 17 Jun 2004 17:16:52 -0000 1.40 % +++ stat.h 20 Jun 2004 02:09:28 -0000 % @@ -89,13 +89,7 @@ % #endif % % -#if !defined(_KERNEL) && __BSD_VISIBLE % -/* % - * XXX we need this for struct timespec. We get miscellaneous namespace % - * pollution with it. % - */ % -#include % -#endif % - % -#if !__BSD_VISIBLE % +#if __BSD_VISIBLE % +#include % +#else % #include % #endif Apparently I never tested the !__BSD_VISIBLE case. Since struct __timespec is mostly unused, the above won't actually compile when only sys/_timespec.h is included. > @@ -166,12 +147,6 @@ struct stat { > */ > unsigned int :(8 / 2) * (16 - (int)sizeof(struct timespec)); > unsigned int :(8 / 2) * (16 - (int)sizeof(struct timespec)); > -#else > - time_t st_birthtime; /* time of file creation */ > - long st_birthtimensec; /* nsec of file creation */ > - unsigned int :(8 / 2) * (16 - (int)sizeof(struct __timespec)); > - unsigned int :(8 / 2) * (16 - (int)sizeof(struct __timespec)); > -#endif > }; > > #if __BSD_VISIBLE For some reason, this actually used struct __timespec. This was the only use of struct __timespec in any version of this file. The reason seems to have been that sys/_timespec was never used as intended, except I used it for the above 2 lines because I didn't notice its full lack of use when I wrote these lines. > @@ -200,13 +175,23 @@ struct nstat { > }; > #endif > > +#ifndef _KERNEL > +#define st_atime st_atim.tv_sec > +#define st_mtime st_mtim.tv_sec > +#define st_ctime st_ctim.tv_sec Excessive horizontal whitespace in new code. > #if __BSD_VISIBLE > -#define st_atime st_atimespec.tv_sec > -#define st_mtime st_mtimespec.tv_sec > -#define st_ctime st_ctimespec.tv_sec > -#define st_birthtime st_birthtimespec.tv_sec Subexcessive horizontal whitespace including missing tabs in old code. I wonder why we didn't use the struct for the !__BSD_VISIBLE case. It might have been due to compilers being super-sensitive to the types, or the macros being technically invalid. If so, the new macros would be technically invalid for both old-FreeBSD and old-POSIX. (In new-FreeBSD and new-POSIX, they are standard so applications are not allowed to #undef them, etc., though this is mostly undocumented.) The !__BSD_VISIBLE case was fragile since the compiler might pad the structs differently to the scalars, but I think the layout was always the same in practice. > Modified: head/sys/sys/timespec.h > ============================================================================== > --- head/sys/sys/timespec.h Sun Mar 28 12:55:31 2010 (r205791) > +++ head/sys/sys/timespec.h Sun Mar 28 13:13:22 2010 (r205792) > @@ -31,22 +31,11 @@ > * $FreeBSD$ > */ > > -/* > - * Prerequisites: , > - */ > - These should still be prerequisites. Their includes were intentionally left out, partly to inhibit direct includes of this header. > #ifndef _SYS_TIMESPEC_H_ > #define _SYS_TIMESPEC_H_ > > -#ifndef _TIME_T_DECLARED > -typedef __time_t time_t; > -#define _TIME_T_DECLARED > -#endif > - > -struct timespec { > - time_t tv_sec; /* seconds */ > - long tv_nsec; /* and nanoseconds */ > -}; > +#include > +#include It's disgusting to include sys/_timespec.h (which shouldn't exist) several layers deep just to uniquize the declaration of struct timespec. > > #if __BSD_VISIBLE > #define TIMEVAL_TO_TIMESPEC(tv, ts) \ > Here is yet more pollution in the primary timespec header. Not too bad since it is ifdefed. But this belongs near timevals, not near timespecs, since it is bogus compatibility cruft for the former. It can't even be used unless the header which declares the former is included. It should only be declared in that header, only in the kernel. That header is sys/time.h which already declares timespecs and might still do so when its pollution is removed. Bruce From owner-svn-src-head@FreeBSD.ORG Tue Mar 30 03:29:12 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BBBB9106566C; Tue, 30 Mar 2010 03:29:12 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail05.syd.optusnet.com.au (mail05.syd.optusnet.com.au [211.29.132.186]) by mx1.freebsd.org (Postfix) with ESMTP id 38B388FC16; Tue, 30 Mar 2010 03:29:11 +0000 (UTC) Received: from c122-106-158-90.carlnfd1.nsw.optusnet.com.au (c122-106-158-90.carlnfd1.nsw.optusnet.com.au [122.106.158.90]) by mail05.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o2U3T5cZ020977 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 30 Mar 2010 14:29:10 +1100 Date: Tue, 30 Mar 2010 14:29:05 +1100 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Dag-Erling Smorgrav In-Reply-To: <201003291320.o2TDKqfe066476@svn.freebsd.org> Message-ID: <20100330142351.C5481@delplex.bde.org> References: <201003291320.o2TDKqfe066476@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: r205834 - head/usr.bin/calendar X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Mar 2010 03:29:12 -0000 On Mon, 29 Mar 2010, Dag-Erling Smorgrav wrote: > Log: > size_t is not equivalent to int on 64-bit platforms. Neither is it on 16-63 or 65-infinity bit platforms, since it is not signed. > Modified: head/usr.bin/calendar/parsedata.c > ============================================================================== > --- head/usr.bin/calendar/parsedata.c Mon Mar 29 12:32:16 2010 (r205833) > +++ head/usr.bin/calendar/parsedata.c Mon Mar 29 13:20:52 2010 (r205834) > @@ -39,9 +39,9 @@ __FBSDID("$FreeBSD$"); > static char *showflags(int flags); > static int isonlydigits(char *s, int nostar); > static const char *getmonthname(int i); > -static int checkmonth(char *s, int *len, int *offset, const char **month); > +static int checkmonth(char *s, size_t *len, size_t *offset, const char **month); > static const char *getdayofweekname(int i); > -static int checkdayofweek(char *s, int *len, int *offset, const char **dow); > +static int checkdayofweek(char *s, size_t *len, size_t *offset, const char **dow); len("size_t") is not equivalent to len("int") so s/size_t/int/g gives ugly formatting on some platforms. Bruce From owner-svn-src-head@FreeBSD.ORG Tue Mar 30 06:42:01 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E9CE7106566B; Tue, 30 Mar 2010 06:42:01 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D8A7B8FC20; Tue, 30 Mar 2010 06:42:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2U6g1YC098574; Tue, 30 Mar 2010 06:42:01 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2U6g1Bu098561; Tue, 30 Mar 2010 06:42:01 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201003300642.o2U6g1Bu098561@svn.freebsd.org> From: Edwin Groothuis Date: Tue, 30 Mar 2010 06:42: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: r205872 - head/usr.bin/calendar X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Mar 2010 06:42:02 -0000 Author: edwin Date: Tue Mar 30 06:42:01 2010 New Revision: 205872 URL: http://svn.freebsd.org/changeset/base/205872 Log: On request of joel@: - Remove the 3rd clause of the UC Berkeley copyrighted files. - For the files added copyrighted by me, move the "All rights reserved" to the next line. Modified: head/usr.bin/calendar/calendar.1 head/usr.bin/calendar/calendar.c head/usr.bin/calendar/calendar.h head/usr.bin/calendar/dates.c head/usr.bin/calendar/day.c head/usr.bin/calendar/events.c head/usr.bin/calendar/io.c head/usr.bin/calendar/locale.c head/usr.bin/calendar/parsedata.c head/usr.bin/calendar/pathnames.h head/usr.bin/calendar/pom.c head/usr.bin/calendar/sunpos.c Modified: head/usr.bin/calendar/calendar.1 ============================================================================== --- head/usr.bin/calendar/calendar.1 Tue Mar 30 05:48:16 2010 (r205871) +++ head/usr.bin/calendar/calendar.1 Tue Mar 30 06:42:01 2010 (r205872) @@ -9,10 +9,6 @@ .\" 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. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by the University of -.\" California, Berkeley and its contributors. .\" 4. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. Modified: head/usr.bin/calendar/calendar.c ============================================================================== --- head/usr.bin/calendar/calendar.c Tue Mar 30 05:48:16 2010 (r205871) +++ head/usr.bin/calendar/calendar.c Tue Mar 30 06:42:01 2010 (r205872) @@ -10,10 +10,6 @@ * 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. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. Modified: head/usr.bin/calendar/calendar.h ============================================================================== --- head/usr.bin/calendar/calendar.h Tue Mar 30 05:48:16 2010 (r205871) +++ head/usr.bin/calendar/calendar.h Tue Mar 30 06:42:01 2010 (r205872) @@ -10,10 +10,6 @@ * 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. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. Modified: head/usr.bin/calendar/dates.c ============================================================================== --- head/usr.bin/calendar/dates.c Tue Mar 30 05:48:16 2010 (r205871) +++ head/usr.bin/calendar/dates.c Tue Mar 30 06:42:01 2010 (r205872) @@ -1,5 +1,6 @@ /*- - * Copyright (c) 1992-2009 Edwin Groothuis. All rights reserved. + * Copyright (c) 1992-2009 Edwin Groothuis . + * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/usr.bin/calendar/day.c ============================================================================== --- head/usr.bin/calendar/day.c Tue Mar 30 05:48:16 2010 (r205871) +++ head/usr.bin/calendar/day.c Tue Mar 30 06:42:01 2010 (r205872) @@ -10,10 +10,6 @@ * 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. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. Modified: head/usr.bin/calendar/events.c ============================================================================== --- head/usr.bin/calendar/events.c Tue Mar 30 05:48:16 2010 (r205871) +++ head/usr.bin/calendar/events.c Tue Mar 30 06:42:01 2010 (r205872) @@ -1,5 +1,6 @@ /*- - * Copyright (c) 1992-2009 Edwin Groothuis. All rights reserved. + * Copyright (c) 1992-2009 Edwin Groothuis . + * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/usr.bin/calendar/io.c ============================================================================== --- head/usr.bin/calendar/io.c Tue Mar 30 05:48:16 2010 (r205871) +++ head/usr.bin/calendar/io.c Tue Mar 30 06:42:01 2010 (r205872) @@ -10,10 +10,6 @@ * 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. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. Modified: head/usr.bin/calendar/locale.c ============================================================================== --- head/usr.bin/calendar/locale.c Tue Mar 30 05:48:16 2010 (r205871) +++ head/usr.bin/calendar/locale.c Tue Mar 30 06:42:01 2010 (r205872) @@ -10,10 +10,6 @@ * 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. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. Modified: head/usr.bin/calendar/parsedata.c ============================================================================== --- head/usr.bin/calendar/parsedata.c Tue Mar 30 05:48:16 2010 (r205871) +++ head/usr.bin/calendar/parsedata.c Tue Mar 30 06:42:01 2010 (r205872) @@ -1,5 +1,6 @@ /*- - * Copyright (c) 1992-2009 Edwin Groothuis. All rights reserved. + * Copyright (c) 1992-2009 Edwin Groothuis . + * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/usr.bin/calendar/pathnames.h ============================================================================== --- head/usr.bin/calendar/pathnames.h Tue Mar 30 05:48:16 2010 (r205871) +++ head/usr.bin/calendar/pathnames.h Tue Mar 30 06:42:01 2010 (r205872) @@ -10,10 +10,6 @@ * 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. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. Modified: head/usr.bin/calendar/pom.c ============================================================================== --- head/usr.bin/calendar/pom.c Tue Mar 30 05:48:16 2010 (r205871) +++ head/usr.bin/calendar/pom.c Tue Mar 30 06:42:01 2010 (r205872) @@ -12,10 +12,6 @@ * 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. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. Modified: head/usr.bin/calendar/sunpos.c ============================================================================== --- head/usr.bin/calendar/sunpos.c Tue Mar 30 05:48:16 2010 (r205871) +++ head/usr.bin/calendar/sunpos.c Tue Mar 30 06:42:01 2010 (r205872) @@ -1,5 +1,6 @@ /*- - * Copyright (c) 2009-2010 Edwin Groothuis. All rights reserved. + * Copyright (c) 2009-2010 Edwin Groothuis . + * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions From owner-svn-src-head@FreeBSD.ORG Tue Mar 30 09:22:34 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4FCF5106564A; Tue, 30 Mar 2010 09:22:34 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3FD318FC15; Tue, 30 Mar 2010 09:22:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2U9MYCj034114; Tue, 30 Mar 2010 09:22:34 GMT (envelope-from maxim@svn.freebsd.org) Received: (from maxim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2U9MYFe034112; Tue, 30 Mar 2010 09:22:34 GMT (envelope-from maxim@svn.freebsd.org) Message-Id: <201003300922.o2U9MYFe034112@svn.freebsd.org> From: Maxim Konovalov Date: Tue, 30 Mar 2010 09:22: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: r205873 - head/usr.sbin/mtree X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Mar 2010 09:22:34 -0000 Author: maxim Date: Tue Mar 30 09:22:33 2010 New Revision: 205873 URL: http://svn.freebsd.org/changeset/base/205873 Log: o Remove a duplicate reference to -f flag in the SYNOPSYS section. o Improve wording. PR: docs/144407 Submitted by: gcooper MFC after: 1 week Modified: head/usr.sbin/mtree/mtree.8 Modified: head/usr.sbin/mtree/mtree.8 ============================================================================== --- head/usr.sbin/mtree/mtree.8 Tue Mar 30 06:42:01 2010 (r205872) +++ head/usr.sbin/mtree/mtree.8 Tue Mar 30 09:22:33 2010 (r205873) @@ -41,9 +41,6 @@ .Op Fl f Ar spec .Ek .Bk -words -.Op Fl f Ar spec -.Ek -.Bk -words .Op Fl K Ar keywords .Ek .Bk -words @@ -119,7 +116,7 @@ Same as except a status of 2 is returned if the file hierarchy did not match the specification. .It Fl w -Make some errorconditions non-fatal warnings. +Make some errors non-fatal warnings. .It Fl x Do not descend below mount points in the file hierarchy. .It Fl f Ar file From owner-svn-src-head@FreeBSD.ORG Tue Mar 30 09:58:22 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 554921065670; Tue, 30 Mar 2010 09:58:22 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 452488FC1A; Tue, 30 Mar 2010 09:58:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2U9wMIV042086; Tue, 30 Mar 2010 09:58:22 GMT (envelope-from maxim@svn.freebsd.org) Received: (from maxim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2U9wMKX042084; Tue, 30 Mar 2010 09:58:22 GMT (envelope-from maxim@svn.freebsd.org) Message-Id: <201003300958.o2U9wMKX042084@svn.freebsd.org> From: Maxim Konovalov Date: Tue, 30 Mar 2010 09:58: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: r205874 - head/usr.bin/sockstat X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Mar 2010 09:58:22 -0000 Author: maxim Date: Tue Mar 30 09:58:21 2010 New Revision: 205874 URL: http://svn.freebsd.org/changeset/base/205874 Log: o Make sockstat -6 output more readable for long ipv6 addresses (most of them apart from ::1): put a whitespace between local and remote address:port pairs. PR: bin/145194 Submitted by: Fedor Dikarev MFC after: 2 weeks Modified: head/usr.bin/sockstat/sockstat.c Modified: head/usr.bin/sockstat/sockstat.c ============================================================================== --- head/usr.bin/sockstat/sockstat.c Tue Mar 30 09:22:33 2010 (r205873) +++ head/usr.bin/sockstat/sockstat.c Tue Mar 30 09:58:21 2010 (r205874) @@ -621,6 +621,8 @@ display(void) case AF_INET: case AF_INET6: pos += printaddr(s->family, &s->laddr); + if (s->family == AF_INET6 && pos >= 58) + pos += xprintf(" "); while (pos < 58) pos += xprintf(" "); pos += printaddr(s->family, &s->faddr); From owner-svn-src-head@FreeBSD.ORG Tue Mar 30 13:46:41 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8764C106564A; Tue, 30 Mar 2010 13:46:41 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7520C8FC21; Tue, 30 Mar 2010 13:46:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2UDkf9T095693; Tue, 30 Mar 2010 13:46:41 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2UDkePk095687; Tue, 30 Mar 2010 13:46:40 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201003301346.o2UDkePk095687@svn.freebsd.org> From: Ruslan Ermilov Date: Tue, 30 Mar 2010 13:46:40 +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: r205880 - head/usr.sbin/config X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Mar 2010 13:46:41 -0000 Author: ru Date: Tue Mar 30 13:46:40 2010 New Revision: 205880 URL: http://svn.freebsd.org/changeset/base/205880 Log: - Handle calloc() allocation failures. - Fixed a comment. - 2 -> EXIT_FAILURE in some places. - errx() -> err() where appropriate. PR: 144644 Submitted by: Garrett Cooper Modified: head/usr.sbin/config/config.y head/usr.sbin/config/lang.l head/usr.sbin/config/main.c head/usr.sbin/config/mkmakefile.c head/usr.sbin/config/mkoptions.c Modified: head/usr.sbin/config/config.y ============================================================================== --- head/usr.sbin/config/config.y Tue Mar 30 12:08:00 2010 (r205879) +++ head/usr.sbin/config/config.y Tue Mar 30 13:46:40 2010 (r205880) @@ -166,6 +166,8 @@ Config_spec: CPU Save_id { struct cputype *cp = (struct cputype *)calloc(1, sizeof (struct cputype)); + if (cp == NULL) + err(EXIT_FAILURE, "calloc"); cp->cpu_name = $2; SLIST_INSERT_HEAD(&cputype, cp, cpu_next); } | @@ -197,6 +199,8 @@ Config_spec: struct hint *hint; hint = (struct hint *)calloc(1, sizeof (struct hint)); + if (hint == NULL) + err(EXIT_FAILURE, "calloc"); hint->hint_name = $2; STAILQ_INSERT_TAIL(&hints, hint, hint_next); hintmode = 1; @@ -331,6 +335,8 @@ newfile(char *name) struct files_name *nl; nl = (struct files_name *) calloc(1, sizeof *nl); + if (nl == NULL) + err(EXIT_FAILURE, "calloc"); nl->f_name = name; STAILQ_INSERT_TAIL(&fntab, nl, f_next); } @@ -364,6 +370,8 @@ newdev(char *name) } np = (struct device *) calloc(1, sizeof *np); + if (np == NULL) + err(EXIT_FAILURE, "calloc"); np->d_name = name; STAILQ_INSERT_TAIL(&dtab, np, d_next); } @@ -422,6 +430,8 @@ newopt(struct opt_head *list, char *name } op = (struct opt *)calloc(1, sizeof (struct opt)); + if (op == NULL) + err(EXIT_FAILURE, "calloc"); op->op_name = name; op->op_ownfile = 0; op->op_value = value; Modified: head/usr.sbin/config/lang.l ============================================================================== --- head/usr.sbin/config/lang.l Tue Mar 30 12:08:00 2010 (r205879) +++ head/usr.sbin/config/lang.l Tue Mar 30 13:46:40 2010 (r205880) @@ -33,6 +33,7 @@ #include #include +#include #include #include "y.tab.h" #include "config.h" @@ -220,6 +221,8 @@ cfgfile_add(const char *fname) struct cfgfile *cf; cf = calloc(1, sizeof(*cf)); + if (cf == NULL) + err(EXIT_FAILURE, "calloc"); assert(cf != NULL); asprintf(&cf->cfg_path, "%s", fname); STAILQ_INSERT_TAIL(&cfgfiles, cf, cfg_next); Modified: head/usr.sbin/config/main.c ============================================================================== --- head/usr.sbin/config/main.c Tue Mar 30 12:08:00 2010 (r205879) +++ head/usr.sbin/config/main.c Tue Mar 30 13:46:40 2010 (r205880) @@ -120,7 +120,7 @@ main(int argc, char **argv) if (*destdir == '\0') strlcpy(destdir, optarg, sizeof(destdir)); else - errx(2, "directory already set"); + errx(EXIT_FAILURE, "directory already set"); break; case 'g': debugging++; @@ -175,7 +175,7 @@ main(int argc, char **argv) if (mkdir(p, 0777)) err(2, "%s", p); } else if (!S_ISDIR(buf.st_mode)) - errx(2, "%s isn't a directory", p); + errx(EXIT_FAILURE, "%s isn't a directory", p); SLIST_INIT(&cputype); SLIST_INIT(&mkopt); @@ -256,7 +256,7 @@ get_srcdir(void) int i; if (realpath("../..", srcdir) == NULL) - errx(2, "Unable to find root of source tree"); + err(EXIT_FAILURE, "Unable to find root of source tree"); if ((pwd = getenv("PWD")) != NULL && *pwd == '/' && (pwd = strdup(pwd)) != NULL) { /* Remove the last two path components. */ @@ -513,7 +513,7 @@ configfile(void) } sbuf_finish(sb); /* - * We print first part of the tamplate, replace our tag with + * We print first part of the template, replace our tag with * configuration files content and later continue writing our * template. */ @@ -650,6 +650,8 @@ remember(const char *file) } } hl = calloc(1, sizeof(*hl)); + if (hl == NULL) + err(EXIT_FAILURE, "calloc"); hl->h_name = s; hl->h_next = htab; htab = hl; @@ -671,19 +673,19 @@ kernconfdump(const char *file) r = open(file, O_RDONLY); if (r == -1) - errx(EXIT_FAILURE, "Couldn't open file '%s'", file); + err(EXIT_FAILURE, "Couldn't open file '%s'", file); error = fstat(r, &st); if (error == -1) - errx(EXIT_FAILURE, "fstat() failed"); + err(EXIT_FAILURE, "fstat() failed"); if (S_ISDIR(st.st_mode)) errx(EXIT_FAILURE, "'%s' is a directory", file); fp = fdopen(r, "r"); if (fp == NULL) - errx(EXIT_FAILURE, "fdopen() failed"); + err(EXIT_FAILURE, "fdopen() failed"); osz = 1024; o = calloc(1, osz); if (o == NULL) - errx(EXIT_FAILURE, "Couldn't allocate memory"); + err(EXIT_FAILURE, "Couldn't allocate memory"); /* ELF note section header. */ asprintf(&cmd, "/usr/bin/elfdump -c %s | grep -A 5 kern_conf" "| tail -2 | cut -d ' ' -f 2 | paste - - -", file); @@ -703,7 +705,7 @@ kernconfdump(const char *file) "INCLUDE_CONFIG_FILE", file); r = fseek(fp, off, SEEK_CUR); if (r != 0) - errx(EXIT_FAILURE, "fseek() failed"); + err(EXIT_FAILURE, "fseek() failed"); for (i = 0; i < size - 1; i++) { r = fgetc(fp); if (r == EOF) Modified: head/usr.sbin/config/mkmakefile.c ============================================================================== --- head/usr.sbin/config/mkmakefile.c Tue Mar 30 12:08:00 2010 (r205879) +++ head/usr.sbin/config/mkmakefile.c Tue Mar 30 13:46:40 2010 (r205880) @@ -98,6 +98,8 @@ new_fent(void) struct file_list *fp; fp = (struct file_list *) calloc(1, sizeof *fp); + if (fp == NULL) + err(EXIT_FAILURE, "calloc"); STAILQ_INSERT_TAIL(&ftab, fp, f_next); return (fp); } Modified: head/usr.sbin/config/mkoptions.c ============================================================================== --- head/usr.sbin/config/mkoptions.c Tue Mar 30 12:08:00 2010 (r205879) +++ head/usr.sbin/config/mkoptions.c Tue Mar 30 13:46:40 2010 (r205880) @@ -70,6 +70,8 @@ options(void) /* Fake the cpu types as options. */ SLIST_FOREACH(cp, &cputype, cpu_next) { op = (struct opt *)calloc(1, sizeof(*op)); + if (op == NULL) + err(EXIT_FAILURE, "calloc"); op->op_name = ns(cp->cpu_name); SLIST_INSERT_HEAD(&opt, op, op_next); } @@ -84,6 +86,8 @@ options(void) /* Fake MAXUSERS as an option. */ op = (struct opt *)calloc(1, sizeof(*op)); + if (op == NULL) + err(EXIT_FAILURE, "calloc"); op->op_name = ns("MAXUSERS"); snprintf(buf, sizeof(buf), "%d", maxusers); op->op_value = ns(buf); @@ -199,6 +203,8 @@ do_option(char *name) tidy++; } else { op = (struct opt *) calloc(1, sizeof *op); + if (op == NULL) + err(EXIT_FAILURE, "calloc"); op->op_name = inw; op->op_value = invalue; SLIST_INSERT_HEAD(&op_head, op, op_next); @@ -225,6 +231,8 @@ do_option(char *name) if (value && !seen) { /* New option appears */ op = (struct opt *) calloc(1, sizeof *op); + if (op == NULL) + err(EXIT_FAILURE, "calloc"); op->op_name = ns(name); op->op_value = value ? ns(value) : NULL; SLIST_INSERT_HEAD(&op_head, op, op_next); @@ -336,6 +344,8 @@ next: } po = (struct opt_list *) calloc(1, sizeof *po); + if (po == NULL) + err(EXIT_FAILURE, "calloc"); po->o_name = this; po->o_file = val; SLIST_INSERT_HEAD(&otab, po, o_next); From owner-svn-src-head@FreeBSD.ORG Tue Mar 30 15:34:04 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1B0571065674; Tue, 30 Mar 2010 15:34:04 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-fx0-f225.google.com (mail-fx0-f225.google.com [209.85.220.225]) by mx1.freebsd.org (Postfix) with ESMTP id C912B8FC20; Tue, 30 Mar 2010 15:34:02 +0000 (UTC) Received: by fxm25 with SMTP id 25so14503fxm.3 for ; Tue, 30 Mar 2010 08:34:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=ME3YYJpuldxHq0AqIV2ecNDZVS1QeFJLuslHlT2s2Qg=; b=REfQLw0PkbmaBhIZR25T/tVQ3zGnNaC/M/XfU3HPvti5b6SkfTr9NO+IHtSUfyeBQQ G79z3GjLIhz7we0EOWJVyP495NNp1BUPi1ITH/cSsIxezMC3k5pXeYjzaTP8WwYpKvhs 1RCItuEZ/l3ZfyniyLk091m3D/V07Ax+MYW2s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=iCS8ZLpFlWXuwQANza5BwAJOChFTVPTVfqnssatXevBOlu0CUtVMEYOM/jWpwpDl+b m9NDkwtkBpk+ryzyJ2XgsBbzImOKqd2cJ8mtpk6mfyxywX0yoEW7rZxqWcH96EuZrZXG GgZ81DgteJiqCkND7GBAMDfbCVyGG5bO4EI8s= Received: by 10.223.7.91 with SMTP id c27mr7165354fac.19.1269962799070; Tue, 30 Mar 2010 08:26:39 -0700 (PDT) Received: from mavbook.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id 14sm4021922fxm.1.2010.03.30.08.26.37 (version=SSLv3 cipher=RC4-MD5); Tue, 30 Mar 2010 08:26:38 -0700 (PDT) Sender: Alexander Motin Message-ID: <4BB2182C.4080203@FreeBSD.org> Date: Tue, 30 Mar 2010 18:26:36 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20091212) MIME-Version: 1.0 To: Bruce Cran References: <201003131117.o2DBHek2003410@svn.freebsd.org> In-Reply-To: <201003131117.o2DBHek2003410@svn.freebsd.org> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r205119 - head/contrib/top X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Mar 2010 15:34:04 -0000 Bruce Cran wrote: > Author: brucec > Date: Sat Mar 13 11:17:39 2010 > New Revision: 205119 > URL: http://svn.freebsd.org/changeset/base/205119 > > Log: > Change the 'amt' parameter in format_k2 from int to unsigned long long > to match the values passed in and prevent the SIZE field being corrupted > when more than 2TB is allocated. This change seems broke top on ARM, as declaration in util.h doesn't specifies argument type, and caller assumes int there. To make it work correctly, second part should be done: --- top.prev/utils.h 2009-10-14 15:23:42.000000000 +0300 +++ top/utils.h 2010-03-30 18:14:11.000000000 +0300 @@ -21,4 +21,4 @@ long percentages(); char *errmsg(); char *format_time(); char *format_k(); -char *format_k2(); +char *format_k2(unsigned long long); -- Alexander Motin From owner-svn-src-head@FreeBSD.ORG Tue Mar 30 16:09:42 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C12E9106566C; Tue, 30 Mar 2010 16:09:42 +0000 (UTC) (envelope-from giovanni.trematerra@gmail.com) Received: from mail-fx0-f225.google.com (mail-fx0-f225.google.com [209.85.220.225]) by mx1.freebsd.org (Postfix) with ESMTP id CAC358FC18; Tue, 30 Mar 2010 16:09:41 +0000 (UTC) Received: by fxm25 with SMTP id 25so48285fxm.3 for ; Tue, 30 Mar 2010 09:09:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:received:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=Ks1PTWOLsvY+mWW970hDxsH4YMGHNmrJnACPCWMSZyo=; b=Giyft7kwh3qoc2J+MawJsX1BOvYmZrFWtbjdFlRg2JZ243jYs01dNrRyQdhlCz/2i+ +Pu5+lgAj4bnOZq0SmHlU6ks55TT6C122PlohKs4orWFgKvlG8RNh+nebGWO9CsgYKwc LqCaEuj4wsXJlWiBuLZJB3QGpsf2/c8wr2hKc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=ERZb9s1pOX8KXJwG5OS9azZS3aHmx4AhWr8hcEjzhDpXFksz0ML1MfJ6rj+Km3Ha5G wcrQI7Ij0BfQ9ZWrocLapsYdmtrm1ts4PRQZzAd3UI3kXjcS20rReXQrIZc4rV1rACcf n2a6HHj0b3pe9bxLPCCpDaJ0LEWLc7af7XO3c= MIME-Version: 1.0 Received: by 10.223.110.201 with HTTP; Tue, 30 Mar 2010 08:39:09 -0700 (PDT) In-Reply-To: <201003131117.o2DBHek2003410@svn.freebsd.org> References: <201003131117.o2DBHek2003410@svn.freebsd.org> Date: Tue, 30 Mar 2010 17:39:09 +0200 Received: by 10.223.33.219 with SMTP id i27mr5042075fad.62.1269963550198; Tue, 30 Mar 2010 08:39:10 -0700 (PDT) Message-ID: <4e6cba831003300839u5eac26d2n142ecb69502a64b0@mail.gmail.com> From: Giovanni Trematerra To: Bruce Cran 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, Randall Stewart Subject: Re: svn commit: r205119 - head/contrib/top X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Mar 2010 16:09:42 -0000 On Sat, Mar 13, 2010 at 1:17 PM, Bruce Cran wrote: > Author: brucec > Date: Sat Mar 13 11:17:39 2010 > New Revision: 205119 > URL: http://svn.freebsd.org/changeset/base/205119 > > Log: > =A0Change the 'amt' parameter in format_k2 from int to unsigned long long > =A0to match the values passed in and prevent the SIZE field being corrupt= ed > =A0when more than 2TB is allocated. > > =A0PR: =A0 =A0 =A0 =A0 =A0 bin/129706 > =A0Approved by: =A0rrs (mentor) > =A0MFC after: =A0 =A01 week > > Modified: > =A0head/contrib/top/utils.c > > Modified: head/contrib/top/utils.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/contrib/top/utils.c =A0 =A0Sat Mar 13 11:08:57 2010 =A0 =A0 =A0 = =A0(r205118) > +++ head/contrib/top/utils.c =A0 =A0Sat Mar 13 11:17:39 2010 =A0 =A0 =A0 = =A0(r205119) > @@ -476,7 +476,7 @@ int amt; > > =A0char *format_k2(amt) > > -int amt; > +unsigned long long amt; > > =A0{ > =A0 =A0 static char retarray[NUM_STRINGS][16]; While here wouldn't be good thing to ansify the function? From owner-svn-src-head@FreeBSD.ORG Tue Mar 30 17:05:25 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0FBD5106566B; Tue, 30 Mar 2010 17:05:25 +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 D91DB8FC1F; Tue, 30 Mar 2010 17:05:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2UH5O28039558; Tue, 30 Mar 2010 17:05:24 GMT (envelope-from jfv@svn.freebsd.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2UH5O5r039555; Tue, 30 Mar 2010 17:05:24 GMT (envelope-from jfv@svn.freebsd.org) Message-Id: <201003301705.o2UH5O5r039555@svn.freebsd.org> From: Jack F Vogel Date: Tue, 30 Mar 2010 17:05: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: r205884 - head/sys/dev/e1000 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Mar 2010 17:05:25 -0000 Author: jfv Date: Tue Mar 30 17:05:24 2010 New Revision: 205884 URL: http://svn.freebsd.org/changeset/base/205884 Log: Fix lint build problem. Modified: head/sys/dev/e1000/if_em.c head/sys/dev/e1000/if_em.h Modified: head/sys/dev/e1000/if_em.c ============================================================================== --- head/sys/dev/e1000/if_em.c Tue Mar 30 15:26:12 2010 (r205883) +++ head/sys/dev/e1000/if_em.c Tue Mar 30 17:05:24 2010 (r205884) @@ -4823,16 +4823,18 @@ em_print_debug_info(struct adapter *adap device_printf(dev, "Queue(%d) tdh = %d, tdt = %d\n", i, E1000_READ_REG(&adapter->hw, E1000_TDH(i)), E1000_READ_REG(&adapter->hw, E1000_TDT(i))); - device_printf(dev, "TX(%d) no descriptors avail event = %lld\n", - txr->me, (long long)txr->no_desc_avail); - device_printf(dev, "TX(%d) MSIX IRQ Handled = %lld\n", txr->me, - (long long)txr->tx_irq); + device_printf(dev, "TX(%d) no descriptors avail event = %ld\n", + txr->me, txr->no_desc_avail); + device_printf(dev, "TX(%d) MSIX IRQ Handled = %ld\n", + txr->me, txr->tx_irq); device_printf(dev, "Num Tx descriptors avail = %d\n", txr->tx_avail); device_printf(dev, "Tx Descriptors not avail1 = %ld\n", txr->no_desc_avail); } for (int i = 0; i < adapter->num_queues; i++, rxr++) { + device_printf(dev, "RX(%d) MSIX IRQ Handled = %ld\n", + rxr->me, rxr->rx_irq); device_printf(dev, "hw rdh = %d, hw rdt = %d\n", E1000_READ_REG(&adapter->hw, E1000_RDH(i)), E1000_READ_REG(&adapter->hw, E1000_RDT(i))); Modified: head/sys/dev/e1000/if_em.h ============================================================================== --- head/sys/dev/e1000/if_em.h Tue Mar 30 15:26:12 2010 (r205883) +++ head/sys/dev/e1000/if_em.h Tue Mar 30 17:05:24 2010 (r205884) @@ -291,8 +291,8 @@ struct tx_ring { bus_dma_tag_t txtag; void *tag; struct resource *res; - u64 tx_irq; - u64 no_desc_avail; + unsigned long tx_irq; + unsigned long no_desc_avail; }; /* @@ -310,8 +310,8 @@ struct rx_ring { struct taskqueue *tq; struct e1000_rx_desc *rx_base; struct em_dma_alloc rxdma; - unsigned int next_to_refresh; - unsigned int next_to_check; + u32 next_to_refresh; + u32 next_to_check; struct em_buffer *rx_buffers; struct mbuf *fmp; struct mbuf *lmp; @@ -323,9 +323,9 @@ struct rx_ring { bus_dmamap_t rx_sparemap; /* Soft stats */ - u64 rx_irq; - u64 rx_packets; - u64 rx_bytes; + unsigned long rx_irq; + unsigned long rx_packets; + unsigned long rx_bytes; }; From owner-svn-src-head@FreeBSD.ORG Tue Mar 30 18:29:20 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 99CDE1065670; Tue, 30 Mar 2010 18:29:20 +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 3DFA88FC1C; Tue, 30 Mar 2010 18:29:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2UITKfl057903; Tue, 30 Mar 2010 18:29:20 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2UITKwm057901; Tue, 30 Mar 2010 18:29:20 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201003301829.o2UITKwm057901@svn.freebsd.org> From: John Baldwin Date: Tue, 30 Mar 2010 18:29: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: r205885 - head/sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Mar 2010 18:29:20 -0000 Author: jhb Date: Tue Mar 30 18:29:19 2010 New Revision: 205885 URL: http://svn.freebsd.org/changeset/base/205885 Log: Various and sundry style, whitespace, and comment fixes. Submitted by: bde (mostly) Modified: head/sys/sys/pcpu.h Modified: head/sys/sys/pcpu.h ============================================================================== --- head/sys/sys/pcpu.h Tue Mar 30 17:05:24 2010 (r205884) +++ head/sys/sys/pcpu.h Tue Mar 30 18:29:19 2010 (r205885) @@ -42,22 +42,19 @@ #include #include -struct pcb; -struct thread; - /* * Define a set for pcpu data. * * We don't use SET_DECLARE because it defines the set as 'a' when we - * want 'aw'. GCC considers uninitialized data in a seperate section - * writable and there is no generic zero initializer that works for + * want 'aw'. gcc considers uninitialized data in a separate section + * writable, and there is no generic zero initializer that works for * structs and scalars. */ extern uintptr_t *__start_set_pcpu; extern uintptr_t *__stop_set_pcpu; __asm__( -#if defined(__arm__) +#ifdef __arm__ ".section set_pcpu, \"aw\", %progbits\n" #else ".section set_pcpu, \"aw\", @progbits\n" @@ -73,8 +70,8 @@ extern uintptr_t dpcpu_off[]; /* * Convenience defines. */ -#define DPCPU_START (uintptr_t)&__start_set_pcpu -#define DPCPU_STOP (uintptr_t)&__stop_set_pcpu +#define DPCPU_START ((uintptr_t)&__start_set_pcpu) +#define DPCPU_STOP ((uintptr_t)&__stop_set_pcpu) #define DPCPU_BYTES (DPCPU_STOP - DPCPU_START) #define DPCPU_MODMIN 2048 #define DPCPU_SIZE roundup2(DPCPU_BYTES, PAGE_SIZE) @@ -111,8 +108,8 @@ extern uintptr_t dpcpu_off[]; /* * XXXUPS remove as soon as we have per cpu variable - * linker sets and can define rm_queue in _rm_lock.h -*/ + * linker sets and can define rm_queue in _rm_lock.h + */ struct rm_queue { struct rm_queue* volatile rmq_next; struct rm_queue* volatile rmq_prev; @@ -120,7 +117,6 @@ struct rm_queue { #define PCPU_NAME_LEN (sizeof("CPU ") + sizeof(__XSTRING(MAXCPU) + 1)) - /* * This structure maps out the global data that needs to be kept on a * per-cpu basis. The members are accessed via the PCPU_GET/SET/PTR @@ -133,43 +129,40 @@ struct pcpu { struct thread *pc_fpcurthread; /* Fp state owner */ struct thread *pc_deadthread; /* Zombie thread or NULL */ struct pcb *pc_curpcb; /* Current pcb */ - uint64_t pc_switchtime; - int pc_switchticks; + uint64_t pc_switchtime; /* cpu_ticks() at last csw */ + int pc_switchticks; /* `ticks' at last csw */ u_int pc_cpuid; /* This cpu number */ cpumask_t pc_cpumask; /* This cpu mask */ cpumask_t pc_other_cpus; /* Mask of all other cpus */ SLIST_ENTRY(pcpu) pc_allcpu; struct lock_list_entry *pc_spinlocks; #ifdef KTR - char pc_name[PCPU_NAME_LEN]; /* String name for KTR. */ + char pc_name[PCPU_NAME_LEN]; /* String name for KTR */ #endif struct vmmeter pc_cnt; /* VM stats counters */ long pc_cp_time[CPUSTATES]; /* statclock ticks */ struct device *pc_device; - void *pc_netisr; /* netisr SWI cookie. */ + void *pc_netisr; /* netisr SWI cookie */ - /* + /* * Stuff for read mostly lock - * + * * XXXUPS remove as soon as we have per cpu variable * linker sets. */ - struct rm_queue pc_rm_queue; + struct rm_queue pc_rm_queue; - /* - * Dynamic per-cpu data area. - */ - uintptr_t pc_dynamic; + uintptr_t pc_dynamic; /* Dynamic per-cpu data area */ /* * Keep MD fields last, so that CPU-specific variations on a * single architecture don't result in offset variations of - * the machine-independent fields of the pcpu. Even though + * the machine-independent fields of the pcpu. Even though * the pcpu structure is private to the kernel, some ports - * (e.g. lsof, part of gtop) define _KERNEL and include this - * header. While strictly speaking this is wrong, there's no - * reason not to keep the offsets of the MI fields constant. - * If only to make kernel debugging easier... + * (e.g., lsof, part of gtop) define _KERNEL and include this + * header. While strictly speaking this is wrong, there's no + * reason not to keep the offsets of the MI fields constant + * if only to make kernel debugging easier. */ PCPU_MD_FIELDS; } __aligned(128); @@ -179,6 +172,7 @@ struct pcpu { SLIST_HEAD(cpuhead, pcpu); extern struct cpuhead cpuhead; +extern struct pcpu *cpuid_to_pcpu[MAXCPU]; #define curcpu PCPU_GET(cpuid) #define curproc (curthread->td_proc) @@ -193,21 +187,17 @@ extern struct cpuhead cpuhead; * db_show_mdpcpu() is responsible for handling machine dependent * fields for the DDB 'show pcpu' command. */ - -extern struct pcpu *cpuid_to_pcpu[MAXCPU]; - - void cpu_pcpu_init(struct pcpu *pcpu, int cpuid, size_t size); void db_show_mdpcpu(struct pcpu *pcpu); -void pcpu_destroy(struct pcpu *pcpu); -struct pcpu *pcpu_find(u_int cpuid); -void pcpu_init(struct pcpu *pcpu, int cpuid, size_t size); void *dpcpu_alloc(int size); void dpcpu_copy(void *s, int size); void dpcpu_free(void *s, int size); void dpcpu_init(void *dpcpu, int cpuid); +void pcpu_destroy(struct pcpu *pcpu); +struct pcpu *pcpu_find(u_int cpuid); +void pcpu_init(struct pcpu *pcpu, int cpuid, size_t size); -#endif /* _KERNEL */ +#endif /* _KERNEL */ #endif /* !_SYS_PCPU_H_ */ From owner-svn-src-head@FreeBSD.ORG Tue Mar 30 18:31:55 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CAB3A1065795; Tue, 30 Mar 2010 18:31:55 +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 BAEBD8FC15; Tue, 30 Mar 2010 18:31:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2UIVtCH058529; Tue, 30 Mar 2010 18:31:55 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2UIVtYC058527; Tue, 30 Mar 2010 18:31:55 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201003301831.o2UIVtYC058527@svn.freebsd.org> From: John Baldwin Date: Tue, 30 Mar 2010 18:31: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: r205886 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Mar 2010 18:31:55 -0000 Author: jhb Date: Tue Mar 30 18:31:55 2010 New Revision: 205886 URL: http://svn.freebsd.org/changeset/base/205886 Log: Defer freeing a kevent list until after dropping kqueue locks. LOR: 185 Submitted by: Matthew Fleming @ Isilon MFC after: 1 week Modified: head/sys/kern/kern_event.c Modified: head/sys/kern/kern_event.c ============================================================================== --- head/sys/kern/kern_event.c Tue Mar 30 18:29:19 2010 (r205885) +++ head/sys/kern/kern_event.c Tue Mar 30 18:31:55 2010 (r205886) @@ -1218,7 +1218,7 @@ static int kqueue_expand(struct kqueue *kq, struct filterops *fops, uintptr_t ident, int waitok) { - struct klist *list, *tmp_knhash; + struct klist *list, *tmp_knhash, *to_free; u_long tmp_knhashmask; int size; int fd; @@ -1226,6 +1226,7 @@ kqueue_expand(struct kqueue *kq, struct KQ_NOTOWNED(kq); + to_free = NULL; if (fops->f_isfd) { fd = ident; if (kq->kq_knlistsize <= fd) { @@ -1237,13 +1238,13 @@ kqueue_expand(struct kqueue *kq, struct return ENOMEM; KQ_LOCK(kq); if (kq->kq_knlistsize > fd) { - free(list, M_KQUEUE); + to_free = list; list = NULL; } else { if (kq->kq_knlist != NULL) { bcopy(kq->kq_knlist, list, kq->kq_knlistsize * sizeof(*list)); - free(kq->kq_knlist, M_KQUEUE); + to_free = kq->kq_knlist; kq->kq_knlist = NULL; } bzero((caddr_t)list + @@ -1265,11 +1266,12 @@ kqueue_expand(struct kqueue *kq, struct kq->kq_knhash = tmp_knhash; kq->kq_knhashmask = tmp_knhashmask; } else { - free(tmp_knhash, M_KQUEUE); + to_free = tmp_knhash; } KQ_UNLOCK(kq); } } + free(to_free, M_KQUEUE); KQ_NOTOWNED(kq); return 0; From owner-svn-src-head@FreeBSD.ORG Tue Mar 30 19:07:42 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 489F1106566B; Tue, 30 Mar 2010 19:07:42 +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 38AB58FC22; Tue, 30 Mar 2010 19:07:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2UJ7gLK067301; Tue, 30 Mar 2010 19:07:42 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2UJ7g7W067299; Tue, 30 Mar 2010 19:07:42 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201003301907.o2UJ7g7W067299@svn.freebsd.org> From: John Baldwin Date: Tue, 30 Mar 2010 19:07: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: r205900 - head/lib/libstand X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Mar 2010 19:07:42 -0000 Author: jhb Date: Tue Mar 30 19:07:41 2010 New Revision: 205900 URL: http://svn.freebsd.org/changeset/base/205900 Log: Use panic() (which the environment is required to provide to libstand) to implement assert() instead of relying on a non-required exit(). The exit() invocation also did not match the semantics of the exit() routine that current boot environments happen to require. PR: kern/144749 Discussed with: bde MFC after: 1 week Modified: head/lib/libstand/assert.c Modified: head/lib/libstand/assert.c ============================================================================== --- head/lib/libstand/assert.c Tue Mar 30 19:06:54 2010 (r205899) +++ head/lib/libstand/assert.c Tue Mar 30 19:07:41 2010 (r205900) @@ -35,10 +35,10 @@ void __assert(const char *func, const char *file, int line, const char *expression) { if (func == NULL) - printf("Assertion failed: (%s), file %s, line %d.\n", + panic("Assertion failed: (%s), file %s, line %d.\n", expression, file, line); else - printf("Assertion failed: (%s), function %s, file %s, line " - "%d.\n", expression, func, file, line); - exit(); + panic( + "Assertion failed: (%s), function %s, file %s, line %d.\n", + expression, func, file, line); } From owner-svn-src-head@FreeBSD.ORG Tue Mar 30 19:09:19 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1F0721065676; Tue, 30 Mar 2010 19:09:19 +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 0E3AC8FC22; Tue, 30 Mar 2010 19:09:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2UJ9I5q067823; Tue, 30 Mar 2010 19:09:18 GMT (envelope-from jfv@svn.freebsd.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2UJ9IKn067820; Tue, 30 Mar 2010 19:09:18 GMT (envelope-from jfv@svn.freebsd.org) Message-Id: <201003301909.o2UJ9IKn067820@svn.freebsd.org> From: Jack F Vogel Date: Tue, 30 Mar 2010 19:09: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: r205904 - head/sys/dev/ixgbe X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Mar 2010 19:09:19 -0000 Author: jfv Date: Tue Mar 30 19:09:18 2010 New Revision: 205904 URL: http://svn.freebsd.org/changeset/base/205904 Log: Thanks to Michael Tuexen for adding SCTP support for 82599, also for finding a one character bug that kept TSO from working. Sometimes with direct attach cables a failure can occur in init, the old method of calling detach was broken, there is no way to return an error to the system from init, so I have changed it to return failure thru the ioctl. And, have fixed the ALTQ code changes of Max Laier, sorry Max :) Modified: head/sys/dev/ixgbe/ixgbe.c head/sys/dev/ixgbe/ixgbe.h Modified: head/sys/dev/ixgbe/ixgbe.c ============================================================================== --- head/sys/dev/ixgbe/ixgbe.c Tue Mar 30 19:08:05 2010 (r205903) +++ head/sys/dev/ixgbe/ixgbe.c Tue Mar 30 19:09:18 2010 (r205904) @@ -1,6 +1,6 @@ /****************************************************************************** - Copyright (c) 2001-2010, Intel Corporation + Copyright (c) 2001-2009, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without @@ -46,7 +46,7 @@ int ixgbe_display_debug_stat /********************************************************************* * Driver version *********************************************************************/ -char ixgbe_driver_version[] = "2.1.6"; +char ixgbe_driver_version[] = "2.1.7"; /********************************************************************* * PCI Device ID Table @@ -106,8 +106,8 @@ static int ixgbe_mq_start_locked(struct static void ixgbe_qflush(struct ifnet *); #endif static int ixgbe_ioctl(struct ifnet *, u_long, caddr_t); -static void ixgbe_init(void *); -static void ixgbe_init_locked(struct adapter *); +static void ixgbe_init(void *); +static int ixgbe_init_locked(struct adapter *); static void ixgbe_stop(void *); static void ixgbe_media_status(struct ifnet *, struct ifmediareq *); static int ixgbe_media_change(struct ifnet *); @@ -142,7 +142,7 @@ static void ixgbe_disable_intr(struc static void ixgbe_update_stats_counters(struct adapter *); static bool ixgbe_txeof(struct tx_ring *); static bool ixgbe_rxeof(struct ix_queue *, int); -static void ixgbe_rx_checksum(u32, struct mbuf *); +static void ixgbe_rx_checksum(u32, struct mbuf *, u32); static void ixgbe_set_promisc(struct adapter *); static void ixgbe_disable_promisc(struct adapter *); static void ixgbe_set_multi(struct adapter *); @@ -827,9 +827,13 @@ ixgbe_mq_start_locked(struct ifnet *ifp, } enqueued = 0; - if (m == NULL) + if (m == NULL) { next = drbr_dequeue(ifp, txr->br); - else + } else if (drbr_needs_enqueue(ifp, txr->br)) { + if ((err = drbr_enqueue(ifp, txr->br, m)) != 0) + return (err); + next = drbr_dequeue(ifp, txr->br); + } else next = m; /* Process the queue */ @@ -905,7 +909,7 @@ ixgbe_ioctl(struct ifnet * ifp, u_long c ifp->if_mtu = ifr->ifr_mtu; adapter->max_frame_size = ifp->if_mtu + ETHER_HDR_LEN + ETHER_CRC_LEN; - ixgbe_init_locked(adapter); + error = ixgbe_init_locked(adapter); IXGBE_CORE_UNLOCK(adapter); } break; @@ -920,7 +924,7 @@ ixgbe_ioctl(struct ifnet * ifp, u_long c ixgbe_set_promisc(adapter); } } else - ixgbe_init_locked(adapter); + error = ixgbe_init_locked(adapter); } else if (ifp->if_drv_flags & IFF_DRV_RUNNING) ixgbe_stop(adapter); @@ -955,8 +959,11 @@ ixgbe_ioctl(struct ifnet * ifp, u_long c ifp->if_capenable ^= IFCAP_LRO; if (mask & IFCAP_VLAN_HWTAGGING) ifp->if_capenable ^= IFCAP_VLAN_HWTAGGING; - if (ifp->if_drv_flags & IFF_DRV_RUNNING) - ixgbe_init(adapter); + if (ifp->if_drv_flags & IFF_DRV_RUNNING) { + IXGBE_CORE_LOCK(adapter); + error = ixgbe_init_locked(adapter); + IXGBE_CORE_UNLOCK(adapter); + } VLAN_CAPABILITIES(ifp); break; } @@ -982,7 +989,7 @@ ixgbe_ioctl(struct ifnet * ifp, u_long c **********************************************************************/ #define IXGBE_MHADD_MFS_SHIFT 16 -static void +static int ixgbe_init_locked(struct adapter *adapter) { struct ifnet *ifp = adapter->ifp; @@ -990,7 +997,6 @@ ixgbe_init_locked(struct adapter *adapte struct ixgbe_hw *hw = &adapter->hw; u32 k, txdctl, mhadd, gpie; u32 rxdctl, rxctrl; - int err; mtx_assert(&adapter->core_mtx, MA_OWNED); INIT_DEBUGOUT("ixgbe_init: begin"); @@ -1012,7 +1018,7 @@ ixgbe_init_locked(struct adapter *adapte if (ixgbe_setup_transmit_structures(adapter)) { device_printf(dev,"Could not setup transmit structures\n"); ixgbe_stop(adapter); - return; + return (ENOMEM); } ixgbe_init_hw(hw); @@ -1034,7 +1040,7 @@ ixgbe_init_locked(struct adapter *adapte if (ixgbe_setup_receive_structures(adapter)) { device_printf(dev,"Could not setup receive structures\n"); ixgbe_stop(adapter); - return; + return (ENOMEM); } /* Configure RX settings */ @@ -1064,8 +1070,11 @@ ixgbe_init_locked(struct adapter *adapte if (ifp->if_capenable & IFCAP_TSO4) ifp->if_hwassist |= CSUM_TSO; if (ifp->if_capenable & IFCAP_TXCSUM) - ifp->if_hwassist = (CSUM_TCP | CSUM_UDP); - + ifp->if_hwassist |= (CSUM_TCP | CSUM_UDP); +#if __FreeBSD_version >= 800000 + if (hw->mac.type == ixgbe_mac_82599EB) + ifp->if_hwassist |= CSUM_SCTP; +#endif /* Set MTU size */ if (ifp->if_mtu > ETHERMTU) { mhadd = IXGBE_READ_REG(hw, IXGBE_MHADD); @@ -1130,7 +1139,7 @@ ixgbe_init_locked(struct adapter *adapte #ifdef IXGBE_FDIR /* Init Flow director */ - if (adapter->hw.mac.type == ixgbe_mac_82599EB) + if (hw->mac.type == ixgbe_mac_82599EB) ixgbe_init_fdir_signature_82599(&adapter->hw, fdir_pballoc); #endif @@ -1138,13 +1147,14 @@ ixgbe_init_locked(struct adapter *adapte ** Check on any SFP devices that ** need to be kick-started */ - err = hw->phy.ops.identify(hw); - if (err == IXGBE_ERR_SFP_NOT_SUPPORTED) { - device_printf(dev, - "Unsupported SFP+ module type was detected.\n"); - ixgbe_detach(dev); - return; - } + if (hw->phy.type == ixgbe_phy_none) { + int err = hw->phy.ops.identify(hw); + if (err == IXGBE_ERR_SFP_NOT_SUPPORTED) { + device_printf(dev, + "Unsupported SFP+ module type was detected.\n"); + return (EIO); + } + } /* Config/Enable Link */ ixgbe_config_link(adapter); @@ -1156,7 +1166,7 @@ ixgbe_init_locked(struct adapter *adapte ifp->if_drv_flags |= IFF_DRV_RUNNING; ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; - return; + return (0); } static void @@ -3003,6 +3013,12 @@ ixgbe_tx_ctx_setup(struct tx_ring *txr, type_tucmd_mlhl |= IXGBE_ADVTXD_TUCMD_L4T_UDP; break; +#if __FreeBSD_version >= 800000 + case IPPROTO_SCTP: + if (mp->m_pkthdr.csum_flags & CSUM_SCTP) + type_tucmd_mlhl |= IXGBE_ADVTXD_TUCMD_L4T_SCTP; + break; +#endif default: offload = FALSE; break; @@ -3956,16 +3972,16 @@ ixgbe_rxeof(struct ix_queue *que, int co IXGBE_RX_LOCK(rxr); + /* Sync the ring. */ + bus_dmamap_sync(rxr->rxdma.dma_tag, rxr->rxdma.dma_map, + BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); + for (i = rxr->next_to_check; count != 0;) { struct mbuf *sendmp, *mh, *mp; u32 rsc, ptype; u16 hlen, plen, hdr, vtag; bool eop; - /* Sync the ring. */ - bus_dmamap_sync(rxr->rxdma.dma_tag, rxr->rxdma.dma_map, - BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); - cur = &rxr->rx_base[i]; staterr = le32toh(cur->wb.upper.status_error); @@ -4138,7 +4154,7 @@ ixgbe_rxeof(struct ix_queue *que, int co rxr->bytes += sendmp->m_pkthdr.len; rxr->rx_bytes += sendmp->m_pkthdr.len; if ((ifp->if_capenable & IFCAP_RXCSUM) != 0) - ixgbe_rx_checksum(staterr, sendmp); + ixgbe_rx_checksum(staterr, sendmp, ptype); #if __FreeBSD_version >= 800000 sendmp->m_pkthdr.flowid = que->msix; sendmp->m_flags |= M_FLOWID; @@ -4202,10 +4218,15 @@ next_desc: * *********************************************************************/ static void -ixgbe_rx_checksum(u32 staterr, struct mbuf * mp) +ixgbe_rx_checksum(u32 staterr, struct mbuf * mp, u32 ptype) { - u16 status = (u16) staterr; - u8 errors = (u8) (staterr >> 24); + u16 status = (u16) staterr; + u8 errors = (u8) (staterr >> 24); + bool sctp = FALSE; + + if ((ptype & IXGBE_RXDADV_PKTTYPE_ETQF) == 0 && + (ptype & IXGBE_RXDADV_PKTTYPE_SCTP) != 0) + sctp = TRUE; if (status & IXGBE_RXD_STAT_IPCS) { if (!(errors & IXGBE_RXD_ERR_IPE)) { @@ -4217,10 +4238,15 @@ ixgbe_rx_checksum(u32 staterr, struct mb mp->m_pkthdr.csum_flags = 0; } if (status & IXGBE_RXD_STAT_L4CS) { + u16 type = (CSUM_DATA_VALID | CSUM_PSEUDO_HDR); +#if __FreeBSD_version >= 800000 + if (sctp) + type = CSUM_SCTP_VALID; +#endif if (!(errors & IXGBE_RXD_ERR_TCPE)) { - mp->m_pkthdr.csum_flags |= - (CSUM_DATA_VALID | CSUM_PSEUDO_HDR); - mp->m_pkthdr.csum_data = htons(0xffff); + mp->m_pkthdr.csum_flags |= type; + if (!sctp) + mp->m_pkthdr.csum_data = htons(0xffff); } } return; Modified: head/sys/dev/ixgbe/ixgbe.h ============================================================================== --- head/sys/dev/ixgbe/ixgbe.h Tue Mar 30 19:08:05 2010 (r205903) +++ head/sys/dev/ixgbe/ixgbe.h Tue Mar 30 19:09:18 2010 (r205904) @@ -179,7 +179,13 @@ #define IXGBE_RX_HDR 128 #define IXGBE_VFTA_SIZE 128 #define IXGBE_BR_SIZE 4096 -#define CSUM_OFFLOAD 7 /* Bits in csum flags */ + +/* Offload bits in mbuf flag */ +#if __FreeBSD_version >= 800000 +#define CSUM_OFFLOAD (CSUM_IP|CSUM_TCP|CSUM_UDP|CSUM_SCTP) +#else +#define CSUM_OFFLOAD (CSUM_IP|CSUM_TCP|CSUM_UDP) +#endif /* For 6.X code compatibility */ #if !defined(ETHER_BPF_MTAP) From owner-svn-src-head@FreeBSD.ORG Tue Mar 30 19:35:26 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6ACA21065673; Tue, 30 Mar 2010 19:35:26 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 3DBC38FC19; Tue, 30 Mar 2010 19:35:26 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id E2AFF46BC3; Tue, 30 Mar 2010 15:35:25 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 1B6EF8A01F; Tue, 30 Mar 2010 15:35:25 -0400 (EDT) From: John Baldwin To: src-committers@freebsd.org Date: Tue, 30 Mar 2010 15:22:17 -0400 User-Agent: KMail/1.12.1 (FreeBSD/7.3-CBSD-20100217; KDE/4.3.1; amd64; ; ) References: <201003301907.o2UJ7g7W067299@svn.freebsd.org> In-Reply-To: <201003301907.o2UJ7g7W067299@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201003301522.17316.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Tue, 30 Mar 2010 15:35:25 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.8 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r205900 - head/lib/libstand X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Mar 2010 19:35:26 -0000 On Tuesday 30 March 2010 3:07:42 pm John Baldwin wrote: > Author: jhb > Date: Tue Mar 30 19:07:41 2010 > New Revision: 205900 > URL: http://svn.freebsd.org/changeset/base/205900 > > Log: > Use panic() (which the environment is required to provide to libstand) to > implement assert() instead of relying on a non-required exit(). The exit() > invocation also did not match the semantics of the exit() routine that > current boot environments happen to require. s/require/provide/ at the end. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Tue Mar 30 19:41:39 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3FEF4106566B; Tue, 30 Mar 2010 19:41: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 303C58FC16; Tue, 30 Mar 2010 19:41:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2UJfdaW075502; Tue, 30 Mar 2010 19:41:39 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2UJfdfB075500; Tue, 30 Mar 2010 19:41:39 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201003301941.o2UJfdfB075500@svn.freebsd.org> From: John Baldwin Date: Tue, 30 Mar 2010 19:41: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: r205915 - head/sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Mar 2010 19:41:39 -0000 Author: jhb Date: Tue Mar 30 19:41:38 2010 New Revision: 205915 URL: http://svn.freebsd.org/changeset/base/205915 Log: Use CACHE_LINE_SIZE alignment for 'struct pcpu' rather than hardcoding 128. Reviewed by: jeff Modified: head/sys/sys/pcpu.h Modified: head/sys/sys/pcpu.h ============================================================================== --- head/sys/sys/pcpu.h Tue Mar 30 19:37:55 2010 (r205914) +++ head/sys/sys/pcpu.h Tue Mar 30 19:41:38 2010 (r205915) @@ -165,7 +165,7 @@ struct pcpu { * if only to make kernel debugging easier. */ PCPU_MD_FIELDS; -} __aligned(128); +} __aligned(CACHE_LINE_SIZE); #ifdef _KERNEL From owner-svn-src-head@FreeBSD.ORG Tue Mar 30 19:51:35 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2467E1065670; Tue, 30 Mar 2010 19:51:35 +0000 (UTC) (envelope-from kwm@freebsd.org) Received: from viefep14-int.chello.at (viefep14-int.chello.at [62.179.121.34]) by mx1.freebsd.org (Postfix) with ESMTP id C87B78FC14; Tue, 30 Mar 2010 19:51:33 +0000 (UTC) Received: from edge02.upcmail.net ([192.168.13.237]) by viefep19-int.chello.at (InterMail vM.8.01.02.02 201-2260-120-106-20100312) with ESMTP id <20100330193400.CRGE23953.viefep19-int.chello.at@edge02.upcmail.net>; Tue, 30 Mar 2010 21:34:00 +0200 Received: from [192.168.1.64] ([77.250.185.191]) by edge02.upcmail.net with edge id zXZx1d07m48Bq8D02XZzb2; Tue, 30 Mar 2010 21:34:00 +0200 X-SourceIP: 77.250.185.191 From: Koop Mast To: Jack F Vogel In-Reply-To: <201003301909.o2UJ9IKn067820@svn.freebsd.org> References: <201003301909.o2UJ9IKn067820@svn.freebsd.org> Content-Type: text/plain; charset="us-ascii" Date: Tue, 30 Mar 2010 21:34:22 +0200 Message-ID: <1269977662.15736.43.camel@headache.rainbow-runner.nl> Mime-Version: 1.0 X-Mailer: Evolution 2.29.92.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit X-Cloudmark-Analysis: v=1.1 cv=EFR1pENkxzhdjTnRVAuI+iHrp5zsYr2ENPL4njVhkqM= c=1 sm=0 a=Mxz3xaAkkHoA:10 a=kj9zAlcOel0A:10 a=LW_60RwewtKi_uPO57QA:9 a=ey_9usnqZrZZK8HdeIya_Uonz3cA:4 a=CjuIK1q_8ugA:10 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r205904 - head/sys/dev/ixgbe X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Mar 2010 19:51:35 -0000 On Tue, 2010-03-30 at 19:09 +0000, Jack F Vogel wrote: > Modified: > head/sys/dev/ixgbe/ixgbe.c > head/sys/dev/ixgbe/ixgbe.h > > Modified: head/sys/dev/ixgbe/ixgbe.c > ============================================================================== > --- head/sys/dev/ixgbe/ixgbe.c Tue Mar 30 19:08:05 2010 (r205903) > +++ head/sys/dev/ixgbe/ixgbe.c Tue Mar 30 19:09:18 2010 (r205904) > @@ -1,6 +1,6 @@ > /****************************************************************************** > > - Copyright (c) 2001-2010, Intel Corporation > + Copyright (c) 2001-2009, Intel Corporation ^^ Going back in time... > All rights reserved. > > Redistribution and use in source and binary forms, with or without > @@ -46,7 +46,7 @@ int ixgbe_display_debug_stat > /********************************************************************* > * Driver version > *********************************************************************/ > -char ixgbe_driver_version[] = "2.1.6"; > +char ixgbe_driver_version[] = "2.1.7"; > ^^ with a newer version? Curious :) -Koop From owner-svn-src-head@FreeBSD.ORG Tue Mar 30 19:54:29 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9F2ED1065670; Tue, 30 Mar 2010 19:54:29 +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 8F5F48FC18; Tue, 30 Mar 2010 19:54:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2UJsTW7078491; Tue, 30 Mar 2010 19:54:29 GMT (envelope-from jfv@svn.freebsd.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2UJsT4K078489; Tue, 30 Mar 2010 19:54:29 GMT (envelope-from jfv@svn.freebsd.org) Message-Id: <201003301954.o2UJsT4K078489@svn.freebsd.org> From: Jack F Vogel Date: Tue, 30 Mar 2010 19:54: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: r205919 - head/sys/dev/ixgbe X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Mar 2010 19:54:29 -0000 Author: jfv Date: Tue Mar 30 19:54:29 2010 New Revision: 205919 URL: http://svn.freebsd.org/changeset/base/205919 Log: fix my clobber of the copyright date :) Modified: head/sys/dev/ixgbe/ixgbe.c Modified: head/sys/dev/ixgbe/ixgbe.c ============================================================================== --- head/sys/dev/ixgbe/ixgbe.c Tue Mar 30 19:52:45 2010 (r205918) +++ head/sys/dev/ixgbe/ixgbe.c Tue Mar 30 19:54:29 2010 (r205919) @@ -1,6 +1,6 @@ /****************************************************************************** - Copyright (c) 2001-2009, Intel Corporation + Copyright (c) 2001-2010, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without From owner-svn-src-head@FreeBSD.ORG Tue Mar 30 19:55:09 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B9276106568A; Tue, 30 Mar 2010 19:55:09 +0000 (UTC) (envelope-from jfvogel@gmail.com) Received: from mail-ew0-f224.google.com (mail-ew0-f224.google.com [209.85.219.224]) by mx1.freebsd.org (Postfix) with ESMTP id 938408FC25; Tue, 30 Mar 2010 19:55:08 +0000 (UTC) Received: by ewy24 with SMTP id 24so2199641ewy.33 for ; Tue, 30 Mar 2010 12:55:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:received:message-id:subject:from:to:cc:content-type; bh=ueVODyE/0ILsg/AyFO4uKGv7ZmiHRq8Wsxz81AlKonU=; b=IxAajxdNu0h9tS6YRMH7PPkiOg6dV8Oz2XgIA5prHfzWASTSut0BVPqJ3OE5HxTDcW Goeo0Qj4mf2xEYl8kYAG6AKFD2d2DetdXmPSmim0U/Q/Dg8qwaqMK85KzKDl/tlnR8xy LCatpnocQgfkYxP80QU43pKkTvTki8eRvSJz0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=axhaX2ewEbdU3AtRPcQHuKN7spD8nESZvnyWN0Bsi2qZglTN67+evcorox/C8Rlv/s sj7wlI/RxrWxWBT+fBbnYKihMgBqDlA+WcxTBez3frWm9hEDCQiMEpYJEkButFOrCadS POUE75yKV2ZVtkMsPDDi5GiJSgIH8NNAH5gmM= MIME-Version: 1.0 Received: by 10.216.7.146 with HTTP; Tue, 30 Mar 2010 12:55:07 -0700 (PDT) In-Reply-To: <1269977662.15736.43.camel@headache.rainbow-runner.nl> References: <201003301909.o2UJ9IKn067820@svn.freebsd.org> <1269977662.15736.43.camel@headache.rainbow-runner.nl> Date: Tue, 30 Mar 2010 12:55:07 -0700 Received: by 10.216.155.208 with SMTP id j58mr178032wek.228.1269978907275; Tue, 30 Mar 2010 12:55:07 -0700 (PDT) Message-ID: <2a41acea1003301255w1c6928che5b6ecf67daeb750@mail.gmail.com> From: Jack Vogel To: Koop Mast Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Jack F Vogel , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r205904 - head/sys/dev/ixgbe X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Mar 2010 19:55:10 -0000 Mad dash fixes always are a bad idea, lol. Thanks, correcting it. Jack On Tue, Mar 30, 2010 at 12:34 PM, Koop Mast wrote: > On Tue, 2010-03-30 at 19:09 +0000, Jack F Vogel wrote: > > > Modified: > > head/sys/dev/ixgbe/ixgbe.c > > head/sys/dev/ixgbe/ixgbe.h > > > > Modified: head/sys/dev/ixgbe/ixgbe.c > > > ============================================================================== > > --- head/sys/dev/ixgbe/ixgbe.c Tue Mar 30 19:08:05 2010 > (r205903) > > +++ head/sys/dev/ixgbe/ixgbe.c Tue Mar 30 19:09:18 2010 > (r205904) > > @@ -1,6 +1,6 @@ > > > /****************************************************************************** > > > > - Copyright (c) 2001-2010, Intel Corporation > > + Copyright (c) 2001-2009, Intel Corporation > ^^ > Going back in time... > > > All rights reserved. > > > > Redistribution and use in source and binary forms, with or without > > @@ -46,7 +46,7 @@ int ixgbe_display_debug_stat > > /********************************************************************* > > * Driver version > > *********************************************************************/ > > -char ixgbe_driver_version[] = "2.1.6"; > > +char ixgbe_driver_version[] = "2.1.7"; > > > ^^ > with a newer version? Curious :) > > -Koop > > From owner-svn-src-head@FreeBSD.ORG Tue Mar 30 20:39:57 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EB761106564A; Tue, 30 Mar 2010 20:39:57 +0000 (UTC) (envelope-from mjacob@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DB9D38FC1F; Tue, 30 Mar 2010 20:39:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2UKdvIW089247; Tue, 30 Mar 2010 20:39:57 GMT (envelope-from mjacob@svn.freebsd.org) Received: (from mjacob@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2UKdvgb089245; Tue, 30 Mar 2010 20:39:57 GMT (envelope-from mjacob@svn.freebsd.org) Message-Id: <201003302039.o2UKdvgb089245@svn.freebsd.org> From: Matt Jacob Date: Tue, 30 Mar 2010 20:39: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: r205932 - head/sys/dev/mpt X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Mar 2010 20:39:58 -0000 Author: mjacob Date: Tue Mar 30 20:39:57 2010 New Revision: 205932 URL: http://svn.freebsd.org/changeset/base/205932 Log: nit: xpt_bus_deregister has to be called with the sim lock held. MFC after: 1 month Modified: head/sys/dev/mpt/mpt_cam.c Modified: head/sys/dev/mpt/mpt_cam.c ============================================================================== --- head/sys/dev/mpt/mpt_cam.c Tue Mar 30 20:39:48 2010 (r205931) +++ head/sys/dev/mpt/mpt_cam.c Tue Mar 30 20:39:57 2010 (r205932) @@ -1208,14 +1208,18 @@ mpt_cam_detach(struct mpt_softc *mpt) if (mpt->sim != NULL) { xpt_free_path(mpt->path); + MPT_LOCK(mpt); xpt_bus_deregister(cam_sim_path(mpt->sim)); + MPT_UNLOCK(mpt); cam_sim_free(mpt->sim, TRUE); mpt->sim = NULL; } if (mpt->phydisk_sim != NULL) { xpt_free_path(mpt->phydisk_path); + MPT_LOCK(mpt); xpt_bus_deregister(cam_sim_path(mpt->phydisk_sim)); + MPT_UNLOCK(mpt); cam_sim_free(mpt->phydisk_sim, TRUE); mpt->phydisk_sim = NULL; } From owner-svn-src-head@FreeBSD.ORG Tue Mar 30 20:41:20 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C30EF1065670; Tue, 30 Mar 2010 20:41:20 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail09.syd.optusnet.com.au (mail09.syd.optusnet.com.au [211.29.132.190]) by mx1.freebsd.org (Postfix) with ESMTP id 56B278FC17; Tue, 30 Mar 2010 20:41:20 +0000 (UTC) Received: from besplex.bde.org (c122-106-158-90.carlnfd1.nsw.optusnet.com.au [122.106.158.90]) by mail09.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o2UKfD2X000871 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 31 Mar 2010 07:41:16 +1100 Date: Wed, 31 Mar 2010 07:41:13 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Giovanni Trematerra In-Reply-To: <4e6cba831003300839u5eac26d2n142ecb69502a64b0@mail.gmail.com> Message-ID: <20100331072023.E2216@besplex.bde.org> References: <201003131117.o2DBHek2003410@svn.freebsd.org> <4e6cba831003300839u5eac26d2n142ecb69502a64b0@mail.gmail.com> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-1128807053-1269981673=:2216" Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Randall Stewart , Bruce Cran Subject: Re: svn commit: r205119 - head/contrib/top X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Mar 2010 20:41:20 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-1128807053-1269981673=:2216 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Tue, 30 Mar 2010, Giovanni Trematerra wrote: > On Sat, Mar 13, 2010 at 1:17 PM, Bruce Cran wrote: >> Author: brucec >> Date: Sat Mar 13 11:17:39 2010 >> New Revision: 205119 >> URL: http://svn.freebsd.org/changeset/base/205119 >> >> Log: >> =A0Change the 'amt' parameter in format_k2 from int to unsigned long lon= g >> =A0to match the values passed in and prevent the SIZE field being corrup= ted >> =A0when more than 2TB is allocated. >> >> =A0PR: =A0 =A0 =A0 =A0 =A0 bin/129706 >> =A0Approved by: =A0rrs (mentor) >> =A0MFC after: =A0 =A01 week Grrr, where are the ASCII ribbon campaigners? mav@ (?) just reported a type error in this. I may have already complained about this :-). unsigned long long should be a syntax error... >> >> Modified: >> =A0head/contrib/top/utils.c >> >> Modified: head/contrib/top/utils.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/contrib/top/utils.c =A0 =A0Sat Mar 13 11:08:57 2010 =A0 =A0 =A0= =A0(r205118) >> +++ head/contrib/top/utils.c =A0 =A0Sat Mar 13 11:17:39 2010 =A0 =A0 =A0= =A0(r205119) >> @@ -476,7 +476,7 @@ int amt; >> >> =A0char *format_k2(amt) >> >> -int amt; >> +unsigned long long amt; >> >> =A0{ >> =A0 =A0 static char retarray[NUM_STRINGS][16]; > > While here wouldn't be good thing to ansify the function? No, ansi doesn't exist, and this is contribed code which is already hundreds if not thousands of versions behind the "vendor" version, partly because even non-gratuitous changes in it are hard to maintain. contrib/top doesn't have many local changes, but usr.bin/top does (including an almost complete reformatting to KNF), and unfortunately the "vendor" changed almost everything in that too. format_k2() is a FreeBSD addition. In the "vendor" version 3.8b1, there is still only format_k(). This has been converted to a new-style definitio= n so that it can no longer be compiled by old compilers, and its parameter type has been changed from int to long, which is hopefully long enough. Even its style has been improved. Bruce --0-1128807053-1269981673=:2216-- From owner-svn-src-head@FreeBSD.ORG Tue Mar 30 21:11:17 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1E6DD1065673; Tue, 30 Mar 2010 21:11:17 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E7C7C8FC1F; Tue, 30 Mar 2010 21:11:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2ULBGDW096415; Tue, 30 Mar 2010 21:11:16 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2ULBGr6096413; Tue, 30 Mar 2010 21:11:16 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201003302111.o2ULBGr6096413@svn.freebsd.org> From: Edwin Groothuis Date: Tue, 30 Mar 2010 21:11: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: r205937 - head/usr.bin/calendar/calendars X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Mar 2010 21:11:17 -0000 Author: edwin Date: Tue Mar 30 21:11:16 2010 New Revision: 205937 URL: http://svn.freebsd.org/changeset/base/205937 Log: For where possible, make the dates of the Tasmanian holidays properly variable. The leftover ones are the Thursday before the Fourth Saturday of October (Oct/SatFourth-2) which is not possible yet. Modified: head/usr.bin/calendar/calendars/calendar.australia Modified: head/usr.bin/calendar/calendars/calendar.australia ============================================================================== --- head/usr.bin/calendar/calendars/calendar.australia Tue Mar 30 20:46:10 2010 (r205936) +++ head/usr.bin/calendar/calendars/calendar.australia Tue Mar 30 21:11:16 2010 (r205937) @@ -26,13 +26,27 @@ Oct/MonFirst Labour Day (ACT, NSW, SA) Mar/MonSecond Labour Day (VIC) Nov/TueFirst Melbourne Cup (VIC) -/* Tasmania */ -Feb 11 Regatta Day (TAS) -Feb 27 Launceston Cup (TAS) -Mar 11 Eight Hours Day (TAS) -Oct 10 Launceston Show Day (TAS) -Oct 24 Hobart Show Day (TAS) -Nov 04 Recreation Day (N TAS) +/* Tasmania + * http://www.wst.tas.gov.au/employment_info/public_holidays/html/2010 + */ +Feb/MonSecond Regatta Day (TAS) +Feb/WedLast Launceston Cup (TAS) +Mar/TueFirst King Island show (TAS) +Mar/MonSecond Eight Hours Day (TAS) +Oct 10 Launceston Show Day (TAS) /* Thursday preceding second Saturday in October */ +Oct 24 Hobart Show Day (TAS) /* Thursday preceding fourth Saturday in October */ +Nov/MonFirst Recreation Day (N TAS) + +/* +Oct/SatSecond-2 Launceston Show Day (TAS) // Thursday preceding second Sat in October +Oct/SatFourth-2 Hobart Show Day (TAS) // Thursday preceding fourth Sat in October +May/ThuFirst+1 Agfest (Circular Head only) // Friday following the first Thursday in May +Oct/SatFirst-1 Burnie Show // Friday preceding first Saturday in October +Oct/SatThird-1 Flinders Island Show // Friday preceding third Saturday in October + +DEVONPORT CUP Wednesday not earlier than fifth and not later than eleventh day of January +DEVONPORT SHOW Friday nearest last day in November, but not later than first day of December +*/ /* South Australia */ May/MonThird Adelaide Cup (SA) @@ -53,6 +67,6 @@ Aug/MonFirst Picnic Day (NT) /* Queensland */ May/MonFirst Labour Day (QLD) -Aug 14 RNA Show Day (Brisbane metro) +Aug/WedSecond RNA Show Day (Brisbane metro) /* Second Last Wednesday */ #endif From owner-svn-src-head@FreeBSD.ORG Tue Mar 30 21:54:26 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1DEEF1065672; Tue, 30 Mar 2010 21:54:26 +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 E70F78FC1C; Tue, 30 Mar 2010 21:54:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2ULsPjT006003; Tue, 30 Mar 2010 21:54:25 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2ULsPjw006000; Tue, 30 Mar 2010 21:54:25 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201003302154.o2ULsPjw006000@svn.freebsd.org> From: Xin LI Date: Tue, 30 Mar 2010 21:54: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: r205938 - head/usr.sbin/mailwrapper X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Mar 2010 21:54:26 -0000 Author: delphij Date: Tue Mar 30 21:54:25 2010 New Revision: 205938 URL: http://svn.freebsd.org/changeset/base/205938 Log: Sync with OpenBSD: - avoid coredump when there's only one token on a line; - Use calloc(); - Remove a line inherited from example mdoc. Obtained from: OpenBSD MFC after: 1 month Modified: head/usr.sbin/mailwrapper/mailwrapper.8 head/usr.sbin/mailwrapper/mailwrapper.c Modified: head/usr.sbin/mailwrapper/mailwrapper.8 ============================================================================== --- head/usr.sbin/mailwrapper/mailwrapper.8 Tue Mar 30 21:11:16 2010 (r205937) +++ head/usr.sbin/mailwrapper/mailwrapper.8 Tue Mar 30 21:54:25 2010 (r205938) @@ -1,5 +1,5 @@ +.\" $OpenBSD: mailwrapper.8,v 1.10 2009/02/07 16:58:23 martynas Exp $ .\" $NetBSD: mailwrapper.8,v 1.11 2002/02/08 01:38:50 ross Exp $ -.\" $OpenBSD: mailwrapper.8,v 1.8 2003/06/12 12:59:51 jmc Exp $ .\" $FreeBSD$ .\" .\" Copyright (c) 1998 @@ -31,7 +31,6 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" The following requests are required for all man pages. .Dd August 7, 2006 .Dt MAILWRAPPER 8 .Os Modified: head/usr.sbin/mailwrapper/mailwrapper.c ============================================================================== --- head/usr.sbin/mailwrapper/mailwrapper.c Tue Mar 30 21:11:16 2010 (r205937) +++ head/usr.sbin/mailwrapper/mailwrapper.c Tue Mar 30 21:54:25 2010 (r205938) @@ -1,4 +1,4 @@ -/* $OpenBSD: mailwrapper.c,v 1.16 2004/07/06 03:38:14 millert Exp $ */ +/* $OpenBSD: mailwrapper.c,v 1.18 2007/11/06 14:39:19 otto Exp $ */ /* $NetBSD: mailwrapper.c,v 1.9 2003/03/09 08:10:43 mjl Exp $ */ /* @@ -61,8 +61,8 @@ initarg(struct arglist *al) { al->argc = 0; al->maxc = 10; - if ((al->argv = malloc(al->maxc * sizeof(char *))) == NULL) - err(EX_TEMPFAIL, "malloc"); + if ((al->argv = calloc(al->maxc, sizeof(char *))) == NULL) + err(EX_TEMPFAIL, "calloc"); } static void @@ -126,7 +126,7 @@ main(int argc, char *argv[], char *envp[ continue; } - if ((from = strsep(&cp, WS)) == NULL) + if ((from = strsep(&cp, WS)) == NULL || cp == NULL) goto parse_error; cp += strspn(cp, WS); From owner-svn-src-head@FreeBSD.ORG Tue Mar 30 23:10:56 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 94D85106564A; Tue, 30 Mar 2010 23:10:56 +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 848BF8FC15; Tue, 30 Mar 2010 23:10:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2UNAuuD022942; Tue, 30 Mar 2010 23:10:56 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2UNAuNJ022940; Tue, 30 Mar 2010 23:10:56 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201003302310.o2UNAuNJ022940@svn.freebsd.org> From: Xin LI Date: Tue, 30 Mar 2010 23:10: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: r205940 - head/bin/pax X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Mar 2010 23:10:56 -0000 Author: delphij Date: Tue Mar 30 23:10:56 2010 New Revision: 205940 URL: http://svn.freebsd.org/changeset/base/205940 Log: Remove unused files. Deleted: head/bin/pax/cpio.1 head/bin/pax/tar.1 Modified: head/bin/pax/Makefile Modified: head/bin/pax/Makefile ============================================================================== --- head/bin/pax/Makefile Tue Mar 30 22:31:30 2010 (r205939) +++ head/bin/pax/Makefile Tue Mar 30 23:10:56 2010 (r205940) @@ -29,8 +29,5 @@ PROG= pax SRCS= ar_io.c ar_subs.c buf_subs.c cache.c cpio.c file_subs.c ftree.c \ gen_subs.c getoldopt.c options.c pat_rep.c pax.c sel_subs.c \ tables.c tar.c tty_subs.c -#XXX NOTYET -#MAN= pax.1 tar.1 cpio.1 -#LINKS= ${BINDIR}/pax ${BINDIR}/tar ${BINDIR}/pax ${BINDIR}/cpio .include From owner-svn-src-head@FreeBSD.ORG Tue Mar 30 23:11:50 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D6456106566B; Tue, 30 Mar 2010 23:11:50 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C42CB8FC30; Tue, 30 Mar 2010 23:11:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2UNBokl023205; Tue, 30 Mar 2010 23:11:50 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2UNBoLL023198; Tue, 30 Mar 2010 23:11:50 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201003302311.o2UNBoLL023198@svn.freebsd.org> From: Rick Macklem Date: Tue, 30 Mar 2010 23:11: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: r205941 - in head/sys/fs: nfs nfsserver X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Mar 2010 23:11:50 -0000 Author: rmacklem Date: Tue Mar 30 23:11:50 2010 New Revision: 205941 URL: http://svn.freebsd.org/changeset/base/205941 Log: This patch should fix handling of byte range locks locally on the server for the experimental nfs server. When enabled by setting vfs.newnfs.locallocks_enable to non-zero, the experimental nfs server will now acquire byte range locks on the file on behalf of NFSv4 clients, such that lock conflicts between the NFSv4 clients and processes running locally on the server, will be recognized and handled correctly. MFC after: 2 weeks Modified: head/sys/fs/nfs/nfs_commonport.c head/sys/fs/nfs/nfs_commonsubs.c head/sys/fs/nfs/nfs_var.h head/sys/fs/nfs/nfsport.h head/sys/fs/nfs/nfsrvstate.h head/sys/fs/nfsserver/nfs_nfsdstate.c Modified: head/sys/fs/nfs/nfs_commonport.c ============================================================================== --- head/sys/fs/nfs/nfs_commonport.c Tue Mar 30 23:10:56 2010 (r205940) +++ head/sys/fs/nfs/nfs_commonport.c Tue Mar 30 23:11:50 2010 (r205941) @@ -82,7 +82,8 @@ SYSCTL_STRING(_vfs_newnfs, OID_AUTO, cal */ MALLOC_DEFINE(M_NEWNFSRVCACHE, "NFSD srvcache", "NFSD Server Request Cache"); MALLOC_DEFINE(M_NEWNFSDCLIENT, "NFSD V4client", "NFSD V4 Client Id"); -MALLOC_DEFINE(M_NEWNFSDSTATE, "NFSD V4state", "NFSD V4 State (Openowner, Open, Lockowner, Delegation"); +MALLOC_DEFINE(M_NEWNFSDSTATE, "NFSD V4state", + "NFSD V4 State (Openowner, Open, Lockowner, Delegation"); MALLOC_DEFINE(M_NEWNFSDLOCK, "NFSD V4lock", "NFSD V4 byte range lock"); MALLOC_DEFINE(M_NEWNFSDLOCKFILE, "NFSD lckfile", "NFSD Open/Lock file"); MALLOC_DEFINE(M_NEWNFSSTRING, "NFSD string", "NFSD V4 long string"); @@ -97,7 +98,10 @@ MALLOC_DEFINE(M_NEWNFSCLLOCKOWNER, "NFSC MALLOC_DEFINE(M_NEWNFSCLLOCK, "NFSCL lck", "NFSCL Lock"); MALLOC_DEFINE(M_NEWNFSV4NODE, "NEWNFSnode", "New nfs vnode"); MALLOC_DEFINE(M_NEWNFSDIRECTIO, "NEWdirectio", "New nfs Direct IO buffer"); -MALLOC_DEFINE(M_NEWNFSDIROFF, "Newnfscl_diroff", "New NFS directory offset data"); +MALLOC_DEFINE(M_NEWNFSDIROFF, "NFSCL diroffdiroff", + "New NFS directory offset data"); +MALLOC_DEFINE(M_NEWNFSDROLLBACK, "NFSD rollback", + "New NFS local lock rollback"); /* * Definition of mutex locks. Modified: head/sys/fs/nfs/nfs_commonsubs.c ============================================================================== --- head/sys/fs/nfs/nfs_commonsubs.c Tue Mar 30 23:10:56 2010 (r205940) +++ head/sys/fs/nfs/nfs_commonsubs.c Tue Mar 30 23:11:50 2010 (r205941) @@ -1824,6 +1824,19 @@ nfsv4_getref(struct nfsv4lock *lp, int * } /* + * Test for a lock. Return 1 if locked, 0 otherwise. + */ +APPLESTATIC int +nfsv4_testlock(struct nfsv4lock *lp) +{ + + if ((lp->nfslock_lock & NFSV4LOCK_LOCK) == 0 && + lp->nfslock_usecnt == 0) + return (0); + return (1); +} + +/* * Wake up anyone sleeping, waiting for this lock. */ static void Modified: head/sys/fs/nfs/nfs_var.h ============================================================================== --- head/sys/fs/nfs/nfs_var.h Tue Mar 30 23:10:56 2010 (r205940) +++ head/sys/fs/nfs/nfs_var.h Tue Mar 30 23:11:50 2010 (r205941) @@ -251,6 +251,7 @@ int nfsv4_lock(struct nfsv4lock *, int, void nfsv4_unlock(struct nfsv4lock *, int); void nfsv4_relref(struct nfsv4lock *); void nfsv4_getref(struct nfsv4lock *, int *, void *); +int nfsv4_testlock(struct nfsv4lock *); int nfsrv_mtostr(struct nfsrv_descript *, char *, int); int nfsrv_checkutf8(u_int8_t *, int); int newnfs_sndlock(int *); Modified: head/sys/fs/nfs/nfsport.h ============================================================================== --- head/sys/fs/nfs/nfsport.h Tue Mar 30 23:10:56 2010 (r205940) +++ head/sys/fs/nfs/nfsport.h Tue Mar 30 23:11:50 2010 (r205941) @@ -539,6 +539,7 @@ void nfsrvd_rcv(struct socket *, void *, #define NFSSTATESPINLOCK extern struct mtx nfs_state_mutex #define NFSLOCKSTATE() mtx_lock(&nfs_state_mutex) #define NFSUNLOCKSTATE() mtx_unlock(&nfs_state_mutex) +#define NFSSTATEMUTEXPTR (&nfs_state_mutex) #define NFSREQSPINLOCK extern struct mtx nfs_req_mutex #define NFSLOCKREQ() mtx_lock(&nfs_req_mutex) #define NFSUNLOCKREQ() mtx_unlock(&nfs_req_mutex) @@ -674,6 +675,7 @@ MALLOC_DECLARE(M_NEWNFSDIROFF); MALLOC_DECLARE(M_NEWNFSV4NODE); MALLOC_DECLARE(M_NEWNFSDIRECTIO); MALLOC_DECLARE(M_NEWNFSMNT); +MALLOC_DECLARE(M_NEWNFSDROLLBACK); #define M_NFSRVCACHE M_NEWNFSRVCACHE #define M_NFSDCLIENT M_NEWNFSDCLIENT #define M_NFSDSTATE M_NEWNFSDSTATE @@ -692,6 +694,7 @@ MALLOC_DECLARE(M_NEWNFSMNT); #define M_NFSDIROFF M_NEWNFSDIROFF #define M_NFSV4NODE M_NEWNFSV4NODE #define M_NFSDIRECTIO M_NEWNFSDIRECTIO +#define M_NFSDROLLBACK M_NEWNFSDROLLBACK #define NFSINT_SIGMASK(set) \ (SIGISMEMBER(set, SIGINT) || SIGISMEMBER(set, SIGTERM) || \ Modified: head/sys/fs/nfs/nfsrvstate.h ============================================================================== --- head/sys/fs/nfs/nfsrvstate.h Tue Mar 30 23:10:56 2010 (r205940) +++ head/sys/fs/nfs/nfsrvstate.h Tue Mar 30 23:11:50 2010 (r205941) @@ -185,6 +185,17 @@ struct nfslockconflict { }; /* + * This structure is used to keep track of local locks that might need + * to be rolled back. + */ +struct nfsrollback { + LIST_ENTRY(nfsrollback) rlck_list; + uint64_t rlck_first; + uint64_t rlck_end; + int rlck_type; +}; + +/* * This structure refers to a file for which lock(s) and/or open(s) exist. * Searched via hash table on file handle or found via the back pointer from an * open or lock owner. @@ -193,8 +204,12 @@ struct nfslockfile { LIST_HEAD(, nfsstate) lf_open; /* Open list */ LIST_HEAD(, nfsstate) lf_deleg; /* Delegation list */ LIST_HEAD(, nfslock) lf_lock; /* Lock list */ + LIST_HEAD(, nfslock) lf_locallock; /* Local lock list */ + LIST_HEAD(, nfsrollback) lf_rollback; /* Local lock rollback list */ LIST_ENTRY(nfslockfile) lf_hash; /* Hash list entry */ fhandle_t lf_fh; /* The file handle */ + struct nfsv4lock lf_locallock_lck; /* serialize local locking */ + int lf_usecount; /* Ref count for locking */ }; /* Modified: head/sys/fs/nfsserver/nfs_nfsdstate.c ============================================================================== --- head/sys/fs/nfsserver/nfs_nfsdstate.c Tue Mar 30 23:10:56 2010 (r205940) +++ head/sys/fs/nfsserver/nfs_nfsdstate.c Tue Mar 30 23:11:50 2010 (r205941) @@ -65,11 +65,11 @@ static void nfsrv_dumpaclient(struct nfs struct nfsd_dumpclients *dumpp); static void nfsrv_freeopenowner(struct nfsstate *stp, int cansleep, NFSPROC_T *p); -static int nfsrv_freeopen(struct nfsstate *stp, int *freedlockp, - int cansleep, NFSPROC_T *p); -static int nfsrv_freelockowner(struct nfsstate *stp, int *freedlockp, - int cansleep, NFSPROC_T *p); -static int nfsrv_freeallnfslocks(struct nfsstate *stp, int *freedlockp, +static int nfsrv_freeopen(struct nfsstate *stp, vnode_t vp, int cansleep, + NFSPROC_T *p); +static void nfsrv_freelockowner(struct nfsstate *stp, vnode_t vp, int cansleep, + NFSPROC_T *p); +static void nfsrv_freeallnfslocks(struct nfsstate *stp, vnode_t vp, int cansleep, NFSPROC_T *p); static void nfsrv_freenfslock(struct nfslock *lop); static void nfsrv_freenfslockfile(struct nfslockfile *lfp); @@ -80,8 +80,8 @@ static void nfsrv_getowner(struct nfssta struct nfsstate **stpp); static int nfsrv_getlockfh(vnode_t vp, u_short flags, struct nfslockfile **new_lfpp, fhandle_t *nfhp, NFSPROC_T *p); -static int nfsrv_getlockfile(u_short flags, - struct nfslockfile **new_lfpp, struct nfslockfile **lfpp, fhandle_t *nfhp); +static int nfsrv_getlockfile(u_short flags, struct nfslockfile **new_lfpp, + struct nfslockfile **lfpp, fhandle_t *nfhp, int lockit); static void nfsrv_insertlock(struct nfslock *new_lop, struct nfslock *insert_lop, struct nfsstate *stp, struct nfslockfile *lfp); static void nfsrv_updatelock(struct nfsstate *stp, struct nfslock **new_lopp, @@ -109,9 +109,20 @@ static time_t nfsrv_leaseexpiry(void); static void nfsrv_delaydelegtimeout(struct nfsstate *stp); static int nfsrv_checkseqid(struct nfsrv_descript *nd, u_int32_t seqid, struct nfsstate *stp, struct nfsrvcache *op); -static void nfsrv_locallocks(vnode_t vp, struct nfslockfile *lfp, - NFSPROC_T *p); static int nfsrv_nootherstate(struct nfsstate *stp); +static int nfsrv_locallock(vnode_t vp, struct nfslockfile *lfp, int flags, + uint64_t first, uint64_t end, struct nfslockconflict *cfp, NFSPROC_T *p); +static void nfsrv_localunlock(vnode_t vp, struct nfslockfile *lfp, + uint64_t init_first, uint64_t init_end, NFSPROC_T *p); +static int nfsrv_dolocal(vnode_t vp, struct nfslockfile *lfp, int flags, + int oldflags, uint64_t first, uint64_t end, struct nfslockconflict *cfp, + NFSPROC_T *p); +static void nfsrv_locallock_rollback(vnode_t vp, struct nfslockfile *lfp, + NFSPROC_T *p); +static void nfsrv_locallock_commit(struct nfslockfile *lfp, int flags, + uint64_t first, uint64_t end); +static void nfsrv_locklf(struct nfslockfile *lfp); +static void nfsrv_unlocklf(struct nfslockfile *lfp); /* * Scan the client list for a match and either return the current one, @@ -683,7 +694,7 @@ nfsrv_dumplocks(vnode_t vp, struct nfsd_ ret = nfsrv_getlockfh(vp, 0, NULL, &nfh, p); NFSLOCKSTATE(); if (!ret) - ret = nfsrv_getlockfile(0, NULL, &lfp, &nfh); + ret = nfsrv_getlockfile(0, NULL, &lfp, &nfh, 0); if (ret) { ldumpp[0].ndlck_clid.nclid_idlen = 0; NFSUNLOCKSTATE(); @@ -927,9 +938,8 @@ nfsrv_cleanclient(struct nfsclient *clp, { struct nfsstate *stp, *nstp; - LIST_FOREACH_SAFE(stp, &clp->lc_open, ls_list, nstp) { + LIST_FOREACH_SAFE(stp, &clp->lc_open, ls_list, nstp) nfsrv_freeopenowner(stp, 1, p); - } } /* @@ -993,7 +1003,10 @@ nfsrv_freedeleg(struct nfsstate *stp) LIST_REMOVE(stp, ls_file); lfp = stp->ls_lfp; if (LIST_EMPTY(&lfp->lf_open) && - LIST_EMPTY(&lfp->lf_lock) && LIST_EMPTY(&lfp->lf_deleg)) + LIST_EMPTY(&lfp->lf_lock) && LIST_EMPTY(&lfp->lf_deleg) && + LIST_EMPTY(&lfp->lf_locallock) && LIST_EMPTY(&lfp->lf_rollback) && + lfp->lf_usecount == 0 && + nfsv4_testlock(&lfp->lf_locallock_lck) == 0) nfsrv_freenfslockfile(lfp); FREE((caddr_t)stp, M_NFSDSTATE); newnfsstats.srvdelegates--; @@ -1031,16 +1044,14 @@ nfsrv_freeopenowner(struct nfsstate *stp * This function frees an open (nfsstate open structure) with all associated * lock_owners and locks. It also frees the nfslockfile structure iff there * are no other opens on the file. - * Must be called with soft clock interrupts disabled. * Returns 1 if it free'd the nfslockfile, 0 otherwise. */ static int -nfsrv_freeopen(struct nfsstate *stp, int *freedlockp, int cansleep, - NFSPROC_T *p) +nfsrv_freeopen(struct nfsstate *stp, vnode_t vp, int cansleep, NFSPROC_T *p) { struct nfsstate *nstp, *tstp; struct nfslockfile *lfp; - int ret = 0, ret2; + int ret; LIST_REMOVE(stp, ls_hash); LIST_REMOVE(stp, ls_list); @@ -1048,28 +1059,27 @@ nfsrv_freeopen(struct nfsstate *stp, int lfp = stp->ls_lfp; /* + * Now, free all lockowners associated with this open. + */ + LIST_FOREACH_SAFE(tstp, &stp->ls_open, ls_list, nstp) + nfsrv_freelockowner(tstp, vp, cansleep, p); + + /* * The nfslockfile is freed here if there are no locks * associated with the open. * If there are locks associated with the open, the * nfslockfile structure can be freed via nfsrv_freelockowner(). * (That is why the call must be here instead of after the loop.) */ - if (LIST_EMPTY(&lfp->lf_open) && LIST_EMPTY(&lfp->lf_lock) && - LIST_EMPTY(&lfp->lf_deleg)) { + if (lfp != NULL && LIST_EMPTY(&lfp->lf_open) && + LIST_EMPTY(&lfp->lf_deleg) && LIST_EMPTY(&lfp->lf_lock) && + LIST_EMPTY(&lfp->lf_locallock) && LIST_EMPTY(&lfp->lf_rollback) && + lfp->lf_usecount == 0 && + (cansleep != 0 || nfsv4_testlock(&lfp->lf_locallock_lck) == 0)) { nfsrv_freenfslockfile(lfp); ret = 1; - } - /* - * Now, free all lockowners associated with this open. - */ - nstp = LIST_FIRST(&stp->ls_open); - while (nstp != LIST_END(&stp->ls_open)) { - tstp = nstp; - nstp = LIST_NEXT(nstp, ls_list); - ret2 = nfsrv_freelockowner(tstp, freedlockp, cansleep, p); - if (ret == 0 && ret2 != 0) - ret = ret2; - } + } else + ret = 0; FREE((caddr_t)stp, M_NFSDSTATE); newnfsstats.srvopens--; nfsrv_openpluslock--; @@ -1078,79 +1088,76 @@ nfsrv_freeopen(struct nfsstate *stp, int /* * Frees a lockowner and all associated locks. - * It also frees the nfslockfile structure, if there are no more - * references to it. - * Must be called with soft clock interrupts disabled. - * Returns 1 if it free'd the nfslockfile structure, 1 otherwise. */ -static int -nfsrv_freelockowner(struct nfsstate *stp, int *freedlockp, int cansleep, +static void +nfsrv_freelockowner(struct nfsstate *stp, vnode_t vp, int cansleep, NFSPROC_T *p) { - int ret; LIST_REMOVE(stp, ls_hash); LIST_REMOVE(stp, ls_list); - ret = nfsrv_freeallnfslocks(stp, freedlockp, cansleep, p); + nfsrv_freeallnfslocks(stp, vp, cansleep, p); if (stp->ls_op) nfsrvd_derefcache(stp->ls_op); FREE((caddr_t)stp, M_NFSDSTATE); newnfsstats.srvlockowners--; nfsrv_openpluslock--; - return (ret); } /* * Free all the nfs locks on a lockowner. - * Returns 1 if it free'd the nfslockfile structure, 0 otherwise. - * If any byte range lock is free'd, *freedlockp is set to 1. */ -static int -nfsrv_freeallnfslocks(struct nfsstate *stp, int *freedlockp, int cansleep, +static void +nfsrv_freeallnfslocks(struct nfsstate *stp, vnode_t vp, int cansleep, NFSPROC_T *p) { struct nfslock *lop, *nlop; - struct nfslockfile *lfp = NULL, *olfp = NULL; - int ret = 0; + struct nfsrollback *rlp, *nrlp; + struct nfslockfile *lfp = NULL; + int gottvp = 0; + vnode_t tvp = NULL; lop = LIST_FIRST(&stp->ls_lock); while (lop != LIST_END(&stp->ls_lock)) { nlop = LIST_NEXT(lop, lo_lckowner); /* - * Since locks off a lockowner are ordered by - * file, you should update the local locks when - * you hit the next file OR the end of the lock - * list. If there are no locks for other owners, - * it must be done before the lockowner is discarded. - * (All this only applies if cansleep == 1.) + * Since all locks should be for the same file, lfp should + * not change. */ - olfp = lfp; - lfp = lop->lo_lfp; - nfsrv_freenfslock(lop); - if (freedlockp) - *freedlockp = 1; - if (LIST_EMPTY(&lfp->lf_open) && LIST_EMPTY(&lfp->lf_lock) && - LIST_EMPTY(&lfp->lf_deleg)) { - if (cansleep) - nfsrv_locallocks(NULL, lfp, p); - nfsrv_freenfslockfile(lfp); - /* - * Set the pointer(s) to this lockowner NULL, - * to indicate it has been free'd and local - * locks discarded already. - */ - if (olfp == lfp) - olfp = NULL; - lfp = NULL; - ret = 1; + if (lfp == NULL) + lfp = lop->lo_lfp; + else if (lfp != lop->lo_lfp) + panic("allnfslocks"); + /* + * If vp is NULL and cansleep != 0, a vnode must be acquired + * from the file handle. This only occurs when called from + * nfsrv_cleanclient(). + */ + if (gottvp == 0) { + if (nfsrv_dolocallocks == 0) + tvp = NULL; + else if (vp == NULL && cansleep != 0) + tvp = nfsvno_getvp(&lfp->lf_fh); + else + tvp = vp; + gottvp = 1; + } + + if (tvp != NULL) { + if (cansleep == 0) + panic("allnfs2"); + nfsrv_localunlock(tvp, lfp, lop->lo_first, + lop->lo_end, p); + LIST_FOREACH_SAFE(rlp, &lfp->lf_rollback, rlck_list, + nrlp) + free(rlp, M_NFSDROLLBACK); + LIST_INIT(&lfp->lf_rollback); } - if (cansleep && olfp != lfp && olfp != NULL) - nfsrv_locallocks(NULL, olfp, p); + nfsrv_freenfslock(lop); lop = nlop; } - if (cansleep && lfp != NULL) - nfsrv_locallocks(NULL, olfp, p); - return (ret); + if (vp == NULL && tvp != NULL) + vput(tvp); } /* @@ -1161,11 +1168,13 @@ static void nfsrv_freenfslock(struct nfslock *lop) { - LIST_REMOVE(lop, lo_lckfile); + if (lop->lo_lckfile.le_prev != NULL) { + LIST_REMOVE(lop, lo_lckfile); + newnfsstats.srvlocks--; + nfsrv_openpluslock--; + } LIST_REMOVE(lop, lo_lckowner); FREE((caddr_t)lop, M_NFSDLOCK); - newnfsstats.srvlocks--; - nfsrv_openpluslock--; } /* @@ -1240,7 +1249,8 @@ nfsrv_getowner(struct nfsstatehead *hp, APPLESTATIC int nfsrv_lockctrl(vnode_t vp, struct nfsstate **new_stpp, struct nfslock **new_lopp, struct nfslockconflict *cfp, - nfsquad_t clientid, nfsv4stateid_t *stateidp, __unused struct nfsexstuff *exp, + nfsquad_t clientid, nfsv4stateid_t *stateidp, + __unused struct nfsexstuff *exp, struct nfsrv_descript *nd, NFSPROC_T *p) { struct nfslock *lop; @@ -1253,9 +1263,11 @@ nfsrv_lockctrl(vnode_t vp, struct nfssta struct nfsstate *stp, *lckstp = NULL; struct nfsclient *clp = NULL; u_int32_t bits; - int error = 0, haslock = 0, ret; - int getlckret, delegation = 0; + int error = 0, haslock = 0, ret, reterr; + int getlckret, delegation = 0, filestruct_locked; fhandle_t nfh; + uint64_t first, end; + uint32_t lock_flags; if (new_stp->ls_flags & (NFSLCK_CHECK | NFSLCK_SETATTR)) { /* @@ -1290,23 +1302,6 @@ nfsrv_lockctrl(vnode_t vp, struct nfssta return (NFSERR_RESOURCE); /* - * For Lock, check for a conflict with a lock held by - * a process running locally on the server now, before - * monkeying with nfsd state. Since the vp is locked, any - * other local calls are blocked during this Op. - */ - if (new_stp->ls_flags & NFSLCK_LOCK) { - if (new_lop->lo_flags & NFSLCK_WRITE) - error = nfsvno_localconflict(vp, F_WRLCK, - new_lop->lo_first, new_lop->lo_end, cfp, p); - else - error = nfsvno_localconflict(vp, F_RDLCK, - new_lop->lo_first, new_lop->lo_end, cfp, p); - if (error) - return (error); - } - - /* * For the lock case, get another nfslock structure, * just in case we need it. * Malloc now, before we start sifting through the linked lists, @@ -1316,6 +1311,9 @@ tryagain: if (new_stp->ls_flags & NFSLCK_LOCK) MALLOC(other_lop, struct nfslock *, sizeof (struct nfslock), M_NFSDLOCK, M_WAITOK); + filestruct_locked = 0; + reterr = 0; + lfp = NULL; /* * Get the lockfile structure for CFH now, so we can do a sanity @@ -1324,22 +1322,41 @@ tryagain: * shouldn't be incremented for this case. * If nfsrv_getlockfile() returns -1, it means "not found", which * will be handled later. + * If we are doing Lock/LockU and local locking is enabled, sleep + * lock the nfslockfile structure. */ getlckret = nfsrv_getlockfh(vp, new_stp->ls_flags, NULL, &nfh, p); NFSLOCKSTATE(); - if (!getlckret) - getlckret = nfsrv_getlockfile(new_stp->ls_flags, NULL, - &lfp, &nfh); - if (getlckret != 0 && getlckret != -1) { - NFSUNLOCKSTATE(); - if (other_lop) - FREE((caddr_t)other_lop, M_NFSDLOCK); - if (haslock) { - NFSLOCKV4ROOTMUTEX(); - nfsv4_unlock(&nfsv4rootfs_lock, 1); - NFSUNLOCKV4ROOTMUTEX(); + if (getlckret == 0) { + if ((new_stp->ls_flags & (NFSLCK_LOCK | NFSLCK_UNLOCK)) != 0 && + nfsrv_dolocallocks != 0 && nd->nd_repstat == 0) { + getlckret = nfsrv_getlockfile(new_stp->ls_flags, NULL, + &lfp, &nfh, 1); + if (getlckret == 0) + filestruct_locked = 1; + } else + getlckret = nfsrv_getlockfile(new_stp->ls_flags, NULL, + &lfp, &nfh, 0); + } + if (getlckret != 0 && getlckret != -1) + reterr = getlckret; + + if (filestruct_locked != 0) { + LIST_INIT(&lfp->lf_rollback); + if ((new_stp->ls_flags & NFSLCK_LOCK)) { + /* + * For local locking, do the advisory locking now, so + * that any conflict can be detected. A failure later + * can be rolled back locally. If an error is returned, + * struct nfslockfile has been unlocked and any local + * locking rolled back. + */ + NFSUNLOCKSTATE(); + reterr = nfsrv_locallock(vp, lfp, + (new_lop->lo_flags & (NFSLCK_READ | NFSLCK_WRITE)), + new_lop->lo_first, new_lop->lo_end, cfp, p); + NFSLOCKSTATE(); } - return (getlckret); } /* @@ -1381,11 +1398,11 @@ tryagain: */ if (error == 0 && (stp->ls_flags & NFSLCK_OPEN) && ((stp->ls_openowner->ls_flags & NFSLCK_NEEDSCONFIRM) || - (getlckret != -1 && stp->ls_lfp != lfp))) + (getlckret == 0 && stp->ls_lfp != lfp))) error = NFSERR_BADSTATEID; if (error == 0 && (stp->ls_flags & (NFSLCK_DELEGREAD | NFSLCK_DELEGWRITE)) && - getlckret != -1 && stp->ls_lfp != lfp) + getlckret == 0 && stp->ls_lfp != lfp) error = NFSERR_BADSTATEID; /* @@ -1398,7 +1415,7 @@ tryagain: */ if (error == 0 && (stp->ls_flags & (NFSLCK_OPEN | NFSLCK_DELEGREAD | NFSLCK_DELEGWRITE)) == 0 && - getlckret != -1 && stp->ls_lfp != lfp) { + getlckret == 0 && stp->ls_lfp != lfp) { #ifdef DIAGNOSTIC printf("Got a lock statid for different file open\n"); #endif @@ -1478,12 +1495,30 @@ tryagain: nfsrv_markstable(clp); /* - * If nd_repstat is set, we can return that now, since the - * seqid# has been incremented. - */ - if (nd->nd_repstat && !error) - error = nd->nd_repstat; - if (error) { + * At this point, either error == NFSERR_BADSTATEID or the + * seqid# has been updated, so we can return any error. + * If error == 0, there may be an error in: + * nd_repstat - Set by the calling function. + * reterr - Set above, if getting the nfslockfile structure + * or acquiring the local lock failed. + * (If both of these are set, nd_repstat should probably be + * returned, since that error was detected before this + * function call.) + */ + if (error != 0 || nd->nd_repstat != 0 || reterr != 0) { + if (error == 0) { + if (nd->nd_repstat != 0) + error = nd->nd_repstat; + else + error = reterr; + } + if (filestruct_locked != 0) { + /* Roll back local locks. */ + NFSUNLOCKSTATE(); + nfsrv_locallock_rollback(vp, lfp, p); + NFSLOCKSTATE(); + nfsrv_unlocklf(lfp); + } NFSUNLOCKSTATE(); if (other_lop) FREE((caddr_t)other_lop, M_NFSDLOCK); @@ -1569,6 +1604,13 @@ tryagain: ((new_stp->ls_flags & (NFSLCK_CHECK|NFSLCK_WRITEACCESS)) == (NFSLCK_CHECK | NFSLCK_WRITEACCESS) && !(mystp->ls_flags & NFSLCK_WRITEACCESS))) { + if (filestruct_locked != 0) { + /* Roll back local locks. */ + NFSUNLOCKSTATE(); + nfsrv_locallock_rollback(vp, lfp, p); + NFSLOCKSTATE(); + nfsrv_unlocklf(lfp); + } NFSUNLOCKSTATE(); if (other_lop) FREE((caddr_t)other_lop, M_NFSDLOCK); @@ -1680,11 +1722,18 @@ tryagain: (new_lop->lo_flags & NFSLCK_WRITE) && (clp != tstp->ls_clp || (tstp->ls_flags & NFSLCK_DELEGREAD)))) { + if (filestruct_locked != 0) { + /* Roll back local locks. */ + NFSUNLOCKSTATE(); + nfsrv_locallock_rollback(vp, lfp, p); + NFSLOCKSTATE(); + nfsrv_unlocklf(lfp); + } ret = nfsrv_delegconflict(tstp, &haslock, p, vp); if (ret) { /* * nfsrv_delegconflict unlocks state when it - * returns non-zero. + * returns non-zero, which it always does. */ if (other_lop) { FREE((caddr_t)other_lop, M_NFSDLOCK); @@ -1696,6 +1745,7 @@ tryagain: } return (ret); } + /* Never gets here. */ } tstp = nstp; } @@ -1706,32 +1756,21 @@ tryagain: * just let it happen.) */ if (new_stp->ls_flags & NFSLCK_UNLOCK) { + first = new_lop->lo_first; + end = new_lop->lo_end; nfsrv_updatelock(stp, new_lopp, &other_lop, lfp); stateidp->seqid = ++(stp->ls_stateid.seqid); stateidp->other[0] = stp->ls_stateid.other[0]; stateidp->other[1] = stp->ls_stateid.other[1]; stateidp->other[2] = stp->ls_stateid.other[2]; - /* - * For a non-empty flp->lf_lock list, I believe - * nfsrv_locallocks() can safely traverse the list, including - * sleeping, for two reasons: - * 1 - The Lock/LockU/Close Ops all require a locked - * vnode for the file and we currently have that. - * 2 - The only other thing that modifies a non-empty - * list is nfsrv_cleanclient() and it is always - * done with the exclusive nfsv4rootfs_lock held. - * Since this Op in progress holds either a shared or - * exclusive lock on nfsv4rootfs_lock, that can't - * happen now. - * However, the structure pointed to by lfp can go - * in many places for an empty list, so that is handled - * by passing a NULL pointer to nfsrv_locallocks(). - * Do that check now, while we are still SMP safe. - */ - if (LIST_EMPTY(&lfp->lf_lock)) - lfp = NULL; + if (filestruct_locked != 0) { + NFSUNLOCKSTATE(); + /* Update the local locks. */ + nfsrv_localunlock(vp, lfp, first, end, p); + NFSLOCKSTATE(); + nfsrv_unlocklf(lfp); + } NFSUNLOCKSTATE(); - nfsrv_locallocks(vp, lfp, p); if (haslock) { NFSLOCKV4ROOTMUTEX(); nfsv4_unlock(&nfsv4rootfs_lock, 1); @@ -1763,6 +1802,13 @@ tryagain: } ret = nfsrv_clientconflict(lop->lo_stp->ls_clp,&haslock,vp,p); if (ret) { + if (filestruct_locked != 0) { + /* Roll back local locks. */ + nfsrv_locallock_rollback(vp, lfp, p); + NFSLOCKSTATE(); + nfsrv_unlocklf(lfp); + NFSUNLOCKSTATE(); + } /* * nfsrv_clientconflict() unlocks state when it * returns non-zero. @@ -1790,6 +1836,13 @@ tryagain: error = NFSERR_LOCKED; else error = NFSERR_DENIED; + if (filestruct_locked != 0) { + /* Roll back local locks. */ + NFSUNLOCKSTATE(); + nfsrv_locallock_rollback(vp, lfp, p); + NFSLOCKSTATE(); + nfsrv_unlocklf(lfp); + } NFSUNLOCKSTATE(); if (haslock) { NFSLOCKV4ROOTMUTEX(); @@ -1820,6 +1873,9 @@ tryagain: * - exist_lock_owner where lock_owner exists * - open_to_lock_owner with new lock_owner */ + first = new_lop->lo_first; + end = new_lop->lo_end; + lock_flags = new_lop->lo_flags; if (!(new_stp->ls_flags & NFSLCK_OPENTOLOCK)) { nfsrv_updatelock(lckstp, new_lopp, &other_lop, lfp); stateidp->seqid = ++(lckstp->ls_stateid.seqid); @@ -1854,11 +1910,13 @@ tryagain: newnfsstats.srvlockowners++; nfsrv_openpluslock++; } - /* See comment above, w.r.t. nfsrv_locallocks(). */ - if (LIST_EMPTY(&lfp->lf_lock)) - lfp = NULL; + if (filestruct_locked != 0) { + NFSUNLOCKSTATE(); + nfsrv_locallock_commit(lfp, lock_flags, first, end); + NFSLOCKSTATE(); + nfsrv_unlocklf(lfp); + } NFSUNLOCKSTATE(); - nfsrv_locallocks(vp, lfp, p); if (haslock) { NFSLOCKV4ROOTMUTEX(); nfsv4_unlock(&nfsv4rootfs_lock, 1); @@ -1984,7 +2042,7 @@ tryagain: error = getfhret; else error = nfsrv_getlockfile(new_stp->ls_flags, &new_lfp, &lfp, - NULL); + NULL, 0); if (new_lfp) FREE((caddr_t)new_lfp, M_NFSDLOCKFILE); if (error) { @@ -2227,7 +2285,7 @@ tryagain: error = getfhret; else error = nfsrv_getlockfile(new_stp->ls_flags, &new_lfp, &lfp, - NULL); + NULL, 0); if (new_lfp) FREE((caddr_t)new_lfp, M_NFSDLOCKFILE); if (error) { @@ -2775,7 +2833,7 @@ nfsrv_openupdate(vnode_t vp, struct nfss struct nfsclient *clp; struct nfslockfile *lfp; u_int32_t bits; - int error, gotstate = 0, len = 0, ret, freedlock; + int error, gotstate = 0, len = 0; u_char client[NFSV4_OPAQUELIMIT]; /* @@ -2863,26 +2921,19 @@ nfsrv_openupdate(vnode_t vp, struct nfss } else if (new_stp->ls_flags & NFSLCK_CLOSE) { ownerstp = stp->ls_openowner; lfp = stp->ls_lfp; - freedlock = 0; - ret = nfsrv_freeopen(stp, &freedlock, 0, p); - /* See comment on nfsrv_lockctrl() w.r.t. locallocks. */ - if (ret) { - lfp = NULL; + if (nfsrv_dolocallocks != 0 && !LIST_EMPTY(&stp->ls_open)) { + /* Get the lf lock */ + nfsrv_locklf(lfp); + NFSUNLOCKSTATE(); + if (nfsrv_freeopen(stp, vp, 1, p) == 0) { + NFSLOCKSTATE(); + nfsrv_unlocklf(lfp); + NFSUNLOCKSTATE(); + } } else { - if (LIST_EMPTY(&lfp->lf_lock)) - lfp = NULL; - } - /* - * For now, I won't do this. The openowner should be - * free'd in NFSNOOPEN seconds and it will be deref'd then. - if (LIST_EMPTY(&ownerstp->ls_open) && ownerstp->ls_op) { - nfsrvd_derefcache(ownerstp->ls_op); - ownerstp->ls_op = NULL; + (void) nfsrv_freeopen(stp, NULL, 0, p); + NFSUNLOCKSTATE(); } - */ - NFSUNLOCKSTATE(); - if (freedlock && lfp != NULL) - nfsrv_locallocks(vp, lfp, p); } else { /* * Update the share bits, making sure that the new set are a @@ -3024,7 +3075,7 @@ nfsrv_releaselckown(struct nfsstate *new !NFSBCMP(stp->ls_owner, new_stp->ls_owner, stp->ls_ownerlen)){ if (LIST_EMPTY(&stp->ls_lock)) { - (void) nfsrv_freelockowner(stp, NULL, 0, p); + nfsrv_freelockowner(stp, NULL, 0, p); } else { NFSUNLOCKSTATE(); return (NFSERR_LOCKSHELD); @@ -3072,7 +3123,7 @@ nfsrv_getlockfh(vnode_t vp, u_short flag */ static int nfsrv_getlockfile(u_short flags, struct nfslockfile **new_lfpp, - struct nfslockfile **lfpp, fhandle_t *nfhp) + struct nfslockfile **lfpp, fhandle_t *nfhp, int lockit) { struct nfslockfile *lfp; fhandle_t *fhp = NULL, *tfhp; @@ -3096,6 +3147,8 @@ nfsrv_getlockfile(u_short flags, struct LIST_FOREACH(lfp, hp, lf_hash) { tfhp = &lfp->lf_fh; if (NFSVNO_CMPFH(fhp, tfhp)) { + if (lockit) + nfsrv_locklf(lfp); *lfpp = lfp; return (0); } @@ -3109,6 +3162,11 @@ nfsrv_getlockfile(u_short flags, struct LIST_INIT(&new_lfp->lf_open); LIST_INIT(&new_lfp->lf_lock); LIST_INIT(&new_lfp->lf_deleg); + LIST_INIT(&new_lfp->lf_locallock); + LIST_INIT(&new_lfp->lf_rollback); + new_lfp->lf_locallock_lck.nfslock_usecnt = 0; + new_lfp->lf_locallock_lck.nfslock_lock = 0; + new_lfp->lf_usecount = 0; LIST_INSERT_HEAD(hp, new_lfp, lf_hash); *lfpp = new_lfp; *new_lfpp = NULL; @@ -3130,31 +3188,39 @@ nfsrv_insertlock(struct nfslock *new_lop new_lop->lo_stp = stp; new_lop->lo_lfp = lfp; - /* Insert in increasing lo_first order */ - lop = LIST_FIRST(&lfp->lf_lock); - if (lop == LIST_END(&lfp->lf_lock) || - new_lop->lo_first <= lop->lo_first) { - LIST_INSERT_HEAD(&lfp->lf_lock, new_lop, lo_lckfile); - } else { - nlop = LIST_NEXT(lop, lo_lckfile); - while (nlop != LIST_END(&lfp->lf_lock) && - nlop->lo_first < new_lop->lo_first) { - lop = nlop; + if (stp != NULL) { + /* Insert in increasing lo_first order */ + lop = LIST_FIRST(&lfp->lf_lock); + if (lop == LIST_END(&lfp->lf_lock) || + new_lop->lo_first <= lop->lo_first) { + LIST_INSERT_HEAD(&lfp->lf_lock, new_lop, lo_lckfile); + } else { nlop = LIST_NEXT(lop, lo_lckfile); + while (nlop != LIST_END(&lfp->lf_lock) && + nlop->lo_first < new_lop->lo_first) { + lop = nlop; + nlop = LIST_NEXT(lop, lo_lckfile); + } + LIST_INSERT_AFTER(lop, new_lop, lo_lckfile); } - LIST_INSERT_AFTER(lop, new_lop, lo_lckfile); + } else { + new_lop->lo_lckfile.le_prev = NULL; /* list not used */ } /* - * Insert after insert_lop, which is overloaded as stp for + * Insert after insert_lop, which is overloaded as stp or lfp for * an empty list. */ - if ((struct nfsstate *)insert_lop == stp) + if (stp == NULL && (struct nfslockfile *)insert_lop == lfp) + LIST_INSERT_HEAD(&lfp->lf_locallock, new_lop, lo_lckowner); + else if ((struct nfsstate *)insert_lop == stp) LIST_INSERT_HEAD(&stp->ls_lock, new_lop, lo_lckowner); else LIST_INSERT_AFTER(insert_lop, new_lop, lo_lckowner); - newnfsstats.srvlocks++; - nfsrv_openpluslock++; + if (stp != NULL) { + newnfsstats.srvlocks++; + nfsrv_openpluslock++; + } } /* @@ -3180,9 +3246,14 @@ nfsrv_updatelock(struct nfsstate *stp, s */ if (new_lop->lo_flags & NFSLCK_UNLOCK) unlock = 1; - ilop = (struct nfslock *)stp; - lop = LIST_FIRST(&stp->ls_lock); - while (lop != LIST_END(&stp->ls_lock)) { + if (stp != NULL) { + ilop = (struct nfslock *)stp; + lop = LIST_FIRST(&stp->ls_lock); + } else { + ilop = (struct nfslock *)lfp; + lop = LIST_FIRST(&lfp->lf_locallock); + } + while (lop != NULL) { /* * Only check locks for this file that aren't before the start of * new lock's range. @@ -3278,8 +3349,7 @@ nfsrv_updatelock(struct nfsstate *stp, s } ilop = lop; lop = LIST_NEXT(lop, lo_lckowner); - if (myfile && (lop == LIST_END(&stp->ls_lock) || - lop->lo_lfp != lfp)) + if (myfile && (lop == NULL || lop->lo_lfp != lfp)) break; } @@ -4362,7 +4432,7 @@ nfsrv_checkremove(vnode_t vp, int remove tryagain: NFSLOCKSTATE(); if (!error) - error = nfsrv_getlockfile(NFSLCK_CHECK, NULL, &lfp, &nfh); + error = nfsrv_getlockfile(NFSLCK_CHECK, NULL, &lfp, &nfh, 0); if (error) { NFSUNLOCKSTATE(); if (haslock) { @@ -4612,7 +4682,7 @@ nfsrv_checkgetattr(struct nfsrv_descript error = nfsrv_getlockfh(vp, NFSLCK_CHECK, NULL, &nfh, p); NFSLOCKSTATE(); if (!error) - error = nfsrv_getlockfile(NFSLCK_CHECK, NULL, &lfp, &nfh); + error = nfsrv_getlockfile(NFSLCK_CHECK, NULL, &lfp, &nfh, 0); if (error) { NFSUNLOCKSTATE(); if (error == -1) @@ -4783,112 +4853,252 @@ nfsrv_delaydelegtimeout(struct nfsstate } /* - * Go through a lock list and set local locks for all ranges. - * This assumes that the lock list is sorted on increasing - * lo_first and that the list won't change, despite the possibility - * of sleeps. + * This function checks to see if there is any other state associated + * with the openowner for this Open. + * It returns 1 if there is no other state, 0 otherwise. */ -static void -nfsrv_locallocks(vnode_t vp, struct nfslockfile *lfp, - NFSPROC_T *p) +static int +nfsrv_nootherstate(struct nfsstate *stp) { - struct nfslock *lop, *nlop; - vnode_t tvp; - int newcollate, flags = 0; - u_int64_t first = 0x0ull, end = 0x0ull; + struct nfsstate *tstp; - if (!nfsrv_dolocallocks) - return; - /* - * If vp is NULL, a vnode must be aquired from the file - * handle. - */ - if (vp == NULL) { - if (lfp == NULL) - panic("nfsrv_locallocks"); - tvp = nfsvno_getvp(&lfp->lf_fh); - if (tvp == NULL) - return; - } else { - tvp = vp; + LIST_FOREACH(tstp, &stp->ls_openowner->ls_open, ls_list) { + if (tstp != stp || !LIST_EMPTY(&tstp->ls_lock)) + return (0); } + return (1); +} - /* - * If lfp == NULL, the lock list is empty, so just unlock - * everything. - */ - if (lfp == NULL) { - (void) nfsvno_advlock(tvp, F_UNLCK, (u_int64_t)0, - NFS64BITSSET, p); - /* vp can't be NULL */ - return; - } +/* + * Create a list of lock deltas (changes to local byte range locking + * that can be rolled back using the list) and apply the changes via + * nfsvno_advlock(). Optionally, lock the list. It is expected that either + * the rollback or update function will be called after this. + * It returns an error (and rolls back, as required), if any nfsvno_advlock() + * call fails. If it returns an error, it will unlock the list. + */ +static int +nfsrv_locallock(vnode_t vp, struct nfslockfile *lfp, int flags, + uint64_t first, uint64_t end, struct nfslockconflict *cfp, NFSPROC_T *p) +{ + struct nfslock *lop, *nlop; + int error = 0; - /* handle whole file case first */ - lop = LIST_FIRST(&lfp->lf_lock); - if (lop != LIST_END(&lfp->lf_lock) && - lop->lo_first == (u_int64_t)0 && - lop->lo_end == NFS64BITSSET) { - if (lop->lo_flags & NFSLCK_WRITE) - (void) nfsvno_advlock(tvp, F_WRLCK, lop->lo_first, - lop->lo_end, p); - else - (void) nfsvno_advlock(tvp, F_RDLCK, lop->lo_first, - lop->lo_end, p); - if (vp == NULL) - vput(tvp); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Tue Mar 30 23:14:36 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F3C8D1065672; Tue, 30 Mar 2010 23:14:35 +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 E37308FC22; Tue, 30 Mar 2010 23:14:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2UNEZCO023825; Tue, 30 Mar 2010 23:14:35 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2UNEZpl023823; Tue, 30 Mar 2010 23:14:35 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201003302314.o2UNEZpl023823@svn.freebsd.org> From: Xin LI Date: Tue, 30 Mar 2010 23:14: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: r205942 - head/bin/pax X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Mar 2010 23:14:36 -0000 Author: delphij Date: Tue Mar 30 23:14:35 2010 New Revision: 205942 URL: http://svn.freebsd.org/changeset/base/205942 Log: Merge OpenBSD revisions 1.4 through 1.9, mostly style cleanups. Obtained from: OpenBSD MFC after: 3 month Modified: head/bin/pax/getoldopt.c Modified: head/bin/pax/getoldopt.c ============================================================================== --- head/bin/pax/getoldopt.c Tue Mar 30 23:11:50 2010 (r205941) +++ head/bin/pax/getoldopt.c Tue Mar 30 23:14:35 2010 (r205942) @@ -1,4 +1,4 @@ -/* $OpenBSD: getoldopt.c,v 1.4 2000/01/22 20:24:51 deraadt Exp $ */ +/* $OpenBSD: getoldopt.c,v 1.9 2009/10/27 23:59:22 deraadt Exp $ */ /* $NetBSD: getoldopt.c,v 1.3 1995/03/21 09:07:28 cgd Exp $ */ /*- @@ -7,7 +7,7 @@ * otherwise, it uses the old rules used by tar, dump, and ps. * * Written 25 August 1985 by John Gilmore (ihnp4!hoptoad!gnu) and placed - * in the Pubic Domain for your edification and enjoyment. + * in the Public Domain for your edification and enjoyment. */ #include @@ -33,7 +33,8 @@ getoldopt(int argc, char **argv, const c optarg = NULL; if (key == NULL) { /* First time */ - if (argc < 2) return EOF; + if (argc < 2) + return (-1); key = argv[1]; if (*key == '-') use_getopt++; @@ -42,18 +43,18 @@ getoldopt(int argc, char **argv, const c } if (use_getopt) - return getopt(argc, argv, optstring); + return (getopt(argc, argv, optstring)); c = *key++; if (c == '\0') { key--; - return EOF; + return (-1); } place = strchr(optstring, c); if (place == NULL || c == ':') { fprintf(stderr, "%s: unknown option %c\n", argv[0], c); - return('?'); + return ('?'); } place++; @@ -64,9 +65,9 @@ getoldopt(int argc, char **argv, const c } else { fprintf(stderr, "%s: %c argument missing\n", argv[0], c); - return('?'); + return ('?'); } } - return(c); + return (c); } From owner-svn-src-head@FreeBSD.ORG Wed Mar 31 00:19:40 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 16155106567F; Wed, 31 Mar 2010 00:19:40 +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 0595B8FC0C; Wed, 31 Mar 2010 00:19:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2V0JdZw038298; Wed, 31 Mar 2010 00:19:39 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2V0Jd7l038296; Wed, 31 Mar 2010 00:19:39 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201003310019.o2V0Jd7l038296@svn.freebsd.org> From: Navdeep Parhar Date: Wed, 31 Mar 2010 00:19: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: r205944 - head/sys/dev/cxgb X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Mar 2010 00:19:40 -0000 Author: np Date: Wed Mar 31 00:19:39 2010 New Revision: 205944 URL: http://svn.freebsd.org/changeset/base/205944 Log: Refresh the firmware version immediately after it is upgraded (or downgraded). MFC after: 3 days Modified: head/sys/dev/cxgb/cxgb_main.c Modified: head/sys/dev/cxgb/cxgb_main.c ============================================================================== --- head/sys/dev/cxgb/cxgb_main.c Tue Mar 30 23:15:06 2010 (r205943) +++ head/sys/dev/cxgb/cxgb_main.c Wed Mar 31 00:19:39 2010 (r205944) @@ -378,17 +378,25 @@ upgrade_fw(adapter_t *sc) { const struct firmware *fw; int status; + u32 vers; if ((fw = firmware_get(FW_FNAME)) == NULL) { device_printf(sc->dev, "Could not find firmware image %s\n", FW_FNAME); return (ENOENT); } else - device_printf(sc->dev, "updating firmware on card\n"); + device_printf(sc->dev, "installing firmware on card\n"); status = t3_load_fw(sc, (const uint8_t *)fw->data, fw->datasize); - device_printf(sc->dev, "firmware update returned %s %d\n", - status == 0 ? "success" : "fail", status); - + if (status != 0) { + device_printf(sc->dev, "failed to install firmware: %d\n", + status); + } else { + t3_get_fw_version(sc, &vers); + snprintf(&sc->fw_version[0], sizeof(sc->fw_version), "%d.%d.%d", + G_FW_VERSION_MAJOR(vers), G_FW_VERSION_MINOR(vers), + G_FW_VERSION_MICRO(vers)); + } + firmware_put(fw, FIRMWARE_UNLOAD); return (status); From owner-svn-src-head@FreeBSD.ORG Wed Mar 31 00:21:57 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3ED51106566C; Wed, 31 Mar 2010 00:21:57 +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 2C08F8FC1B; Wed, 31 Mar 2010 00:21:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2V0Lv7K038842; Wed, 31 Mar 2010 00:21:57 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2V0LvDP038840; Wed, 31 Mar 2010 00:21:57 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201003310021.o2V0LvDP038840@svn.freebsd.org> From: Navdeep Parhar Date: Wed, 31 Mar 2010 00:21: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: r205945 - head/sys/dev/cxgb/common X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Mar 2010 00:21:57 -0000 Author: np Date: Wed Mar 31 00:21:56 2010 New Revision: 205945 URL: http://svn.freebsd.org/changeset/base/205945 Log: Improved PHY EDC settings. MFC after: 3 days Modified: head/sys/dev/cxgb/common/cxgb_ael1002.c Modified: head/sys/dev/cxgb/common/cxgb_ael1002.c ============================================================================== --- head/sys/dev/cxgb/common/cxgb_ael1002.c Wed Mar 31 00:19:39 2010 (r205944) +++ head/sys/dev/cxgb/common/cxgb_ael1002.c Wed Mar 31 00:21:56 2010 (r205945) @@ -1447,395 +1447,439 @@ static int ael2020_setup_twinax_edc(stru 0xd803, 0x40aa, 0xd804, 0x401c, 0xd805, 0x401e, - 0xd806, 0x2ff4, - 0xd807, 0x3dc4, - 0xd808, 0x2035, - 0xd809, 0x3035, - 0xd80a, 0x6524, - 0xd80b, 0x2cb2, - 0xd80c, 0x3012, - 0xd80d, 0x1002, - 0xd80e, 0x26e2, - 0xd80f, 0x3022, - 0xd810, 0x1002, - 0xd811, 0x27d2, - 0xd812, 0x3022, + 0xd806, 0x20c5, + 0xd807, 0x3c05, + 0xd808, 0x6536, + 0xd809, 0x2fe4, + 0xd80a, 0x3dc4, + 0xd80b, 0x6624, + 0xd80c, 0x2ff4, + 0xd80d, 0x3dc4, + 0xd80e, 0x2035, + 0xd80f, 0x30a5, + 0xd810, 0x6524, + 0xd811, 0x2ca2, + 0xd812, 0x3012, 0xd813, 0x1002, - 0xd814, 0x2822, - 0xd815, 0x3012, + 0xd814, 0x27e2, + 0xd815, 0x3022, 0xd816, 0x1002, - 0xd817, 0x2492, + 0xd817, 0x28d2, 0xd818, 0x3022, 0xd819, 0x1002, - 0xd81a, 0x2772, + 0xd81a, 0x2892, 0xd81b, 0x3012, 0xd81c, 0x1002, - 0xd81d, 0x23d2, + 0xd81d, 0x24e2, 0xd81e, 0x3022, 0xd81f, 0x1002, - 0xd820, 0x22cd, - 0xd821, 0x301d, - 0xd822, 0x27f2, - 0xd823, 0x3022, - 0xd824, 0x1002, - 0xd825, 0x5553, - 0xd826, 0x0307, - 0xd827, 0x2522, - 0xd828, 0x3022, - 0xd829, 0x1002, - 0xd82a, 0x2142, - 0xd82b, 0x3012, - 0xd82c, 0x1002, - 0xd82d, 0x4016, - 0xd82e, 0x5e63, - 0xd82f, 0x0344, - 0xd830, 0x2142, + 0xd820, 0x27e2, + 0xd821, 0x3012, + 0xd822, 0x1002, + 0xd823, 0x2422, + 0xd824, 0x3022, + 0xd825, 0x1002, + 0xd826, 0x22cd, + 0xd827, 0x301d, + 0xd828, 0x28f2, + 0xd829, 0x3022, + 0xd82a, 0x1002, + 0xd82b, 0x5553, + 0xd82c, 0x0307, + 0xd82d, 0x2572, + 0xd82e, 0x3022, + 0xd82f, 0x1002, + 0xd830, 0x21a2, 0xd831, 0x3012, 0xd832, 0x1002, - 0xd833, 0x400e, - 0xd834, 0x2522, - 0xd835, 0x3022, - 0xd836, 0x1002, - 0xd837, 0x2b52, - 0xd838, 0x3012, - 0xd839, 0x1002, - 0xd83a, 0x2742, + 0xd833, 0x4016, + 0xd834, 0x5e63, + 0xd835, 0x0344, + 0xd836, 0x21a2, + 0xd837, 0x3012, + 0xd838, 0x1002, + 0xd839, 0x400e, + 0xd83a, 0x2572, 0xd83b, 0x3022, 0xd83c, 0x1002, - 0xd83d, 0x25e2, - 0xd83e, 0x3022, + 0xd83d, 0x2b22, + 0xd83e, 0x3012, 0xd83f, 0x1002, - 0xd840, 0x2fa4, - 0xd841, 0x3dc4, - 0xd842, 0x6624, - 0xd843, 0x414b, - 0xd844, 0x56b3, - 0xd845, 0x03c6, - 0xd846, 0x866b, - 0xd847, 0x400c, - 0xd848, 0x2712, - 0xd849, 0x3012, - 0xd84a, 0x1002, - 0xd84b, 0x2c4b, - 0xd84c, 0x309b, - 0xd84d, 0x56b3, - 0xd84e, 0x03c3, - 0xd84f, 0x866b, - 0xd850, 0x400c, - 0xd851, 0x2272, - 0xd852, 0x3022, - 0xd853, 0x1002, - 0xd854, 0x2742, - 0xd855, 0x3022, - 0xd856, 0x1002, - 0xd857, 0x25e2, - 0xd858, 0x3022, - 0xd859, 0x1002, - 0xd85a, 0x2fb4, - 0xd85b, 0x3dc4, - 0xd85c, 0x6624, - 0xd85d, 0x56b3, - 0xd85e, 0x03c3, - 0xd85f, 0x866b, - 0xd860, 0x401c, - 0xd861, 0x2c45, - 0xd862, 0x3095, - 0xd863, 0x5b53, - 0xd864, 0x2372, - 0xd865, 0x3012, - 0xd866, 0x13c2, - 0xd867, 0x5cc3, - 0xd868, 0x2712, - 0xd869, 0x3012, - 0xd86a, 0x1312, - 0xd86b, 0x2b52, + 0xd840, 0x2842, + 0xd841, 0x3022, + 0xd842, 0x1002, + 0xd843, 0x26e2, + 0xd844, 0x3022, + 0xd845, 0x1002, + 0xd846, 0x2fa4, + 0xd847, 0x3dc4, + 0xd848, 0x6624, + 0xd849, 0x2e8b, + 0xd84a, 0x303b, + 0xd84b, 0x56b3, + 0xd84c, 0x03c6, + 0xd84d, 0x866b, + 0xd84e, 0x400c, + 0xd84f, 0x2782, + 0xd850, 0x3012, + 0xd851, 0x1002, + 0xd852, 0x2c4b, + 0xd853, 0x309b, + 0xd854, 0x56b3, + 0xd855, 0x03c3, + 0xd856, 0x866b, + 0xd857, 0x400c, + 0xd858, 0x22a2, + 0xd859, 0x3022, + 0xd85a, 0x1002, + 0xd85b, 0x2842, + 0xd85c, 0x3022, + 0xd85d, 0x1002, + 0xd85e, 0x26e2, + 0xd85f, 0x3022, + 0xd860, 0x1002, + 0xd861, 0x2fb4, + 0xd862, 0x3dc4, + 0xd863, 0x6624, + 0xd864, 0x56b3, + 0xd865, 0x03c3, + 0xd866, 0x866b, + 0xd867, 0x401c, + 0xd868, 0x2c45, + 0xd869, 0x3095, + 0xd86a, 0x5b53, + 0xd86b, 0x23d2, 0xd86c, 0x3012, - 0xd86d, 0x1002, - 0xd86e, 0x2742, - 0xd86f, 0x3022, - 0xd870, 0x1002, - 0xd871, 0x2582, - 0xd872, 0x3022, - 0xd873, 0x1002, - 0xd874, 0x2142, - 0xd875, 0x3012, - 0xd876, 0x1002, - 0xd877, 0x628f, - 0xd878, 0x2985, - 0xd879, 0x33a5, - 0xd87a, 0x25e2, - 0xd87b, 0x3022, - 0xd87c, 0x1002, - 0xd87d, 0x5653, - 0xd87e, 0x03d2, - 0xd87f, 0x401e, - 0xd880, 0x6f72, - 0xd881, 0x1002, - 0xd882, 0x628f, - 0xd883, 0x2304, - 0xd884, 0x3c84, - 0xd885, 0x6436, - 0xd886, 0xdff4, - 0xd887, 0x6436, - 0xd888, 0x2ff5, - 0xd889, 0x3005, - 0xd88a, 0x8656, - 0xd88b, 0xdfba, - 0xd88c, 0x56a3, - 0xd88d, 0xd05a, - 0xd88e, 0x2972, - 0xd88f, 0x3012, - 0xd890, 0x1392, - 0xd891, 0xd05a, - 0xd892, 0x56a3, - 0xd893, 0xdfba, - 0xd894, 0x0383, - 0xd895, 0x6f72, - 0xd896, 0x1002, - 0xd897, 0x2b45, - 0xd898, 0x3005, - 0xd899, 0x4178, - 0xd89a, 0x5653, - 0xd89b, 0x0384, - 0xd89c, 0x2a62, - 0xd89d, 0x3012, - 0xd89e, 0x1002, - 0xd89f, 0x2f05, - 0xd8a0, 0x3005, - 0xd8a1, 0x41c8, - 0xd8a2, 0x5653, - 0xd8a3, 0x0382, - 0xd8a4, 0x0002, - 0xd8a5, 0x4218, - 0xd8a6, 0x2474, - 0xd8a7, 0x3c84, - 0xd8a8, 0x6437, - 0xd8a9, 0xdff4, - 0xd8aa, 0x6437, - 0xd8ab, 0x2ff5, - 0xd8ac, 0x3c05, - 0xd8ad, 0x8757, - 0xd8ae, 0xb888, - 0xd8af, 0x9787, - 0xd8b0, 0xdff4, - 0xd8b1, 0x6724, - 0xd8b2, 0x866a, - 0xd8b3, 0x6f72, - 0xd8b4, 0x1002, - 0xd8b5, 0x2641, - 0xd8b6, 0x3021, - 0xd8b7, 0x1001, - 0xd8b8, 0xc620, - 0xd8b9, 0x0000, - 0xd8ba, 0xc621, - 0xd8bb, 0x0000, - 0xd8bc, 0xc622, - 0xd8bd, 0x00ce, - 0xd8be, 0xc623, - 0xd8bf, 0x007f, - 0xd8c0, 0xc624, - 0xd8c1, 0x0032, - 0xd8c2, 0xc625, - 0xd8c3, 0x0000, - 0xd8c4, 0xc627, - 0xd8c5, 0x0000, - 0xd8c6, 0xc628, - 0xd8c7, 0x0000, - 0xd8c8, 0xc62c, + 0xd86d, 0x13c2, + 0xd86e, 0x5cc3, + 0xd86f, 0x2782, + 0xd870, 0x3012, + 0xd871, 0x1312, + 0xd872, 0x2b22, + 0xd873, 0x3012, + 0xd874, 0x1002, + 0xd875, 0x2842, + 0xd876, 0x3022, + 0xd877, 0x1002, + 0xd878, 0x2622, + 0xd879, 0x3022, + 0xd87a, 0x1002, + 0xd87b, 0x21a2, + 0xd87c, 0x3012, + 0xd87d, 0x1002, + 0xd87e, 0x628f, + 0xd87f, 0x2985, + 0xd880, 0x33a5, + 0xd881, 0x26e2, + 0xd882, 0x3022, + 0xd883, 0x1002, + 0xd884, 0x5653, + 0xd885, 0x03d2, + 0xd886, 0x401e, + 0xd887, 0x6f72, + 0xd888, 0x1002, + 0xd889, 0x628f, + 0xd88a, 0x2304, + 0xd88b, 0x3c84, + 0xd88c, 0x6436, + 0xd88d, 0xdff4, + 0xd88e, 0x6436, + 0xd88f, 0x2ff5, + 0xd890, 0x3005, + 0xd891, 0x8656, + 0xd892, 0xdfba, + 0xd893, 0x56a3, + 0xd894, 0xd05a, + 0xd895, 0x29e2, + 0xd896, 0x3012, + 0xd897, 0x1392, + 0xd898, 0xd05a, + 0xd899, 0x56a3, + 0xd89a, 0xdfba, + 0xd89b, 0x0383, + 0xd89c, 0x6f72, + 0xd89d, 0x1002, + 0xd89e, 0x2a64, + 0xd89f, 0x3014, + 0xd8a0, 0x2005, + 0xd8a1, 0x3d75, + 0xd8a2, 0xc451, + 0xd8a3, 0x29a2, + 0xd8a4, 0x3022, + 0xd8a5, 0x1002, + 0xd8a6, 0x178c, + 0xd8a7, 0x1898, + 0xd8a8, 0x19a4, + 0xd8a9, 0x1ab0, + 0xd8aa, 0x1bbc, + 0xd8ab, 0x1cc8, + 0xd8ac, 0x1dd3, + 0xd8ad, 0x1ede, + 0xd8ae, 0x1fe9, + 0xd8af, 0x20f4, + 0xd8b0, 0x21ff, + 0xd8b1, 0x0000, + 0xd8b2, 0x2741, + 0xd8b3, 0x3021, + 0xd8b4, 0x1001, + 0xd8b5, 0xc620, + 0xd8b6, 0x0000, + 0xd8b7, 0xc621, + 0xd8b8, 0x0000, + 0xd8b9, 0xc622, + 0xd8ba, 0x00e2, + 0xd8bb, 0xc623, + 0xd8bc, 0x007f, + 0xd8bd, 0xc624, + 0xd8be, 0x00ce, + 0xd8bf, 0xc625, + 0xd8c0, 0x0000, + 0xd8c1, 0xc627, + 0xd8c2, 0x0000, + 0xd8c3, 0xc628, + 0xd8c4, 0x0000, + 0xd8c5, 0xc90a, + 0xd8c6, 0x3a7c, + 0xd8c7, 0xc62c, + 0xd8c8, 0x0000, 0xd8c9, 0x0000, - 0xd8ca, 0x0000, - 0xd8cb, 0x2641, - 0xd8cc, 0x3021, - 0xd8cd, 0x1001, - 0xd8ce, 0xc502, - 0xd8cf, 0x53ac, - 0xd8d0, 0xc503, - 0xd8d1, 0x2cd3, - 0xd8d2, 0xc600, - 0xd8d3, 0x2a6e, - 0xd8d4, 0xc601, - 0xd8d5, 0x2a2c, - 0xd8d6, 0xc605, - 0xd8d7, 0x5557, - 0xd8d8, 0xc60c, - 0xd8d9, 0x5400, - 0xd8da, 0xc710, - 0xd8db, 0x0700, - 0xd8dc, 0xc711, - 0xd8dd, 0x0f06, - 0xd8de, 0xc718, - 0xd8df, 0x0700, - 0xd8e0, 0xc719, - 0xd8e1, 0x0f06, - 0xd8e2, 0xc720, - 0xd8e3, 0x4700, - 0xd8e4, 0xc721, - 0xd8e5, 0x0f06, - 0xd8e6, 0xc728, - 0xd8e7, 0x0700, - 0xd8e8, 0xc729, - 0xd8e9, 0x1207, - 0xd8ea, 0xc801, - 0xd8eb, 0x7f50, - 0xd8ec, 0xc802, - 0xd8ed, 0x7760, - 0xd8ee, 0xc803, - 0xd8ef, 0x7fce, - 0xd8f0, 0xc804, - 0xd8f1, 0x520e, - 0xd8f2, 0xc805, - 0xd8f3, 0x5c11, - 0xd8f4, 0xc806, - 0xd8f5, 0x3c51, - 0xd8f6, 0xc807, - 0xd8f7, 0x4061, - 0xd8f8, 0xc808, - 0xd8f9, 0x49c1, - 0xd8fa, 0xc809, - 0xd8fb, 0x3840, - 0xd8fc, 0xc80a, - 0xd8fd, 0x0000, - 0xd8fe, 0xc821, - 0xd8ff, 0x0002, - 0xd900, 0xc822, - 0xd901, 0x0046, - 0xd902, 0xc844, - 0xd903, 0x182f, - 0xd904, 0xc013, - 0xd905, 0xf341, - 0xd906, 0xc084, - 0xd907, 0x0030, - 0xd908, 0xc904, - 0xd909, 0x1401, - 0xd90a, 0xcb0c, - 0xd90b, 0x0004, - 0xd90c, 0xcb0e, - 0xd90d, 0xa00a, - 0xd90e, 0xcb0f, - 0xd90f, 0xc0c0, - 0xd910, 0xcb10, - 0xd911, 0xc0c0, - 0xd912, 0xcb11, - 0xd913, 0x00a0, - 0xd914, 0xcb12, - 0xd915, 0x0007, - 0xd916, 0xc241, - 0xd917, 0xa000, - 0xd918, 0xc243, - 0xd919, 0x7fe0, - 0xd91a, 0xc604, - 0xd91b, 0x000e, - 0xd91c, 0xc609, - 0xd91d, 0x00f5, - 0xd91e, 0xc611, - 0xd91f, 0x000e, - 0xd920, 0xc660, - 0xd921, 0x9600, - 0xd922, 0xc687, - 0xd923, 0x0004, - 0xd924, 0xc60a, - 0xd925, 0x04f5, - 0xd926, 0x0000, - 0xd927, 0x2641, - 0xd928, 0x3021, - 0xd929, 0x1001, - 0xd92a, 0xc620, - 0xd92b, 0x14e5, - 0xd92c, 0xc621, - 0xd92d, 0xc53d, - 0xd92e, 0xc622, - 0xd92f, 0x3cbe, - 0xd930, 0xc623, - 0xd931, 0x4452, - 0xd932, 0xc624, - 0xd933, 0xc5c5, - 0xd934, 0xc625, - 0xd935, 0xe01e, - 0xd936, 0xc627, - 0xd937, 0x0000, - 0xd938, 0xc628, - 0xd939, 0x0000, - 0xd93a, 0xc62c, - 0xd93b, 0x0000, + 0xd8ca, 0x2741, + 0xd8cb, 0x3021, + 0xd8cc, 0x1001, + 0xd8cd, 0xc502, + 0xd8ce, 0x53ac, + 0xd8cf, 0xc503, + 0xd8d0, 0x2cd3, + 0xd8d1, 0xc600, + 0xd8d2, 0x2a6e, + 0xd8d3, 0xc601, + 0xd8d4, 0x2a2c, + 0xd8d5, 0xc605, + 0xd8d6, 0x5557, + 0xd8d7, 0xc60c, + 0xd8d8, 0x5400, + 0xd8d9, 0xc710, + 0xd8da, 0x0700, + 0xd8db, 0xc711, + 0xd8dc, 0x0f06, + 0xd8dd, 0xc718, + 0xd8de, 0x700, + 0xd8df, 0xc719, + 0xd8e0, 0x0f06, + 0xd8e1, 0xc720, + 0xd8e2, 0x4700, + 0xd8e3, 0xc721, + 0xd8e4, 0x0f06, + 0xd8e5, 0xc728, + 0xd8e6, 0x0700, + 0xd8e7, 0xc729, + 0xd8e8, 0x1207, + 0xd8e9, 0xc801, + 0xd8ea, 0x7f50, + 0xd8eb, 0xc802, + 0xd8ec, 0x7760, + 0xd8ed, 0xc803, + 0xd8ee, 0x7fce, + 0xd8ef, 0xc804, + 0xd8f0, 0x520e, + 0xd8f1, 0xc805, + 0xd8f2, 0x5c11, + 0xd8f3, 0xc806, + 0xd8f4, 0x3c51, + 0xd8f5, 0xc807, + 0xd8f6, 0x4061, + 0xd8f7, 0xc808, + 0xd8f8, 0x49c1, + 0xd8f9, 0xc809, + 0xd8fa, 0x3840, + 0xd8fb, 0xc80a, + 0xd8fc, 0x0000, + 0xd8fd, 0xc821, + 0xd8fe, 0x0002, + 0xd8ff, 0xc822, + 0xd900, 0x0046, + 0xd901, 0xc844, + 0xd902, 0x182f, + 0xd903, 0xc849, + 0xd904, 0x0400, + 0xd905, 0xc84a, + 0xd906, 0x0002, + 0xd907, 0xc013, + 0xd908, 0xf341, + 0xd909, 0xc084, + 0xd90a, 0x0030, + 0xd90b, 0xc904, + 0xd90c, 0x1401, + 0xd90d, 0xcb0c, + 0xd90e, 0x0004, + 0xd90f, 0xcb0e, + 0xd910, 0xa00a, + 0xd911, 0xcb0f, + 0xd912, 0xc0c0, + 0xd913, 0xcb10, + 0xd914, 0xc0c0, + 0xd915, 0xcb11, + 0xd916, 0x00a0, + 0xd917, 0xcb12, + 0xd918, 0x0007, + 0xd919, 0xc241, + 0xd91a, 0xa000, + 0xd91b, 0xc243, + 0xd91c, 0x7fe0, + 0xd91d, 0xc604, + 0xd91e, 0x000e, + 0xd91f, 0xc609, + 0xd920, 0x00f5, + 0xd921, 0xc611, + 0xd922, 0x000e, + 0xd923, 0xc660, + 0xd924, 0x9600, + 0xd925, 0xc687, + 0xd926, 0x0004, + 0xd927, 0xc60a, + 0xd928, 0x04f5, + 0xd929, 0x0000, + 0xd92a, 0x2741, + 0xd92b, 0x3021, + 0xd92c, 0x1001, + 0xd92d, 0xc620, + 0xd92e, 0x14e5, + 0xd92f, 0xc621, + 0xd930, 0xc53d, + 0xd931, 0xc622, + 0xd932, 0x3cbe, + 0xd933, 0xc623, + 0xd934, 0x4452, + 0xd935, 0xc624, + 0xd936, 0xc5c5, + 0xd937, 0xc625, + 0xd938, 0xe01e, + 0xd939, 0xc627, + 0xd93a, 0x0000, + 0xd93b, 0xc628, 0xd93c, 0x0000, - 0xd93d, 0x2b84, - 0xd93e, 0x3c74, - 0xd93f, 0x6435, - 0xd940, 0xdff4, - 0xd941, 0x6435, - 0xd942, 0x2806, - 0xd943, 0x3006, - 0xd944, 0x8565, - 0xd945, 0x2b24, - 0xd946, 0x3c24, - 0xd947, 0x6436, - 0xd948, 0x1002, - 0xd949, 0x2b24, - 0xd94a, 0x3c24, - 0xd94b, 0x6436, - 0xd94c, 0x4045, - 0xd94d, 0x8656, - 0xd94e, 0x5663, - 0xd94f, 0x0302, - 0xd950, 0x401e, - 0xd951, 0x1002, - 0xd952, 0x2807, - 0xd953, 0x31a7, - 0xd954, 0x20c4, - 0xd955, 0x3c24, - 0xd956, 0x6724, - 0xd957, 0x1002, - 0xd958, 0x2807, - 0xd959, 0x3187, - 0xd95a, 0x20c4, - 0xd95b, 0x3c24, - 0xd95c, 0x6724, - 0xd95d, 0x1002, - 0xd95e, 0x24f4, - 0xd95f, 0x3c64, - 0xd960, 0x6436, - 0xd961, 0xdff4, - 0xd962, 0x6436, - 0xd963, 0x1002, - 0xd964, 0x2006, - 0xd965, 0x3d76, - 0xd966, 0xc161, - 0xd967, 0x6134, - 0xd968, 0x6135, - 0xd969, 0x5443, - 0xd96a, 0x0303, - 0xd96b, 0x6524, - 0xd96c, 0x00fb, + 0xd93d, 0xc62c, + 0xd93e, 0x0000, + 0xd93f, 0xc90a, + 0xd940, 0x3a7c, + 0xd941, 0x0000, + 0xd942, 0x2b84, + 0xd943, 0x3c74, + 0xd944, 0x6435, + 0xd945, 0xdff4, + 0xd946, 0x6435, + 0xd947, 0x2806, + 0xd948, 0x3006, + 0xd949, 0x8565, + 0xd94a, 0x2b24, + 0xd94b, 0x3c24, + 0xd94c, 0x6436, + 0xd94d, 0x1002, + 0xd94e, 0x2b24, + 0xd94f, 0x3c24, + 0xd950, 0x6436, + 0xd951, 0x4045, + 0xd952, 0x8656, + 0xd953, 0x5663, + 0xd954, 0x0302, + 0xd955, 0x401e, + 0xd956, 0x1002, + 0xd957, 0x2807, + 0xd958, 0x31a7, + 0xd959, 0x20c4, + 0xd95a, 0x3c24, + 0xd95b, 0x6724, + 0xd95c, 0x2ff7, + 0xd95d, 0x30f7, + 0xd95e, 0x20c4, + 0xd95f, 0x3c04, + 0xd960, 0x6724, + 0xd961, 0x1002, + 0xd962, 0x2807, + 0xd963, 0x3187, + 0xd964, 0x20c4, + 0xd965, 0x3c24, + 0xd966, 0x6724, + 0xd967, 0x2fe4, + 0xd968, 0x3dc4, + 0xd969, 0x6437, + 0xd96a, 0x20c4, + 0xd96b, 0x3c04, + 0xd96c, 0x6724, 0xd96d, 0x1002, - 0xd96e, 0x20d4, - 0xd96f, 0x3c24, - 0xd970, 0x2025, - 0xd971, 0x3005, - 0xd972, 0x6524, + 0xd96e, 0x24f4, + 0xd96f, 0x3c64, + 0xd970, 0x6436, + 0xd971, 0xdff4, + 0xd972, 0x6436, 0xd973, 0x1002, - 0xd974, 0xd019, - 0xd975, 0x2104, - 0xd976, 0x3c24, - 0xd977, 0x2105, - 0xd978, 0x3805, - 0xd979, 0x6524, - 0xd97a, 0xdff4, - 0xd97b, 0x4005, - 0xd97c, 0x6524, - 0xd97d, 0x2e8d, - 0xd97e, 0x303d, - 0xd97f, 0x2408, - 0xd980, 0x35d8, - 0xd981, 0x5dd3, - 0xd982, 0x0307, - 0xd983, 0x8887, - 0xd984, 0x63a7, - 0xd985, 0x8887, - 0xd986, 0x63a7, - 0xd987, 0xdffd, - 0xd988, 0x00f9, - 0xd989, 0x1002, - 0xd98a, 0x0000, + 0xd974, 0x2006, + 0xd975, 0x3d76, + 0xd976, 0xc161, + 0xd977, 0x6134, + 0xd978, 0x6135, + 0xd979, 0x5443, + 0xd97a, 0x0303, + 0xd97b, 0x6524, + 0xd97c, 0x00fb, + 0xd97d, 0x1002, + 0xd97e, 0x20d4, + 0xd97f, 0x3c24, + 0xd980, 0x2025, + 0xd981, 0x3005, + 0xd982, 0x6524, + 0xd983, 0x1002, + 0xd984, 0xd019, + 0xd985, 0x2104, + 0xd986, 0x3c24, + 0xd987, 0x2105, + 0xd988, 0x3805, + 0xd989, 0x6524, + 0xd98a, 0xdff4, + 0xd98b, 0x4005, + 0xd98c, 0x6524, + 0xd98d, 0x2e8d, + 0xd98e, 0x303d, + 0xd98f, 0x2408, + 0xd990, 0x35d8, + 0xd991, 0x5dd3, + 0xd992, 0x0307, + 0xd993, 0x8887, + 0xd994, 0x63a7, + 0xd995, 0x8887, + 0xd996, 0x63a7, + 0xd997, 0xdffd, + 0xd998, 0x00f9, + 0xd999, 0x1002, + 0xd99a, 0x866a, + 0xd99b, 0x6138, + 0xd99c, 0x5883, + 0xd99d, 0x2aa2, + 0xd99e, 0x3022, + 0xd99f, 0x1302, + 0xd9a0, 0x2ff7, + 0xd9a1, 0x3007, + 0xd9a2, 0x8785, + 0xd9a3, 0xb887, + 0xd9a4, 0x8786, + 0xd9a5, 0xb8c6, + 0xd9a6, 0x5a53, + 0xd9a7, 0x29b2, + 0xd9a8, 0x3022, + 0xd9a9, 0x13c2, + 0xd9aa, 0x2474, + 0xd9ab, 0x3c84, + 0xd9ac, 0x64d7, + 0xd9ad, 0x64d7, + 0xd9ae, 0x2ff5, + 0xd9af, 0x3c05, + 0xd9b0, 0x8757, + 0xd9b1, 0xb886, + 0xd9b2, 0x9767, + 0xd9b3, 0x67c4, + 0xd9b4, 0x6f72, + 0xd9b5, 0x1002, + 0xd9b6, 0x0000, }; int i, err; @@ -1956,10 +2000,14 @@ static struct reg_val ael2020_reset_regs { MDIO_DEV_PMA_PMD, 0xcd40, 0xffff, 0x0001 }, + { MDIO_DEV_PMA_PMD, 0xca12, 0xffff, 0x0100 }, + { MDIO_DEV_PMA_PMD, 0xca22, 0xffff, 0x0100 }, + { MDIO_DEV_PMA_PMD, 0xca42, 0xffff, 0x0100 }, { MDIO_DEV_PMA_PMD, 0xff02, 0xffff, 0x0023 }, { MDIO_DEV_PMA_PMD, 0xff03, 0xffff, 0x0000 }, { MDIO_DEV_PMA_PMD, 0xff04, 0xffff, 0x0000 }, + { MDIO_DEV_PMA_PMD, 0xc20d, 0xffff, 0x0002 }, /* end */ { 0, 0, 0, 0 } }; @@ -1987,6 +2035,7 @@ static int ael2020_reset(struct cphy *ph err = set_phy_regs(phy, ael2020_reset_regs); if (err) return err; + msleep(100); /* determine module type and perform appropriate initialization */ err = ael2020_get_module_type(phy, 0); @@ -2091,6 +2140,8 @@ int t3_ael2020_phy_prep(pinfo_t *pinfo, err = set_phy_regs(phy, ael2020_reset_regs); if (err) return err; + msleep(100); + err = ael2020_get_module_type(phy, 0); if (err >= 0) phy->modtype = err; From owner-svn-src-head@FreeBSD.ORG Wed Mar 31 00:22:58 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 93CC2106564A; Wed, 31 Mar 2010 00:22:58 +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 8389B8FC18; Wed, 31 Mar 2010 00:22:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2V0Mwcs039125; Wed, 31 Mar 2010 00:22:58 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2V0MwJO039123; Wed, 31 Mar 2010 00:22:58 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201003310022.o2V0MwJO039123@svn.freebsd.org> From: Navdeep Parhar Date: Wed, 31 Mar 2010 00:22: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: r205946 - head/sys/dev/cxgb X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Mar 2010 00:22:58 -0000 Author: np Date: Wed Mar 31 00:22:58 2010 New Revision: 205946 URL: http://svn.freebsd.org/changeset/base/205946 Log: Do not attempt to retrieve interrupt information before it is available. MFC after: 3 days Modified: head/sys/dev/cxgb/cxgb_main.c Modified: head/sys/dev/cxgb/cxgb_main.c ============================================================================== --- head/sys/dev/cxgb/cxgb_main.c Wed Mar 31 00:21:56 2010 (r205945) +++ head/sys/dev/cxgb/cxgb_main.c Wed Mar 31 00:22:58 2010 (r205946) @@ -2715,7 +2715,9 @@ cxgb_extension_ioctl(struct cdev *dev, u t->cong_thres = q->cong_thres; t->qnum = i; - if (sc->flags & USING_MSIX) + if ((sc->flags & FULL_INIT_DONE) == 0) + t->vector = 0; + else if (sc->flags & USING_MSIX) t->vector = rman_get_start(sc->msix_irq_res[i]); else t->vector = rman_get_start(sc->irq_res); From owner-svn-src-head@FreeBSD.ORG Wed Mar 31 00:24:44 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F0A6C1065670; Wed, 31 Mar 2010 00:24:44 +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 C6E408FC1D; Wed, 31 Mar 2010 00:24:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2V0Oiqn039523; Wed, 31 Mar 2010 00:24:44 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2V0Oin8039521; Wed, 31 Mar 2010 00:24:44 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201003310024.o2V0Oin8039521@svn.freebsd.org> From: Navdeep Parhar Date: Wed, 31 Mar 2010 00:24: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: r205947 - head/sys/dev/cxgb X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Mar 2010 00:24:45 -0000 Author: np Date: Wed Mar 31 00:24:44 2010 New Revision: 205947 URL: http://svn.freebsd.org/changeset/base/205947 Log: Fix build with "nooptions INET" Requested by: bz MFC after: 3 days Modified: head/sys/dev/cxgb/cxgb_sge.c Modified: head/sys/dev/cxgb/cxgb_sge.c ============================================================================== --- head/sys/dev/cxgb/cxgb_sge.c Wed Mar 31 00:22:58 2010 (r205946) +++ head/sys/dev/cxgb/cxgb_sge.c Wed Mar 31 00:24:44 2010 (r205947) @@ -30,6 +30,8 @@ POSSIBILITY OF SUCH DAMAGE. #include __FBSDID("$FreeBSD$"); +#include "opt_inet.h" + #include #include #include @@ -2060,7 +2062,9 @@ t3_free_qset(adapter_t *sc, struct sge_q MTX_DESTROY(&q->rspq.lock); } +#ifdef INET tcp_lro_free(&q->lro.ctrl); +#endif bzero(q, sizeof(*q)); } @@ -2647,11 +2651,13 @@ 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 ret = tcp_lro_init(&q->lro.ctrl); if (ret) { printf("error %d from tcp_lro_init\n", ret); goto err; } +#endif q->lro.ctrl.ifp = pi->ifp; mtx_lock_spin(&sc->sge.reg_lock); @@ -3059,8 +3065,11 @@ process_responses(adapter_t *adap, struc */ skip_lro = __predict_false(qs->port->ifp != m->m_pkthdr.rcvif); - if (lro_enabled && lro_ctrl->lro_cnt && !skip_lro && - (tcp_lro_rx(lro_ctrl, m, 0) == 0)) { + 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 { /* @@ -3081,12 +3090,14 @@ process_responses(adapter_t *adap, struc deliver_partial_bundle(&adap->tdev, rspq, offload_mbufs, ngathered); +#ifdef INET /* Flush LRO */ while (!SLIST_EMPTY(&lro_ctrl->lro_active)) { struct lro_entry *queued = SLIST_FIRST(&lro_ctrl->lro_active); SLIST_REMOVE_HEAD(&lro_ctrl->lro_active, next); tcp_lro_flush(lro_ctrl, queued); } +#endif if (sleeping) check_ring_db(adap, qs, sleeping); From owner-svn-src-head@FreeBSD.ORG Wed Mar 31 00:26:02 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C6BB7106564A; Wed, 31 Mar 2010 00:26:02 +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 B66758FC15; Wed, 31 Mar 2010 00:26:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2V0Q2EY039858; Wed, 31 Mar 2010 00:26:02 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2V0Q2rr039854; Wed, 31 Mar 2010 00:26:02 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201003310026.o2V0Q2rr039854@svn.freebsd.org> From: Navdeep Parhar Date: Wed, 31 Mar 2010 00:26: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: r205948 - head/sys/dev/cxgb X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Mar 2010 00:26:03 -0000 Author: np Date: Wed Mar 31 00:26:02 2010 New Revision: 205948 URL: http://svn.freebsd.org/changeset/base/205948 Log: Fix tx drop statistics. MFC after: 3 days Modified: head/sys/dev/cxgb/cxgb_adapter.h head/sys/dev/cxgb/cxgb_main.c head/sys/dev/cxgb/cxgb_sge.c Modified: head/sys/dev/cxgb/cxgb_adapter.h ============================================================================== --- head/sys/dev/cxgb/cxgb_adapter.h Wed Mar 31 00:24:44 2010 (r205947) +++ head/sys/dev/cxgb/cxgb_adapter.h Wed Mar 31 00:26:02 2010 (r205948) @@ -248,7 +248,6 @@ struct sge_txq { struct callout txq_timer; struct callout txq_watchdog; uint64_t txq_coalesced; - uint32_t txq_drops; uint32_t txq_skipped; uint32_t txq_enqueued; uint32_t txq_dump_start; Modified: head/sys/dev/cxgb/cxgb_main.c ============================================================================== --- head/sys/dev/cxgb/cxgb_main.c Wed Mar 31 00:24:44 2010 (r205947) +++ head/sys/dev/cxgb/cxgb_main.c Wed Mar 31 00:26:02 2010 (r205948) @@ -2423,6 +2423,7 @@ cxgb_tick_handler(void *arg, int count) struct ifnet *ifp = pi->ifp; struct cmac *mac = &pi->mac; struct mac_stats *mstats = &mac->stats; + int drops, j; if (!isset(&sc->open_device_map, pi->port_id)) continue; @@ -2431,34 +2432,20 @@ cxgb_tick_handler(void *arg, int count) t3_mac_update_stats(mac); PORT_UNLOCK(pi); - ifp->if_opackets = - mstats->tx_frames_64 + - mstats->tx_frames_65_127 + - mstats->tx_frames_128_255 + - mstats->tx_frames_256_511 + - mstats->tx_frames_512_1023 + - mstats->tx_frames_1024_1518 + - mstats->tx_frames_1519_max; - - ifp->if_ipackets = - mstats->rx_frames_64 + - mstats->rx_frames_65_127 + - mstats->rx_frames_128_255 + - mstats->rx_frames_256_511 + - mstats->rx_frames_512_1023 + - mstats->rx_frames_1024_1518 + - mstats->rx_frames_1519_max; - + ifp->if_opackets = mstats->tx_frames; + ifp->if_ipackets = mstats->rx_frames; ifp->if_obytes = mstats->tx_octets; ifp->if_ibytes = mstats->rx_octets; ifp->if_omcasts = mstats->tx_mcast_frames; ifp->if_imcasts = mstats->rx_mcast_frames; - - ifp->if_collisions = - mstats->tx_total_collisions; - + ifp->if_collisions = mstats->tx_total_collisions; ifp->if_iqdrops = mstats->rx_cong_drops; - + + drops = 0; + for (j = pi->first_qset; j < pi->first_qset + pi->nqsets; j++) + drops += sc->sge.qs[j].txq[TXQ_ETH].txq_mr->br_drops; + ifp->if_snd.ifq_drops = drops; + ifp->if_oerrors = mstats->tx_excess_collisions + mstats->tx_underrun + Modified: head/sys/dev/cxgb/cxgb_sge.c ============================================================================== --- head/sys/dev/cxgb/cxgb_sge.c Wed Mar 31 00:24:44 2010 (r205947) +++ head/sys/dev/cxgb/cxgb_sge.c Wed Mar 31 00:26:02 2010 (r205948) @@ -3599,10 +3599,9 @@ t3_add_configured_sysctls(adapter_t *sc) CTLTYPE_STRING | CTLFLAG_RD, &qs->rspq, 0, t3_dump_rspq, "A", "dump of the response queue"); - - SYSCTL_ADD_INT(ctx, txqpoidlist, OID_AUTO, "dropped", - CTLFLAG_RD, &qs->txq[TXQ_ETH].txq_drops, - 0, "#tunneled packets dropped"); + SYSCTL_ADD_QUAD(ctx, txqpoidlist, OID_AUTO, "dropped", + CTLFLAG_RD, &qs->txq[TXQ_ETH].txq_mr->br_drops, + "#tunneled packets dropped"); SYSCTL_ADD_INT(ctx, txqpoidlist, OID_AUTO, "sendqlen", CTLFLAG_RD, &qs->txq[TXQ_ETH].sendq.qlen, 0, "#tunneled packets waiting to be sent"); From owner-svn-src-head@FreeBSD.ORG Wed Mar 31 00:26:36 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 210ED106566C; Wed, 31 Mar 2010 00:26: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 10DA88FC08; Wed, 31 Mar 2010 00:26:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2V0QZMA040028; Wed, 31 Mar 2010 00:26:35 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2V0QZcS040026; Wed, 31 Mar 2010 00:26:35 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201003310026.o2V0QZcS040026@svn.freebsd.org> From: Navdeep Parhar Date: Wed, 31 Mar 2010 00:26: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: r205949 - head/sys/dev/cxgb X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Mar 2010 00:26:36 -0000 Author: np Date: Wed Mar 31 00:26:35 2010 New Revision: 205949 URL: http://svn.freebsd.org/changeset/base/205949 Log: Fix signed/unsigned mix-up that allowed txq->in_use to grow beyond txq->size. Modified: head/sys/dev/cxgb/cxgb_sge.c Modified: head/sys/dev/cxgb/cxgb_sge.c ============================================================================== --- head/sys/dev/cxgb/cxgb_sge.c Wed Mar 31 00:26:02 2010 (r205948) +++ head/sys/dev/cxgb/cxgb_sge.c Wed Mar 31 00:26:35 2010 (r205949) @@ -1638,12 +1638,9 @@ cxgb_start_locked(struct sge_qset *qs) { struct mbuf *m_head = NULL; struct sge_txq *txq = &qs->txq[TXQ_ETH]; - int avail, txmax; int in_use_init = txq->in_use; struct port_info *pi = qs->port; struct ifnet *ifp = pi->ifp; - avail = txq->size - txq->in_use - 4; - txmax = min(TX_START_MAX_DESC, avail); if (qs->qs_flags & (QS_FLUSHING|QS_TIMEOUT)) reclaim_completed_tx(qs, 0, TXQ_ETH); @@ -1653,12 +1650,14 @@ cxgb_start_locked(struct sge_qset *qs) return; } TXQ_LOCK_ASSERT(qs); - while ((txq->in_use - in_use_init < txmax) && - !TXQ_RING_EMPTY(qs) && - (ifp->if_drv_flags & IFF_DRV_RUNNING) && + while ((txq->in_use - in_use_init < TX_START_MAX_DESC) && + !TXQ_RING_EMPTY(qs) && (ifp->if_drv_flags & IFF_DRV_RUNNING) && pi->link_config.link_ok) { reclaim_completed_tx(qs, cxgb_tx_reclaim_threshold, TXQ_ETH); + if (txq->size - txq->in_use <= TX_MAX_DESC) + break; + if ((m_head = cxgb_dequeue(qs)) == NULL) break; /* @@ -1697,7 +1696,7 @@ cxgb_transmit_locked(struct ifnet *ifp, * - there is space in hardware transmit queue */ if (check_pkt_coalesce(qs) == 0 && - !TXQ_RING_NEEDS_ENQUEUE(qs) && avail > 4) { + !TXQ_RING_NEEDS_ENQUEUE(qs) && avail > TX_MAX_DESC) { if (t3_encap(qs, &m)) { if (m != NULL && (error = drbr_enqueue(ifp, br, m)) != 0) From owner-svn-src-head@FreeBSD.ORG Wed Mar 31 00:27:50 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 419741065673; Wed, 31 Mar 2010 00:27:50 +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 2FFDF8FC13; Wed, 31 Mar 2010 00:27:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2V0RoAm040329; Wed, 31 Mar 2010 00:27:50 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2V0RoFn040323; Wed, 31 Mar 2010 00:27:50 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201003310027.o2V0RoFn040323@svn.freebsd.org> From: Navdeep Parhar Date: Wed, 31 Mar 2010 00:27: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: r205950 - in head/sys/dev/cxgb: . common X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Mar 2010 00:27:50 -0000 Author: np Date: Wed Mar 31 00:27:49 2010 New Revision: 205950 URL: http://svn.freebsd.org/changeset/base/205950 Log: Multiple fixes related to queue set sizing and resources: - Only the tunnelq (TXQ_ETH) requires a buf_ring, an ifq, and the watchdog/timer callouts. Do not allocate these for the other tx queues. - Use 16k jumbo clusters only on offload capable cards by default. - Do not allocate a full tx ring for the offload queue if the card is not offload capable. - Slightly better freelist size calculation. - Fix nmbjumbo4 typo, remove unneeded global variables. MFC after: 3 days Modified: head/sys/dev/cxgb/common/cxgb_common.h head/sys/dev/cxgb/common/cxgb_t3_hw.c head/sys/dev/cxgb/cxgb_adapter.h head/sys/dev/cxgb/cxgb_main.c head/sys/dev/cxgb/cxgb_sge.c Modified: head/sys/dev/cxgb/common/cxgb_common.h ============================================================================== --- head/sys/dev/cxgb/common/cxgb_common.h Wed Mar 31 00:26:35 2010 (r205949) +++ head/sys/dev/cxgb/common/cxgb_common.h Wed Mar 31 00:27:49 2010 (r205950) @@ -314,6 +314,7 @@ struct qset_params { / unsigned int rspq_size; /* # of entries in response queue */ unsigned int fl_size; /* # of entries in regular free list */ unsigned int jumbo_size; /* # of entries in jumbo free list */ + unsigned int jumbo_buf_size; /* buffer size of jumbo entry */ unsigned int txq_size[SGE_TXQ_PER_SET]; /* Tx queue sizes */ unsigned int cong_thres; /* FL congestion threshold */ unsigned int vector; /* Interrupt (line or vector) number */ Modified: head/sys/dev/cxgb/common/cxgb_t3_hw.c ============================================================================== --- head/sys/dev/cxgb/common/cxgb_t3_hw.c Wed Mar 31 00:26:35 2010 (r205949) +++ head/sys/dev/cxgb/common/cxgb_t3_hw.c Wed Mar 31 00:27:49 2010 (r205950) @@ -4467,8 +4467,6 @@ int __devinit t3_prep_adapter(adapter_t if (reset && t3_reset_adapter(adapter)) return -1; - t3_sge_prep(adapter, &adapter->params.sge); - if (adapter->params.vpd.mclk) { struct tp_params *p = &adapter->params.tp; @@ -4497,6 +4495,8 @@ int __devinit t3_prep_adapter(adapter_t t3_mc7_size(&adapter->pmtx) && t3_mc7_size(&adapter->cm); + t3_sge_prep(adapter, &adapter->params.sge); + if (is_offload(adapter)) { adapter->params.mc5.nservers = DEFAULT_NSERVERS; /* PR 6487. TOE and filtering are mutually exclusive */ Modified: head/sys/dev/cxgb/cxgb_adapter.h ============================================================================== --- head/sys/dev/cxgb/cxgb_adapter.h Wed Mar 31 00:26:35 2010 (r205949) +++ head/sys/dev/cxgb/cxgb_adapter.h Wed Mar 31 00:27:49 2010 (r205950) @@ -141,6 +141,8 @@ enum { #define JUMBO_Q_SIZE 1024 #define RSPQ_Q_SIZE 1024 #define TX_ETH_Q_SIZE 1024 +#define TX_OFLD_Q_SIZE 1024 +#define TX_CTRL_Q_SIZE 256 enum { TXQ_ETH = 0, TXQ_OFLD = 1, Modified: head/sys/dev/cxgb/cxgb_main.c ============================================================================== --- head/sys/dev/cxgb/cxgb_main.c Wed Mar 31 00:26:35 2010 (r205949) +++ head/sys/dev/cxgb/cxgb_main.c Wed Mar 31 00:27:49 2010 (r205950) @@ -218,9 +218,9 @@ TUNABLE_INT("hw.cxgb.force_fw_update", & SYSCTL_UINT(_hw_cxgb, OID_AUTO, force_fw_update, CTLFLAG_RDTUN, &force_fw_update, 0, "update firmware even if up to date"); -int cxgb_use_16k_clusters = 1; +int cxgb_use_16k_clusters = -1; TUNABLE_INT("hw.cxgb.use_16k_clusters", &cxgb_use_16k_clusters); -SYSCTL_UINT(_hw_cxgb, OID_AUTO, use_16k_clusters, CTLFLAG_RDTUN, +SYSCTL_INT(_hw_cxgb, OID_AUTO, use_16k_clusters, CTLFLAG_RDTUN, &cxgb_use_16k_clusters, 0, "use 16kB clusters for the jumbo queue "); /* Modified: head/sys/dev/cxgb/cxgb_sge.c ============================================================================== --- head/sys/dev/cxgb/cxgb_sge.c Wed Mar 31 00:26:35 2010 (r205949) +++ head/sys/dev/cxgb/cxgb_sge.c Wed Mar 31 00:27:49 2010 (r205950) @@ -119,13 +119,9 @@ SYSCTL_UINT(_hw_cxgb, OID_AUTO, tx_recla * we have an m_ext */ static int recycle_enable = 0; -int cxgb_ext_freed = 0; -int cxgb_ext_inited = 0; -int fl_q_size = 0; -int jumbo_q_size = 0; extern int cxgb_use_16k_clusters; -extern int nmbjumbo4; +extern int nmbjumbop; extern int nmbjumbo9; extern int nmbjumbo16; @@ -532,21 +528,30 @@ t3_sge_err_intr_handler(adapter_t *adapt void t3_sge_prep(adapter_t *adap, struct sge_params *p) { - int i, nqsets; + int i, nqsets, fl_q_size, jumbo_q_size, use_16k, jumbo_buf_size; - nqsets = min(SGE_QSETS, mp_ncpus*4); + nqsets = min(SGE_QSETS / adap->params.nports, mp_ncpus); + nqsets *= adap->params.nports; fl_q_size = min(nmbclusters/(3*nqsets), FL_Q_SIZE); while (!powerof2(fl_q_size)) fl_q_size--; + + use_16k = cxgb_use_16k_clusters != -1 ? cxgb_use_16k_clusters : + is_offload(adap); + #if __FreeBSD_version >= 700111 - if (cxgb_use_16k_clusters) + if (use_16k) { jumbo_q_size = min(nmbjumbo16/(3*nqsets), JUMBO_Q_SIZE); - else + jumbo_buf_size = MJUM16BYTES; + } else { jumbo_q_size = min(nmbjumbo9/(3*nqsets), JUMBO_Q_SIZE); + jumbo_buf_size = MJUM9BYTES; + } #else - jumbo_q_size = min(nmbjumbo4/(3*nqsets), JUMBO_Q_SIZE); + jumbo_q_size = min(nmbjumbop/(3*nqsets), JUMBO_Q_SIZE); + jumbo_buf_size = MJUMPAGESIZE; #endif while (!powerof2(jumbo_q_size)) jumbo_q_size--; @@ -555,8 +560,7 @@ t3_sge_prep(adapter_t *adap, struct sge_ device_printf(adap->dev, "Insufficient clusters and/or jumbo buffers.\n"); - /* XXX Does ETHER_ALIGN need to be accounted for here? */ - p->max_pkt_size = adap->sge.qs[0].fl[1].buf_size - sizeof(struct cpl_rx_data); + p->max_pkt_size = jumbo_buf_size - sizeof(struct cpl_rx_data); for (i = 0; i < SGE_QSETS; ++i) { struct qset_params *q = p->qset + i; @@ -574,9 +578,10 @@ t3_sge_prep(adapter_t *adap, struct sge_ q->rspq_size = RSPQ_Q_SIZE; q->fl_size = fl_q_size; q->jumbo_size = jumbo_q_size; + q->jumbo_buf_size = jumbo_buf_size; q->txq_size[TXQ_ETH] = TX_ETH_Q_SIZE; - q->txq_size[TXQ_OFLD] = 1024; - q->txq_size[TXQ_CTRL] = 256; + q->txq_size[TXQ_OFLD] = is_offload(adap) ? TX_OFLD_Q_SIZE : 16; + q->txq_size[TXQ_CTRL] = TX_CTRL_Q_SIZE; q->cong_thres = 0; } } @@ -2004,15 +2009,13 @@ t3_free_qset(adapter_t *sc, struct sge_q int i; reclaim_completed_tx(q, 0, TXQ_ETH); - for (i = 0; i < SGE_TXQ_PER_SET; i++) { - if (q->txq[i].txq_mr != NULL) - buf_ring_free(q->txq[i].txq_mr, M_DEVBUF); - if (q->txq[i].txq_ifq != NULL) { - ifq_delete(q->txq[i].txq_ifq); - free(q->txq[i].txq_ifq, M_DEVBUF); - } + if (q->txq[TXQ_ETH].txq_mr != NULL) + buf_ring_free(q->txq[TXQ_ETH].txq_mr, M_DEVBUF); + if (q->txq[TXQ_ETH].txq_ifq != NULL) { + ifq_delete(q->txq[TXQ_ETH].txq_ifq); + free(q->txq[TXQ_ETH].txq_ifq, M_DEVBUF); } - + for (i = 0; i < SGE_RXQ_PER_SET; ++i) { if (q->fl[i].desc) { mtx_lock_spin(&sc->sge.reg_lock); @@ -2549,25 +2552,22 @@ t3_sge_alloc_qset(adapter_t *sc, u_int i MTX_INIT(&q->lock, q->namebuf, NULL, MTX_DEF); q->port = pi; - for (i = 0; i < SGE_TXQ_PER_SET; i++) { - - if ((q->txq[i].txq_mr = buf_ring_alloc(cxgb_txq_buf_ring_size, - M_DEVBUF, M_WAITOK, &q->lock)) == NULL) { - device_printf(sc->dev, "failed to allocate mbuf ring\n"); - goto err; - } - if ((q->txq[i].txq_ifq = - malloc(sizeof(struct ifaltq), M_DEVBUF, M_NOWAIT|M_ZERO)) - == NULL) { - device_printf(sc->dev, "failed to allocate ifq\n"); - goto err; - } - ifq_init(q->txq[i].txq_ifq, pi->ifp); - callout_init(&q->txq[i].txq_timer, 1); - callout_init(&q->txq[i].txq_watchdog, 1); - q->txq[i].txq_timer.c_cpu = id % mp_ncpus; - q->txq[i].txq_watchdog.c_cpu = id % mp_ncpus; + if ((q->txq[TXQ_ETH].txq_mr = buf_ring_alloc(cxgb_txq_buf_ring_size, + M_DEVBUF, M_WAITOK, &q->lock)) == NULL) { + device_printf(sc->dev, "failed to allocate mbuf ring\n"); + goto err; } + if ((q->txq[TXQ_ETH].txq_ifq = malloc(sizeof(struct ifaltq), M_DEVBUF, + M_NOWAIT | M_ZERO)) == NULL) { + device_printf(sc->dev, "failed to allocate ifq\n"); + goto err; + } + ifq_init(q->txq[TXQ_ETH].txq_ifq, pi->ifp); + callout_init(&q->txq[TXQ_ETH].txq_timer, 1); + callout_init(&q->txq[TXQ_ETH].txq_watchdog, 1); + q->txq[TXQ_ETH].txq_timer.c_cpu = id % mp_ncpus; + q->txq[TXQ_ETH].txq_watchdog.c_cpu = id % mp_ncpus; + init_qset_cntxt(q, id); q->idx = id; if ((ret = alloc_ring(sc, p->fl_size, sizeof(struct rx_desc), @@ -2632,21 +2632,22 @@ t3_sge_alloc_qset(adapter_t *sc, u_int i q->fl[0].buf_size = MCLBYTES; q->fl[0].zone = zone_pack; q->fl[0].type = EXT_PACKET; -#if __FreeBSD_version > 800000 - if (cxgb_use_16k_clusters) { - q->fl[1].buf_size = MJUM16BYTES; + + if (p->jumbo_buf_size == MJUM16BYTES) { q->fl[1].zone = zone_jumbo16; q->fl[1].type = EXT_JUMBO16; - } else { - q->fl[1].buf_size = MJUM9BYTES; + } else if (p->jumbo_buf_size == MJUM9BYTES) { q->fl[1].zone = zone_jumbo9; q->fl[1].type = EXT_JUMBO9; + } else if (p->jumbo_buf_size == MJUMPAGESIZE) { + q->fl[1].zone = zone_jumbop; + q->fl[1].type = EXT_JUMBOP; + } else { + KASSERT(0, ("can't deal with jumbo_buf_size %d.", p->jumbo_buf_size)); + ret = EDOOFUS; + goto err; } -#else - q->fl[1].buf_size = MJUMPAGESIZE; - q->fl[1].zone = zone_jumbop; - q->fl[1].type = EXT_JUMBOP; -#endif + q->fl[1].buf_size = p->jumbo_buf_size; /* Allocate and setup the lro_ctrl structure */ q->lro.enabled = !!(pi->ifp->if_capenable & IFCAP_LRO); From owner-svn-src-head@FreeBSD.ORG Wed Mar 31 02:12:24 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B5746106566B; Wed, 31 Mar 2010 02:12:24 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A4B1B8FC1F; Wed, 31 Mar 2010 02:12:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2V2COOm063421; Wed, 31 Mar 2010 02:12:24 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2V2CO7b063419; Wed, 31 Mar 2010 02:12:24 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201003310212.o2V2CO7b063419@svn.freebsd.org> From: Juli Mallett Date: Wed, 31 Mar 2010 02:12: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: r205954 - head/include X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Mar 2010 02:12:24 -0000 Author: jmallett Date: Wed Mar 31 02:12:24 2010 New Revision: 205954 URL: http://svn.freebsd.org/changeset/base/205954 Log: Be like stdlib.h and bring in a wchar_t definition and use it to prototype wcstoimax and wcstoumax, rather than spelling it __wchar_t. This is necessary to use these functions in C++ where wchar_t is different to __wchar_t and is a built-in type. It may be better to use __wchar_t here and to simply define __wchar_t as being wchar_t in C++ mode rather than to bring in wchar_t, but this is less invasive and follows our existing practice, and restores wchar_t usage in this file to what it was before r1.8. Modified: head/include/inttypes.h Modified: head/include/inttypes.h ============================================================================== --- head/include/inttypes.h Wed Mar 31 01:51:08 2010 (r205953) +++ head/include/inttypes.h Wed Mar 31 02:12:24 2010 (r205954) @@ -32,6 +32,13 @@ #include #include +#ifndef __cplusplus +#ifndef _WCHAR_T_DECLARED +typedef __wchar_t wchar_t; +#define _WCHAR_T_DECLARED +#endif +#endif + typedef struct { intmax_t quot; /* Quotient. */ intmax_t rem; /* Remainder. */ @@ -43,10 +50,10 @@ imaxdiv_t imaxdiv(intmax_t, intmax_t) __ intmax_t strtoimax(const char * __restrict, char ** __restrict, int); uintmax_t strtoumax(const char * __restrict, char ** __restrict, int); -intmax_t wcstoimax(const __wchar_t * __restrict, - __wchar_t ** __restrict, int); -uintmax_t wcstoumax(const __wchar_t * __restrict, - __wchar_t ** __restrict, int); +intmax_t wcstoimax(const wchar_t * __restrict, + wchar_t ** __restrict, int); +uintmax_t wcstoumax(const wchar_t * __restrict, + wchar_t ** __restrict, int); __END_DECLS #endif /* !_INTTYPES_H_ */ From owner-svn-src-head@FreeBSD.ORG Wed Mar 31 02:20:23 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7B99B106566C; Wed, 31 Mar 2010 02:20:23 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6ACB28FC08; Wed, 31 Mar 2010 02:20:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2V2KNPI065193; Wed, 31 Mar 2010 02:20:23 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2V2KNJL065191; Wed, 31 Mar 2010 02:20:23 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201003310220.o2V2KNJL065191@svn.freebsd.org> From: Luigi Rizzo Date: Wed, 31 Mar 2010 02:20: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: r205955 - head/sys/netinet/ipfw X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Mar 2010 02:20:23 -0000 Author: luigi Date: Wed Mar 31 02:20:22 2010 New Revision: 205955 URL: http://svn.freebsd.org/changeset/base/205955 Log: fix bug in previous commit related to rule deletion (stable/8 just fixed moments ago) Modified: head/sys/netinet/ipfw/ip_fw_sockopt.c Modified: head/sys/netinet/ipfw/ip_fw_sockopt.c ============================================================================== --- head/sys/netinet/ipfw/ip_fw_sockopt.c Wed Mar 31 02:12:24 2010 (r205954) +++ head/sys/netinet/ipfw/ip_fw_sockopt.c Wed Mar 31 02:20:22 2010 (r205955) @@ -239,12 +239,12 @@ ipfw_reap_rules(struct ip_fw *head) * The argument is an u_int32_t. The low 16 bit are the rule or set number, * the next 8 bits are the new set, the top 8 bits are the command: * - * 0 delete rules with given number - * 1 delete rules with given set number - * 2 move rules with given number to new set - * 3 move rules with given set number to new set - * 4 swap sets with given numbers - * 5 delete rules with given number and with given set number + * 0 delete rules numbered "rulenum" + * 1 delete rules in set "rulenum" + * 2 move rules "rulenum" to set "new_set" + * 3 move rules from set "rulenum" to set "new_set" + * 4 swap sets "rulenum" and "new_set" + * 5 delete rules "rulenum" and set "new_set" */ static int del_entry(struct ip_fw_chain *chain, u_int32_t arg) @@ -274,7 +274,7 @@ del_entry(struct ip_fw_chain *chain, u_i chain->reap = NULL; /* prepare for deletions */ switch (cmd) { - case 0: /* delete rules number N (N == 0 means all) */ + case 0: /* delete rules "rulenum" (rulenum == 0 matches all) */ case 1: /* delete all rules in set N */ case 5: /* delete rules with number N and set "new_set". */ @@ -287,7 +287,7 @@ del_entry(struct ip_fw_chain *chain, u_i if (cmd == 1) { /* look for a specific set, must scan all */ new_set = rulenum; for (start = -1, i = 0; i < chain->n_rules; i++) { - if (chain->map[i]->set != rulenum) + if (chain->map[i]->set != new_set) continue; if (start < 0) start = i; @@ -321,16 +321,21 @@ del_entry(struct ip_fw_chain *chain, u_i * and then bcopy the final part. * Once we are done we can swap maps and clean up the * deleted rules (unfortunately we need to repeat a - * convoluted test). + * convoluted test). Rules to keep are + * (set == RESVD_SET || !match_set || !match_rule) + * where + * match_set ::= (cmd == 0 || rule->set == new_set) + * match_rule ::= (cmd == 1 || rule->rulenum == rulenum) */ if (start > 0) bcopy(chain->map, map, start * sizeof(struct ip_fw *)); for (i = ofs = start; i < end; i++) { rule = chain->map[i]; - if (rule->set == RESVD_SET || cmd == 0 || - (rule->set == new_set && - (cmd == 1 || rule->rulenum == rulenum))) + if (rule->set == RESVD_SET || + !(cmd == 0 || rule->set == new_set) || + !(cmd == 1 || rule->rulenum == rulenum) ) { map[ofs++] = chain->map[i]; + } } bcopy(chain->map + end, map + ofs, (chain->n_rules - end) * sizeof(struct ip_fw *)); @@ -341,9 +346,9 @@ del_entry(struct ip_fw_chain *chain, u_i int l; rule = map[i]; /* same test as above */ - if (rule->set == RESVD_SET || cmd == 0 || - (rule->set == new_set && - (cmd == 1 || rule->rulenum == rulenum))) + if (rule->set == RESVD_SET || + !(cmd == 0 || rule->set == new_set) || + !(cmd == 1 || rule->rulenum == rulenum) ) continue; l = RULESIZE(rule); From owner-svn-src-head@FreeBSD.ORG Wed Mar 31 03:58:58 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1B50B106566B; Wed, 31 Mar 2010 03:58:58 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 095878FC1B; Wed, 31 Mar 2010 03:58:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2V3wvgA088045; Wed, 31 Mar 2010 03:58:57 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2V3wvTj088041; Wed, 31 Mar 2010 03:58:57 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201003310358.o2V3wvTj088041@svn.freebsd.org> From: Lawrence Stewart Date: Wed, 31 Mar 2010 03:58: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: r205959 - in head/sys: kern modules modules/alq X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Mar 2010 03:58:58 -0000 Author: lstewart Date: Wed Mar 31 03:58:57 2010 New Revision: 205959 URL: http://svn.freebsd.org/changeset/base/205959 Log: Add support for ALQ(9) to be compiled and loaded as a kernel module. Sponsored by: FreeBSD Foundation Reviewed by: dwmalone, jeff, rpaulo, rwatson Approved by: kmacy (mentor) MFC after: 1 month Added: head/sys/modules/alq/ head/sys/modules/alq/Makefile (contents, props changed) Modified: head/sys/kern/kern_alq.c head/sys/modules/Makefile Modified: head/sys/kern/kern_alq.c ============================================================================== --- head/sys/kern/kern_alq.c Wed Mar 31 03:20:14 2010 (r205958) +++ head/sys/kern/kern_alq.c Wed Mar 31 03:58:57 2010 (r205959) @@ -1,7 +1,13 @@ /*- * Copyright (c) 2002, Jeffrey Roberson + * Copyright (c) 2008-2009, Lawrence Stewart + * Copyright (c) 2009-2010, The FreeBSD Foundation * All rights reserved. * + * Portions of this software were developed at the Centre for Advanced + * Internet Architectures, Swinburne University of Technology, Melbourne, + * Australia by Lawrence Stewart under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -27,6 +33,8 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_mac.h" + #include #include #include @@ -180,9 +188,16 @@ ald_daemon(void) ALD_LOCK(); for (;;) { - while ((alq = LIST_FIRST(&ald_active)) == NULL) + while ((alq = LIST_FIRST(&ald_active)) == NULL && + !ald_shutingdown) msleep(&ald_active, &ald_mtx, PWAIT, "aldslp", 0); + /* Don't shutdown until all active ALQs are flushed. */ + if (ald_shutingdown && alq == NULL) { + ALD_UNLOCK(); + break; + } + ALQ_LOCK(alq); ald_deactivate(alq); ALD_UNLOCK(); @@ -192,6 +207,8 @@ ald_daemon(void) wakeup(alq); ALD_LOCK(); } + + kproc_exit(0); } static void @@ -200,14 +217,29 @@ ald_shutdown(void *arg, int howto) struct alq *alq; ALD_LOCK(); + + /* Ensure no new queues can be created. */ ald_shutingdown = 1; + /* Shutdown all ALQs prior to terminating the ald_daemon. */ while ((alq = LIST_FIRST(&ald_queues)) != NULL) { LIST_REMOVE(alq, aq_link); ALD_UNLOCK(); alq_shutdown(alq); ALD_LOCK(); } + + /* At this point, all ALQs are flushed and shutdown. */ + + /* + * Wake ald_daemon so that it exits. It won't be able to do + * anything until we msleep because we hold the ald_mtx. + */ + wakeup(&ald_active); + + /* Wait for ald_daemon to exit. */ + msleep(ald_proc, &ald_mtx, PWAIT, "aldslp", 0); + ALD_UNLOCK(); } @@ -510,3 +542,53 @@ alq_close(struct alq *alq) free(alq->aq_entbuf, M_ALD); free(alq, M_ALD); } + +static int +alq_load_handler(module_t mod, int what, void *arg) +{ + int ret; + + ret = 0; + + switch (what) { + case MOD_LOAD: + case MOD_SHUTDOWN: + break; + + case MOD_QUIESCE: + ALD_LOCK(); + /* Only allow unload if there are no open queues. */ + if (LIST_FIRST(&ald_queues) == NULL) { + ald_shutingdown = 1; + ALD_UNLOCK(); + ald_shutdown(NULL, 0); + mtx_destroy(&ald_mtx); + } else { + ALD_UNLOCK(); + ret = EBUSY; + } + break; + + case MOD_UNLOAD: + /* If MOD_QUIESCE failed we must fail here too. */ + if (ald_shutingdown == 0) + ret = EBUSY; + break; + + default: + ret = EINVAL; + break; + } + + return (ret); +} + +static moduledata_t alq_mod = +{ + "alq", + alq_load_handler, + NULL +}; + +DECLARE_MODULE(alq, alq_mod, SI_SUB_SMP, SI_ORDER_ANY); +MODULE_VERSION(alq, 1); Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Wed Mar 31 03:20:14 2010 (r205958) +++ head/sys/modules/Makefile Wed Mar 31 03:58:57 2010 (r205959) @@ -20,6 +20,7 @@ SUBDIR= ${_3dfx} \ aio \ alc \ ale \ + alq \ ${_amd} \ ${_amdsbwd} \ ${_amdtemp} \ Added: head/sys/modules/alq/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/alq/Makefile Wed Mar 31 03:58:57 2010 (r205959) @@ -0,0 +1,9 @@ +# $FreeBSD$ + +.include + +.PATH: ${.CURDIR}/../../kern +KMOD= alq +SRCS= opt_mac.h vnode_if.h kern_alq.c + +.include From owner-svn-src-head@FreeBSD.ORG Wed Mar 31 07:20:10 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 88137106564A; Wed, 31 Mar 2010 07:20:10 +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 7749C8FC0A; Wed, 31 Mar 2010 07:20:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2V7KAUu032562; Wed, 31 Mar 2010 07:20:10 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2V7KAoj032560; Wed, 31 Mar 2010 07:20:10 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201003310720.o2V7KAoj032560@svn.freebsd.org> From: Alexander Motin Date: Wed, 31 Mar 2010 07:20: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: r205967 - head/sys/dev/ata X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Mar 2010 07:20:10 -0000 Author: mav Date: Wed Mar 31 07:20:10 2010 New Revision: 205967 URL: http://svn.freebsd.org/changeset/base/205967 Log: Include opt_ata.h, as some structures here depending on ATA_CAM option. This fixes ATA_CAM with atamvsata and probably some other drivers. Modified: head/sys/dev/ata/ata-all.h Modified: head/sys/dev/ata/ata-all.h ============================================================================== --- head/sys/dev/ata/ata-all.h Wed Mar 31 07:12:12 2010 (r205966) +++ head/sys/dev/ata/ata-all.h Wed Mar 31 07:20:10 2010 (r205967) @@ -26,6 +26,8 @@ * $FreeBSD$ */ +#include "opt_ata.h" + #if 0 #define ATA_LEGACY_SUPPORT /* Enable obsolete features that break * some modern devices */ From owner-svn-src-head@FreeBSD.ORG Wed Mar 31 12:52:20 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1610C106564A; Wed, 31 Mar 2010 12:52:20 +0000 (UTC) (envelope-from keramida@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 054A48FC21; Wed, 31 Mar 2010 12:52:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2VCqJEs011803; Wed, 31 Mar 2010 12:52:19 GMT (envelope-from keramida@svn.freebsd.org) Received: (from keramida@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2VCqJf6011801; Wed, 31 Mar 2010 12:52:19 GMT (envelope-from keramida@svn.freebsd.org) Message-Id: <201003311252.o2VCqJf6011801@svn.freebsd.org> From: Giorgos Keramidas Date: Wed, 31 Mar 2010 12:52: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: r205978 - head/share/man/man7 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Mar 2010 12:52:20 -0000 Author: keramida (doc committer) Date: Wed Mar 31 12:52:19 2010 New Revision: 205978 URL: http://svn.freebsd.org/changeset/base/205978 Log: Document DEBUG_FLAGS in a more visible place, in the build(7) manpage Noticed by: Alexander Best Reviewed by: jhb MFC after: 1 week Modified: head/share/man/man7/build.7 Modified: head/share/man/man7/build.7 ============================================================================== --- head/share/man/man7/build.7 Wed Mar 31 12:22:55 2010 (r205977) +++ head/share/man/man7/build.7 Wed Mar 31 12:52:19 2010 (r205978) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 15, 2009 +.Dd March 31, 2010 .Dt BUILD 7 .Os .Sh NAME @@ -311,6 +311,20 @@ should be set as with .Sh ENVIRONMENT Variables that influence all builds include: .Bl -tag -width ".Va MAKEOBJDIRPREFIX" +.It Va DEBUG_FLAGS +Defines a set of debugging flags that will be used to build all userland +binaries under +.Pa /usr/src . +When +.Va DEBUG_FLAGS +is defined, the +.Cm install +and +.Cm installworld +targets install binaries from the current +.Va MAKEOBJDIRPREFIX +without stripping, +so that debugging information is retained in the installed binaries. .It Va DESTDIR The directory hierarchy prefix where built objects will be installed. If not set, From owner-svn-src-head@FreeBSD.ORG Wed Mar 31 14:42:07 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EAAD5106564A; Wed, 31 Mar 2010 14:42:07 +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 DA3CA8FC14; Wed, 31 Mar 2010 14:42:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2VEg7AV036589; Wed, 31 Mar 2010 14:42:07 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2VEg7gS036587; Wed, 31 Mar 2010 14:42:07 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201003311442.o2VEg7gS036587@svn.freebsd.org> From: Warner Losh Date: Wed, 31 Mar 2010 14:42: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: r205980 - head/tools/tools/nanobsd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Mar 2010 14:42:08 -0000 Author: imp Date: Wed Mar 31 14:42:07 2010 New Revision: 205980 URL: http://svn.freebsd.org/changeset/base/205980 Log: Stop hard coding i386 as the arch for the build. Instead, default to the processor we're running on. Also, supply amd64 version of create_diskimage that's the same as i386's. # didn't fix the confusion between using the processor for this and using # the machine (which would be more appropriate). NANO_ARCH smashes the two # together right now. MFC after: 7 days Modified: head/tools/tools/nanobsd/nanobsd.sh Modified: head/tools/tools/nanobsd/nanobsd.sh ============================================================================== --- head/tools/tools/nanobsd/nanobsd.sh Wed Mar 31 13:51:31 2010 (r205979) +++ head/tools/tools/nanobsd/nanobsd.sh Wed Mar 31 14:42:07 2010 (r205980) @@ -134,7 +134,7 @@ PPLEVEL=3 ####################################################################### # Not a variable at this time -NANO_ARCH=i386 +NANO_ARCH=`uname -p` ####################################################################### # @@ -497,6 +497,11 @@ create_i386_diskimage ( ) ( ) > ${NANO_OBJ}/_.di 2>&1 ) +# i386 and amd64 are identical for disk images +create_amd64_diskimage ( ) ( + create_i386_diskimage +) + last_orders () ( # Redefine this function with any last orders you may have # after the build completed, for instance to copy the finished From owner-svn-src-head@FreeBSD.ORG Wed Mar 31 16:07:36 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D1A0F106566B; Wed, 31 Mar 2010 16:07:36 +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 C0BFD8FC15; Wed, 31 Mar 2010 16:07:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2VG7aWj055737; Wed, 31 Mar 2010 16:07:36 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2VG7a7K055734; Wed, 31 Mar 2010 16:07:36 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201003311607.o2VG7a7K055734@svn.freebsd.org> From: Rui Paulo Date: Wed, 31 Mar 2010 16:07: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: r205986 - head/sys/net80211 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Mar 2010 16:07:37 -0000 Author: rpaulo Date: Wed Mar 31 16:07:36 2010 New Revision: 205986 URL: http://svn.freebsd.org/changeset/base/205986 Log: Constify vap argument of ieee80211_{note,discard}* functions. MFC after: 1 week Modified: head/sys/net80211/ieee80211_input.c head/sys/net80211/ieee80211_var.h Modified: head/sys/net80211/ieee80211_input.c ============================================================================== --- head/sys/net80211/ieee80211_input.c Wed Mar 31 16:01:48 2010 (r205985) +++ head/sys/net80211/ieee80211_input.c Wed Mar 31 16:07:36 2010 (r205986) @@ -734,7 +734,8 @@ ieee80211_ssid_mismatch(struct ieee80211 * Return the bssid of a frame. */ static const uint8_t * -ieee80211_getbssid(struct ieee80211vap *vap, const struct ieee80211_frame *wh) +ieee80211_getbssid(const struct ieee80211vap *vap, + const struct ieee80211_frame *wh) { if (vap->iv_opmode == IEEE80211_M_STA) return wh->i_addr2; @@ -748,7 +749,7 @@ ieee80211_getbssid(struct ieee80211vap * #include void -ieee80211_note(struct ieee80211vap *vap, const char *fmt, ...) +ieee80211_note(const struct ieee80211vap *vap, const char *fmt, ...) { char buf[128]; /* XXX */ va_list ap; @@ -761,7 +762,7 @@ ieee80211_note(struct ieee80211vap *vap, } void -ieee80211_note_frame(struct ieee80211vap *vap, +ieee80211_note_frame(const struct ieee80211vap *vap, const struct ieee80211_frame *wh, const char *fmt, ...) { @@ -776,7 +777,7 @@ ieee80211_note_frame(struct ieee80211vap } void -ieee80211_note_mac(struct ieee80211vap *vap, +ieee80211_note_mac(const struct ieee80211vap *vap, const uint8_t mac[IEEE80211_ADDR_LEN], const char *fmt, ...) { @@ -790,7 +791,7 @@ ieee80211_note_mac(struct ieee80211vap * } void -ieee80211_discard_frame(struct ieee80211vap *vap, +ieee80211_discard_frame(const struct ieee80211vap *vap, const struct ieee80211_frame *wh, const char *type, const char *fmt, ...) { @@ -811,7 +812,7 @@ ieee80211_discard_frame(struct ieee80211 } void -ieee80211_discard_ie(struct ieee80211vap *vap, +ieee80211_discard_ie(const struct ieee80211vap *vap, const struct ieee80211_frame *wh, const char *type, const char *fmt, ...) { @@ -830,7 +831,7 @@ ieee80211_discard_ie(struct ieee80211vap } void -ieee80211_discard_mac(struct ieee80211vap *vap, +ieee80211_discard_mac(const struct ieee80211vap *vap, const uint8_t mac[IEEE80211_ADDR_LEN], const char *type, const char *fmt, ...) { Modified: head/sys/net80211/ieee80211_var.h ============================================================================== --- head/sys/net80211/ieee80211_var.h Wed Mar 31 16:01:48 2010 (r205985) +++ head/sys/net80211/ieee80211_var.h Wed Mar 31 16:07:36 2010 (r205986) @@ -852,10 +852,10 @@ ieee80211_htchanflags(const struct ieee8 if (ieee80211_msg(_vap, _m)) \ ieee80211_note_frame(_vap, _wh, _fmt, __VA_ARGS__); \ } while (0) -void ieee80211_note(struct ieee80211vap *, const char *, ...); -void ieee80211_note_mac(struct ieee80211vap *, +void ieee80211_note(const struct ieee80211vap *, const char *, ...); +void ieee80211_note_mac(const struct ieee80211vap *, const uint8_t mac[IEEE80211_ADDR_LEN], const char *, ...); -void ieee80211_note_frame(struct ieee80211vap *, +void ieee80211_note_frame(const struct ieee80211vap *, const struct ieee80211_frame *, const char *, ...); #define ieee80211_msg_debug(_vap) \ ((_vap)->iv_debug & IEEE80211_MSG_DEBUG) @@ -893,11 +893,11 @@ void ieee80211_note_frame(struct ieee802 ieee80211_discard_mac(_vap, _mac, _type, _fmt, __VA_ARGS__);\ } while (0) -void ieee80211_discard_frame(struct ieee80211vap *, +void ieee80211_discard_frame(const struct ieee80211vap *, const struct ieee80211_frame *, const char *type, const char *fmt, ...); -void ieee80211_discard_ie(struct ieee80211vap *, +void ieee80211_discard_ie(const struct ieee80211vap *, const struct ieee80211_frame *, const char *type, const char *fmt, ...); -void ieee80211_discard_mac(struct ieee80211vap *, +void ieee80211_discard_mac(const struct ieee80211vap *, const uint8_t mac[IEEE80211_ADDR_LEN], const char *type, const char *fmt, ...); #else From owner-svn-src-head@FreeBSD.ORG Wed Mar 31 16:42:22 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 71B691065670; Wed, 31 Mar 2010 16:42:22 +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 614B58FC0A; Wed, 31 Mar 2010 16:42:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2VGgMXr063358; Wed, 31 Mar 2010 16:42:22 GMT (envelope-from jfv@svn.freebsd.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2VGgMFw063356; Wed, 31 Mar 2010 16:42:22 GMT (envelope-from jfv@svn.freebsd.org) Message-Id: <201003311642.o2VGgMFw063356@svn.freebsd.org> From: Jack F Vogel Date: Wed, 31 Mar 2010 16:42: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: r205987 - head/sys/dev/e1000 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Mar 2010 16:42:22 -0000 Author: jfv Date: Wed Mar 31 16:42:22 2010 New Revision: 205987 URL: http://svn.freebsd.org/changeset/base/205987 Log: Fix poll handler declaration. Modified: head/sys/dev/e1000/if_lem.c Modified: head/sys/dev/e1000/if_lem.c ============================================================================== --- head/sys/dev/e1000/if_lem.c Wed Mar 31 16:07:36 2010 (r205986) +++ head/sys/dev/e1000/if_lem.c Wed Mar 31 16:42:22 2010 (r205987) @@ -269,7 +269,7 @@ static void lem_add_rx_process_limit(str #endif /* ~EM_LEGACY_IRQ */ #ifdef DEVICE_POLLING -static poll_handler_t em_poll; +static poll_handler_t lem_poll; #endif /* POLLING */ /********************************************************************* From owner-svn-src-head@FreeBSD.ORG Wed Mar 31 16:55:47 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CAF70106566B; Wed, 31 Mar 2010 16:55:47 +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 BA3288FC1D; Wed, 31 Mar 2010 16:55:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2VGtlGY066436; Wed, 31 Mar 2010 16:55:47 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2VGtlAD066434; Wed, 31 Mar 2010 16:55:47 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201003311655.o2VGtlAD066434@svn.freebsd.org> From: Andriy Gapon Date: Wed, 31 Mar 2010 16:55: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: r205988 - head/usr.bin/indent X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Mar 2010 16:55:47 -0000 Author: avg Date: Wed Mar 31 16:55:47 2010 New Revision: 205988 URL: http://svn.freebsd.org/changeset/base/205988 Log: indent(1): correctly handle case/label at the very start of a function Obtained from: NetBSD (rev. 1.11 of indent.c) MFC after: 1 week Modified: head/usr.bin/indent/indent.c Modified: head/usr.bin/indent/indent.c ============================================================================== --- head/usr.bin/indent/indent.c Wed Mar 31 16:42:22 2010 (r205987) +++ head/usr.bin/indent/indent.c Wed Mar 31 16:55:47 2010 (r205988) @@ -675,7 +675,7 @@ check_type: ps.want_blank = true; break; } - if (ps.in_decl) { + if (ps.in_or_st) { *e_code++ = ':'; ps.want_blank = false; break; From owner-svn-src-head@FreeBSD.ORG Wed Mar 31 17:05:30 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8127C1065673; Wed, 31 Mar 2010 17:05: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 641228FC1A; Wed, 31 Mar 2010 17:05:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2VH5UEt068584; Wed, 31 Mar 2010 17:05:30 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2VH5Uk3068579; Wed, 31 Mar 2010 17:05:30 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201003311705.o2VH5Uk3068579@svn.freebsd.org> From: Andriy Gapon Date: Wed, 31 Mar 2010 17:05: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: r205989 - head/usr.bin/indent X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Mar 2010 17:05:30 -0000 Author: avg Date: Wed Mar 31 17:05:30 2010 New Revision: 205989 URL: http://svn.freebsd.org/changeset/base/205989 Log: indent(1): add a new option, -ta, to treat all *_t identifiers as types Submitted by: Hans Petter Selasky Discussed with: bde MFC after: 10 days Modified: head/usr.bin/indent/args.c head/usr.bin/indent/indent.1 head/usr.bin/indent/indent_globs.h head/usr.bin/indent/lexi.c Modified: head/usr.bin/indent/args.c ============================================================================== --- head/usr.bin/indent/args.c Wed Mar 31 16:55:47 2010 (r205988) +++ head/usr.bin/indent/args.c Wed Mar 31 17:05:30 2010 (r205989) @@ -157,6 +157,7 @@ struct pro { {"sc", PRO_BOOL, true, ON, &star_comment_cont}, {"sob", PRO_BOOL, false, ON, &swallow_optional_blanklines}, {"st", PRO_SPECIAL, 0, STDIN, 0}, + {"ta", PRO_BOOL, false, ON, &auto_typedefs}, {"troff", PRO_BOOL, false, ON, &troff}, {"ut", PRO_BOOL, true, ON, &use_tabs}, {"v", PRO_BOOL, false, ON, &verbose}, Modified: head/usr.bin/indent/indent.1 ============================================================================== --- head/usr.bin/indent/indent.1 Wed Mar 31 16:55:47 2010 (r205988) +++ head/usr.bin/indent/indent.1 Wed Mar 31 17:05:30 2010 (r205989) @@ -80,6 +80,7 @@ .Op Fl sob | Fl nsob .Ek .Op Fl \&st +.Op Fl \&ta .Op Fl troff .Op Fl ut | Fl nut .Op Fl v | Fl \&nv @@ -377,6 +378,9 @@ Default: Causes .Nm to take its input from stdin and put its output to stdout. +.It Fl ta +Automatically add all identifiers ending in "_t" to the list +of type keywords. .It Fl T Ns Ar typename Adds .Ar typename Modified: head/usr.bin/indent/indent_globs.h ============================================================================== --- head/usr.bin/indent/indent_globs.h Wed Mar 31 16:55:47 2010 (r205988) +++ head/usr.bin/indent/indent_globs.h Wed Mar 31 17:05:30 2010 (r205989) @@ -204,6 +204,8 @@ int function_brace_split; /* split f * brace onto separate lines */ int use_tabs; /* set true to use tabs for spacing, * false uses all spaces */ +int auto_typedefs; /* set true to recognize identifiers + * ending in "_t" like typedefs */ /* -troff font state information */ Modified: head/usr.bin/indent/lexi.c ============================================================================== --- head/usr.bin/indent/lexi.c Wed Mar 31 16:55:47 2010 (r205988) +++ head/usr.bin/indent/lexi.c Wed Mar 31 17:05:30 2010 (r205989) @@ -249,6 +249,17 @@ lexi(void) last_code = ident; /* Remember that this is the code we will * return */ + if (auto_typedefs) { + const char *q = s_token; + /* Check if we have an "_t" in the end */ + if (q[0] && q[1] && + (strcmp(q + strlen(q) - 2, "_t") == 0)) { + ps.its_a_keyword = true; + ps.last_u_d = true; + goto found_auto_typedef; + } + } + /* * This loop will check if the token is a keyword. */ @@ -285,6 +296,7 @@ lexi(void) /* FALLTHROUGH */ case 4: /* one of the declaration keywords */ + found_auto_typedef: if (ps.p_l_follow) { ps.cast_mask |= (1 << ps.p_l_follow) & ~ps.sizeof_mask; break; /* inside parens: cast, param list or sizeof */ From owner-svn-src-head@FreeBSD.ORG Wed Mar 31 17:40:14 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4A25D106566C; Wed, 31 Mar 2010 17:40: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 390D78FC14; Wed, 31 Mar 2010 17:40:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2VHeEXa076317; Wed, 31 Mar 2010 17:40:14 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2VHeEdt076314; Wed, 31 Mar 2010 17:40:14 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201003311740.o2VHeEdt076314@svn.freebsd.org> From: Warner Losh Date: Wed, 31 Mar 2010 17:40: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: r205992 - head/usr.bin/sed X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Mar 2010 17:40:14 -0000 Author: imp Date: Wed Mar 31 17:40:13 2010 New Revision: 205992 URL: http://svn.freebsd.org/changeset/base/205992 Log: Make -r mean exactly the same thing as -E for increased compatibility with GNU sed. MFC after: 7 days Modified: head/usr.bin/sed/main.c head/usr.bin/sed/sed.1 Modified: head/usr.bin/sed/main.c ============================================================================== --- head/usr.bin/sed/main.c Wed Mar 31 17:14:32 2010 (r205991) +++ head/usr.bin/sed/main.c Wed Mar 31 17:40:13 2010 (r205992) @@ -130,8 +130,9 @@ main(int argc, char *argv[]) fflag = 0; inplace = NULL; - while ((c = getopt(argc, argv, "EI:ae:f:i:ln")) != -1) + while ((c = getopt(argc, argv, "EI:ae:f:i:lnr")) != -1) switch (c) { + case 'r': /* Gnu sed compat */ case 'E': rflags = REG_EXTENDED; break; Modified: head/usr.bin/sed/sed.1 ============================================================================== --- head/usr.bin/sed/sed.1 Wed Mar 31 17:14:32 2010 (r205991) +++ head/usr.bin/sed/sed.1 Wed Mar 31 17:40:13 2010 (r205992) @@ -39,11 +39,11 @@ .Nd stream editor .Sh SYNOPSIS .Nm -.Op Fl Ealn +.Op Fl Ealnr .Ar command .Op Ar .Nm -.Op Fl Ealn +.Op Fl Ealnr .Op Fl e Ar command .Op Fl f Ar command_file .Op Fl I Ar extension @@ -144,6 +144,10 @@ all of the commands have been applied to The .Fl n option suppresses this behavior. +.It Fl r +Same as +.Fl E +for compatibility with GNU sed. .El .Pp The form of a From owner-svn-src-head@FreeBSD.ORG Wed Mar 31 17:47:58 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3DF01106566C; Wed, 31 Mar 2010 17:47:58 +0000 (UTC) (envelope-from mjacob@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2D1778FC0A; Wed, 31 Mar 2010 17:47:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2VHlwXl078039; Wed, 31 Mar 2010 17:47:58 GMT (envelope-from mjacob@svn.freebsd.org) Received: (from mjacob@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2VHlwJX078037; Wed, 31 Mar 2010 17:47:58 GMT (envelope-from mjacob@svn.freebsd.org) Message-Id: <201003311747.o2VHlwJX078037@svn.freebsd.org> From: Matt Jacob Date: Wed, 31 Mar 2010 17:47: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: r205993 - head/sys/cam X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Mar 2010 17:47:58 -0000 Author: mjacob Date: Wed Mar 31 17:47:57 2010 New Revision: 205993 URL: http://svn.freebsd.org/changeset/base/205993 Log: For unhandled actions in xpt_action_default, remember to call xpt_done for queued requests. This solves the problem of indefinite hangs for unspecified transports when XPT_SCAN_BUS is called. A few minor cosmetics elsewhere. MFC after: 1 week Modified: head/sys/cam/cam_xpt.c Modified: head/sys/cam/cam_xpt.c ============================================================================== --- head/sys/cam/cam_xpt.c Wed Mar 31 17:40:13 2010 (r205992) +++ head/sys/cam/cam_xpt.c Wed Mar 31 17:47:57 2010 (r205993) @@ -2380,6 +2380,7 @@ xpt_action_default(union ccb *start_ccb) if (start_ccb->ccb_h.func_code == XPT_ATA_IO) { start_ccb->ataio.resid = 0; } + /* FALLTHROUGH */ case XPT_RESET_DEV: case XPT_ENG_EXEC: { @@ -2888,6 +2889,9 @@ xpt_action_default(union ccb *start_ccb) case XPT_ENG_INQ: /* XXX Implement */ start_ccb->ccb_h.status = CAM_PROVIDE_FAIL; + if (start_ccb->ccb_h.func_code & XPT_FC_DEV_QUEUED) { + xpt_done(start_ccb); + } break; } } @@ -3930,7 +3934,7 @@ xpt_dev_async_default(u_int32_t async_co struct cam_et *target, struct cam_ed *device, void *async_arg) { - printf("xpt_dev_async called\n"); + printf("%s called\n", __func__); } u_int32_t @@ -4919,4 +4923,3 @@ camisr_runqueue(void *V_queue) (*ccb_h->cbfcnp)(ccb_h->path->periph, (union ccb *)ccb_h); } } - From owner-svn-src-head@FreeBSD.ORG Wed Mar 31 18:18:38 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 326E0106566C; Wed, 31 Mar 2010 18:18:38 +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 213478FC0C; Wed, 31 Mar 2010 18:18:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2VIIcN2084838; Wed, 31 Mar 2010 18:18:38 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2VIIcco084836; Wed, 31 Mar 2010 18:18:38 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201003311818.o2VIIcco084836@svn.freebsd.org> From: Warner Losh Date: Wed, 31 Mar 2010 18:18: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: r205994 - head/tools/tools/nanobsd/gateworks X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Mar 2010 18:18:38 -0000 Author: imp Date: Wed Mar 31 18:18:37 2010 New Revision: 205994 URL: http://svn.freebsd.org/changeset/base/205994 Log: Two fixes: (1) We don't need a custom install_kernel. We can install without symbols by adding INSTALL_NODEBUG (which likely should be WITHOUT_KERNEL_SYMBOLS_FILE, or something shorter) to CONF_INSTALL (2) for make buildenv stage, use NANO_MAKE_CONF_BUILD rather than the non-existant NANO_MAKE_CONF. MFC after: 7 days Modified: head/tools/tools/nanobsd/gateworks/common Modified: head/tools/tools/nanobsd/gateworks/common ============================================================================== --- head/tools/tools/nanobsd/gateworks/common Wed Mar 31 17:47:57 2010 (r205993) +++ head/tools/tools/nanobsd/gateworks/common Wed Mar 31 18:18:37 2010 (r205994) @@ -37,7 +37,7 @@ NANO_CUSTOMIZE="$NANO_CUSTOMIZE cust_ins buildenv() { cd ${NANO_SRC} - env TARGET_ARCH=${NANO_ARCH} __MAKE_CONF=${NANO_MAKE_CONF} \ + env TARGET_ARCH=${NANO_ARCH} __MAKE_CONF=${NANO_MAKE_CONF_BUILD} \ DESTDIR=${NANO_WORLDDIR} make buildenv } @@ -146,22 +146,9 @@ WITHOUT_TCSH=true CONF_INSTALL="$CONF_BUILD WITHOUT_TOOLCHAIN=true WITHOUT_INSTALLLIB=true +INSTALL_NODEBUG=true " -# NB: override to suppress install of kernel.symbols -install_kernel() -{ - pprint 2 "install kernel" - pprint 3 "log: ${MAKEOBJDIRPREFIX}/_.ik" - - cd ${NANO_SRC} - env TARGET_ARCH=${NANO_ARCH} ${NANO_PMAKE} installkernel \ - INSTALL_NODEBUG=true \ - DESTDIR=${NANO_WORLDDIR} \ - __MAKE_CONF=${NANO_MAKE_CONF} KERNCONF=`basename ${NANO_KERNEL}` \ - > ${MAKEOBJDIRPREFIX}/_.ik 2>&1 -} - # NB: override to force / on s1 instead of s1a setup_nanobsd_etc() { From owner-svn-src-head@FreeBSD.ORG Wed Mar 31 18:21:27 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EA7E2106566C; Wed, 31 Mar 2010 18:21:26 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D71898FC0C; Wed, 31 Mar 2010 18:21:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2VILQBi085496; Wed, 31 Mar 2010 18:21:26 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2VILPwY085492; Wed, 31 Mar 2010 18:21:25 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201003311821.o2VILPwY085492@svn.freebsd.org> From: Ulrich Spoerlein Date: Wed, 31 Mar 2010 18:21: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: r205995 - in head/games/fortune: . datfiles X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Mar 2010 18:21:27 -0000 Author: uqs Date: Wed Mar 31 18:21:25 2010 New Revision: 205995 URL: http://svn.freebsd.org/changeset/base/205995 Log: Sync fortunes with other *BSDs - Spelling errors - Typographical fixes - Consistent attributions - Use Jr. more consistently - Capitalization of dictionary-like entries - Sorting using tools/do_sort - Remove duplicate fortunes - Style according to the Notes file - Reflect correct default fortune name in Notes - Remove some no longer needed spelling hints - Drop latin1 characters (sorry MÃ¥rten) This is a partial sync against the DragonflyBSD sources, where a lot of fixes from Free, Net and OpenBSD were merged previously. Only about 50% of the changes originate from there, the rest was done by dougb and yours truly. Partial review by: wilko (earlier version), ed (dito) In collaboration with: dougb Approved by: ed (co-mentor) Modified: head/games/fortune/Notes head/games/fortune/datfiles/fortunes head/games/fortune/datfiles/fortunes-o.real head/games/fortune/datfiles/fortunes.sp.ok head/games/fortune/datfiles/limerick head/games/fortune/datfiles/startrek head/games/fortune/datfiles/zippy Modified: head/games/fortune/Notes ============================================================================== --- head/games/fortune/Notes Wed Mar 31 18:18:37 2010 (r205994) +++ head/games/fortune/Notes Wed Mar 31 18:21:25 2010 (r205995) @@ -19,13 +19,13 @@ Warning: /usr/share/games/fortune. A fortune file has two parts: the source file (which contains the fortunes themselves) and the data file which describes the fortunes. The data file always has the same name as the fortune file -with the string ".dat" concatenated, i.e. "fort" is the standard fortune -database, and "fort.dat" is the data file which describes it. See +with the string ".dat" concatenated, i.e. "fortunes" is the standard fortune +database, and "fortunes.dat" is the data file which describes it. See strfile(8) for more information on creating the data files. Fortunes are split into potentially offensive and not potentially offensive parts. The offensive version of a file has the same name as the -non-offensive version with "-o" concatenated, i.e. "fort" is the standard -fortune database, and "fort-o" is the standard offensive database. The +non-offensive version with "-o" concatenated, i.e. "fortunes" is the standard +fortune database, and "fortunes-o" is the standard offensive database. The fortune program automatically assumes that any file with a name ending in "-o" is potentially offensive, and should therefore only be displayed if explicitly requested, either with the -o option or by specifying a file name @@ -42,10 +42,10 @@ MUST be in the potentially offensive dat explicit language (see George Carlin's recent updated list) MUST be in the potentially offensive database. Political and religious opinions are often sequestered in the potentially offensive section as well. Anything which -assumes as a world view blatantly racist, mysogynist (sexist), or homophobic +assumes as a world view blatantly racist, misogynist (sexist), or homophobic ideas should not be in either, since they are not really funny unless *you* -are racist, mysogynist, or homophobic. - The point of this is that people have should have a reasonable +are racist, misogynist, or homophobic. + The point of this is that people should have a reasonable expectation that, should they just run "fortune", they will not be offended. We know that some people take offense at anything, but normal people do have opinions, too, and have a right not to have their sensibilities offended by @@ -53,7 +53,7 @@ a program which is supposed to be entert -o" or "fortune -a" are saying, in effect, that they are willing to have their sensibilities tweaked. However, they should not have their personal worth seriously (i.e., not in jest) assaulted. Jokes which depend for their -humor on racist, mysogynist, or homophobic stereotypes *do* seriously +humor on racist, misogynist, or homophobic stereotypes *do* seriously assault individual personal worth, and in a general entertainment medium we should be able to get by without it. Modified: head/games/fortune/datfiles/fortunes ============================================================================== --- head/games/fortune/datfiles/fortunes Wed Mar 31 18:18:37 2010 (r205994) +++ head/games/fortune/datfiles/fortunes Wed Mar 31 18:21:25 2010 (r205995) @@ -368,8 +368,10 @@ OR'd together, outta sight! Double bucky, I'd like a whole word of Double bucky, I'm happy I heard of Double bucky, I'd like a whole word of you! - - -- (C) 1978 by Guy L. Steele, Jr. + -- Guy L. Steele, Jr., (C) 1978 + (to Nicholas Wirth, who suggested that an extra bit + be added to terminal codes on 36-bit machines for use + by screen editors.) % Hard Copies and Chmod @@ -834,7 +836,7 @@ would like on it. "Here lies an honest lawyer. "Sorry, but I can't do that," replied the stonecutter. "In this state, it's against the law to bury two people in the same grave. However, -I could put ``here lies an honest lawyer'', if that would be okay." +I could put `here lies an honest lawyer', if that would be okay." "But that won't let people know who it is" protested the lawyer. "Certainly will," retorted the stonecutter. "people will read it and exclaim, "That's Strange!" @@ -1146,7 +1148,7 @@ strings of pearls. The spirit and inten throughout. There should be neither too little nor too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity. - A program should follow the 'Law of Least Astonishment'. What is this + A program should follow the "Law of Least Astonishment." What is this law? It is simply that the program should always respond to the user in the way that astonishes him least. A program, no matter how complex, should act as a single unit. The @@ -1161,7 +1163,7 @@ program. conference and then returned to report to his manager, saying: "What sort of programmers work for other companies? They behaved badly and were unconcerned with appearances. Their hair was long and unkempt and their -clothes were wrinkled and old. They crashed out hospitality suites and they +clothes were wrinkled and old. They crashed our hospitality suites and they made rude noises during my presentation." The manager said: "I should have never sent you to the conference. Those programmers live beyond the physical world. They consider life absurd, @@ -1466,7 +1468,7 @@ generalizable. The general tendency is to over-design the second system, using all the ideas and frills that were cautiously sidetracked on the first one. The result, as Ovid says, is a "big pile". - -- Frederick Brooks, "The Mythical Man Month" + -- Frederick Brooks, Jr., "The Mythical Man-Month" % An eighty-year-old woman is rocking away the afternoon on her porch when she sees an old, tarnished lamp sitting near the steps. She @@ -1513,7 +1515,7 @@ over canoe frames, for my people need tr and we offer you a chance to kill yourself with our ceremonial knife." The Englishman accepts the knife and yells, "God Save the Queen", while plunging the knife into his heart. - The Frenchman removes the knife from the fallen body, and yells, + The Frenchman removes the knife from the fallen body, and yells, "Vive la France", while plunging the knife into his heart. The American removes the knife from the fallen body, and yells, while stabbing himself all over his body, "Here's your lousy canoe!" @@ -1562,7 +1564,7 @@ a postcard?" "The curious incident of the stable dog in the nighttime." "But the dog did nothing in the nighttime." "That was the curious incident." - -- A. Conan Doyle, "Silver Blaze" + -- Sir Arthur Conan Doyle, "Silver Blaze" % Approaching the gates of the monastery, Hakuin found Ken the Zen preaching to a group of disciples. @@ -1609,8 +1611,8 @@ Los Angeles fainted from hyperoxygenatio under the exhaust of a bus until he revived. % Before he became a hermit, Zarathud was a young Priest, and - took great delight in making fools of his opponents in front of -his followers. +took great delight in making fools of his opponents in front of his +followers. One day Zarathud took his students to a pleasant pasture and there he confronted The Sacred Chao while She was contentedly grazing. "Tell me, you dumb beast," demanded the Priest in his @@ -1626,7 +1628,7 @@ Chinese ideogram for NO-THING.) and finds himself no wiser than before," Bokonon tells us. "He is full of murderous resentment of people who are ignorant without having come by their ignorance the hard way." - -- Kurt Vonnegut, "Cat's Cradle" + -- Kurt Vonnegut, Jr., "Cat's Cradle" % Bubba, Jim Bob, and Leroy were fishing out on the lake last November, and, when Bubba tipped his head back to empty the Jim Beam, he fell out of the @@ -1694,7 +1696,7 @@ way I ought to go from here?" the Cat. "I don't care much where--" said Alice. "Then it doesn't matter which way you go," said the Cat. - -- Lewis Carroll + -- Lewis Carroll, "Alice's Adventures in Wonderland" (1865) % Concerning the war in Vietnam, Senator George Aiken of Vermont noted in January, 1966, "I'm not very keen for doves or hawks. I think we need more @@ -1877,7 +1879,7 @@ how to be excellent: "In Search of Excel So the Cleaning Personnel Don't Steal It", etc. -- Dave Barry, "In Search of Excellence" % - Exxon's 'Universe of Energy' tends to the peculiar rather than the + Exxon's "Universe of Energy" tends to the peculiar rather than the humorous ... After [an incomprehensible film montage about wind and sun and rain and strip mines and] two or three minutes of mechanical confusion, the seats locomote through a short tunnel filled with clock-work dinosaurs. @@ -1923,9 +1925,9 @@ of events, there lurks a singular, sinis "MINE! HA-HA!" % "Found it," the Mouse replied rather crossly: -"of course you know what 'it' means." +"of course you know what `it' means." - "I know what 'it' means well enough, when I find a thing," + "I know what `it' means well enough, when I find a thing," said the Duck: "it's generally a frog or a worm. The question is, what did the archbishop find?" @@ -1937,15 +1939,15 @@ such as a "pride of lions" or a "gaggle One of the professors noticed a group of prostitutes down the block, and posed the question, "What name would be given to that group?" The four fell into silence for a moment, as they pondered the possibilities... - At last, one spoke: "How about 'a Jam of Tarts'?" The others nodded + At last, one spoke: "How about `a Jam of Tarts'?" The others nodded in acknowledgment as they continued to consider the problem. A second -professor spoke: "I'd suggest 'an Essay of Trollops.'" Again, the others -nodded. A third spoke: "I propose 'a Flourish of Strumpets.'" +professor spoke: "I'd suggest `an Essay of Trollops.'" Again, the others +nodded. A third spoke: "I propose `a Flourish of Strumpets.'" They continued their walk in silence, until the first professor remarked to the remaining professor, who was the most senior and learned of the four, "You haven't suggested a name for our ladies. What are your thoughts?" - Replied the fourth professor, "'An Anthology of Prose.'" + Replied the fourth professor, "`An Anthology of Prose.'" % Fred noticed his roommate had a black eye upon returning from a dance. "What happened?" @@ -1958,12 +1960,11 @@ and sarcastic?" "Of course not," said a sympathetic friend. "Well," retorted Frank, "neither would Jennifer." % - "Gee, Mudhead, everyone at More Science High has an + "Gee, Mudhead, everyone at Morse Science High has an extracurricular activity except you." "Well, gee, doesn't Louise count?" "Only to ten, Mudhead." - - -- Firesign Theater + -- The Firesign Theatre % "Gentlemen of the jury," said the defense attorney, now beginning to warm to his summation, "the real question here before you is, shall this @@ -2261,7 +2262,7 @@ each other up: the floor.) S-word. Excuse me. Look, Bob, I'm going to have to get back to you. Bob: Fine. - -- Dave Barry + -- Dave Barry, "$#$%#^%!^%&@%@!" % "I don't know what you mean by `glory,'" Alice said Humpty Dumpty smiled contemptuously. "Of course you don't -- @@ -2276,7 +2277,9 @@ less." so many different things." "The question is," said Humpty Dumpty, "which is to be master-- that's all." - -- Lewis Carroll, "Through the Looking Glass" + -- Lewis Carroll, + "Through the Looking-Glass, + and What Alice Found There" (1871) % I for one cannot protest the recent M.T.A. fare hike and the accompanying promises that this would in no way improve service. For @@ -2328,7 +2331,7 @@ operation - namely, to remove those irri "And then he will be sane?" "Then he will be perfectly sane, and a quite admirable citizen." "Thank heaven for science!" said old Yacob. - -- H.G. Wells, "The Country of the Blind" + -- H. G. Wells, "The Country of the Blind" % "I keep seeing spots in front of my eyes." "Did you ever see a doctor?" @@ -2403,7 +2406,7 @@ more simply -- `Never imagine yourself n might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise.'" - -- Lewis Carroll, "Alice in Wonderland" + -- Lewis Carroll, "Alice's Adventures in Wonderland" (1865) % I said, "Preacher, give me strength for round 5." He said, "What you need is to grow up, son." @@ -2567,7 +2570,7 @@ man. Mud-as-man alone could speak. "Certainly," said man. "Then I leave it to you to think of one for all of this," said God. And He went away. - -- Kurt Vonnegut, "Between Time and Timbuktu" + -- Kurt Vonnegut, Jr., "Between Time and Timbuktu" % In the beginning there was data. The data was without form and null, and darkness was upon the face of the console; and the Spirit of @@ -2815,7 +2818,7 @@ guzzled in one gulp and then smashed on the man stuffed the broken bottle in his mouth, munched broken glass and smacked his lips with relish. "Can I, ah, uh, get you another, sir?" the drifter stammered. - "Naw, I gotta git outa here, boy," the man grunted. "Big Mike's + "Naw, I gotta git outta here, boy," the man grunted. "Big Mike's a-comin'." % Love's Drug @@ -3002,7 +3005,7 @@ confirm who I am. -- Captain Freedom % Old Barlow was a crossing-tender at a junction where an express train -demolished an automobile and it's occupants. Being the chief witness, his +demolished an automobile and its occupants. Being the chief witness, his testimony was vitally important. Barlow explained that the night was dark, and he waved his lantern frantically, but the driver of the car paid no attention to the signal. @@ -3072,7 +3075,7 @@ and it was very juicy. I stood up and t when my mother at the kitchen window called my name in a sharp voice. I had to decide quickly. I decided. A rotten Big Boy hitting the target is a memorable sound, like a fat -man doing a belly-flop. With a whoop and a yell the tomatoe came after +man doing a belly-flop. With a whoop and a yell the tomatoee came after me faster than I knew she could run, and grabbed my shirt and was about to brain me when Mother called her name in a sharp voice. And my sister, who was a good person, obeyed and let go -- and burst into tears. I guess she knew that @@ -3164,7 +3167,7 @@ biggest, strongest fish he had ever caug until, finally, he managed to bring it to the surface. Looking of the edge of the boat, he saw the head of this huge fish breaking the surface. Smiling with pride, he reached over the edge to pull the fish up. Unfortunately, he -accidently caught his watch on the edge, and, before he knew it, there was a +accidentally caught his watch on the edge, and, before he knew it, there was a snap, and his watch tumbled into the water next to the fish with a loud "sploosh!" Distracted by this shiny object, the fish made a sudden lunge, simultaneously snapping the line, and swallowing the watch. Sadly, the @@ -3539,12 +3542,14 @@ know." "An uncomfortable sort of age. Now if you'd asked MY advice, I'd have said 'Leave off at seven' -- but it's too late now." "I never ask advice about growing," Alice said indignantly. - "Too proud?" the other enquired. + "Too proud?" the other enquired. Alice felt even more indignant at this suggestion. "I mean," she said, "that one can't help growing older." "ONE can't, perhaps," said Humpty Dumpty; "but TWO can. With proper assistance, you might have left off at seven." - -- Lewis Carroll, "Through the Looking-Glass" + -- Lewis Carroll, + "Through the Looking-Glass, + and What Alice Found There" (1871) % Several students were asked to prove that all odd integers are prime. The first student to try to do this was a math student. "Hmmm... @@ -3732,7 +3737,7 @@ she'd been she said she'd spent the nigh % "That's right; the upper-case shift works fine on the screen, but they're not coming out on the damn printer... Hold? Sure, I'll hold." - -- e.e. cummings last service call + -- e. e. cummings last service call % "The best thing for being sad," replied Merlin, beginning to puff and blow, "is to learn something. That's the only thing that never fails. @@ -3907,7 +3912,7 @@ married! You're a sadist, that's what!" THE LESSER-KNOWN PROGRAMMING LANGUAGES #2: RENE Named after the famous French philosopher and mathematician Rene -DesCartes, RENE is a language used for artificial intelligence. The +Descartes, RENE is a language used for artificial intelligence. The language is being developed at the Chicago Center of Machine Politics and Programming under a grant from the Jane Byrne Victory Fund. A spokesman described the language as "Just as great as dis [sic] city of @@ -4030,7 +4035,9 @@ called 'Ways and Means': but that's onl time completely bewildered. "I was coming to that," the Knight said. "The song really is "A-sitting on a Gate": and the tune's my own invention." - --Lewis Carroll, "Through the Looking Glass" + -- Lewis Carroll, + "Through the Looking-Glass, + and What Alice Found There" (1871) % The only real game in the world, I think, is baseball... You've got to start way down, at the bottom, when you're six or seven years @@ -4065,7 +4072,8 @@ blocks of wood. Opaque, like black pool "The pyramid is opening!" "Which one?" "The one with the ever-widening hole in it!" - -- Firesign Theater, "How Can You Be In Two Places At + -- The Firesign Theatre, + "How Can You Be In Two Places At Once When You're Not Anywhere At All" % The salesman and the system analyst took off to spend a weekend in the @@ -4157,8 +4165,8 @@ make sure that they are Earthlings. The when some guy goes bananas, the cops rope off a sixteen block area around him and call a shrink from the medical school who stands atop a patrol car with a megaphone and shouts, "OK! THIS! ALL! STARTED! WHEN! YOU! WERE! -THREE! YEARS! OLD! ON! ACCOUNT! OF! YOUR MOTHER! RIGHT? SO! LET'S! -TALK! ABOUT! IT!" Down here they don't waste that kind of time. The LAPD +THREE! YEARS! OLD! ON! ACCOUNT! OF! YOUR MOTHER! RIGHT? SO! LET'S! +TALK! ABOUT! IT!" Down here they don't waste that kind of time. The LAPD has SWAT teams composed of guys who make Darth Vader look like Mr. Peepers. Before they go to bust a bookie joint they mortar it first. -- M. Christensen, "A Portland Innocent in LA" @@ -4270,7 +4278,7 @@ you the Widow Miffin?" a small boy asked "Oh, no?" replied the little boy. "Wait 'til you see what they're carrying upstairs!" % - There was a mad scientist (a mad... social... scientist) who kidnaped + There was a mad scientist (a mad... social... scientist) who kidnapped three colleagues, an engineer, a physicist, and a mathematician, and locked each of them in separate cells with plenty of canned food and water but no can opener. @@ -4282,13 +4290,13 @@ and escaped. off the tin cans by throwing them against the wall. She was developing a good pitching arm and a new quantum theory. The mathematician had stacked the unopened cans into a surprising -solution to the kissing problem; his dessicated corpse was propped calmly +solution to the kissing problem; his desiccated corpse was propped calmly against a wall, and this was inscribed on the floor: Theorem: If I can't open these cans, I'll die. Proof: assume the opposite... % There was once a programmer who was attached to the court of the -warlord Wu. The warlord asked the programmer: "Which is easier to design: +warlord of Wu. The warlord asked the programmer: "Which is easier to design: an accounting package or an operating system?" "An operating system," replied the programmer. The warlord uttered an exclamation of disbelief. "Surely an @@ -4328,7 +4336,7 @@ demands from him more than his utmost st sinew and brain and hope and fear and dreams -- and still calls for more. They are fools that think otherwise. No great effort was ever bought. No painting, no music, no poem, no cathedral in stone, no church, no state was -ever raised into being for payment of any kind. No parthenon, no Thermopylae +ever raised into being for payment of any kind. No Parthenon, no Thermopylae was ever built or fought for pay or glory; no Bukhara sacked, or China ground beneath Mongol heel, for loot or power alone. The payment for doing these things was itself the doing of them. @@ -4393,14 +4401,14 @@ be as easily led to beauty as to uglines relations, to joy as to bitterness, be said to be suffering from Hunter Thompson's disease. I don't have it this morning. It comes and goes. This morning I don't have Hunter Thompson's disease. - -- Kurt Vonnegut Jr. on Dr. Hunter S. Thompson: Excerpt + -- Kurt Vonnegut, Jr. on Dr. Hunter S. Thompson: Excerpt from "A Political Disease", Vonnegut's review of "Fear and Loathing: On the Campaign Trail '72" % - To A Quick Young Fox + To A Quick Young Fox: Why jog exquisite bulk, fond crazy vamp, Daft buxom jonquil, zephyr's gawky vice? -Guy fed by work, quiz Jove's xanthic lamp-- +Guy fed by work, quiz Jove's xanthic lamp -- Zow! Qualms by deja vu gyp fox-kin thrice. -- Lazy Dog % @@ -4565,7 +4573,7 @@ let him lie there all night." "Don't worry about that. They have a guard station in front of the White House that's open 24 hours a day. The guards would recognize Colson... and by that time of course his wife would have called the cops and reported -that a bunch of thugs had kidnaped him." +that a bunch of thugs had kidnapped him." "Wouldn't it be a little kinder if you drove about four more blocks and stopped at a phone box to ring the hospital and say, 'Would you mind going around to the front of the White House? There's a naked man lying outside @@ -4574,7 +4582,7 @@ in the street, bleeding to death...'" "It would be quite a story for the newspapers, wouldn't it?" "Yeah, I think it's safe to say we'd see some headlines on that one." -- Hunter S. Thompson, talking to R. Steadman on C. Colson, - ex-Marine captain, now born again, of Watergate fame. + ex-Marine captain, now born again, of Watergate fame. % "Well, it's garish, ugly, and derelicts have used it for a toilet. The rides are dilapidated to the point of being lethal, and could easily @@ -4593,7 +4601,7 @@ an End-user of Very Little Brain, and lo "Well, that was a piece of cake, eh K-9?" "Piece of cake, Master? Radial slice of baked confection ... coefficient of relevance to Key of Time: zero." - -- Dr. Who + -- "Doctor Who" % "We're running out of adjectives to describe our situation. We had crisis, then we went into chaos, and now what do we call this?" said @@ -4691,7 +4699,7 @@ ever happened to me... the most dreadful "Well, it's a highly technical, sensitive instrument we use in computer repair. Being a layman, you probably can't grasp exactly what it does. We call it a two-by-four." - -- Jeff MacNelley, "Shoe" + -- Jeff MacNelly, "Shoe" % "When I drink, *everybody* drinks!" a man shouted to the assembled bar patrons. A loud general cheer went up. After downing his @@ -4860,14 +4868,14 @@ There, that ought to patch it. Dist it "The famous scientific criminal, as famous among crooks as --" "My blushes, Watson," Holmes murmured, in a deprecating voice. "I was about to say 'as he is unknown to the public.'" - -- A. Conan Doyle, "The Valley of Fear" + -- Sir Arthur Conan Doyle, "The Valley of Fear" % "You know, it's at times like this when I'm trapped in a Vogon airlock with a man from Betelgeuse and about to die of asphyxiation in deep space that I really wish I'd listened to what my mother told me when I was young!" "Why, what did she tell you?" - "I don't know, I didn't listen." + "I don't know, I didn't listen!" -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy" % "You mean, if you allow the master to be uncivil, to treat you @@ -5076,7 +5084,7 @@ please communicate them by one of the fo ARPA: WastebasketSLMHQ.ARPA UUCP: [berkeley, seismo, harpo]!fubar!thekid!slmhq!wastebasket - Non-network sites: Federal Express to: + Non-network sites: Federal Express to: Wastebasket Room NE43-926 Copernicus, The Moon, 12345-6789 @@ -5223,7 +5231,7 @@ III. Any body passing through solid matt 8. Babes in Boyland 9. Santa's Magic Lap 10. Hot Buttered Elves - -- David Letterman's "Top Ten Christmas Movies in Times + -- David Letterman, "Top Ten Christmas Movies in Times Square" % ... A booming voice says, "Wrong, cretin!", and you notice that you @@ -5337,7 +5345,7 @@ other's private parts. ... computer hardware progress is so fast. No other technology since civilization began has seen six orders of magnitude in performance-price gain in 30 years. - -- Fred Brooks + -- Frederick Brooks, Jr. % ... [concerning quotation marks] even if we *_d_i_d* quote anybody in this business, it probably would be gibberish. @@ -5350,8 +5358,6 @@ introduction of Christianity, have been yet we have not advanced one inch towards uniformity. -- Thomas Jefferson, "Notes on Virginia" % - Eat drink and be merry, for tomorrow they may make it illegal. -% <<<<< EVACUATION ROUTE <<<<< % ... "fire" does not matter, "earth" and "air" and "water" do not matter. @@ -5440,14 +5446,14 @@ legally ... impeccable! -- Individuals who make their abode in vitreous edifices would be well advised to refrain from catapulting projectiles. -- Neophyte's serendipity. --- Exclusive dedication to necessitious chores without interludes of hedonistic +-- Exclusive dedication to necessitous chores without interludes of hedonistic diversion renders John a hebetudinous fellow. -- A revolving concretion of earthy or mineral matter accumulates no congeries of small, green bryophytic plant. -- Abstention from any aleatory undertaking precludes a potential escalation of a lucrative nature. -- Missiles of ligneous or osteal consistency have the potential of fracturing - osseous structure, but appelations will eternally remain innocuous. + osseous structure, but appellations will eternally remain innocuous. % ** MAXIMUM TERMINALS ACTIVE. TRY AGAIN LATER ** % @@ -5492,7 +5498,7 @@ their C programs. -- Robert Firth % ... Our second completely true news item was sent to me by Mr. H. Boyce -Connell Jr. of Atlanta, Ga., where he is involved in a law firm. One +Connell, Jr. of Atlanta, Ga., where he is involved in a law firm. One thing I like about the South is, folks there care about tradition. If somebody gets handed a name like "H. Boyce," he hangs on to it, puts it on his legal stationery, even passes it to his son, rather than do what @@ -5519,7 +5525,7 @@ awareness of the great goals for Man and galled saucepan does not reach 212 degrees Fahrenheit. % ... so long as the people do not care to exercise their freedom, those -who wish to tyrranize will do so; for tyrants are active and ardent, +who wish to tyrannize will do so; for tyrants are active and ardent, and will devote themselves in the name of any number of gods, religious and otherwise, to put shackles upon sleeping men. -- Voltarine de Cleyre @@ -5596,13 +5602,13 @@ cleanersayingIllgetyoumyprettyandyourlit % ... this is an awesome sight. The entire rebel resistance buried under six million hardbound copies of "The Naked Lunch." - -- The Firesign Theater + -- The Firesign Theatre % ... though his invention worked superbly -- his theory was a crock of sewage from beginning to end. -- Vernor Vinge, "The Peace War" % - U X + U X e dUdX, e dX, cosine, secant, tangent, sine, 3.14159... % * UNIX is a Trademark of Bell Laboratories. @@ -5647,7 +5653,7 @@ into doubt. % ... when fits of creativity run strong, more than one programmer or writer has been known to abandon the desktop for the more spacious floor. - -- Fred Brooks + -- Frederick Brooks, Jr. % ... which reminds me of the Carrot family: Ma Carrot, Pa Carrot, and Baby Carrot. One fine spring day they decided to go out for a picnic. They all @@ -5708,20 +5714,20 @@ QED: A sheet of paper is a lazy dog. 10. The city does not employ so called "Wallet Inspectors". -- David Letterman, "Top Ten New York City Pedestrian Tips" % -[1] Alexander the Great was a great general. -[2] Great generals are forewarned. -[3] Forewarned is forearmed. -[4] Four is an even number. -[5] Four is certainly an odd number of arms for a man to have. -[6] The only number that is both even and odd is infinity. +(1) Alexander the Great was a great general. +(2) Great generals are forewarned. +(3) Forewarned is forearmed. +(4) Four is an even number. +(5) Four is certainly an odd number of arms for a man to have. +(6) The only number that is both even and odd is infinity. Therefore, Alexander the Great had an infinite number of arms. % -[1] Alexander the Great was a great general. -[2] Great generals are forewarned. -[3] Forewarned is forearmed. -[4] Four is an even number. -[5] Four is certainly an odd number of arms for a man to have. -[6] The only number that is both even and odd is infinity. +(1) Alexander the Great was a great general. +(2) Great generals are forewarned. +(3) Forewarned is forearmed. +(4) Four is an even number. +(5) Four is certainly an odd number of arms for a man to have. +(6) The only number that is both even and odd is infinity. Therefore, all horses are black. % 1. Avoid fried meats which angry up the blood. @@ -5792,7 +5798,7 @@ you have to (always catch the buyer hung 2. I, David Letterman, will never rent out my farm again. 1. We are stardust. We are golden. We are going to look really stupid to future generations. - -- David Letterman, Top Ten Lessons of Woodstock + -- David Letterman, "Top Ten Lessons of Woodstock" % 10 Reasons Why a Beer is Better Than a Woman: @@ -5801,8 +5807,8 @@ you have to (always catch the buyer hung 3. A beer doesn't think baseball is stupid simply because the guys spit. 4. A beer doesn't give a [expletive deleted] if you keep a bunch of other beers on the side. - 5. A beer will not call you a sexist pig if you say "doberman" instead of - "doberperson". + 5. A beer will not call you a sexist pig if you say "Doberman" instead of + "Doberperson." 6. A beer won't get a job as a DJ and play 5 straight hours of lesbian folk music on yer fave radio station. 7. A beer understands why The Three Stooges are funny. @@ -5820,7 +5826,7 @@ FF buckets of bits on the bus FF buckets of bits on the bus FF buckets of bits Take one down, short it to ground -FE buckets of bits on the bus... +FE buckets of bits on the bus ad infinitum... % @@ -5932,13 +5938,13 @@ It isn't just a good idea, it's the law! What 20th Century U.S. President was almost impeached and what office did he later hold? % -3 syncs represent the trinity - init, the child and the eternal zombie +3 syncs represent the trinity -- init, the child and the eternal zombie process. In doing 3, you're paying homage to each and I think such traditions are important in this shallow, mercurial business we find ourselves in. -- Jordan K. Hubbard % -$3,000,000. +$3,000,000 % 355/113 -- Not the famous irrational number PI, but an incredible simulation. @@ -6050,7 +6056,7 @@ A beautiful woman is a blessing from Hea -- Kipling % A beautiful woman is a picture which drives all beholders nobly mad. - -- Emerson + -- Ralph Waldo Emerson % A beer delayed is a beer denied. % @@ -6067,7 +6073,7 @@ A billion hours ago man had not yet walk A billion dollars ago was late yesterday afternoon at the U.S. Treasury. % A biologist, a statistician, a mathematician and a computer scientist are on -a photo-safari in Africa. As they're driving along the savanna in their +a photo-safari in Africa. As they're driving along the savannah in their jeep, they stop and scout the horizon with their binoculars. The biologist: "Look! A herd of zebras! And there's a white zebra! @@ -6203,7 +6209,7 @@ invariably sat silent. The monk had alr and a moonlit night. One day he brought to Tortue a piece of string, and asked the same question. In reply, the Grand Tortue grasped the loop between his feet and, with a few simple manipulations, created a complex -string which he proferred wordlessly to the monk. At that moment, the monk +string which he proffered wordlessly to the monk. At that moment, the monk was enlightened. From then on, the monk did not bother Tortue. Instead, he made string after @@ -6261,9 +6267,10 @@ A city is a large community where people % A clash of doctrine is not a disaster - it is an opportunity. % -A classic is something that everyone wants to have read +A classic is something that everybody wants to have read and nobody wants to read. - -- Mark Twain, "The Disappearance of Literature" + -- Mark Twain quoting Professor Winchester, + "The Disappearance of Literature" % A clever prophet makes sure of the event first. % @@ -6438,7 +6445,7 @@ damned things is ample. A couch is as good as a chair. % A countryman between two lawyers is like a fish between two cats. - -- Ben Franklin + -- Benjamin Franklin % A couple of young fellers were fishing at their special pond off the beaten track when out of the bushes jumped the Game Warden. Immediately, @@ -6535,7 +6542,7 @@ A diplomatic husband said to his wife, " your birthday when you never look any older?" % A diplomat's life consists of three things: protocol, Geritol, and alcohol. - -- Adlai Stevenson + -- Adlai E. Stevenson % A distraught patient phoned her doctor's office. "Was it true," the woman inquired, "that the medication the doctor had prescribed was for the rest @@ -6544,7 +6551,7 @@ of her life?" the woman proceeded bravely on. "Well, I'm wondering, then, how serious my condition is. This prescription is marked `NO REFILLS'". % -A diva who specializes in risque arias is an off-coloratura soprano. +A diva who specializes in risqu'e arias is an off-coloratura soprano. % A doctor calls his patient to give him the results of his tests. "I have some bad news," says the doctor, "and some worse news." The bad news is @@ -6708,7 +6715,7 @@ dimension strictly exceeds the topologic -- Mandelbrot, "The Fractal Geometry of Nature" % A free society is one where it is safe to be unpopular. - -- Adlai Stevenson + -- Adlai E. Stevenson % A freelancer is one who gets paid by the word -- per piece or perhaps. -- Robert Benchley @@ -6728,11 +6735,11 @@ lawyers more than he hates his wife. A friend with weed is a friend indeed. % A full belly makes a dull brain. - -- Ben Franklin + -- Benjamin Franklin [and the local candy machine man. Ed] % -A 'full' life in my experience is usually full only of other +A "full" life in my experience is usually full only of other people's demands. % A furore Normanorum libera nos, O Domine! @@ -6782,7 +6789,7 @@ A gift of a flower will soon be made to A girl and a boy bump into each other -- surely an accident. A girl and a boy bump and her handkerchief drops -- surely another accident. But when a girl gives a boy a dead squid -- *_t_h_a_t _h_a_d _t_o _m_e_a_n _s_o_m_e_t_h_i_n_g*. - -- S. Morganstern, "The Silent Gondoliers" + -- S. Morgenstern, "The Silent Gondoliers" % A girl with a future avoids the man with a past. -- Evan Esar, "The Humor of Humor" @@ -6847,7 +6854,7 @@ then asks the backhoe operator for direc A GOOD WAY TO THREATEN somebody is to light a stick of dynamite. Then you call the guy and hold the burning fuse to the phone. "Hear that?" you say. "That's dynamite, baby." - -- Jack Handey, The New Mexican, 1988 + -- Jack Handey, "The New Mexican" (1988) % A gossip is one who talks to you about others, a bore is one who talks to you about himself; and a brilliant conversationalist is one who talks to @@ -6867,7 +6874,7 @@ to take it all away. A grammarian's life is always intense. % A great empire, like a great cake, is most easily diminished at the edges. - -- Ben Franklin + -- Benjamin Franklin % A great many people think they are thinking when they are merely rearranging their prejudices. @@ -6883,7 +6890,7 @@ indicating two directions at once. Full bushy black moustache and, at their corners, sank into little folds filled with disapproval and potato chip crumbs. In the shadow under the green visor of the cap Ignatius J. Reilly's supercilious blue and yellow eyes looked down -upon the other people waiting under the clock at the D.H. Holmes department +upon the other people waiting under the clock at the D. H. Holmes department store, studying the crowd of people for signs of bad taste in dress. Several of the outfits, Ignatius noticed, were new enough and expensive enough to be properly considered offenses against taste and decency. Possession of @@ -6981,19 +6988,19 @@ Stormtroopers, who can't hit the broad s -- Tom Galloway % A is for Amy who fell down the stairs, B is for Basil assaulted by bears. -C is for Clair who wasted away, D is for Desmond thrown out of the sleigh. +C is for Clara who wasted away, D is for Desmond thrown out of the sleigh. E is for Ernest who choked on a peach, F is for Fanny, sucked dry by a leech. G is for George, smothered under a rug, H is for Hector, done in by a thug. I is for Ida who drowned in the lake, J is for James who took lye, by mistake. K is for Kate who was struck with an axe, L is for Leo who swallowed some tacks. -M is for Maud who was swept out to sea, N is for Nevil who died of ennui. +M is for Maud who was swept out to sea, N is for Neville who died of ennui. O is for Olive, run through with an awl, P is for Prue, trampled flat in a brawl -Q is for Quinton who sank in a mire, R is for Rhoda, consumed by a fire. -S is for Susan who parished of fits, T is for Titas who flew into bits. +Q is for Quentin who sank in a mire, R is for Rhoda, consumed by a fire. +S is for Susan who parished of fits, T is for Titus who flew into bits. U is for Una who slipped down a drain, V is for Victor, squashed under a train. -W is for Winie, embedded in ice, X is for Xercies, devoured by mice. -Y is for Yoric whose head was bashed in, Z is for Zilla who drank too much gin. - -- Edward Gorey "The Gastly Crumb Tines" +W is for Winnie, embedded in ice, X is for Xerxes, devoured by mice. +Y is for Yorick whose head was bashed in, Z is for Zillah who drank too much gin. + -- Edward Gorey, "The Gashlycrumb Tinies" % A is for Apple. -- Hester Pryne @@ -7077,7 +7084,7 @@ The lady, indignant, removed her ear. % A language that doesn't affect the way you think about programming is not worth knowing. - -- Alan Perlis + -- Alan J. Perlis % A language that doesn't have everything is actually easier to program in than some that do. @@ -7138,7 +7145,7 @@ A lie in time saves nine. % A lie is an abomination unto the Lord and a very present help in time of trouble. - -- Adlai Stevenson + -- Adlai E. Stevenson % A life lived in fear is a life half lived. % @@ -7160,10 +7167,10 @@ And the clean ones so seldom are comical % A LISP programmer knows the value of everything, but the cost of nothing. - -- Alan Perlis + -- Alan J. Perlis % A list is only as strong as its weakest link. - -- Don Knuth + -- Donald E. Knuth % A little experience often upsets a lot of theory. % @@ -7171,7 +7178,7 @@ A little inaccuracy saves a world of exp -- C. E. Ayres % A little inaccuracy sometimes saves tons of explanation. - -- H. H. Munro, "Saki" + -- H. H. Munroe a.k.a. Saki, "The Square Egg" (1924) % A little kid went up to Santa and asked him, "Santa, you know when I'm bad right?" And Santa says, "Yes, I do." The little kid then asks, "And you @@ -7185,7 +7192,7 @@ those software systems that have excited the products of one or a few designing minds, great designers. Consider Unix, APL, Pascal, Modula, the Smalltalk interface, even Fortran; and contrast them with Cobol, PL/I, Algol, MVS/370, and MS-DOS. - -- Fred Brooks + -- Frederick Brooks, Jr. % A little word of doubtful number, A foe to rest and peaceful slumber. @@ -7208,7 +7215,7 @@ A lot of people are afraid of heights. -- Steven Wright % A lot of people I know believe in positive thinking, -and so do I. I believe everything positively stinks. +and so do I. I believe everything positively stinks. -- Lew Col % A lover without indiscretion is no lover at all. @@ -7228,7 +7235,7 @@ a beautiful woman. Somewhere, somebody' % A man always remembers his first love with special tenderness, but after that begins to bunch them. - -- Mencken + -- H. L. Mencken % A man arrived home early to find his wife in the arms of his best friend, who swore how much they were in love. To quiet the enraged husband, the @@ -7288,7 +7295,7 @@ staggers up to the door and confronts th "I'm sorry, sir, ties required." % A man is known by the company he organizes. - -- A. Bierce + -- Ambrose Bierce % A man is like a rusty wheel on a rusty cart, He sings his song as he rattles along and then he falls apart. @@ -7366,7 +7373,7 @@ Tell, me who is buried here?" "My wife's first husband." % A man who cannot seduce men cannot save them either. - -- Soren Kierkegaard + -- S. A. Kierkegaard (1813-1855) % A man who carries a cat by its tail learns something he can learn in no other way. @@ -7444,7 +7451,7 @@ but to protect the writer. % A method of solution is perfect if we can foresee from the start, and even prove, that following that method we shall attain our aim. - -- Leibnitz + -- Gottfried Wilhelm Leibniz % A Mexican newspaper reports that bored Royal Air Force pilots stationed on the Falkland Islands have devised what they consider a marvelous new @@ -7454,28 +7461,24 @@ along it at the water's edge. Perhaps t heads in unison watching the planes go by, and when the pilots turn around and fly back, the birds turn their heads in the opposite direction, like spectators at a slow-motion tennis match. Then, the -paper reports "The pilots fly out to sea and directly to the penguin +paper reports, "The pilots fly out to sea and directly to the penguin colony and overfly it. Heads go up, up, up, and ten thousand penguins fall over gently onto their backs. - -- Audobon Society Magazine - -2001-02-02, from http://news.bbc.co.uk: - -For five weeks, a team from the British Antarctic Survey (BAS) -monitored 1,000 king penguins on the island of South Georgia as -Lynx helicopters passed overhead. - -"Not one king penguin fell over when the helicopters came over," -said team leader Dr Richard Stone. + -- Audubon Society Magazine -"As the aircraft approached, the birds went quiet and stopped +[From the BBC, 2001-02-02: + For five weeks, a team from the British Antarctic Survey (BAS) +monitored 1,000 king penguins on the island of South Georgia as Lynx +helicopters passed overhead. + "Not one king penguin fell over when the helicopters came over," +said team leader Dr. Richard Stone. + "As the aircraft approached, the birds went quiet and stopped calling to each other, and adolescent birds that were not associated with nests began walking away from the noise. Pure animal instinct, really." - -The conclusion, said Dr Stone, is that flights over 305 metres -(1,000 feet) caused "only minor and transitory ecological effects" -on king penguins. + The conclusion, said Dr. Stone, is that flights over 305 metres +(1,000 feet) caused "only minor and transitory ecological effects" on +king penguins.] % A mighty creature is the germ, Though smaller than the pachyderm. @@ -7613,7 +7616,7 @@ A nickel ain't worth a dime anymore. % A "No" uttered from deepest conviction is better and greater than a "Yes" merely uttered to please, or what is worse, to avoid trouble. - -- Mahatma Ghandi + -- Mahatma Gandhi % A novice of the temple once approached the Chief Priest with a question. @@ -7684,12 +7687,12 @@ A person who has something looks at all % A person who is more than casually interested in computers should be well schooled in machine language, since it is a fundamental part of a computer. - -- Donald Knuth + -- Donald E. Knuth % A pessimist is a man who has been compelled to live with an optimist. -- Elbert Hubbard % -A physicist is an atoms way of knowing about atoms. +A physicist is an atom's way of knowing about atoms. -- George Wald % A pickup with three guys in it pulls into the lumber yard. One of the men @@ -7756,7 +7759,7 @@ paycheck?" % A political man can have as his aim the realization of freedom, but he has no means to realize it other than through violence. - -- Jean Paul Sartre + -- Jean-Paul Sartre % A possum must be himself, and being himself he is honest. -- Walt Kelly @@ -7764,7 +7767,7 @@ A possum must be himself, and being hims A pound of salt will not sweeten a single cup of tea. % A power so great, it can only be used for Good or Evil! - -- Firesign Theatre, "The Giant Rat of Summatra" + -- The Firesign Theatre, "The Giant Rat of Sumatra" % A "practical joker" deserves applause for his wit according to its quality. Bastinado is about right. For exceptional wit one might grant keelhauling. @@ -7777,7 +7780,7 @@ A prediction is worth twenty explanation A pretty foot is one of the greatest gifts of nature... please send me your last pair of shoes, already worn out in dancing... so I can have something of yours to press against my heart. - -- Goethe + -- Johann Wolfgang von Goethe % A pretty woman can do anything; an ugly woman must do everything. % @@ -7831,7 +7834,7 @@ when its programs require attention to t % A prohibitionist is the sort of man one wouldn't care to drink with -- even if he drank. - -- Mencken + -- H. L. Mencken % A prominent broadcaster, on a big-game safari in Africa, was taken to a watering hole where the life of the jungle could be observed. As he @@ -8019,7 +8022,7 @@ die and a new generation grows up that i % A sect or party is an elegant incognito devised to save a man from the vexation of thinking. - -- Ralph Waldo Emerson, Journals, 1831 + -- Ralph Waldo Emerson, "Journals" (1831) % A sense of desolation and uncertainty, of futility, of the baselessness of aspirations, of the vanity of endeavor, and a thirst for a life giving @@ -8197,7 +8200,7 @@ Lord of the Rings LITE(tm) Some guys take a long vacation to throw a ring into a volcano. Hamlet LITE(tm) - -- by Wm. Shakespeare + -- by William Shakespeare A college student on vacation with family problems, a screwy girl-friend and a mother who won't act her age. @@ -8210,7 +8213,7 @@ A Tale of Two Cities LITE(tm) lady who knits. Crime and Punishment LITE(tm) - -- by Fyodor Dostoevski + -- by Fyodor Dostoyevsky A man sends a nasty letter to a pawnbroker, but later *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Wed Mar 31 18:36:04 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B7C4B106564A; Wed, 31 Mar 2010 18:36:04 +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 A677C8FC12; Wed, 31 Mar 2010 18:36:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2VIa42J088700; Wed, 31 Mar 2010 18:36:04 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2VIa4x3088698; Wed, 31 Mar 2010 18:36:04 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201003311836.o2VIa4x3088698@svn.freebsd.org> From: Xin LI Date: Wed, 31 Mar 2010 18:36: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: r205996 - head/lib/libc/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Mar 2010 18:36:04 -0000 Author: delphij Date: Wed Mar 31 18:36:04 2010 New Revision: 205996 URL: http://svn.freebsd.org/changeset/base/205996 Log: Add prototypes for libc private interfaces. While I'm there, apply __unused whenever appropriate. Reviewed by: md5(1) Modified: head/lib/libc/gen/_spinlock_stub.c Modified: head/lib/libc/gen/_spinlock_stub.c ============================================================================== --- head/lib/libc/gen/_spinlock_stub.c Wed Mar 31 18:21:25 2010 (r205995) +++ head/lib/libc/gen/_spinlock_stub.c Wed Mar 31 18:36:04 2010 (r205996) @@ -34,6 +34,11 @@ __FBSDID("$FreeBSD$"); #include "spinlock.h" +long _atomic_lock_stub(volatile long *); +void _spinlock_stub(spinlock_t *); +void _spinunlock_stub(spinlock_t *); +void _spinlock_debug_stub(spinlock_t *, char *, int); + /* * Declare weak definitions in case the application is not linked * with libpthread. @@ -43,12 +48,11 @@ __weak_reference(_spinlock_stub, _spinlo __weak_reference(_spinunlock_stub, _spinunlock); __weak_reference(_spinlock_debug_stub, _spinlock_debug); - /* * This function is a stub for the _atomic_lock function in libpthread. */ long -_atomic_lock_stub(volatile long *lck) +_atomic_lock_stub(volatile long *lck __unused) { return (0L); } @@ -58,7 +62,7 @@ _atomic_lock_stub(volatile long *lck) * This function is a stub for the spinlock function in libpthread. */ void -_spinlock_stub(spinlock_t *lck) +_spinlock_stub(spinlock_t *lck __unused) { } @@ -66,7 +70,7 @@ _spinlock_stub(spinlock_t *lck) * This function is a stub for the spinunlock function in libpthread. */ void -_spinunlock_stub(spinlock_t *lck) +_spinunlock_stub(spinlock_t *lck __unused) { } @@ -74,6 +78,6 @@ _spinunlock_stub(spinlock_t *lck) * This function is a stub for the debug spinlock function in libpthread. */ void -_spinlock_debug_stub(spinlock_t *lck, char *fname, int lineno) +_spinlock_debug_stub(spinlock_t *lck __unused, char *fname __unused, int lineno __unused) { } From owner-svn-src-head@FreeBSD.ORG Wed Mar 31 18:37:01 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 172321065675; Wed, 31 Mar 2010 18:37:01 +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 05F768FC27; Wed, 31 Mar 2010 18:37:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2VIb0do088938; Wed, 31 Mar 2010 18:37:00 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2VIb0Iv088935; Wed, 31 Mar 2010 18:37:00 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201003311837.o2VIb0Iv088935@svn.freebsd.org> From: Xin LI Date: Wed, 31 Mar 2010 18:37: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: r205997 - head/lib/libc/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Mar 2010 18:37:01 -0000 Author: delphij Date: Wed Mar 31 18:37:00 2010 New Revision: 205997 URL: http://svn.freebsd.org/changeset/base/205997 Log: Add prototype for libc internal interfaces. Modified: head/lib/libc/gen/__getosreldate.c head/lib/libc/gen/_thread_init.c Modified: head/lib/libc/gen/__getosreldate.c ============================================================================== --- head/lib/libc/gen/__getosreldate.c Wed Mar 31 18:36:04 2010 (r205996) +++ head/lib/libc/gen/__getosreldate.c Wed Mar 31 18:37:00 2010 (r205997) @@ -30,6 +30,8 @@ __FBSDID("$FreeBSD$"); #include #include +int __getosreldate(void); + /* * This is private to libc. It is intended for wrapping syscall stubs in order * to avoid having to put SIGSYS signal handlers in place to test for presence Modified: head/lib/libc/gen/_thread_init.c ============================================================================== --- head/lib/libc/gen/_thread_init.c Wed Mar 31 18:36:04 2010 (r205996) +++ head/lib/libc/gen/_thread_init.c Wed Mar 31 18:37:00 2010 (r205997) @@ -29,6 +29,8 @@ __FBSDID("$FreeBSD$"); #include +void _thread_init_stub(void); + __weak_reference(_thread_init_stub, _thread_init); __weak_reference(_thread_autoinit_dummy_decl_stub, _thread_autoinit_dummy_decl); From owner-svn-src-head@FreeBSD.ORG Wed Mar 31 20:00:45 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4E25B1065672; Wed, 31 Mar 2010 20:00:45 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3CD8D8FC13; Wed, 31 Mar 2010 20:00:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2VK0jdo007437; Wed, 31 Mar 2010 20:00:45 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2VK0jGl007435; Wed, 31 Mar 2010 20:00:45 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <201003312000.o2VK0jGl007435@svn.freebsd.org> From: Fabien Thomas Date: Wed, 31 Mar 2010 20:00: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: r205998 - head/sys/dev/hwpmc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Mar 2010 20:00:45 -0000 Author: fabient Date: Wed Mar 31 20:00:44 2010 New Revision: 205998 URL: http://svn.freebsd.org/changeset/base/205998 Log: If there is multiple PMCs for the same interrupt ignore new post. This will indirectly fix a bug where the thread will be pinned forever if the assert is not compiled. MFC after: 3days Modified: head/sys/dev/hwpmc/hwpmc_mod.c Modified: head/sys/dev/hwpmc/hwpmc_mod.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_mod.c Wed Mar 31 18:37:00 2010 (r205997) +++ head/sys/dev/hwpmc/hwpmc_mod.c Wed Mar 31 20:00:44 2010 (r205998) @@ -3972,9 +3972,11 @@ pmc_post_callchain_callback(void) td = curthread; - KASSERT((td->td_pflags & TDP_CALLCHAIN) == 0, - ("[pmc,%d] thread %p already marked for callchain capture", - __LINE__, (void *) td)); + /* + * If there is multiple PMCs for the same interrupt ignore new post + */ + if (td->td_pflags & TDP_CALLCHAIN) + return; /* * Mark this thread as needing callchain capture. From owner-svn-src-head@FreeBSD.ORG Wed Mar 31 20:15:20 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A49AE1065672; Wed, 31 Mar 2010 20:15:20 +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 938898FC0C; Wed, 31 Mar 2010 20:15:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2VKFKwm010657; Wed, 31 Mar 2010 20:15:20 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2VKFK4T010655; Wed, 31 Mar 2010 20:15:20 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201003312015.o2VKFK4T010655@svn.freebsd.org> From: Alexander Motin Date: Wed, 31 Mar 2010 20:15: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: r205999 - head/sys/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Mar 2010 20:15:20 -0000 Author: mav Date: Wed Mar 31 20:15:20 2010 New Revision: 205999 URL: http://svn.freebsd.org/changeset/base/205999 Log: ng_gif depends on gif. Modified: head/sys/conf/files Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Wed Mar 31 20:00:44 2010 (r205998) +++ head/sys/conf/files Wed Mar 31 20:15:20 2010 (r205999) @@ -2322,7 +2322,7 @@ net/if_ethersubr.c optional ether \ net/if_faith.c optional faith net/if_fddisubr.c optional fddi net/if_fwsubr.c optional fwip -net/if_gif.c optional gif +net/if_gif.c optional gif | netgraph_gif net/if_gre.c optional gre inet net/if_iso88025subr.c optional token net/if_lagg.c optional lagg @@ -2485,7 +2485,7 @@ netinet/if_ether.c optional inet ether netinet/igmp.c optional inet netinet/in.c optional inet netinet/ip_carp.c optional inet carp | inet6 carp -netinet/in_gif.c optional gif inet +netinet/in_gif.c optional gif inet | netgraph_gif inet netinet/ip_gre.c optional gre inet netinet/ip_id.c optional inet netinet/in_mcast.c optional inet @@ -2560,7 +2560,7 @@ netinet6/frag6.c optional inet6 netinet6/icmp6.c optional inet6 netinet6/in6.c optional inet6 netinet6/in6_cksum.c optional inet6 -netinet6/in6_gif.c optional gif inet6 +netinet6/in6_gif.c optional gif inet6 | netgraph_gif inet6 netinet6/in6_ifattach.c optional inet6 netinet6/in6_mcast.c optional inet6 netinet6/in6_pcb.c optional inet6 From owner-svn-src-head@FreeBSD.ORG Wed Mar 31 20:37:44 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9B58C106564A; Wed, 31 Mar 2010 20:37:44 +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 8A6768FC08; Wed, 31 Mar 2010 20:37:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2VKbihP015583; Wed, 31 Mar 2010 20:37:44 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2VKbiPe015581; Wed, 31 Mar 2010 20:37:44 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201003312037.o2VKbiPe015581@svn.freebsd.org> From: Alexander Motin Date: Wed, 31 Mar 2010 20: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: r206000 - head/sys/netgraph X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Mar 2010 20:37:44 -0000 Author: mav Date: Wed Mar 31 20:37:44 2010 New Revision: 206000 URL: http://svn.freebsd.org/changeset/base/206000 Log: Make ng_ppp fulfill upper protocol stack layers alignment requirements on platforms with strict alignment constraints. This fixes kernel panics on arm and probably other architectures. PR: sparc64/80410 Modified: head/sys/netgraph/ng_ppp.c Modified: head/sys/netgraph/ng_ppp.c ============================================================================== --- head/sys/netgraph/ng_ppp.c Wed Mar 31 20:15:20 2010 (r205999) +++ head/sys/netgraph/ng_ppp.c Wed Mar 31 20:37:44 2010 (r206000) @@ -907,7 +907,21 @@ ng_ppp_proto_recv(node_p node, item_p it const priv_p priv = NG_NODE_PRIVATE(node); hook_p outHook = NULL; int error; +#ifdef ALIGNED_POINTER + struct mbuf *m, *n; + NGI_GET_M(item, m); + if (!ALIGNED_POINTER(mtod(m, caddr_t), uint32_t)) { + n = m_defrag(m, M_NOWAIT); + if (n == NULL) { + m_freem(m); + NG_FREE_ITEM(item); + return (ENOBUFS); + } + m = n; + } + NGI_M(item) = m; +#endif /* ALIGNED_POINTER */ switch (proto) { case PROT_IP: if (priv->conf.enableIP) From owner-svn-src-head@FreeBSD.ORG Wed Mar 31 20:43:25 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4F3211065672; Wed, 31 Mar 2010 20:43:25 +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 3D66F8FC18; Wed, 31 Mar 2010 20:43:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2VKhPKL016857; Wed, 31 Mar 2010 20:43:25 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2VKhP9Y016850; Wed, 31 Mar 2010 20:43:25 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201003312043.o2VKhP9Y016850@svn.freebsd.org> From: Marius Strobl Date: Wed, 31 Mar 2010 20: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: r206001 - head/sys/dev/e1000 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Mar 2010 20:43:25 -0000 Author: marius Date: Wed Mar 31 20:43:24 2010 New Revision: 206001 URL: http://svn.freebsd.org/changeset/base/206001 Log: Hook the identification LEDs of igb(4), lem(4) and em(4) devices up with led(4) so they can be lit or f.e. made blink via `echo f2 > /dev/led/em0` for localization purposes. Approved by: jfv MFC afer: 1 week (after r205869) Modified: head/sys/dev/e1000/if_em.c head/sys/dev/e1000/if_em.h head/sys/dev/e1000/if_igb.c head/sys/dev/e1000/if_igb.h head/sys/dev/e1000/if_lem.c head/sys/dev/e1000/if_lem.h Modified: head/sys/dev/e1000/if_em.c ============================================================================== --- head/sys/dev/e1000/if_em.c Wed Mar 31 20:37:44 2010 (r206000) +++ head/sys/dev/e1000/if_em.c Wed Mar 31 20:43:24 2010 (r206001) @@ -77,6 +77,7 @@ #include #include +#include #include #include @@ -267,6 +268,7 @@ static void em_release_hw_control(st static void em_get_wakeup(device_t); static void em_enable_wakeup(device_t); static int em_enable_phy_wakeup(struct adapter *); +static void em_led_func(void *, int); static int em_irq_fast(void *); @@ -656,6 +658,9 @@ em_attach(device_t dev) /* Tell the stack that the interface is not active */ adapter->ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE); + adapter->led_dev = led_create(em_led_func, adapter, + device_get_nameunit(dev)); + INIT_DEBUGOUT("em_attach: end"); return (0); @@ -769,6 +774,9 @@ em_resume(device_t dev) struct adapter *adapter = device_get_softc(dev); struct ifnet *ifp = adapter->ifp; + if (adapter->led_dev != NULL) + led_destroy(adapter->led_dev); + EM_CORE_LOCK(adapter); em_init_locked(adapter); em_init_manageability(adapter); @@ -2163,6 +2171,9 @@ em_stop(void *arg) e1000_reset_hw(&adapter->hw); E1000_WRITE_REG(&adapter->hw, E1000_WUC, 0); + + e1000_led_off(&adapter->hw); + e1000_cleanup_led(&adapter->hw); } @@ -4538,7 +4549,7 @@ em_get_wakeup(device_t dev) /* * Enable PCI Wake On Lan capability */ -void +static void em_enable_wakeup(device_t dev) { struct adapter *adapter = device_get_softc(dev); @@ -4690,6 +4701,22 @@ out: return ret; } +static void +em_led_func(void *arg, int onoff) +{ + struct adapter *adapter = arg; + + EM_CORE_LOCK(adapter); + if (onoff) { + e1000_setup_led(&adapter->hw); + e1000_led_on(&adapter->hw); + } else { + e1000_led_off(&adapter->hw); + e1000_cleanup_led(&adapter->hw); + } + EM_CORE_UNLOCK(adapter); +} + /********************************************************************** * * Update the board statistics counters. Modified: head/sys/dev/e1000/if_em.h ============================================================================== --- head/sys/dev/e1000/if_em.h Wed Mar 31 20:37:44 2010 (r206000) +++ head/sys/dev/e1000/if_em.h Wed Mar 31 20:43:24 2010 (r206001) @@ -337,6 +337,7 @@ struct adapter { /* FreeBSD operating-system-specific structures. */ struct e1000_osdep osdep; struct device *dev; + struct cdev *led_dev; struct resource *memory; struct resource *flash; Modified: head/sys/dev/e1000/if_igb.c ============================================================================== --- head/sys/dev/e1000/if_igb.c Wed Mar 31 20:37:44 2010 (r206000) +++ head/sys/dev/e1000/if_igb.c Wed Mar 31 20:43:24 2010 (r206001) @@ -83,6 +83,7 @@ #include #include +#include #include #include @@ -234,6 +235,7 @@ static void igb_release_manageability(st static void igb_get_hw_control(struct adapter *); static void igb_release_hw_control(struct adapter *); static void igb_enable_wakeup(device_t); +static void igb_led_func(void *, int); static int igb_irq_fast(void *); static void igb_add_rx_process_limit(struct adapter *, const char *, @@ -585,6 +587,9 @@ igb_attach(device_t dev) /* Tell the stack that the interface is not active */ adapter->ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE); + adapter->led_dev = led_create(igb_led_func, adapter, + device_get_nameunit(dev)); + INIT_DEBUGOUT("igb_attach: end"); return (0); @@ -624,6 +629,9 @@ igb_detach(device_t dev) return (EBUSY); } + if (adapter->led_dev != NULL) + led_destroy(adapter->led_dev); + #ifdef DEVICE_POLLING if (ifp->if_capenable & IFCAP_POLLING) ether_poll_deregister(ifp); @@ -2002,6 +2010,9 @@ igb_stop(void *arg) e1000_reset_hw(&adapter->hw); E1000_WRITE_REG(&adapter->hw, E1000_WUC, 0); + + e1000_led_off(&adapter->hw); + e1000_cleanup_led(&adapter->hw); } @@ -4613,7 +4624,7 @@ igb_is_valid_ether_addr(uint8_t *addr) /* * Enable PCI Wake On Lan capability */ -void +static void igb_enable_wakeup(device_t dev) { u16 cap, status; @@ -4634,6 +4645,21 @@ igb_enable_wakeup(device_t dev) return; } +static void +igb_led_func(void *arg, int onoff) +{ + struct adapter *adapter = arg; + + IGB_CORE_LOCK(adapter); + if (onoff) { + e1000_setup_led(&adapter->hw); + e1000_led_on(&adapter->hw); + } else { + e1000_led_off(&adapter->hw); + e1000_cleanup_led(&adapter->hw); + } + IGB_CORE_UNLOCK(adapter); +} /********************************************************************** * Modified: head/sys/dev/e1000/if_igb.h ============================================================================== --- head/sys/dev/e1000/if_igb.h Wed Mar 31 20:37:44 2010 (r206000) +++ head/sys/dev/e1000/if_igb.h Wed Mar 31 20:43:24 2010 (r206001) @@ -361,6 +361,7 @@ struct adapter { struct e1000_osdep osdep; struct device *dev; + struct cdev *led_dev; struct resource *pci_mem; struct resource *msix_mem; Modified: head/sys/dev/e1000/if_lem.c ============================================================================== --- head/sys/dev/e1000/if_lem.c Wed Mar 31 20:37:44 2010 (r206000) +++ head/sys/dev/e1000/if_lem.c Wed Mar 31 20:43:24 2010 (r206001) @@ -79,6 +79,7 @@ #include #include +#include #include #include @@ -253,6 +254,7 @@ static void lem_release_hw_control(s static void lem_get_wakeup(device_t); static void lem_enable_wakeup(device_t); static int lem_enable_phy_wakeup(struct adapter *); +static void lem_led_func(void *, int); #ifdef EM_LEGACY_IRQ static void lem_intr(void *); @@ -667,6 +669,9 @@ lem_attach(device_t dev) /* Tell the stack that the interface is not active */ adapter->ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE); + adapter->led_dev = led_create(lem_led_func, adapter, + device_get_nameunit(dev)); + INIT_DEBUGOUT("lem_attach: end"); return (0); @@ -722,6 +727,9 @@ lem_detach(device_t dev) ether_poll_deregister(ifp); #endif + if (adapter->led_dev != NULL) + led_destroy(adapter->led_dev); + EM_CORE_LOCK(adapter); EM_TX_LOCK(adapter); adapter->in_detach = 1; @@ -2252,6 +2260,9 @@ lem_stop(void *arg) e1000_reset_hw(&adapter->hw); if (adapter->hw.mac.type >= e1000_82544) E1000_WRITE_REG(&adapter->hw, E1000_WUC, 0); + + e1000_led_off(&adapter->hw); + e1000_cleanup_led(&adapter->hw); } @@ -4126,7 +4137,7 @@ lem_get_wakeup(device_t dev) /* * Enable PCI Wake On Lan capability */ -void +static void lem_enable_wakeup(device_t dev) { struct adapter *adapter = device_get_softc(dev); @@ -4268,6 +4279,21 @@ out: return ret; } +static void +lem_led_func(void *arg, int onoff) +{ + struct adapter *adapter = arg; + + EM_CORE_LOCK(adapter); + if (onoff) { + e1000_setup_led(&adapter->hw); + e1000_led_on(&adapter->hw); + } else { + e1000_led_off(&adapter->hw); + e1000_cleanup_led(&adapter->hw); + } + EM_CORE_UNLOCK(adapter); +} /********************************************************************* * 82544 Coexistence issue workaround. Modified: head/sys/dev/e1000/if_lem.h ============================================================================== --- head/sys/dev/e1000/if_lem.h Wed Mar 31 20:37:44 2010 (r206000) +++ head/sys/dev/e1000/if_lem.h Wed Mar 31 20:43:24 2010 (r206001) @@ -293,6 +293,7 @@ struct adapter { /* FreeBSD operating-system-specific structures. */ struct e1000_osdep osdep; struct device *dev; + struct cdev *led_dev; struct resource *memory; struct resource *flash; From owner-svn-src-head@FreeBSD.ORG Wed Mar 31 20:55:13 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 84D7A106564A; Wed, 31 Mar 2010 20:55:13 +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 726D98FC0C; Wed, 31 Mar 2010 20:55:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2VKtDPs019663; Wed, 31 Mar 2010 20:55:13 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2VKtDOF019648; Wed, 31 Mar 2010 20:55:13 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201003312055.o2VKtDOF019648@svn.freebsd.org> From: Xin LI Date: Wed, 31 Mar 2010 20:55: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: r206002 - head/lib/libz X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Mar 2010 20:55:13 -0000 Author: delphij Date: Wed Mar 31 20:55:13 2010 New Revision: 206002 URL: http://svn.freebsd.org/changeset/base/206002 Log: Update to 1.2.4.1 (beta). Modified: head/lib/libz/ChangeLog head/lib/libz/README head/lib/libz/crc32.c head/lib/libz/deflate.c head/lib/libz/gzguts.h (contents, props changed) head/lib/libz/gzlib.c head/lib/libz/gzread.c head/lib/libz/inftrees.c head/lib/libz/minigzip.c head/lib/libz/zconf.h head/lib/libz/zlib.3 head/lib/libz/zlib.h head/lib/libz/zutil.c head/lib/libz/zutil.h Directory Properties: head/lib/libz/ (props changed) Modified: head/lib/libz/ChangeLog ============================================================================== --- head/lib/libz/ChangeLog Wed Mar 31 20:43:24 2010 (r206001) +++ head/lib/libz/ChangeLog Wed Mar 31 20:55:13 2010 (r206002) @@ -1,6 +1,30 @@ ChangeLog file for zlib +Changes in 1.2.4.1 (28 Mar 2010) +- Remove the use of [a-z] constructs for sed in configure [gentoo 310225] +- Remove $(SHAREDLIB) from LIBS in Makefile.in [Creech] +- Restore "for debugging" comment on sprintf() in gzlib.c +- Remove fdopen for MVS from gzguts.h +- Put new README-WIN32.txt in win32 [Rowe] +- Add check for shell to configure and invoke another shell if needed +- Fix big fat stinking bug in gzseek() on uncompressed files +- Remove vestigial F_OPEN64 define in zutil.h +- Set and check the value of _LARGEFILE_SOURCE and _LARGEFILE64_SOURCE +- Avoid errors on non-LFS systems when applications define LFS macros +- Set EXE to ".exe" in configure for MINGW [Kahle] +- Match crc32() in crc32.c exactly to the prototype in zlib.h [Sherrill] +- Add prefix for cross-compilation in win32/makefile.gcc [Bar-Lev] +- Add DLL install in win32/makefile.gcc [Bar-Lev] +- Allow Linux* or linux* from uname in configure [Bar-Lev] +- Allow ldconfig to be redefined in configure and Makefile.in [Bar-Lev] +- Add cross-compilation prefixes to configure [Bar-Lev] +- Match type exactly in gz_load() invocation in gzread.c +- Match type exactly of zcalloc() in zutil.c to zlib.h alloc_func +- Provide prototypes for *64 functions when building zlib without LFS +- Don't use -lc when linking shared library on MinGW +- Remove errno.h check in configure and vestigial errno code in zutil.h + Changes in 1.2.4 (14 Mar 2010) - Fix VER3 extraction in configure for no fourth subversion - Update zlib.3, add docs to Makefile.in to make .pdf out of it Modified: head/lib/libz/README ============================================================================== --- head/lib/libz/README Wed Mar 31 20:43:24 2010 (r206001) +++ head/lib/libz/README Wed Mar 31 20:55:13 2010 (r206002) @@ -1,6 +1,6 @@ ZLIB DATA COMPRESSION LIBRARY -zlib 1.2.4 is a general purpose data compression library. All the code is +zlib 1.2.4.1 is a general purpose data compression library. All the code is thread safe. The data format used by the zlib library is described by RFCs (Request for Comments) 1950 to 1952 in the files http://www.ietf.org/rfc/rfc1950.txt (zlib format), rfc1951.txt (deflate format) @@ -30,7 +30,7 @@ Mark Nelson wrote an ar issue of Dr. Dobb's Journal; a copy of the article is available at http://marknelson.us/1997/01/01/zlib-engine/ . -The changes made in version 1.2.4 are documented in the file ChangeLog. +The changes made in version 1.2.4.1 are documented in the file ChangeLog. Unsupported third party contributions are provided in directory contrib/ . Modified: head/lib/libz/crc32.c ============================================================================== --- head/lib/libz/crc32.c Wed Mar 31 20:43:24 2010 (r206001) +++ head/lib/libz/crc32.c Wed Mar 31 20:55:13 2010 (r206002) @@ -221,7 +221,7 @@ const unsigned long FAR * ZEXPORT get_cr unsigned long ZEXPORT crc32(crc, buf, len) unsigned long crc; const unsigned char FAR *buf; - unsigned len; + uInt len; { if (buf == Z_NULL) return 0UL; Modified: head/lib/libz/deflate.c ============================================================================== --- head/lib/libz/deflate.c Wed Mar 31 20:43:24 2010 (r206001) +++ head/lib/libz/deflate.c Wed Mar 31 20:55:13 2010 (r206002) @@ -52,7 +52,7 @@ #include "deflate.h" const char deflate_copyright[] = - " deflate 1.2.4 Copyright 1995-2010 Jean-loup Gailly and Mark Adler "; + " deflate 1.2.4.1 Copyright 1995-2010 Jean-loup Gailly and Mark Adler "; /* If you use the zlib library in a product, an acknowledgment is welcome in the documentation of your product. If for some reason you cannot Modified: head/lib/libz/gzguts.h ============================================================================== --- head/lib/libz/gzguts.h Wed Mar 31 20:43:24 2010 (r206001) +++ head/lib/libz/gzguts.h Wed Mar 31 20:55:13 2010 (r206002) @@ -3,9 +3,9 @@ * For conditions of distribution and use, see copyright notice in zlib.h */ -#ifdef _LARGEFILE64_SOURCE +#if _LARGEFILE64_SOURCE == 1 # ifndef _LARGEFILE_SOURCE -# define _LARGEFILE_SOURCE +# define _LARGEFILE_SOURCE 1 # endif # ifdef _FILE_OFFSET_BITS # undef _FILE_OFFSET_BITS @@ -44,7 +44,7 @@ #endif /* get errno and strerror definition */ -#if defined UNDER_CE && defined NO_ERRNO_H +#if defined UNDER_CE # include # define zstrerror() gz_strwinerror((DWORD)GetLastError()) #else @@ -56,13 +56,7 @@ # endif #endif -/* MVS fdopen() */ -#ifdef __MVS__ - #pragma map (fdopen , "\174\174FDOPEN") - FILE *fdopen(int, const char *); -#endif - -#ifdef _LARGEFILE64_SOURCE +#if _LARGEFILE64_SOURCE == 1 # define z_off64_t off64_t #else # define z_off64_t z_off_t @@ -117,7 +111,7 @@ typedef gz_state FAR *gz_statep; /* shared functions */ ZEXTERN void ZEXPORT gz_error OF((gz_statep, int, const char *)); -#if defined UNDER_CE && defined NO_ERRNO_H +#if defined UNDER_CE ZEXTERN char ZEXPORT *gz_strwinerror OF((DWORD error)); #endif Modified: head/lib/libz/gzlib.c ============================================================================== --- head/lib/libz/gzlib.c Wed Mar 31 20:43:24 2010 (r206001) +++ head/lib/libz/gzlib.c Wed Mar 31 20:55:13 2010 (r206002) @@ -3,9 +3,12 @@ * For conditions of distribution and use, see copyright notice in zlib.h */ +/* $FreeBSD$ */ + #include "gzguts.h" +#include "zutil.h" -#ifdef _LARGEFILE64_SOURCE +#if _LARGEFILE64_SOURCE == 1 && _LFS64_LARGEFILE == 1 # define LSEEK lseek64 #else # define LSEEK lseek @@ -15,7 +18,7 @@ local void gz_reset OF((gz_statep)); local gzFile gz_open OF((const char *, int, const char *)); -#if defined UNDER_CE && defined NO_ERRNO_H +#if defined UNDER_CE /* Map the Windows error number in ERROR to a locale-dependent error message string and return a pointer to it. Typically, the values for ERROR come @@ -65,7 +68,7 @@ char ZEXPORT *gz_strwinerror (error) return buf; } -#endif /* UNDER_CE && NO_ERRNO_H */ +#endif /* UNDER_CE */ /* Reset gzip file state */ local void gz_reset(state) @@ -217,7 +220,7 @@ gzFile ZEXPORT gzdopen(fd, mode) if (fd == -1 || (path = malloc(7 + 3 * sizeof(int))) == NULL) return NULL; - sprintf(path, "", fd); + sprintf(path, "", fd); /* for debugging */ gz = gz_open(path, fd, mode); free(path); return gz; @@ -305,7 +308,7 @@ z_off64_t ZEXPORT gzseek64(file, offset, /* if within raw area while reading, just go there */ if (state->mode == GZ_READ && state->how == COPY && state->pos + offset >= state->raw) { - ret = LSEEK(state->fd, offset, SEEK_CUR); + ret = LSEEK(state->fd, offset - state->have, SEEK_CUR); if (ret == -1) return -1; state->have = 0; Modified: head/lib/libz/gzread.c ============================================================================== --- head/lib/libz/gzread.c Wed Mar 31 20:43:24 2010 (r206001) +++ head/lib/libz/gzread.c Wed Mar 31 20:55:13 2010 (r206002) @@ -3,6 +3,8 @@ * For conditions of distribution and use, see copyright notice in zlib.h */ +/* $FreeBSD$ */ + #include "gzguts.h" #include @@ -56,7 +58,8 @@ local int gz_avail(state) if (state->err != Z_OK) return -1; if (state->eof == 0) { - if (gz_load(state, state->in, state->size, &(strm->avail_in)) == -1) + if (gz_load(state, state->in, state->size, + (unsigned *)&(strm->avail_in)) == -1) return -1; strm->next_in = state->in; } Modified: head/lib/libz/inftrees.c ============================================================================== --- head/lib/libz/inftrees.c Wed Mar 31 20:43:24 2010 (r206001) +++ head/lib/libz/inftrees.c Wed Mar 31 20:55:13 2010 (r206002) @@ -9,7 +9,7 @@ #define MAXBITS 15 const char inflate_copyright[] = - " inflate 1.2.4 Copyright 1995-2010 Mark Adler "; + " inflate 1.2.4.1 Copyright 1995-2010 Mark Adler "; /* If you use the zlib library in a product, an acknowledgment is welcome in the documentation of your product. If for some reason you cannot @@ -62,7 +62,7 @@ unsigned short FAR *work; 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0}; static const unsigned short lext[31] = { /* Length codes 257..285 extra */ 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, - 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 64, 195}; + 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 67, 206}; static const unsigned short dbase[32] = { /* Distance codes 0..29 base */ 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, Modified: head/lib/libz/minigzip.c ============================================================================== --- head/lib/libz/minigzip.c Wed Mar 31 20:43:24 2010 (r206001) +++ head/lib/libz/minigzip.c Wed Mar 31 20:55:13 2010 (r206002) @@ -54,7 +54,7 @@ extern int unlink OF((const char *)); #endif -#if defined(UNDER_CE) && defined(NO_ERRNO_H) +#if defined(UNDER_CE) # include # define perror(s) pwinerror(s) @@ -116,7 +116,7 @@ static void pwinerror (s) fprintf(stderr, "%s\n", strwinerror(GetLastError ())); } -#endif /* UNDER_CE && NO_ERRNO_H */ +#endif /* UNDER_CE */ #ifndef GZ_SUFFIX # define GZ_SUFFIX ".gz" Modified: head/lib/libz/zconf.h ============================================================================== --- head/lib/libz/zconf.h Wed Mar 31 20:43:24 2010 (r206001) +++ head/lib/libz/zconf.h Wed Mar 31 20:55:13 2010 (r206002) @@ -364,7 +364,7 @@ typedef uLong FAR uLongf; # define Z_HAVE_UNISTD_H #endif -#ifdef Z_HAVE_UNISTD_H +#if defined(Z_HAVE_UNISTD_H) || _LARGEFILE64_SOURCE == 1 # include /* for off_t */ # include /* for SEEK_* and off_t */ # ifdef VMS @@ -375,10 +375,6 @@ typedef uLong FAR uLongf; # endif #endif -#ifdef _LARGEFILE64_SOURCE -# include -#endif - #ifndef SEEK_SET # define SEEK_SET 0 /* Seek from beginning of file. */ # define SEEK_CUR 1 /* Seek from current position. */ Modified: head/lib/libz/zlib.3 ============================================================================== --- head/lib/libz/zlib.3 Wed Mar 31 20:43:24 2010 (r206001) +++ head/lib/libz/zlib.3 Wed Mar 31 20:55:13 2010 (r206002) @@ -1,4 +1,4 @@ -.TH ZLIB 3 "14 March 2010" +.TH ZLIB 3 "28 Mar 2010" .SH NAME zlib \- compression/decompression library .SH SYNOPSIS @@ -125,7 +125,7 @@ before asking for help. Send questions and/or comments to zlib@gzip.org, or (for the Windows DLL version) to Gilles Vollant (info@winimage.com). .SH AUTHORS -Version 1.2.4 +Version 1.2.4.1 Copyright (C) 1995-2010 Jean-loup Gailly (jloup@gzip.org) and Mark Adler (madler@alumni.caltech.edu). .LP Modified: head/lib/libz/zlib.h ============================================================================== --- head/lib/libz/zlib.h Wed Mar 31 20:43:24 2010 (r206001) +++ head/lib/libz/zlib.h Wed Mar 31 20:55:13 2010 (r206002) @@ -1,5 +1,5 @@ /* zlib.h -- interface of the 'zlib' general purpose compression library - version 1.2.4, Mar 14th, 2010 + version 1.2.4.1, March 28th, 2010 Copyright (C) 1995-2010 Jean-loup Gailly and Mark Adler @@ -37,12 +37,12 @@ extern "C" { #endif -#define ZLIB_VERSION "1.2.4" -#define ZLIB_VERNUM 0x1240 +#define ZLIB_VERSION "1.2.4.1" +#define ZLIB_VERNUM 0x1241 #define ZLIB_VER_MAJOR 1 #define ZLIB_VER_MINOR 2 #define ZLIB_VER_REVISION 4 -#define ZLIB_VER_SUBREVISION 0 +#define ZLIB_VER_SUBREVISION 1 /* The 'zlib' compression library provides in-memory compression and @@ -1556,29 +1556,30 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF( inflateBackInit_((strm), (windowBits), (window), \ ZLIB_VERSION, sizeof(z_stream)) -#ifdef _LARGEFILE64_SOURCE +#if _LARGEFILE64_SOURCE == 1 && _LFS64_LARGEFILE == 1 ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); ZEXTERN off64_t ZEXPORT gzseek64 OF((gzFile, off64_t, int)); ZEXTERN off64_t ZEXPORT gztell64 OF((gzFile)); ZEXTERN off64_t ZEXPORT gzoffset64 OF((gzFile)); ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, off64_t)); ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, off64_t)); -#elif _FILE_OFFSET_BITS == 64 - ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); - ZEXTERN off_t ZEXPORT gzseek64 OF((gzFile, off_t, int)); - ZEXTERN off_t ZEXPORT gztell64 OF((gzFile)); - ZEXTERN off_t ZEXPORT gzoffset64 OF((gzFile)); - ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, off_t)); - ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, off_t)); #endif -#if !defined(ZLIB_INTERNAL) && _FILE_OFFSET_BITS == 64 +#if !defined(ZLIB_INTERNAL) && _FILE_OFFSET_BITS == 64 && _LFS64_LARGEFILE == 1 # define gzopen gzopen64 # define gzseek gzseek64 # define gztell gztell64 # define gzoffset gzoffset64 # define adler32_combine adler32_combine64 # define crc32_combine crc32_combine64 +# if _LARGEFILE64_SOURCE != 1 + ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); + ZEXTERN off_t ZEXPORT gzseek64 OF((gzFile, off_t, int)); + ZEXTERN off_t ZEXPORT gztell64 OF((gzFile)); + ZEXTERN off_t ZEXPORT gzoffset64 OF((gzFile)); + ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, off_t)); + ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, off_t)); +# endif #else ZEXTERN gzFile ZEXPORT gzopen OF((const char *, const char *)); ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile, z_off_t, int)); Modified: head/lib/libz/zutil.c ============================================================================== --- head/lib/libz/zutil.c Wed Mar 31 20:43:24 2010 (r206001) +++ head/lib/libz/zutil.c Wed Mar 31 20:55:13 2010 (r206002) @@ -272,7 +272,7 @@ void zcfree (voidpf opaque, voidpf ptr) # define _hfree hfree #endif -voidpf zcalloc (voidpf opaque, unsigned items, unsigned size) +voidpf zcalloc (voidpf opaque, uInt items, uInt size) { if (opaque) opaque = 0; /* to make compiler happy */ return _halloc((long)items, size); Modified: head/lib/libz/zutil.h ============================================================================== --- head/lib/libz/zutil.h Wed Mar 31 20:43:24 2010 (r206001) +++ head/lib/libz/zutil.h Wed Mar 31 20:55:13 2010 (r206002) @@ -24,19 +24,6 @@ # include #endif -#if defined(UNDER_CE) && defined(NO_ERRNO_H) -# define zseterrno(ERR) SetLastError((DWORD)(ERR)) -# define zerrno() ((int)GetLastError()) -#else -# ifdef NO_ERRNO_H - extern int errno; -# else -# include -# endif -# define zseterrno(ERR) do { errno = (ERR); } while (0) -# define zerrno() errno -#endif - #ifndef local # define local static #endif @@ -167,12 +154,22 @@ extern const char * const z_errmsg[10]; #pragma warn -8066 #endif -#ifdef _LARGEFILE64_SOURCE +#if _LARGEFILE64_SOURCE == 1 && _LFS64_LARGEFILE == 1 # define z_off64_t off64_t #else # define z_off64_t z_off_t #endif +/* provide prototypes for these when building zlib without LFS */ +#if _LARGEFILE64_SOURCE != 1 || _LFS64_LARGEFILE != 1 + ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); + ZEXTERN off_t ZEXPORT gzseek64 OF((gzFile, off_t, int)); + ZEXTERN off_t ZEXPORT gztell64 OF((gzFile)); + ZEXTERN off_t ZEXPORT gzoffset64 OF((gzFile)); + ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, off_t)); + ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, off_t)); +#endif + /* common defaults */ #ifndef OS_CODE @@ -183,12 +180,6 @@ extern const char * const z_errmsg[10]; # define F_OPEN(name, mode) fopen((name), (mode)) #endif -#ifdef _LARGEFILE64_SOURCE -# define F_OPEN64(name, mode) fopen64((name), (mode)) -#else -# define F_OPEN64(name, mode) fopen((name), (mode)) -#endif - /* functions */ #if defined(STDC99) || (defined(__TURBOC__) && __TURBOC__ >= 0x550) From owner-svn-src-head@FreeBSD.ORG Wed Mar 31 22:11:07 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 235EC106566B; Wed, 31 Mar 2010 22:11:07 +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 11EEA8FC12; Wed, 31 Mar 2010 22:11:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2VMB6MU037485; Wed, 31 Mar 2010 22:11:06 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2VMB63m037483; Wed, 31 Mar 2010 22:11:06 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201003312211.o2VMB63m037483@svn.freebsd.org> From: Alexander Motin Date: Wed, 31 Mar 2010 22:11: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: r206015 - head/sys/netgraph X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Mar 2010 22:11:07 -0000 Author: mav Date: Wed Mar 31 22:11:06 2010 New Revision: 206015 URL: http://svn.freebsd.org/changeset/base/206015 Log: Make ng_l2tp irrelevant to data alignment. Modified: head/sys/netgraph/ng_l2tp.c Modified: head/sys/netgraph/ng_l2tp.c ============================================================================== --- head/sys/netgraph/ng_l2tp.c Wed Mar 31 22:05:53 2010 (r206014) +++ head/sys/netgraph/ng_l2tp.c Wed Mar 31 22:11:06 2010 (r206015) @@ -790,7 +790,7 @@ ng_l2tp_rcvdata_lower(hook_p h, item_p i NG_FREE_ITEM(item); ERROUT(EINVAL); } - hdr = ntohs(*mtod(m, u_int16_t *)); + hdr = (mtod(m, uint8_t *)[0] << 8) + mtod(m, uint8_t *)[1]; m_adj(m, 2); /* Check required header bits and minimum length */ @@ -819,7 +819,7 @@ ng_l2tp_rcvdata_lower(hook_p h, item_p i NG_FREE_ITEM(item); ERROUT(EINVAL); } - len = (u_int16_t)ntohs(*mtod(m, u_int16_t *)) - 4; + len = (mtod(m, uint8_t *)[0] << 8) + mtod(m, uint8_t *)[1] - 4; m_adj(m, 2); if (len < 0 || len > m->m_pkthdr.len) { priv->stats.recvInvalid++; @@ -1095,9 +1095,10 @@ ng_l2tp_rcvdata(hook_p hook, item_p item const priv_p priv = NG_NODE_PRIVATE(NG_HOOK_NODE(hook)); const hookpriv_p hpriv = NG_HOOK_PRIVATE(hook); struct mbuf *m; + uint8_t *p; u_int16_t hdr; int error; - int i = 1; + int i = 2; /* Sanity check */ L2TP_SEQ_CHECK(&priv->seq); @@ -1129,20 +1130,27 @@ ng_l2tp_rcvdata(hook_p hook, item_p item NG_FREE_ITEM(item); ERROUT(ENOBUFS); } + p = mtod(m, uint8_t *); hdr = L2TP_DATA_HDR; if (hpriv->conf.include_length) { hdr |= L2TP_HDR_LEN; - mtod(m, u_int16_t *)[i++] = htons(m->m_pkthdr.len); + p[i++] = m->m_pkthdr.len >> 8; + p[i++] = m->m_pkthdr.len & 0xff; } - mtod(m, u_int16_t *)[i++] = htons(priv->conf.peer_id); - mtod(m, u_int16_t *)[i++] = htons(hpriv->conf.peer_id); + p[i++] = priv->conf.peer_id >> 8; + p[i++] = priv->conf.peer_id & 0xff; + p[i++] = hpriv->conf.peer_id >> 8; + p[i++] = hpriv->conf.peer_id & 0xff; if (hpriv->conf.enable_dseq) { hdr |= L2TP_HDR_SEQ; - mtod(m, u_int16_t *)[i++] = htons(hpriv->ns); - mtod(m, u_int16_t *)[i++] = htons(hpriv->nr); + p[i++] = hpriv->ns >> 8; + p[i++] = hpriv->ns & 0xff; + p[i++] = hpriv->nr >> 8; + p[i++] = hpriv->nr & 0xff; hpriv->ns++; } - mtod(m, u_int16_t *)[0] = htons(hdr); + p[0] = hdr >> 8; + p[1] = hdr & 0xff; /* Update per session stats. */ hpriv->stats.xmitPackets++; @@ -1496,6 +1504,7 @@ static int ng_l2tp_xmit_ctrl(priv_p priv, struct mbuf *m, u_int16_t ns) { struct l2tp_seq *const seq = &priv->seq; + uint8_t *p; u_int16_t session_id = 0; int error; @@ -1540,12 +1549,19 @@ ng_l2tp_xmit_ctrl(priv_p priv, struct mb } /* Fill in L2TP header */ - mtod(m, u_int16_t *)[0] = htons(L2TP_CTRL_HDR); - mtod(m, u_int16_t *)[1] = htons(m->m_pkthdr.len); - mtod(m, u_int16_t *)[2] = htons(priv->conf.peer_id); - mtod(m, u_int16_t *)[3] = htons(session_id); - mtod(m, u_int16_t *)[4] = htons(ns); - mtod(m, u_int16_t *)[5] = htons(seq->nr); + p = mtod(m, u_int8_t *); + p[0] = L2TP_CTRL_HDR >> 8; + p[1] = L2TP_CTRL_HDR & 0xff; + p[2] = m->m_pkthdr.len >> 8; + p[3] = m->m_pkthdr.len & 0xff; + p[4] = priv->conf.peer_id >> 8; + p[5] = priv->conf.peer_id & 0xff; + p[6] = session_id >> 8; + p[7] = session_id & 0xff; + p[8] = ns >> 8; + p[9] = ns & 0xff; + p[10] = seq->nr >> 8; + p[11] = seq->nr & 0xff; /* Update sequence number info and stats */ priv->stats.xmitPackets++; From owner-svn-src-head@FreeBSD.ORG Wed Mar 31 22:16:05 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B502E106564A; Wed, 31 Mar 2010 22:16: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 A40D18FC14; Wed, 31 Mar 2010 22:16:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2VMG5al038647; Wed, 31 Mar 2010 22:16:05 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2VMG5L7038645; Wed, 31 Mar 2010 22:16:05 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201003312216.o2VMG5L7038645@svn.freebsd.org> From: Alexander Motin Date: Wed, 31 Mar 2010 22:16: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: r206017 - head/sys/netgraph X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Mar 2010 22:16:05 -0000 Author: mav Date: Wed Mar 31 22:16:05 2010 New Revision: 206017 URL: http://svn.freebsd.org/changeset/base/206017 Log: Make ng_ksocket fulfill lower protocol stack layers alignment requirements on platforms with strict alignment constraints. This fixes kernel panics on arm and probably other architectures. PR: sparc64/80410 Modified: head/sys/netgraph/ng_ksocket.c Modified: head/sys/netgraph/ng_ksocket.c ============================================================================== --- head/sys/netgraph/ng_ksocket.c Wed Mar 31 22:11:19 2010 (r206016) +++ head/sys/netgraph/ng_ksocket.c Wed Mar 31 22:16:05 2010 (r206017) @@ -902,12 +902,24 @@ ng_ksocket_rcvdata(hook_p hook, item_p i struct sockaddr *sa = NULL; int error; struct mbuf *m; +#ifdef ALIGNED_POINTER + struct mbuf *n; +#endif /* ALIGNED_POINTER */ struct sa_tag *stag; /* Extract data */ NGI_GET_M(item, m); NG_FREE_ITEM(item); - +#ifdef ALIGNED_POINTER + if (!ALIGNED_POINTER(mtod(m, caddr_t), uint32_t)) { + n = m_defrag(m, M_NOWAIT); + if (n == NULL) { + m_freem(m); + return (ENOBUFS); + } + m = n; + } +#endif /* ALIGNED_POINTER */ /* * Look if socket address is stored in packet tags. * If sockaddr is ours, or provided by a third party (zero id), From owner-svn-src-head@FreeBSD.ORG Wed Mar 31 22:19:01 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1185F106566C; Wed, 31 Mar 2010 22:19:01 +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 F37918FC19; Wed, 31 Mar 2010 22:19:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2VMJ0uO039299; Wed, 31 Mar 2010 22:19:00 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2VMJ0DX039294; Wed, 31 Mar 2010 22:19:00 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201003312219.o2VMJ0DX039294@svn.freebsd.org> From: Marius Strobl Date: Wed, 31 Mar 2010 22:19: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: r206018 - in head/sys/sparc64: fhc pci sbus X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Mar 2010 22:19:01 -0000 Author: marius Date: Wed Mar 31 22:19:00 2010 New Revision: 206018 URL: http://svn.freebsd.org/changeset/base/206018 Log: - Take advantage of the INTCLR_* macros. - Right-justify the backslashes as per style(9). Modified: head/sys/sparc64/fhc/fhc.c head/sys/sparc64/pci/psycho.c head/sys/sparc64/pci/schizo.c head/sys/sparc64/sbus/sbus.c Modified: head/sys/sparc64/fhc/fhc.c ============================================================================== --- head/sys/sparc64/fhc/fhc.c Wed Mar 31 22:16:05 2010 (r206017) +++ head/sys/sparc64/fhc/fhc.c Wed Mar 31 22:19:00 2010 (r206018) @@ -208,7 +208,7 @@ fhc_attach(device_t dev) printf("model unknown\n"); for (i = FHC_FANFAIL; i <= FHC_TOD; i++) { - bus_write_4(sc->sc_memres[i], FHC_ICLR, 0x0); + bus_write_4(sc->sc_memres[i], FHC_ICLR, INTCLR_IDLE); (void)bus_read_4(sc->sc_memres[i], FHC_ICLR); } @@ -391,7 +391,7 @@ fhc_intr_clear(void *arg) struct intr_vector *iv = arg; struct fhc_icarg *fica = iv->iv_icarg; - bus_write_4(fica->fica_memres, FHC_ICLR, 0x0); + bus_write_4(fica->fica_memres, FHC_ICLR, INTCLR_IDLE); (void)bus_read_4(fica->fica_memres, FHC_ICLR); } Modified: head/sys/sparc64/pci/psycho.c ============================================================================== --- head/sys/sparc64/pci/psycho.c Wed Mar 31 22:16:05 2010 (r206017) +++ head/sys/sparc64/pci/psycho.c Wed Mar 31 22:19:00 2010 (r206018) @@ -188,13 +188,13 @@ struct psycho_dma_sync { uint8_t pds_func; /* func. of farest PCI dev. */ }; -#define PSYCHO_READ8(sc, off) \ +#define PSYCHO_READ8(sc, off) \ bus_read_8((sc)->sc_mem_res, (off)) -#define PSYCHO_WRITE8(sc, off, v) \ +#define PSYCHO_WRITE8(sc, off, v) \ bus_write_8((sc)->sc_mem_res, (off), (v)) -#define PCICTL_READ8(sc, off) \ +#define PCICTL_READ8(sc, off) \ PSYCHO_READ8((sc), (sc)->sc_pcictl + (off)) -#define PCICTL_WRITE8(sc, off, v) \ +#define PCICTL_WRITE8(sc, off, v) \ PSYCHO_WRITE8((sc), (sc)->sc_pcictl + (off), (v)) /* @@ -523,7 +523,7 @@ psycho_attach(device_t dev) (u_long)intrmap, (u_long)PSYCHO_READ8(sc, intrmap), (u_long)intrclr); PSYCHO_WRITE8(sc, intrmap, INTMAP_VEC(sc->sc_ign, i)); - PSYCHO_WRITE8(sc, intrclr, 0); + PSYCHO_WRITE8(sc, intrclr, INTCLR_IDLE); PSYCHO_WRITE8(sc, intrmap, INTMAP_ENABLE(INTMAP_VEC(sc->sc_ign, i), PCPU_GET(mid))); @@ -1137,7 +1137,7 @@ psycho_intr_clear(void *arg) struct intr_vector *iv = arg; struct psycho_icarg *pica = iv->iv_icarg; - PSYCHO_WRITE8(pica->pica_sc, pica->pica_clr, 0); + PSYCHO_WRITE8(pica->pica_sc, pica->pica_clr, INTCLR_IDLE); } static int Modified: head/sys/sparc64/pci/schizo.c ============================================================================== --- head/sys/sparc64/pci/schizo.c Wed Mar 31 22:16:05 2010 (r206017) +++ head/sys/sparc64/pci/schizo.c Wed Mar 31 22:19:00 2010 (r206018) @@ -189,26 +189,26 @@ struct schizo_dma_sync { #define SCHIZO_PERF_CNT_QLTY 100 -#define SCHIZO_SPC_READ_8(spc, sc, offs) \ +#define SCHIZO_SPC_READ_8(spc, sc, offs) \ bus_read_8((sc)->sc_mem_res[(spc)], (offs)) -#define SCHIZO_SPC_WRITE_8(spc, sc, offs, v) \ +#define SCHIZO_SPC_WRITE_8(spc, sc, offs, v) \ bus_write_8((sc)->sc_mem_res[(spc)], (offs), (v)) -#define SCHIZO_PCI_READ_8(sc, offs) \ +#define SCHIZO_PCI_READ_8(sc, offs) \ SCHIZO_SPC_READ_8(STX_PCI, (sc), (offs)) -#define SCHIZO_PCI_WRITE_8(sc, offs, v) \ +#define SCHIZO_PCI_WRITE_8(sc, offs, v) \ SCHIZO_SPC_WRITE_8(STX_PCI, (sc), (offs), (v)) -#define SCHIZO_CTRL_READ_8(sc, offs) \ +#define SCHIZO_CTRL_READ_8(sc, offs) \ SCHIZO_SPC_READ_8(STX_CTRL, (sc), (offs)) -#define SCHIZO_CTRL_WRITE_8(sc, offs, v) \ +#define SCHIZO_CTRL_WRITE_8(sc, offs, v) \ SCHIZO_SPC_WRITE_8(STX_CTRL, (sc), (offs), (v)) -#define SCHIZO_PCICFG_READ_8(sc, offs) \ +#define SCHIZO_PCICFG_READ_8(sc, offs) \ SCHIZO_SPC_READ_8(STX_PCICFG, (sc), (offs)) -#define SCHIZO_PCICFG_WRITE_8(sc, offs, v) \ +#define SCHIZO_PCICFG_WRITE_8(sc, offs, v) \ SCHIZO_SPC_WRITE_8(STX_PCICFG, (sc), (offs), (v)) -#define SCHIZO_ICON_READ_8(sc, offs) \ +#define SCHIZO_ICON_READ_8(sc, offs) \ SCHIZO_SPC_READ_8(STX_ICON, (sc), (offs)) -#define SCHIZO_ICON_WRITE_8(sc, offs, v) \ +#define SCHIZO_ICON_WRITE_8(sc, offs, v) \ SCHIZO_SPC_WRITE_8(STX_ICON, (sc), (offs), (v)) struct schizo_desc { @@ -1077,7 +1077,7 @@ schizo_dma_sync_stub(void *arg) for (; atomic_cmpset_acq_32(&sc->sc_cdma_state, SCHIZO_CDMA_STATE_DONE, SCHIZO_CDMA_STATE_PENDING) == 0;) ; - SCHIZO_PCI_WRITE_8(sc, sc->sc_cdma_clr, 1); + SCHIZO_PCI_WRITE_8(sc, sc->sc_cdma_clr, INTCLR_RECEIVED); microuptime(&cur); end.tv_sec = 1; end.tv_usec = 0; @@ -1162,7 +1162,7 @@ schizo_intr_clear(void *arg) struct intr_vector *iv = arg; struct schizo_icarg *sica = iv->iv_icarg; - SCHIZO_PCI_WRITE_8(sica->sica_sc, sica->sica_clr, 0); + SCHIZO_PCI_WRITE_8(sica->sica_sc, sica->sica_clr, INTCLR_IDLE); } static int Modified: head/sys/sparc64/sbus/sbus.c ============================================================================== --- head/sys/sparc64/sbus/sbus.c Wed Mar 31 22:16:05 2010 (r206017) +++ head/sys/sparc64/sbus/sbus.c Wed Mar 31 22:19:00 2010 (r206018) @@ -171,9 +171,9 @@ struct sbus_softc { void *sc_pf_ihand; }; -#define SYSIO_READ8(sc, off) \ +#define SYSIO_READ8(sc, off) \ bus_read_8((sc)->sc_sysio_res, (off)) -#define SYSIO_WRITE8(sc, off, v) \ +#define SYSIO_WRITE8(sc, off, v) \ bus_write_8((sc)->sc_sysio_res, (off), (v)) static device_probe_t sbus_probe; @@ -697,7 +697,7 @@ sbus_intr_clear(void *arg) struct intr_vector *iv = arg; struct sbus_icarg *sica = iv->iv_icarg; - SYSIO_WRITE8(sica->sica_sc, sica->sica_clr, 0); + SYSIO_WRITE8(sica->sica_sc, sica->sica_clr, INTCLR_IDLE); } static int From owner-svn-src-head@FreeBSD.ORG Wed Mar 31 22:27:33 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9EE4C1065672; Wed, 31 Mar 2010 22:27:33 +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 738D78FC1D; Wed, 31 Mar 2010 22:27:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2VMRXKb041275; Wed, 31 Mar 2010 22:27:33 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2VMRXPV041273; Wed, 31 Mar 2010 22:27:33 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201003312227.o2VMRXPV041273@svn.freebsd.org> From: Marius Strobl Date: Wed, 31 Mar 2010 22:27:33 +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: r206019 - head/sys/sparc64/pci X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Mar 2010 22:27:33 -0000 Author: marius Date: Wed Mar 31 22:27:33 2010 New Revision: 206019 URL: http://svn.freebsd.org/changeset/base/206019 Log: Don't re-implement device_get_nameunit(9). Modified: head/sys/sparc64/pci/apb.c Modified: head/sys/sparc64/pci/apb.c ============================================================================== --- head/sys/sparc64/pci/apb.c Wed Mar 31 22:19:00 2010 (r206018) +++ head/sys/sparc64/pci/apb.c Wed Mar 31 22:27:33 2010 (r206019) @@ -223,8 +223,7 @@ apb_alloc_resource(device_t dev, device_ */ if (start == 0 && end == ~0) { device_printf(dev, "can't decode default resource id %d for " - "%s%d, bypassing\n", *rid, device_get_name(child), - device_get_unit(child)); + "%s, bypassing\n", *rid, device_get_nameunit(child)); goto passup; } @@ -236,31 +235,28 @@ apb_alloc_resource(device_t dev, device_ switch (type) { case SYS_RES_IOPORT: if (!apb_checkrange(sc->sc_iomap, APB_IO_SCALE, start, end)) { - device_printf(dev, "device %s%d requested unsupported " - "I/O range 0x%lx-0x%lx\n", device_get_name(child), - device_get_unit(child), start, end); + device_printf(dev, "device %s requested unsupported " + "I/O range 0x%lx-0x%lx\n", + device_get_nameunit(child), start, end); return (NULL); } if (bootverbose) device_printf(sc->sc_bsc.ops_pcib_sc.dev, "device " - "%s%d requested decoded I/O range 0x%lx-0x%lx\n", - device_get_name(child), device_get_unit(child), - start, end); + "%s requested decoded I/O range 0x%lx-0x%lx\n", + device_get_nameunit(child), start, end); break; case SYS_RES_MEMORY: if (!apb_checkrange(sc->sc_memmap, APB_MEM_SCALE, start, end)) { - device_printf(dev, "device %s%d requested unsupported " + device_printf(dev, "device %s requested unsupported " "memory range 0x%lx-0x%lx\n", - device_get_name(child), device_get_unit(child), - start, end); + device_get_nameunit(child), start, end); return (NULL); } if (bootverbose) device_printf(sc->sc_bsc.ops_pcib_sc.dev, "device " - "%s%d requested decoded memory range 0x%lx-0x%lx\n", - device_get_name(child), device_get_unit(child), - start, end); + "%s requested decoded memory range 0x%lx-0x%lx\n", + device_get_nameunit(child), start, end); break; default: From owner-svn-src-head@FreeBSD.ORG Wed Mar 31 22:32:56 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DE270106564A; Wed, 31 Mar 2010 22:32:56 +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 B28748FC15; Wed, 31 Mar 2010 22:32:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2VMWubZ042490; Wed, 31 Mar 2010 22:32:56 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2VMWud4042487; Wed, 31 Mar 2010 22:32:56 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201003312232.o2VMWud4042487@svn.freebsd.org> From: Marius Strobl Date: Wed, 31 Mar 2010 22:32: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: r206020 - head/sys/sparc64/pci X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Mar 2010 22:32:57 -0000 Author: marius Date: Wed Mar 31 22:32:56 2010 New Revision: 206020 URL: http://svn.freebsd.org/changeset/base/206020 Log: Use device_get_nameunit(9) rather than device_get_name(9) so one can identify the reporting bridge in machines with multiple PCI domains. Modified: head/sys/sparc64/pci/psycho.c head/sys/sparc64/pci/schizo.c Modified: head/sys/sparc64/pci/psycho.c ============================================================================== --- head/sys/sparc64/pci/psycho.c Wed Mar 31 22:27:33 2010 (r206019) +++ head/sys/sparc64/pci/psycho.c Wed Mar 31 22:32:56 2010 (r206020) @@ -808,7 +808,7 @@ psycho_ue(void *arg) if ((afsr & UEAFSR_P_DTE) != 0) iommu_decode_fault(sc->sc_is, afar); panic("%s: uncorrectable DMA error AFAR %#lx AFSR %#lx", - device_get_name(sc->sc_dev), (u_long)afar, (u_long)afsr); + device_get_nameunit(sc->sc_dev), (u_long)afar, (u_long)afsr); return (FILTER_HANDLED); } @@ -838,7 +838,7 @@ psycho_pci_bus(void *arg) afar = PCICTL_READ8(sc, PCR_AFA); afsr = PCICTL_READ8(sc, PCR_AFS); panic("%s: PCI bus %c error AFAR %#lx AFSR %#lx", - device_get_name(sc->sc_dev), 'A' + sc->sc_half, (u_long)afar, + device_get_nameunit(sc->sc_dev), 'A' + sc->sc_half, (u_long)afar, (u_long)afsr); return (FILTER_HANDLED); } Modified: head/sys/sparc64/pci/schizo.c ============================================================================== --- head/sys/sparc64/pci/schizo.c Wed Mar 31 22:27:33 2010 (r206019) +++ head/sys/sparc64/pci/schizo.c Wed Mar 31 22:32:56 2010 (r206020) @@ -826,7 +826,7 @@ schizo_pci_bus(void *arg) } panic("%s: PCI bus %c error AFAR %#llx AFSR %#llx PCI CSR %#llx " - "IOMMU %#llx STATUS %#llx", device_get_name(sc->sc_dev), + "IOMMU %#llx STATUS %#llx", device_get_nameunit(sc->sc_dev), 'A' + sc->sc_half, (unsigned long long)afar, (unsigned long long)afsr, (unsigned long long)csr, (unsigned long long)iommu, (unsigned long long)status); @@ -861,7 +861,7 @@ schizo_ue(void *arg) break; mtx_unlock_spin(sc->sc_mtx); panic("%s: uncorrectable DMA error AFAR %#llx AFSR %#llx", - device_get_name(sc->sc_dev), (unsigned long long)afar, + device_get_nameunit(sc->sc_dev), (unsigned long long)afar, (unsigned long long)afsr); return (FILTER_HANDLED); } @@ -895,7 +895,7 @@ schizo_host_bus(void *arg) uint64_t errlog; errlog = SCHIZO_CTRL_READ_8(sc, STX_CTRL_BUS_ERRLOG); - panic("%s: %s error %#llx", device_get_name(sc->sc_dev), + panic("%s: %s error %#llx", device_get_nameunit(sc->sc_dev), sc->sc_mode == SCHIZO_MODE_TOM ? "JBus" : "Safari", (unsigned long long)errlog); return (FILTER_HANDLED); From owner-svn-src-head@FreeBSD.ORG Wed Mar 31 22:47:56 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 375AB1065674; Wed, 31 Mar 2010 22:47: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 0BE878FC1E; Wed, 31 Mar 2010 22:47:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2VMltFB045812; Wed, 31 Mar 2010 22:47:55 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2VMltHT045811; Wed, 31 Mar 2010 22:47:55 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201003312247.o2VMltHT045811@svn.freebsd.org> From: Alexander Motin Date: Wed, 31 Mar 2010 22:47: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: r206021 - head/sys/netgraph X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Mar 2010 22:47:56 -0000 Author: mav Date: Wed Mar 31 22:47:55 2010 New Revision: 206021 URL: http://svn.freebsd.org/changeset/base/206021 Log: Remove some more alignment constraints. Modified: head/sys/netgraph/ng_mppc.c head/sys/netgraph/ng_ppp.c Modified: head/sys/netgraph/ng_mppc.c ============================================================================== --- head/sys/netgraph/ng_mppc.c Wed Mar 31 22:32:56 2010 (r206020) +++ head/sys/netgraph/ng_mppc.c Wed Mar 31 22:47:55 2010 (r206021) @@ -53,6 +53,7 @@ #include #include #include +#include #include #include @@ -601,7 +602,7 @@ err1: /* Install header */ M_PREPEND(m, MPPC_HDRLEN, M_DONTWAIT); if (m != NULL) - *(mtod(m, uint16_t *)) = htons(header); + be16enc(mtod(m, void *), header); *datap = m; return (*datap == NULL ? ENOBUFS : 0); @@ -630,8 +631,7 @@ ng_mppc_decompress(node_p node, struct m m_freem(m); return (EINVAL); } - m_copydata(m, 0, MPPC_HDRLEN, (caddr_t)&header); - header = ntohs(header); + header = be16dec(mtod(m, void *)); cc = (header & MPPC_CCOUNT_MASK); m_adj(m, MPPC_HDRLEN); Modified: head/sys/netgraph/ng_ppp.c ============================================================================== --- head/sys/netgraph/ng_ppp.c Wed Mar 31 22:32:56 2010 (r206020) +++ head/sys/netgraph/ng_ppp.c Wed Mar 31 22:47:55 2010 (r206021) @@ -97,6 +97,7 @@ #include #include #include +#include #include #include @@ -860,8 +861,8 @@ ng_ppp_rcvdata_bypass(hook_p hook, item_ NG_FREE_ITEM(item); return (ENOBUFS); } - linkNum = ntohs(mtod(m, uint16_t *)[0]); - proto = ntohs(mtod(m, uint16_t *)[1]); + linkNum = be16dec(mtod(m, uint8_t *)); + proto = be16dec(mtod(m, uint8_t *) + 2); m_adj(m, 4); NGI_M(item) = m; @@ -1544,7 +1545,7 @@ ng_ppp_mp_recv(node_p node, item_p item, if (m->m_len < 2 && (m = m_pullup(m, 2)) == NULL) ERROUT(ENOBUFS); - shdr = ntohs(*mtod(m, uint16_t *)); + shdr = be16dec(mtod(m, void *)); frag->seq = MP_SHORT_EXTEND(shdr); frag->first = (shdr & MP_SHORT_FIRST_FLAG) != 0; frag->last = (shdr & MP_SHORT_LAST_FLAG) != 0; @@ -1561,7 +1562,7 @@ ng_ppp_mp_recv(node_p node, item_p item, if (m->m_len < 4 && (m = m_pullup(m, 4)) == NULL) ERROUT(ENOBUFS); - lhdr = ntohl(*mtod(m, uint32_t *)); + lhdr = be32dec(mtod(m, void *)); frag->seq = MP_LONG_EXTEND(lhdr); frag->first = (lhdr & MP_LONG_FIRST_FLAG) != 0; frag->last = (lhdr & MP_LONG_LAST_FLAG) != 0; From owner-svn-src-head@FreeBSD.ORG Wed Mar 31 23:02:26 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B4BB51065673; Wed, 31 Mar 2010 23:02:26 +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 A3E958FC18; Wed, 31 Mar 2010 23:02:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2VN2QwD049122; Wed, 31 Mar 2010 23:02:26 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2VN2QW0049121; Wed, 31 Mar 2010 23:02:26 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201003312302.o2VN2QW0049121@svn.freebsd.org> From: Xin LI Date: Wed, 31 Mar 2010 23:02: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: r206022 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Mar 2010 23:02:26 -0000 Author: delphij Date: Wed Mar 31 23:02:25 2010 New Revision: 206022 URL: http://svn.freebsd.org/changeset/base/206022 Log: Add definition of IPv6 mobility header's protocol number, as assigned by IANA and defined in RFC 3775. Obtained from: KAME Modified: head/sys/netinet/in.h Modified: head/sys/netinet/in.h ============================================================================== --- head/sys/netinet/in.h Wed Mar 31 22:47:55 2010 (r206021) +++ head/sys/netinet/in.h Wed Mar 31 23:02:25 2010 (r206022) @@ -236,6 +236,7 @@ __END_DECLS #define IPPROTO_GMTP 100 /* GMTP*/ #define IPPROTO_IPCOMP 108 /* payload compression (IPComp) */ #define IPPROTO_SCTP 132 /* SCTP */ +#define IPPROTO_MH 135 /* IPv6 Mobility Header */ /* 101-254: Partly Unassigned */ #define IPPROTO_PIM 103 /* Protocol Independent Mcast */ #define IPPROTO_CARP 112 /* CARP */ From owner-svn-src-head@FreeBSD.ORG Wed Mar 31 23:24:42 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D7A52106564A; Wed, 31 Mar 2010 23:24:42 +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 C69FF8FC14; Wed, 31 Mar 2010 23:24:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2VNOgBB054059; Wed, 31 Mar 2010 23:24:42 GMT (envelope-from jfv@svn.freebsd.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2VNOgB5054057; Wed, 31 Mar 2010 23:24:42 GMT (envelope-from jfv@svn.freebsd.org) Message-Id: <201003312324.o2VNOgB5054057@svn.freebsd.org> From: Jack F Vogel Date: Wed, 31 Mar 2010 23:24: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: r206023 - head/sys/dev/e1000 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Mar 2010 23:24:42 -0000 Author: jfv Date: Wed Mar 31 23:24:42 2010 New Revision: 206023 URL: http://svn.freebsd.org/changeset/base/206023 Log: The POLL code was missed in the queue conversion, change the argument type to igb_rxeof() to the correct type. Note, any users of POLLING must be sure and set the number of queues to 1 for things to work correctly. Modified: head/sys/dev/e1000/if_igb.c Modified: head/sys/dev/e1000/if_igb.c ============================================================================== --- head/sys/dev/e1000/if_igb.c Wed Mar 31 23:02:25 2010 (r206022) +++ head/sys/dev/e1000/if_igb.c Wed Mar 31 23:24:42 2010 (r206023) @@ -1316,7 +1316,8 @@ igb_irq_fast(void *arg) #ifdef DEVICE_POLLING /********************************************************************* * - * Legacy polling routine + * Legacy polling routine : if using this code you MUST be sure that + * multiqueue is not defined, ie, set igb_num_queues to 1. * *********************************************************************/ #if __FreeBSD_version >= 800000 @@ -1328,12 +1329,12 @@ static void #endif igb_poll(struct ifnet *ifp, enum poll_cmd cmd, int count) { - struct adapter *adapter = ifp->if_softc; - struct rx_ring *rxr = adapter->rx_rings; - struct tx_ring *txr = adapter->tx_rings; - u32 reg_icr, rx_done = 0; - u32 loop = IGB_MAX_LOOP; - bool more; + struct adapter *adapter = ifp->if_softc; + struct igb_queue *que = adapter->queues; + struct tx_ring *txr = adapter->tx_rings; + u32 reg_icr, rx_done = 0; + u32 loop = IGB_MAX_LOOP; + bool more; IGB_CORE_LOCK(adapter); if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) { @@ -1353,7 +1354,7 @@ igb_poll(struct ifnet *ifp, enum poll_cm IGB_CORE_UNLOCK(adapter); /* TODO: rx_count */ - rx_done = igb_rxeof(rxr, count) ? 1 : 0; + rx_done = igb_rxeof(que, count) ? 1 : 0; IGB_TX_LOCK(txr); do { From owner-svn-src-head@FreeBSD.ORG Thu Apr 1 01:16:01 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6F588106566C; Thu, 1 Apr 2010 01:16:01 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4419E8FC08; Thu, 1 Apr 2010 01:16:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o311G1kw078881; Thu, 1 Apr 2010 01:16:01 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o311G147078879; Thu, 1 Apr 2010 01:16:01 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201004010116.o311G147078879@svn.freebsd.org> From: Lawrence Stewart Date: Thu, 1 Apr 2010 01:16: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: r206026 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Apr 2010 01:16:01 -0000 Author: lstewart Date: Thu Apr 1 01:16:00 2010 New Revision: 206026 URL: http://svn.freebsd.org/changeset/base/206026 Log: - Factor code to destroy an ALQ out of alq_close() into a private alq_destroy(). - Use the new alq_destroy() to properly handle a failure case in alq_open(). Sponsored by: FreeBSD Foundation Reviewed by: dwmalone, jeff, rpaulo, rwatson (as part of a larger patch) Approved by: kmacy (mentor) MFC after: 1 month Modified: head/sys/kern/kern_alq.c Modified: head/sys/kern/kern_alq.c ============================================================================== --- head/sys/kern/kern_alq.c Thu Apr 1 00:38:38 2010 (r206025) +++ head/sys/kern/kern_alq.c Thu Apr 1 01:16:00 2010 (r206026) @@ -103,6 +103,7 @@ static void ald_deactivate(struct alq *) /* Internal queue functions */ static void alq_shutdown(struct alq *); +static void alq_destroy(struct alq *); static int alq_doio(struct alq *); @@ -263,6 +264,18 @@ alq_shutdown(struct alq *alq) crfree(alq->aq_cred); } +void +alq_destroy(struct alq *alq) +{ + /* Drain all pending IO. */ + alq_shutdown(alq); + + mtx_destroy(&alq->aq_mtx); + free(alq->aq_first, M_ALD); + free(alq->aq_entbuf, M_ALD); + free(alq, M_ALD); +} + /* * Flush all pending data to disk. This operation will block. */ @@ -420,8 +433,11 @@ alq_open(struct alq **alqp, const char * alp->ae_next = alq->aq_first; - if ((error = ald_add(alq)) != 0) + if ((error = ald_add(alq)) != 0) { + alq_destroy(alq); return (error); + } + *alqp = alq; return (0); @@ -525,22 +541,9 @@ alq_flush(struct alq *alq) void alq_close(struct alq *alq) { - /* - * If we're already shuting down someone else will flush and close - * the vnode. - */ - if (ald_rem(alq) != 0) - return; - - /* - * Drain all pending IO. - */ - alq_shutdown(alq); - - mtx_destroy(&alq->aq_mtx); - free(alq->aq_first, M_ALD); - free(alq->aq_entbuf, M_ALD); - free(alq, M_ALD); + /* Only flush and destroy alq if not already shutting down. */ + if (ald_rem(alq) == 0) + alq_destroy(alq); } static int From owner-svn-src-head@FreeBSD.ORG Thu Apr 1 01:23:36 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C22E91065670; Thu, 1 Apr 2010 01:23:36 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B12AA8FC18; Thu, 1 Apr 2010 01:23:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o311Namc080599; Thu, 1 Apr 2010 01:23:36 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o311NajH080597; Thu, 1 Apr 2010 01:23:36 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201004010123.o311NajH080597@svn.freebsd.org> From: Lawrence Stewart Date: Thu, 1 Apr 2010 01: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: r206027 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Apr 2010 01:23:36 -0000 Author: lstewart Date: Thu Apr 1 01:23:36 2010 New Revision: 206027 URL: http://svn.freebsd.org/changeset/base/206027 Log: According to SLEEP(9), msleep() is deprecated in favour of mtx_sleep(). Sponsored by: FreeBSD Foundation Reviewed by: dwmalone, jeff, rpaulo, rwatson (as part of a larger patch) Approved by: kmacy (mentor) MFC after: 1 month Modified: head/sys/kern/kern_alq.c Modified: head/sys/kern/kern_alq.c ============================================================================== --- head/sys/kern/kern_alq.c Thu Apr 1 01:16:00 2010 (r206026) +++ head/sys/kern/kern_alq.c Thu Apr 1 01:23:36 2010 (r206027) @@ -191,7 +191,7 @@ ald_daemon(void) for (;;) { while ((alq = LIST_FIRST(&ald_active)) == NULL && !ald_shutingdown) - msleep(&ald_active, &ald_mtx, PWAIT, "aldslp", 0); + mtx_sleep(&ald_active, &ald_mtx, PWAIT, "aldslp", 0); /* Don't shutdown until all active ALQs are flushed. */ if (ald_shutingdown && alq == NULL) { @@ -234,12 +234,12 @@ ald_shutdown(void *arg, int howto) /* * Wake ald_daemon so that it exits. It won't be able to do - * anything until we msleep because we hold the ald_mtx. + * anything until we mtx_sleep because we hold the ald_mtx. */ wakeup(&ald_active); /* Wait for ald_daemon to exit. */ - msleep(ald_proc, &ald_mtx, PWAIT, "aldslp", 0); + mtx_sleep(ald_proc, &ald_mtx, PWAIT, "aldslp", 0); ALD_UNLOCK(); } From owner-svn-src-head@FreeBSD.ORG Thu Apr 1 01:27:10 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ED9AB106564A; Thu, 1 Apr 2010 01:27:10 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DCC498FC13; Thu, 1 Apr 2010 01:27:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o311RAZv081385; Thu, 1 Apr 2010 01:27:10 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o311RA7C081383; Thu, 1 Apr 2010 01:27:10 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201004010127.o311RA7C081383@svn.freebsd.org> From: Lawrence Stewart Date: Thu, 1 Apr 2010 01:27: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: r206028 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Apr 2010 01:27:11 -0000 Author: lstewart Date: Thu Apr 1 01:27:10 2010 New Revision: 206028 URL: http://svn.freebsd.org/changeset/base/206028 Log: The ALQ should not be considered drained until it has been made inactive. Sponsored by: FreeBSD Foundation Reviewed by: dwmalone, jeff, rpaulo, rwatson (as part of a larger patch) Approved by: kmacy (mentor) MFC after: 1 month Modified: head/sys/kern/kern_alq.c Modified: head/sys/kern/kern_alq.c ============================================================================== --- head/sys/kern/kern_alq.c Thu Apr 1 01:23:36 2010 (r206027) +++ head/sys/kern/kern_alq.c Thu Apr 1 01:27:10 2010 (r206028) @@ -253,7 +253,7 @@ alq_shutdown(struct alq *alq) alq->aq_flags |= AQ_SHUTDOWN; /* Drain IO */ - while (alq->aq_flags & (AQ_FLUSHING|AQ_ACTIVE)) { + while (alq->aq_flags & AQ_ACTIVE) { alq->aq_flags |= AQ_WANTED; msleep_spin(alq, &alq->aq_mtx, "aldclose", 0); } From owner-svn-src-head@FreeBSD.ORG Thu Apr 1 01:49:43 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9E6E5106564A; Thu, 1 Apr 2010 01:49:43 +0000 (UTC) (envelope-from mjacob@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8DA568FC0A; Thu, 1 Apr 2010 01:49:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o311nhGG086336; Thu, 1 Apr 2010 01:49:43 GMT (envelope-from mjacob@svn.freebsd.org) Received: (from mjacob@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o311nh5I086335; Thu, 1 Apr 2010 01:49:43 GMT (envelope-from mjacob@svn.freebsd.org) Message-Id: <201004010149.o311nh5I086335@svn.freebsd.org> From: Matt Jacob Date: Thu, 1 Apr 2010 01:49: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: r206029 - head/sys/cam/scsi X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Apr 2010 01:49:43 -0000 Author: mjacob Date: Thu Apr 1 01:49:43 2010 New Revision: 206029 URL: http://svn.freebsd.org/changeset/base/206029 Log: Add a couple missing basic mode page codes. MFC after: 1 week Modified: head/sys/cam/scsi/scsi_all.h Modified: head/sys/cam/scsi/scsi_all.h ============================================================================== --- head/sys/cam/scsi/scsi_all.h Thu Apr 1 01:27:10 2010 (r206028) +++ head/sys/cam/scsi/scsi_all.h Thu Apr 1 01:49:43 2010 (r206029) @@ -170,6 +170,8 @@ struct scsi_mode_sense_6 #define SMS_PAGE_CODE 0x3F #define SMS_VENDOR_SPECIFIC_PAGE 0x00 #define SMS_DISCONNECT_RECONNECT_PAGE 0x02 +#define SMS_FORMAT_DEVICE_PAGE 0x03 +#define SMS_GEOMETRY_PAGE 0x04 #define SMS_CACHE_PAGE 0x08 #define SMS_PERIPHERAL_DEVICE_PAGE 0x09 #define SMS_CONTROL_MODE_PAGE 0x0A From owner-svn-src-head@FreeBSD.ORG Thu Apr 1 10:41:02 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 534191065670; Thu, 1 Apr 2010 10:41:02 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 42FC18FC14; Thu, 1 Apr 2010 10:41:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o31Af2HB006566; Thu, 1 Apr 2010 10:41:02 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o31Af2Vl006565; Thu, 1 Apr 2010 10:41:02 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201004011041.o31Af2Vl006565@svn.freebsd.org> From: Alexander Motin Date: Thu, 1 Apr 2010 10: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: r206032 - head/sys/netgraph X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Apr 2010 10:41:02 -0000 Author: mav Date: Thu Apr 1 10:41:01 2010 New Revision: 206032 URL: http://svn.freebsd.org/changeset/base/206032 Log: Remove alignment constraints. Modified: head/sys/netgraph/ng_tcpmss.c Modified: head/sys/netgraph/ng_tcpmss.c ============================================================================== --- head/sys/netgraph/ng_tcpmss.c Thu Apr 1 02:41:50 2010 (r206031) +++ head/sys/netgraph/ng_tcpmss.c Thu Apr 1 10:41:01 2010 (r206032) @@ -47,6 +47,7 @@ #include #include +#include #include #include #include @@ -410,9 +411,9 @@ correct_mss(struct tcphdr *tc, int hlen, { int olen, optlen; u_char *opt; - uint16_t *mss; int accumulate; int res = 0; + uint16_t sum; for (olen = hlen - sizeof(struct tcphdr), opt = (u_char *)(tc + 1); olen > 0; olen -= optlen, opt += optlen) { @@ -427,13 +428,15 @@ correct_mss(struct tcphdr *tc, int hlen, if (*opt == TCPOPT_MAXSEG) { if (optlen != TCPOLEN_MAXSEG) continue; - mss = (uint16_t *)(opt + 2); - if (ntohs(*mss) > maxmss) { - accumulate = *mss; - *mss = htons(maxmss); - accumulate -= *mss; - if ((flags & CSUM_TCP) == 0) - TCPMSS_ADJUST_CHECKSUM(accumulate, tc->th_sum); + accumulate = be16dec(opt + 2); + if (accumulate > maxmss) { + if ((flags & CSUM_TCP) == 0) { + accumulate -= maxmss; + sum = be16dec(&tc->th_sum); + TCPMSS_ADJUST_CHECKSUM(accumulate, sum); + be16enc(&tc->th_sum, sum); + } + be16enc(opt + 2, maxmss); res = 1; } } From owner-svn-src-head@FreeBSD.ORG Thu Apr 1 11:30:46 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C764A1065670; Thu, 1 Apr 2010 11:30:46 +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 B6D768FC12; Thu, 1 Apr 2010 11:30:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o31BUkNC017373; Thu, 1 Apr 2010 11:30:46 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o31BUk3p017371; Thu, 1 Apr 2010 11:30:46 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201004011130.o31BUk3p017371@svn.freebsd.org> From: Joel Dahl Date: Thu, 1 Apr 2010 11:30: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: r206033 - head/sys/dev/sound/pci X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Apr 2010 11:30:46 -0000 Author: joel (doc committer) Date: Thu Apr 1 11:30:46 2010 New Revision: 206033 URL: http://svn.freebsd.org/changeset/base/206033 Log: Fix the gap between mute and lowest possible volume. The es1370 mixer volumes were incorrectly calculated. I've tested this with one of my es1370 cards and I can confirm that it works. PR: 98167 Submitted by: Joseph Terner Approved by: kib Modified: head/sys/dev/sound/pci/es137x.c Modified: head/sys/dev/sound/pci/es137x.c ============================================================================== --- head/sys/dev/sound/pci/es137x.c Thu Apr 1 10:41:01 2010 (r206032) +++ head/sys/dev/sound/pci/es137x.c Thu Apr 1 11:30:46 2010 (r206033) @@ -355,7 +355,7 @@ es1370_mixset(struct snd_mixer *m, unsig if (mixtable[dev].left == 0xf) rl = (l < 2) ? 0x80 : 7 - (l - 2) / 14; else - rl = (l < 10) ? 0x80 : 15 - (l - 10) / 6; + rl = (l < 7) ? 0x80 : 31 - (l - 7) / 3; es = mix_getdevinfo(m); ES_LOCK(es); if (dev == SOUND_MIXER_PCM && (ES_SINGLE_PCM_MIX(es->escfg)) && @@ -364,7 +364,7 @@ es1370_mixset(struct snd_mixer *m, unsig else set_dac1 = 0; if (mixtable[dev].stereo) { - rr = (r < 10) ? 0x80 : 15 - (r - 10) / 6; + rr = (r < 7) ? 0x80 : 31 - (r - 7) / 3; es1370_wrcodec(es, mixtable[dev].right, rr); if (set_dac1 && mixtable[SOUND_MIXER_SYNTH].stereo) es1370_wrcodec(es, From owner-svn-src-head@FreeBSD.ORG Thu Apr 1 12:18:44 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A6CC71065677; Thu, 1 Apr 2010 12:18:44 +0000 (UTC) (envelope-from decke@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 95F2D8FC0C; Thu, 1 Apr 2010 12:18:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o31CIibe027983; Thu, 1 Apr 2010 12:18:44 GMT (envelope-from decke@svn.freebsd.org) Received: (from decke@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o31CIiL4027981; Thu, 1 Apr 2010 12:18:44 GMT (envelope-from decke@svn.freebsd.org) Message-Id: <201004011218.o31CIiL4027981@svn.freebsd.org> From: Bernhard Froehlich Date: Thu, 1 Apr 2010 12:18: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: r206034 - head/share/misc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Apr 2010 12:18:44 -0000 Author: decke (ports committer) Date: Thu Apr 1 12:18:44 2010 New Revision: 206034 URL: http://svn.freebsd.org/changeset/base/206034 Log: - Add myself to the ports committer list Approved by: miwi (mentor), beat (co-mentor) Modified: head/share/misc/committers-ports.dot Modified: head/share/misc/committers-ports.dot ============================================================================== --- head/share/misc/committers-ports.dot Thu Apr 1 11:30:46 2010 (r206033) +++ head/share/misc/committers-ports.dot Thu Apr 1 12:18:44 2010 (r206034) @@ -67,6 +67,7 @@ cperciva [label="Colin Percival\ncperciv daichi [label="Daichi Goto\ndaichi@FreeBSD.org\n2002/10/17"] danfe [label="Alexey Dokuchaev\ndanfe@FreeBSD.org\n2004/08/20"] db [label="Diane Bruce\ndb@FreeBSD.org\n2007/01/18"] +decke [label="Bernhard Froehlich\ndecke@FreeBSD.org\n2010/03/21"] delphij [label="Xin Li\ndelphij@FreeBSD.org\n2006/05/01"] demon [label="Dmitry Sivachenko\ndemon@FreeBSD.org\n2000/11/13"] dryice [label="Dryice Dong Liu\ndryice@FreeBSD.org\n2006/12/25"] @@ -181,6 +182,8 @@ arved -> stefan asami -> obrien +beat -> decke + beech -> glarkin beech -> mva @@ -283,6 +286,7 @@ mezz -> tmclaugh miwi -> amdmi3 miwi -> avilla miwi -> beat +miwi -> decke miwi -> farrokhi miwi -> gahr miwi -> makc From owner-svn-src-head@FreeBSD.ORG Thu Apr 1 12:26:29 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BF8581065675; Thu, 1 Apr 2010 12:26:29 +0000 (UTC) (envelope-from decke@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AE6BF8FC24; Thu, 1 Apr 2010 12:26:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o31CQTpP029843; Thu, 1 Apr 2010 12:26:29 GMT (envelope-from decke@svn.freebsd.org) Received: (from decke@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o31CQTnL029841; Thu, 1 Apr 2010 12:26:29 GMT (envelope-from decke@svn.freebsd.org) Message-Id: <201004011226.o31CQTnL029841@svn.freebsd.org> From: Bernhard Froehlich Date: Thu, 1 Apr 2010 12:26: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: r206036 - head/usr.bin/calendar/calendars X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Apr 2010 12:26:29 -0000 Author: decke (ports committer) Date: Thu Apr 1 12:26:29 2010 New Revision: 206036 URL: http://svn.freebsd.org/changeset/base/206036 Log: - Add my birthday to the calendar Approved by: miwi (mentor), beat (co-mentor) Modified: head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Thu Apr 1 12:25:40 2010 (r206035) +++ head/usr.bin/calendar/calendars/calendar.freebsd Thu Apr 1 12:26:29 2010 (r206036) @@ -82,6 +82,7 @@ 03/12 Greg Lewis born in Adelaide, South Australia, Australia, 1969 03/13 Alexander Leidinger born in Neunkirchen, Saarland, Germany, 1976 03/13 Will Andrews born in Pontiac, Michigan, United States, 1982 +03/14 Bernhard Froehlich born in Graz, Styria, Austria, 1985 03/15 Paolo Pisati born in Lodi, Italy, 1977 03/15 Brian Fundakowski Feldman born in Alexandria, Virginia, United States, 1983 03/17 Michael Smith born in Bankstown, New South Wales, Australia, 1971 From owner-svn-src-head@FreeBSD.ORG Thu Apr 1 13:11:40 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2878D106566B; Thu, 1 Apr 2010 13:11:40 +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 173678FC0A; Thu, 1 Apr 2010 13:11:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o31DBdrL039767; Thu, 1 Apr 2010 13:11:39 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o31DBdpC039764; Thu, 1 Apr 2010 13:11:39 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201004011311.o31DBdpC039764@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Thu, 1 Apr 2010 13: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: r206038 - head/libexec/fingerd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Apr 2010 13:11:40 -0000 Author: des Date: Thu Apr 1 13:11:39 2010 New Revision: 206038 URL: http://svn.freebsd.org/changeset/base/206038 Log: Add a debugging option (-d) Add a -k option which fingerd(8) passes through to finger(1). MFC after: 2 weeks Modified: head/libexec/fingerd/fingerd.8 head/libexec/fingerd/fingerd.c Modified: head/libexec/fingerd/fingerd.8 ============================================================================== --- head/libexec/fingerd/fingerd.8 Thu Apr 1 12:26:32 2010 (r206037) +++ head/libexec/fingerd/fingerd.8 Thu Apr 1 13:11:39 2010 (r206038) @@ -32,7 +32,7 @@ .\" @(#)fingerd.8 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd June 4, 1993 +.Dd April 1, 2010 .Dt FINGERD 8 .Os .Sh NAME @@ -40,6 +40,8 @@ .Nd remote user information server .Sh SYNOPSIS .Nm +.Op Fl d +.Op Fl k .Op Fl s .Op Fl l .Op Fl p Ar filename @@ -106,6 +108,25 @@ The following options may be passed to as server program arguments in .Pa /etc/inetd.conf : .Bl -tag -width indent +.It Fl d +Enable debugging mode. +In debugging mode, +.Nm +will not attempt any network-related operations on +.Va stdin , +and it will print the full +.Nm finger +command line +to +.Va stderr +before executing it. +.It Fl k +Suppress login information. +See the description of the +.Fl k +option in +.Xr finger 1 +for details. .It Fl s Enable secure mode. Queries without a user name are rejected and Modified: head/libexec/fingerd/fingerd.c ============================================================================== --- head/libexec/fingerd/fingerd.c Thu Apr 1 12:26:32 2010 (r206037) +++ head/libexec/fingerd/fingerd.c Thu Apr 1 13:11:39 2010 (r206038) @@ -72,17 +72,23 @@ main(int argc, char *argv[]) char *lp; struct sockaddr_storage ss; socklen_t sval; - int p[2], logging, pflag, secure; + int p[2], debug, kflag, logging, pflag, secure; #define ENTRIES 50 char **ap, *av[ENTRIES + 1], **comp, line[1024], *prog; char rhost[MAXHOSTNAMELEN]; prog = _PATH_FINGER; - logging = pflag = secure = 0; + logging = kflag = pflag = secure = 0; openlog("fingerd", LOG_PID | LOG_CONS, LOG_DAEMON); opterr = 0; - while ((ch = getopt(argc, argv, "lp:s")) != -1) + while ((ch = getopt(argc, argv, "dklp:s")) != -1) switch (ch) { + case 'd': + debug = 1; + break; + case 'k': + kflag = 1; + break; case 'l': logging = 1; break; @@ -101,7 +107,7 @@ main(int argc, char *argv[]) /* * Enable server-side Transaction TCP. */ - { + if (!debug) { int one = 1; if (setsockopt(STDOUT_FILENO, IPPROTO_TCP, TCP_NOPUSH, &one, sizeof one) < 0) { @@ -112,7 +118,7 @@ main(int argc, char *argv[]) if (!fgets(line, sizeof(line), stdin)) exit(1); - if (logging || pflag) { + if (!debug && (logging || pflag)) { sval = sizeof(ss); if (getpeername(0, (struct sockaddr *)&ss, &sval) < 0) logerr("getpeername: %s", strerror(errno)); @@ -143,12 +149,14 @@ main(int argc, char *argv[]) syslog(LOG_NOTICE, "query from %s: `%s'", rhost, t); } - comp = &av[1]; - av[2] = "--"; - for (lp = line, ap = &av[3];;) { + comp = &av[2]; + av[3] = "--"; + if (kflag) + *comp-- = "-k"; + for (lp = line, ap = &av[4];;) { *ap = strtok(lp, " \t\r\n"); if (!*ap) { - if (secure && ap == &av[3]) { + if (secure && ap == &av[4]) { puts("must provide username\r\n"); exit(1); } @@ -161,8 +169,7 @@ main(int argc, char *argv[]) /* RFC742: "/[Ww]" == "-l" */ if ((*ap)[0] == '/' && ((*ap)[1] == 'W' || (*ap)[1] == 'w')) { - av[1] = "-l"; - comp = &av[0]; + *comp-- = "-l"; } else if (++ap == av + ENTRIES) { *ap = NULL; @@ -178,6 +185,13 @@ main(int argc, char *argv[]) if (pipe(p) < 0) logerr("pipe: %s", strerror(errno)); + if (debug) { + fprintf(stderr, "%s", prog); + for (ap = comp; *ap != NULL; ++ap) + fprintf(stderr, " %s", *ap); + fprintf(stderr, "\n"); + } + switch(vfork()) { case 0: (void)close(p[0]); From owner-svn-src-head@FreeBSD.ORG Thu Apr 1 13:13:10 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 44635106566C; Thu, 1 Apr 2010 13:13:10 +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 33F168FC1D; Thu, 1 Apr 2010 13:13:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o31DDAtR040133; Thu, 1 Apr 2010 13:13:10 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o31DDA7N040131; Thu, 1 Apr 2010 13:13:10 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201004011313.o31DDA7N040131@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Thu, 1 Apr 2010 13:13: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: r206039 - head/etc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Apr 2010 13:13:10 -0000 Author: des Date: Thu Apr 1 13:13:09 2010 New Revision: 206039 URL: http://svn.freebsd.org/changeset/base/206039 Log: Add -k to the recommended fingerd(8) command line. MFC after: 2 weeks Modified: head/etc/inetd.conf Modified: head/etc/inetd.conf ============================================================================== --- head/etc/inetd.conf Thu Apr 1 13:11:39 2010 (r206038) +++ head/etc/inetd.conf Thu Apr 1 13:13:09 2010 (r206039) @@ -16,8 +16,8 @@ #shell stream tcp6 nowait root /usr/libexec/rshd rshd #login stream tcp nowait root /usr/libexec/rlogind rlogind #login stream tcp6 nowait root /usr/libexec/rlogind rlogind -#finger stream tcp nowait/3/10 nobody /usr/libexec/fingerd fingerd -s -#finger stream tcp6 nowait/3/10 nobody /usr/libexec/fingerd fingerd -s +#finger stream tcp nowait/3/10 nobody /usr/libexec/fingerd fingerd -k -s +#finger stream tcp6 nowait/3/10 nobody /usr/libexec/fingerd fingerd -k -s # # run comsat as root to be able to print partial mailbox contents w/ biff, # or use the safer tty:tty to just print that new mail has been received. From owner-svn-src-head@FreeBSD.ORG Thu Apr 1 13:16:33 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 45EDA1065670; Thu, 1 Apr 2010 13:16:33 +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 353678FC19; Thu, 1 Apr 2010 13:16:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o31DGXtI040946; Thu, 1 Apr 2010 13:16:33 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o31DGXaC040944; Thu, 1 Apr 2010 13:16:33 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201004011316.o31DGXaC040944@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Thu, 1 Apr 2010 13:16:33 +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: r206040 - head/libexec/fingerd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Apr 2010 13:16:33 -0000 Author: des Date: Thu Apr 1 13:16:32 2010 New Revision: 206040 URL: http://svn.freebsd.org/changeset/base/206040 Log: Forgot to initialize the debug variable. MFC after: 2 weeks Modified: head/libexec/fingerd/fingerd.c Modified: head/libexec/fingerd/fingerd.c ============================================================================== --- head/libexec/fingerd/fingerd.c Thu Apr 1 13:13:09 2010 (r206039) +++ head/libexec/fingerd/fingerd.c Thu Apr 1 13:16:32 2010 (r206040) @@ -78,7 +78,7 @@ main(int argc, char *argv[]) char rhost[MAXHOSTNAMELEN]; prog = _PATH_FINGER; - logging = kflag = pflag = secure = 0; + debug = logging = kflag = pflag = secure = 0; openlog("fingerd", LOG_PID | LOG_CONS, LOG_DAEMON); opterr = 0; while ((ch = getopt(argc, argv, "dklp:s")) != -1) From owner-svn-src-head@FreeBSD.ORG Thu Apr 1 14:27:29 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BA289106564A; Thu, 1 Apr 2010 14:27:29 +0000 (UTC) (envelope-from flz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A727B8FC20; Thu, 1 Apr 2010 14:27:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o31ERTpg056834; Thu, 1 Apr 2010 14:27:29 GMT (envelope-from flz@svn.freebsd.org) Received: (from flz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o31ERTaT056824; Thu, 1 Apr 2010 14:27:29 GMT (envelope-from flz@svn.freebsd.org) Message-Id: <201004011427.o31ERTaT056824@svn.freebsd.org> From: Florent Thoumie Date: Thu, 1 Apr 2010 14:27: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: r206043 - in head/usr.sbin/pkg_install: add delete lib version X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Apr 2010 14:27:29 -0000 Author: flz Date: Thu Apr 1 14:27:29 2010 New Revision: 206043 URL: http://svn.freebsd.org/changeset/base/206043 Log: Various fixes. - Replace hardcoded INDEX version. [1] - Fix a buffer overlap. [2] - Remove empty package when fetching fails and -K is used. [3] - Remove useless chmod2() after mkdtemp(3). [4] - Replace mkdir(1) call with mkdir(2). [5] - Get rid of some vsystem() calls. - Switch from lstat(2) to open(2) in fexists(). - Try rename(2) in move_file() first. - Bump PKG_INSTALL_VERSION to 20100401. PR: bin/145101 [1], bin/139492 [2], bin/144919 [3] bin/144920 [4], bin/144921 [5] Submitted by: gcooper [1,2,3,4,5] Modified: head/usr.sbin/pkg_install/add/futil.c head/usr.sbin/pkg_install/add/perform.c head/usr.sbin/pkg_install/delete/perform.c head/usr.sbin/pkg_install/lib/file.c head/usr.sbin/pkg_install/lib/lib.h head/usr.sbin/pkg_install/lib/match.c head/usr.sbin/pkg_install/lib/pen.c head/usr.sbin/pkg_install/lib/url.c head/usr.sbin/pkg_install/version/perform.c Modified: head/usr.sbin/pkg_install/add/futil.c ============================================================================== --- head/usr.sbin/pkg_install/add/futil.c Thu Apr 1 13:27:27 2010 (r206042) +++ head/usr.sbin/pkg_install/add/futil.c Thu Apr 1 14:27:29 2010 (r206043) @@ -50,7 +50,7 @@ make_hierarchy(char *dir) } } else { - if (vsystem("/bin/mkdir %s", dir)) { + if (mkdir(dir, 0777) < 0) { if (cp2) *cp2 = '/'; return FAIL; Modified: head/usr.sbin/pkg_install/add/perform.c ============================================================================== --- head/usr.sbin/pkg_install/add/perform.c Thu Apr 1 13:27:27 2010 (r206042) +++ head/usr.sbin/pkg_install/add/perform.c Thu Apr 1 14:27:29 2010 (r206043) @@ -78,6 +78,7 @@ pkg_do(char *pkg) char pre_arg[FILENAME_MAX], post_arg[FILENAME_MAX]; char *conflict[2]; char **matched; + int fd; conflictsfound = 0; code = 0; @@ -408,8 +409,10 @@ pkg_do(char *pkg) goto bomb; /* Look for the requirements file */ - if (fexists(REQUIRE_FNAME)) { - vsystem("/bin/chmod +x %s", REQUIRE_FNAME); /* be sure */ + if ((fd = open(REQUIRE_FNAME, O_RDWR)) != -1) { + fstat(fd, &sb); + fchmod(fd, sb.st_mode | S_IXALL); /* be sure, chmod a+x */ + close(fd); if (Verbose) printf("Running requirements file first for %s..\n", Plist.name); if (!Fake && vsystem("./%s %s INSTALL", REQUIRE_FNAME, Plist.name)) { @@ -441,8 +444,10 @@ pkg_do(char *pkg) } /* If we're really installing, and have an installation file, run it */ - if (!NoInstall && fexists(pre_script)) { - vsystem("/bin/chmod +x %s", pre_script); /* make sure */ + if (!NoInstall && (fd = open(pre_script, O_RDWR)) != -1) { + fstat(fd, &sb); + fchmod(fd, sb.st_mode | S_IXALL); /* be sure, chmod a+x */ + close(fd); if (Verbose) printf("Running pre-install for %s..\n", Plist.name); if (!Fake && vsystem("./%s %s %s", pre_script, Plist.name, pre_arg)) { @@ -470,8 +475,10 @@ pkg_do(char *pkg) } /* Run the installation script one last time? */ - if (!NoInstall && fexists(post_script)) { - vsystem("/bin/chmod +x %s", post_script); /* make sure */ + if (!NoInstall && (fd = open(post_script, O_RDWR)) != -1) { + fstat(fd, &sb); + fchmod(fd, sb.st_mode | S_IXALL); /* be sure, chmod a+x */ + close(fd); if (Verbose) printf("Running post-install for %s..\n", Plist.name); if (!Fake && vsystem("./%s %s %s", post_script, Plist.name, post_arg)) { @@ -503,7 +510,10 @@ pkg_do(char *pkg) goto success; /* close enough for government work */ } /* Make sure pkg_info can read the entry */ - vsystem("/bin/chmod a+rx %s", LogDir); + fd = open(LogDir, O_RDWR); + fstat(fd, &sb); + fchmod(fd, sb.st_mode | S_IRALL | S_IXALL); /* be sure, chmod a+rx */ + close(fd); move_file(".", DESC_FNAME, LogDir); move_file(".", COMMENT_FNAME, LogDir); if (fexists(INSTALL_FNAME)) Modified: head/usr.sbin/pkg_install/delete/perform.c ============================================================================== --- head/usr.sbin/pkg_install/delete/perform.c Thu Apr 1 13:27:27 2010 (r206042) +++ head/usr.sbin/pkg_install/delete/perform.c Thu Apr 1 14:27:29 2010 (r206043) @@ -132,6 +132,8 @@ pkg_do(char *pkg) const char *post_script, *pre_arg, *post_arg; struct reqr_by_entry *rb_entry; struct reqr_by_head *rb_list; + int fd; + struct stat sb; if (!pkg || !(len = strlen(pkg))) return 1; @@ -221,10 +223,12 @@ pkg_do(char *pkg) setenv(PKG_PREFIX_VNAME, p->name, 1); - if (fexists(REQUIRE_FNAME)) { + if ((fd = open(REQUIRE_FNAME, O_RDWR)) != -1) { + fstat(fd, &sb); + fchmod(fd, sb.st_mode | S_IXALL); /* be sure, chmod a+x */ + close(fd); if (Verbose) printf("Executing 'require' script.\n"); - vsystem("/bin/chmod +x %s", REQUIRE_FNAME); /* be sure */ if (vsystem("./%s %s DEINSTALL", REQUIRE_FNAME, pkg)) { warnx("package %s fails requirements %s", pkg, Force ? "" : "- not deleted"); @@ -250,11 +254,13 @@ pkg_do(char *pkg) post_script = pre_arg = post_arg = NULL; } - if (!NoDeInstall && pre_script != NULL && fexists(pre_script)) { + if (!NoDeInstall && pre_script != NULL && (fd = open(pre_script, O_RDWR)) != -1) { if (Fake) printf("Would execute de-install script at this point.\n"); else { - vsystem("/bin/chmod +x %s", pre_script); /* make sure */ + fstat(fd, &sb); + fchmod(fd, sb.st_mode | S_IXALL); /* be sure, chmod a+x */ + close(fd); if (vsystem("./%s %s %s", pre_script, pkg, pre_arg)) { warnx("deinstall script returned error status"); if (!Force) @@ -326,11 +332,13 @@ pkg_do(char *pkg) return 1; } - if (!NoDeInstall && post_script != NULL && fexists(post_script)) { + if (!NoDeInstall && post_script != NULL && (fd = open(post_script, O_RDWR)) != -1) { if (Fake) printf("Would execute post-deinstall script at this point.\n"); else { - vsystem("/bin/chmod +x %s", post_script); /* make sure */ + fstat(fd, &sb); + fchmod(fd, sb.st_mode | S_IXALL); /* be sure, chmod a+x */ + close(fd); if (vsystem("./%s %s %s", post_script, pkg, post_arg)) { warnx("post-deinstall script returned error status"); if (!Force) Modified: head/usr.sbin/pkg_install/lib/file.c ============================================================================== --- head/usr.sbin/pkg_install/lib/file.c Thu Apr 1 13:27:27 2010 (r206042) +++ head/usr.sbin/pkg_install/lib/file.c Thu Apr 1 14:27:29 2010 (r206043) @@ -31,10 +31,13 @@ __FBSDID("$FreeBSD$"); Boolean fexists(const char *fname) { - struct stat dummy; - if (!lstat(fname, &dummy)) - return TRUE; - return FALSE; + int fd; + + if ((fd = open(fname, O_RDONLY)) == -1) + return FALSE; + + close(fd); + return TRUE; } /* Quick check to see if something is a directory or symlink to a directory */ @@ -279,17 +282,23 @@ copy_file(const char *dir, const char *f } void -move_file(const char *dir, const char *fname, const char *to) +move_file(const char *dir, const char *fname, const char *tdir) { - char cmd[FILENAME_MAX]; + char from[FILENAME_MAX]; + char to[FILENAME_MAX]; if (fname[0] == '/') - snprintf(cmd, FILENAME_MAX, "/bin/mv %s %s", fname, to); + strncpy(from, fname, FILENAME_MAX); else - snprintf(cmd, FILENAME_MAX, "/bin/mv %s/%s %s", dir, fname, to); - if (vsystem(cmd)) { - cleanup(0); - errx(2, "%s: could not perform '%s'", __func__, cmd); + snprintf(from, FILENAME_MAX, "%s/%s", dir, fname); + + snprintf(to, FILENAME_MAX, "%s/%s", tdir, fname); + + if (rename(from, to) == -1) { + if (vsystem("/bin/mv %s %s", from, to)) { + cleanup(0); + errx(2, "%s: could not move '%s' to '%s'", __func__, from, to); + } } } Modified: head/usr.sbin/pkg_install/lib/lib.h ============================================================================== --- head/usr.sbin/pkg_install/lib/lib.h Thu Apr 1 13:27:27 2010 (r206042) +++ head/usr.sbin/pkg_install/lib/lib.h Thu Apr 1 14:27:29 2010 (r206043) @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -51,6 +52,11 @@ #define YES 2 #define NO 1 +/* Some more stat macros. */ +#define S_IRALL 0000444 +#define S_IWALL 0000222 +#define S_IXALL 0000111 + /* Usually "rm", but often "echo" during debugging! */ #define REMOVE_CMD "/bin/rm" @@ -84,18 +90,6 @@ #define DISPLAY_FNAME "+DISPLAY" #define MTREE_FNAME "+MTREE_DIRS" -#if defined(__FreeBSD_version) && __FreeBSD_version >= 900000 -#define INDEX_FNAME "INDEX-9" -#elif defined(__FreeBSD_version) && __FreeBSD_version >= 800000 -#define INDEX_FNAME "INDEX-8" -#elif defined(__FreeBSD_version) && __FreeBSD_version >= 700000 -#define INDEX_FNAME "INDEX-7" -#elif defined(__FreeBSD_version) && __FreeBSD_version >= 600000 -#define INDEX_FNAME "INDEX-6" -#else -#define INDEX_FNAME "INDEX" -#endif - #define CMD_CHAR '@' /* prefix for extended PLIST cmd */ /* The name of the "prefix" environment variable given to scripts */ @@ -105,7 +99,7 @@ * Version of the package tools - increase whenever you make a change * in the code that is not cosmetic only. */ -#define PKG_INSTALL_VERSION 20100122 +#define PKG_INSTALL_VERSION 20100401 #define PKG_WRAPCONF_FNAME "/var/db/pkg_install.conf" #define main(argc, argv) real_main(argc, argv) Modified: head/usr.sbin/pkg_install/lib/match.c ============================================================================== --- head/usr.sbin/pkg_install/lib/match.c Thu Apr 1 13:27:27 2010 (r206042) +++ head/usr.sbin/pkg_install/lib/match.c Thu Apr 1 14:27:29 2010 (r206043) @@ -267,7 +267,7 @@ matchallbyorigin(const char **origins, i */ if (isemptydir(tmp)) continue; - snprintf(tmp, PATH_MAX, "%s/%s", tmp, CONTENTS_FNAME); + strncat(tmp, "/" CONTENTS_FNAME, PATH_MAX); fp = fopen(tmp, "r"); if (fp == NULL) { warnx("the package info for package '%s' is corrupt", installed[i]); Modified: head/usr.sbin/pkg_install/lib/pen.c ============================================================================== --- head/usr.sbin/pkg_install/lib/pen.c Thu Apr 1 13:27:27 2010 (r206042) +++ head/usr.sbin/pkg_install/lib/pen.c Thu Apr 1 14:27:29 2010 (r206043) @@ -113,10 +113,6 @@ make_playpen(char *pen, off_t sz) cleanup(0); errx(2, "%s: can't mktemp '%s'", __func__, pen); } - if (chmod(pen, 0700) == FAIL) { - cleanup(0); - errx(2, "%s: can't mkdir '%s'", __func__, pen); - } if (Verbose) { if (sz) { Modified: head/usr.sbin/pkg_install/lib/url.c ============================================================================== --- head/usr.sbin/pkg_install/lib/url.c Thu Apr 1 13:27:27 2010 (r206042) +++ head/usr.sbin/pkg_install/lib/url.c Thu Apr 1 14:27:29 2010 (r206043) @@ -108,6 +108,10 @@ fileGetURL(const char *base, const char if ((ftp = fetchGetURL(fname, Verbose ? "v" : NULL)) == NULL) { printf("Error: Unable to get %s: %s\n", fname, fetchLastErrString); + /* If the fetch fails, yank the package. */ + if (keep_package && unlink(pkg) < 0 && Verbose) { + warnx("failed to remove partially fetched package: %s", pkg); + } return NULL; } Modified: head/usr.sbin/pkg_install/version/perform.c ============================================================================== --- head/usr.sbin/pkg_install/version/perform.c Thu Apr 1 13:27:27 2010 (r206042) +++ head/usr.sbin/pkg_install/version/perform.c Thu Apr 1 14:27:29 2010 (r206043) @@ -35,28 +35,41 @@ static int pkg_do(char *); static void show_version(Package, const char *, const char *); /* - * This is the traditional pkg_perform, except that the argument is _not_ - * a list of packages. It is the index file from the command line. + * This is the traditional pkg_perform, except that the argument is _not_ a + * list of packages. It is the index file from the command line. * - * We loop over the installed packages, matching them with the -s flag - * if needed and calling pkg_do(). Before hand we set up a few things, - * and after we tear them down... + * We loop over the installed packages, matching them with the -s flag if + * needed and calling pkg_do(). Beforehand we set up a few things, and after + * we tear them down... + * + * Returns 0 on success, non-zero on failure, corresponding to the number of + * failed attempts to access the INDEX. */ int pkg_perform(char **indexarg) { char **pkgs, *pat[2], **patterns; struct index_entry *ie; - int i, err_cnt = 0; + int i, err_cnt = 0, rel_major_ver; int MatchType; + struct utsname u; + + if (uname(&u) == -1) { + warn("%s(): failed to determine uname information", __func__); + return 1; + } else if ((rel_major_ver = (int) strtol(u.release, NULL, 10)) <= 0) { + + } + /* * Try to find and open the INDEX. We only check IndexFile != NULL * later, if we actually need the INDEX. */ - if (*indexarg == NULL) - snprintf(IndexPath, sizeof(IndexPath), "%s/%s", PORTS_DIR, INDEX_FNAME); - else + if (*indexarg == NULL) { + snprintf(IndexPath, sizeof(IndexPath), "%s/INDEX-%d", PORTS_DIR, + rel_major_ver); + } else strlcpy(IndexPath, *indexarg, sizeof(IndexPath)); if (isURL(IndexPath)) IndexFile = fetchGetURL(IndexPath, ""); From owner-svn-src-head@FreeBSD.ORG Thu Apr 1 15:19:51 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B4319106566C; Thu, 1 Apr 2010 15:19:51 +0000 (UTC) (envelope-from simon@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9FCB68FC0A; Thu, 1 Apr 2010 15:19:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o31FJpqk068578; Thu, 1 Apr 2010 15:19:51 GMT (envelope-from simon@svn.freebsd.org) Received: (from simon@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o31FJpw2068549; Thu, 1 Apr 2010 15:19:51 GMT (envelope-from simon@svn.freebsd.org) Message-Id: <201004011519.o31FJpw2068549@svn.freebsd.org> From: "Simon L. Nielsen" Date: Thu, 1 Apr 2010 15: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: r206046 - in head/crypto/openssl: . apps crypto crypto/asn1 crypto/bio crypto/bn crypto/bn/asm crypto/engine crypto/evp crypto/ocsp crypto/rand engines fips ssl X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Apr 2010 15:19:51 -0000 Author: simon Date: Thu Apr 1 15:19:51 2010 New Revision: 206046 URL: http://svn.freebsd.org/changeset/base/206046 Log: Merge OpenSSL 0.9.8n into head. This fixes CVE-2010-0740 which only affected -CURRENT (OpenSSL 0.9.8m) but not -STABLE branches. I have not yet been able to find out if CVE-2010-0433 impacts FreeBSD. This will be investigated further. Security: CVE-2010-0433, CVE-2010-0740 Security: http://www.openssl.org/news/secadv_20100324.txt Modified: head/crypto/openssl/CHANGES head/crypto/openssl/FAQ head/crypto/openssl/Makefile head/crypto/openssl/NEWS head/crypto/openssl/README head/crypto/openssl/apps/req.c head/crypto/openssl/apps/speed.c head/crypto/openssl/config head/crypto/openssl/crypto/asn1/a_object.c head/crypto/openssl/crypto/bio/bss_file.c head/crypto/openssl/crypto/bn/asm/ppc.pl head/crypto/openssl/crypto/bn/asm/x86_64-gcc.c head/crypto/openssl/crypto/bn/bn_div.c head/crypto/openssl/crypto/engine/eng_all.c head/crypto/openssl/crypto/engine/eng_cryptodev.c head/crypto/openssl/crypto/evp/digest.c head/crypto/openssl/crypto/evp/evp_locl.h head/crypto/openssl/crypto/evp/names.c head/crypto/openssl/crypto/md32_common.h head/crypto/openssl/crypto/ocsp/ocsp_prn.c head/crypto/openssl/crypto/opensslv.h head/crypto/openssl/crypto/rand/rand_win.c head/crypto/openssl/engines/e_capi.c head/crypto/openssl/engines/e_chil.c head/crypto/openssl/fips/Makefile head/crypto/openssl/openssl.spec head/crypto/openssl/ssl/kssl.c head/crypto/openssl/ssl/s3_pkt.c Directory Properties: head/crypto/openssl/ (props changed) Modified: head/crypto/openssl/CHANGES ============================================================================== --- head/crypto/openssl/CHANGES Thu Apr 1 15:17:52 2010 (r206045) +++ head/crypto/openssl/CHANGES Thu Apr 1 15:19:51 2010 (r206046) @@ -2,6 +2,21 @@ OpenSSL CHANGES _______________ + Changes between 0.9.8m and 0.9.8n [24 Mar 2010] + + *) When rejecting SSL/TLS records due to an incorrect version number, never + update s->server with a new major version number. As of + - OpenSSL 0.9.8m if 'short' is a 16-bit type, + - OpenSSL 0.9.8f if 'short' is longer than 16 bits, + the previous behavior could result in a read attempt at NULL when + receiving specific incorrect SSL/TLS records once record payload + protection is active. (CVE-2010-0740) + [Bodo Moeller, Adam Langley ] + + *) Fix for CVE-2010-0433 where some kerberos enabled versions of OpenSSL + could be crashed if the relevant tables were not present (e.g. chrooted). + [Tomas Hoger ] + Changes between 0.9.8l and 0.9.8m [25 Feb 2010] *) Always check bn_wexpend() return values for failure. (CVE-2009-3245) Modified: head/crypto/openssl/FAQ ============================================================================== --- head/crypto/openssl/FAQ Thu Apr 1 15:17:52 2010 (r206045) +++ head/crypto/openssl/FAQ Thu Apr 1 15:19:51 2010 (r206046) @@ -78,7 +78,7 @@ OpenSSL - Frequently Asked Questions * Which is the current version of OpenSSL? The current version is available from . -OpenSSL 0.9.8m was released on Feb 25th, 2010. +OpenSSL 0.9.8n was released on Mar 24th, 2010. In addition to the current stable release, you can also access daily snapshots of the OpenSSL development version at value,def,value,nid,n_min,n_max, chtype)) Modified: head/crypto/openssl/apps/speed.c ============================================================================== --- head/crypto/openssl/apps/speed.c Thu Apr 1 15:17:52 2010 (r206045) +++ head/crypto/openssl/apps/speed.c Thu Apr 1 15:19:51 2010 (r206046) @@ -254,12 +254,18 @@ # endif #endif -#if defined(OPENSSL_SYS_VMS) || defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MACINTOSH_CLASSIC) || defined(OPENSSL_SYS_OS2) || defined(OPENSSL_SYS_NETWARE) -# define NO_FORK 1 -#elif HAVE_FORK +#ifndef HAVE_FORK +# if defined(OPENSSL_SYS_VMS) || defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MACINTOSH_CLASSIC) || defined(OPENSSL_SYS_OS2) || defined(OPENSSL_SYS_NETWARE) +# define HAVE_FORK 0 +# else +# define HAVE_FORK 1 +# endif +#endif + +#if HAVE_FORK # undef NO_FORK #else -# define NO_FORK 1 +# define NO_FORK #endif #undef BUFSIZE Modified: head/crypto/openssl/config ============================================================================== --- head/crypto/openssl/config Thu Apr 1 15:17:52 2010 (r206045) +++ head/crypto/openssl/config Thu Apr 1 15:19:51 2010 (r206046) @@ -741,6 +741,10 @@ case "$GUESSOS" in OBJECT_MODE=${OBJECT_MODE:-32} if [ "$CC" = "gcc" ]; then OUT="aix-gcc" + if [ $OBJECT_MODE -eq 64 ]; then + echo 'Your $OBJECT_MODE was found to be set to 64' + OUT="aix64-gcc" + fi elif [ $OBJECT_MODE -eq 64 ]; then echo 'Your $OBJECT_MODE was found to be set to 64' OUT="aix64-cc" Modified: head/crypto/openssl/crypto/asn1/a_object.c ============================================================================== --- head/crypto/openssl/crypto/asn1/a_object.c Thu Apr 1 15:17:52 2010 (r206045) +++ head/crypto/openssl/crypto/asn1/a_object.c Thu Apr 1 15:19:51 2010 (r206046) @@ -291,12 +291,12 @@ ASN1_OBJECT *c2i_ASN1_OBJECT(ASN1_OBJECT ASN1_OBJECT *ret=NULL; const unsigned char *p; int i; - /* Sanity check OID encoding: can't have 0x80 in subidentifiers, see: - * X.690 8.19.2 + /* Sanity check OID encoding: can't have leading 0x80 in + * subidentifiers, see: X.690 8.19.2 */ for (i = 0, p = *pp + 1; i < len - 1; i++, p++) { - if (*p == 0x80) + if (*p == 0x80 && (!i || !(p[-1] & 0x80))) { ASN1err(ASN1_F_C2I_ASN1_OBJECT,ASN1_R_INVALID_OBJECT_ENCODING); return NULL; Modified: head/crypto/openssl/crypto/bio/bss_file.c ============================================================================== --- head/crypto/openssl/crypto/bio/bss_file.c Thu Apr 1 15:17:52 2010 (r206045) +++ head/crypto/openssl/crypto/bio/bss_file.c Thu Apr 1 15:19:51 2010 (r206046) @@ -272,9 +272,9 @@ static long MS_CALLBACK file_ctrl(BIO *b BIO_clear_flags(b,BIO_FLAGS_UPLINK); #endif #endif -#ifdef UP_fsetmode +#ifdef UP_fsetmod if (b->flags&BIO_FLAGS_UPLINK) - UP_fsetmode(b->ptr,num&BIO_FP_TEXT?'t':'b'); + UP_fsetmod(b->ptr,(char)((num&BIO_FP_TEXT)?'t':'b')); else #endif { Modified: head/crypto/openssl/crypto/bn/asm/ppc.pl ============================================================================== --- head/crypto/openssl/crypto/bn/asm/ppc.pl Thu Apr 1 15:17:52 2010 (r206045) +++ head/crypto/openssl/crypto/bn/asm/ppc.pl Thu Apr 1 15:19:51 2010 (r206046) @@ -2074,5 +2074,7 @@ EOF $data =~ s/^(\s*)cmplw(\s+)([^,]+),(.*)/$1cmpl$2$3,0,$4/gm; # assembler X doesn't accept li, load immediate value #$data =~ s/^(\s*)li(\s+)([^,]+),(.*)/$1addi$2$3,0,$4/gm; + # assembler Y chokes on apostrophes in comments + $data =~ s/'//gm; return($data); } Modified: head/crypto/openssl/crypto/bn/asm/x86_64-gcc.c ============================================================================== --- head/crypto/openssl/crypto/bn/asm/x86_64-gcc.c Thu Apr 1 15:17:52 2010 (r206045) +++ head/crypto/openssl/crypto/bn/asm/x86_64-gcc.c Thu Apr 1 15:19:51 2010 (r206046) @@ -59,6 +59,7 @@ #undef mul #undef mul_add +#undef sqr /* * "m"(a), "+m"(r) is the way to favor DirectPath µ-code; Modified: head/crypto/openssl/crypto/bn/bn_div.c ============================================================================== --- head/crypto/openssl/crypto/bn/bn_div.c Thu Apr 1 15:17:52 2010 (r206045) +++ head/crypto/openssl/crypto/bn/bn_div.c Thu Apr 1 15:19:51 2010 (r206046) @@ -337,7 +337,10 @@ X) -> 0x%08X\n", t2 -= d1; } #else /* !BN_LLONG */ - BN_ULONG t2l,t2h,ql,qh; + BN_ULONG t2l,t2h; +#if !defined(BN_UMULT_LOHI) && !defined(BN_UMULT_HIGH) + BN_ULONG ql,qh; +#endif q=bn_div_words(n0,n1,d0); #ifdef BN_DEBUG_LEVITTE @@ -561,7 +564,10 @@ X) -> 0x%08X\n", t2 -= d1; } #else /* !BN_LLONG */ - BN_ULONG t2l,t2h,ql,qh; + BN_ULONG t2l,t2h; +#if !defined(BN_UMULT_LOHI) && !defined(BN_UMULT_HIGH) + BN_ULONG ql,qh; +#endif q=bn_div_words(n0,n1,d0); #ifdef BN_DEBUG_LEVITTE Modified: head/crypto/openssl/crypto/engine/eng_all.c ============================================================================== --- head/crypto/openssl/crypto/engine/eng_all.c Thu Apr 1 15:17:52 2010 (r206045) +++ head/crypto/openssl/crypto/engine/eng_all.c Thu Apr 1 15:19:51 2010 (r206046) @@ -104,7 +104,7 @@ void ENGINE_load_builtin_engines(void) #endif #endif #ifndef OPENSSL_NO_HW -#if defined(__OpenBSD__) || defined(__FreeBSD__) +#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(HAVE_CRYPTODEV) ENGINE_load_cryptodev(); #endif #if defined(OPENSSL_SYS_WIN32) && !defined(OPENSSL_NO_CAPIENG) Modified: head/crypto/openssl/crypto/engine/eng_cryptodev.c ============================================================================== --- head/crypto/openssl/crypto/engine/eng_cryptodev.c Thu Apr 1 15:17:52 2010 (r206045) +++ head/crypto/openssl/crypto/engine/eng_cryptodev.c Thu Apr 1 15:19:51 2010 (r206046) @@ -755,10 +755,18 @@ cryptodev_bn_mod_exp(BIGNUM *r, const BI goto err; kop.crk_iparams = 3; - if (cryptodev_asym(&kop, BN_num_bytes(m), r, 0, NULL) == -1) { + if (cryptodev_asym(&kop, BN_num_bytes(m), r, 0, NULL)) { const RSA_METHOD *meth = RSA_PKCS1_SSLeay(); + printf("OCF asym process failed, Running in software\n"); + ret = meth->bn_mod_exp(r, a, p, m, ctx, in_mont); + + } else if (ECANCELED == kop.crk_status) { + const RSA_METHOD *meth = RSA_PKCS1_SSLeay(); + printf("OCF hardware operation cancelled. Running in Software\n"); ret = meth->bn_mod_exp(r, a, p, m, ctx, in_mont); } + /* else cryptodev operation worked ok ==> ret = 1*/ + err: zapparams(&kop); return (ret); @@ -801,10 +809,18 @@ cryptodev_rsa_mod_exp(BIGNUM *r0, const goto err; kop.crk_iparams = 6; - if (cryptodev_asym(&kop, BN_num_bytes(rsa->n), r0, 0, NULL) == -1) { + if (cryptodev_asym(&kop, BN_num_bytes(rsa->n), r0, 0, NULL)) { const RSA_METHOD *meth = RSA_PKCS1_SSLeay(); + printf("OCF asym process failed, running in Software\n"); + ret = (*meth->rsa_mod_exp)(r0, I, rsa, ctx); + + } else if (ECANCELED == kop.crk_status) { + const RSA_METHOD *meth = RSA_PKCS1_SSLeay(); + printf("OCF hardware operation cancelled. Running in Software\n"); ret = (*meth->rsa_mod_exp)(r0, I, rsa, ctx); } + /* else cryptodev operation worked ok ==> ret = 1*/ + err: zapparams(&kop); return (ret); @@ -940,7 +956,8 @@ cryptodev_dsa_verify(const unsigned char kop.crk_iparams = 7; if (cryptodev_asym(&kop, 0, NULL, 0, NULL) == 0) { - dsaret = kop.crk_status; +/*OCF success value is 0, if not zero, change dsaret to fail*/ + if(0 != kop.crk_status) dsaret = 0; } else { const DSA_METHOD *meth = DSA_OpenSSL(); Modified: head/crypto/openssl/crypto/evp/digest.c ============================================================================== --- head/crypto/openssl/crypto/evp/digest.c Thu Apr 1 15:17:52 2010 (r206045) +++ head/crypto/openssl/crypto/evp/digest.c Thu Apr 1 15:19:51 2010 (r206046) @@ -235,6 +235,7 @@ static int do_evp_md_engine(EVP_MD_CTX * { /* Same comment from evp_enc.c */ EVPerr(EVP_F_DO_EVP_MD_ENGINE,EVP_R_INITIALIZATION_ERROR); + ENGINE_finish(impl); return 0; } /* We'll use the ENGINE's private digest definition */ Modified: head/crypto/openssl/crypto/evp/evp_locl.h ============================================================================== --- head/crypto/openssl/crypto/evp/evp_locl.h Thu Apr 1 15:17:52 2010 (r206045) +++ head/crypto/openssl/crypto/evp/evp_locl.h Thu Apr 1 15:19:51 2010 (r206046) @@ -127,9 +127,9 @@ BLOCK_CIPHER_def1(cname, cbc, cbc, CBC, #define BLOCK_CIPHER_def_cfb(cname, kstruct, nid, key_len, \ iv_len, cbits, flags, init_key, cleanup, \ set_asn1, get_asn1, ctrl) \ -BLOCK_CIPHER_def1(cname, cfb##cbits, cfb##cbits, CFB, kstruct, nid, \ - (cbits + 7)/8, key_len, iv_len, \ - flags, init_key, cleanup, set_asn1, get_asn1, ctrl) +BLOCK_CIPHER_def1(cname, cfb##cbits, cfb##cbits, CFB, kstruct, nid, 1, \ + key_len, iv_len, flags, init_key, cleanup, set_asn1, \ + get_asn1, ctrl) #define BLOCK_CIPHER_def_ofb(cname, kstruct, nid, key_len, \ iv_len, cbits, flags, init_key, cleanup, \ Modified: head/crypto/openssl/crypto/evp/names.c ============================================================================== --- head/crypto/openssl/crypto/evp/names.c Thu Apr 1 15:17:52 2010 (r206045) +++ head/crypto/openssl/crypto/evp/names.c Thu Apr 1 15:19:51 2010 (r206046) @@ -90,7 +90,7 @@ int EVP_add_digest(const EVP_MD *md) r=OBJ_NAME_add(OBJ_nid2ln(md->type),OBJ_NAME_TYPE_MD_METH,(const char *)md); if (r == 0) return(0); - if (md->type != md->pkey_type) + if (md->pkey_type && md->type != md->pkey_type) { r=OBJ_NAME_add(OBJ_nid2sn(md->pkey_type), OBJ_NAME_TYPE_MD_METH|OBJ_NAME_ALIAS,name); Modified: head/crypto/openssl/crypto/md32_common.h ============================================================================== --- head/crypto/openssl/crypto/md32_common.h Thu Apr 1 15:17:52 2010 (r206045) +++ head/crypto/openssl/crypto/md32_common.h Thu Apr 1 15:19:51 2010 (r206046) @@ -241,11 +241,11 @@ #ifndef PEDANTIC # if defined(__GNUC__) && __GNUC__>=2 && !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) # if defined(__s390x__) -# define HOST_c2l(c,l) ({ asm ("lrv %0,0(%1)" \ - :"=r"(l) : "r"(c)); \ +# define HOST_c2l(c,l) ({ asm ("lrv %0,%1" \ + :"=d"(l) :"m"(*(const unsigned int *)(c));\ (c)+=4; (l); }) -# define HOST_l2c(l,c) ({ asm ("strv %0,0(%1)" \ - : : "r"(l),"r"(c) : "memory"); \ +# define HOST_l2c(l,c) ({ asm ("strv %1,%0" \ + :"=m"(*(unsigned int *)(c)) :"d"(l));\ (c)+=4; (l); }) # endif # endif Modified: head/crypto/openssl/crypto/ocsp/ocsp_prn.c ============================================================================== --- head/crypto/openssl/crypto/ocsp/ocsp_prn.c Thu Apr 1 15:17:52 2010 (r206045) +++ head/crypto/openssl/crypto/ocsp/ocsp_prn.c Thu Apr 1 15:19:51 2010 (r206046) @@ -275,6 +275,7 @@ int OCSP_RESPONSE_print(BIO *bp, OCSP_RE } if (!X509V3_extensions_print(bp, "Response Extensions", rd->responseExtensions, flags, 4)) + goto err; if(X509_signature_print(bp, br->signatureAlgorithm, br->signature) <= 0) goto err; Modified: head/crypto/openssl/crypto/opensslv.h ============================================================================== --- head/crypto/openssl/crypto/opensslv.h Thu Apr 1 15:17:52 2010 (r206045) +++ head/crypto/openssl/crypto/opensslv.h Thu Apr 1 15:19:51 2010 (r206046) @@ -25,11 +25,11 @@ * (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for * major minor fix final patch/beta) */ -#define OPENSSL_VERSION_NUMBER 0x009080dfL +#define OPENSSL_VERSION_NUMBER 0x009080efL #ifdef OPENSSL_FIPS -#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.8m-fips 25 Feb 2010" +#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.8n-fips 24 Mar 2010" #else -#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.8m 25 Feb 2010" +#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.8n 24 Mar 2010" #endif #define OPENSSL_VERSION_PTEXT " part of " OPENSSL_VERSION_TEXT Modified: head/crypto/openssl/crypto/rand/rand_win.c ============================================================================== --- head/crypto/openssl/crypto/rand/rand_win.c Thu Apr 1 15:17:52 2010 (r206045) +++ head/crypto/openssl/crypto/rand/rand_win.c Thu Apr 1 15:19:51 2010 (r206046) @@ -750,7 +750,7 @@ static void readscreen(void) int y; /* y-coordinate of screen lines to grab */ int n = 16; /* number of screen lines to grab at a time */ - if (GetVersion() >= 0x80000000 || !OPENSSL_isservice()) + if (GetVersion() < 0x80000000 && OPENSSL_isservice()>0) return; /* Create a screen DC and a memory DC compatible to screen DC */ Modified: head/crypto/openssl/engines/e_capi.c ============================================================================== --- head/crypto/openssl/engines/e_capi.c Thu Apr 1 15:17:52 2010 (r206045) +++ head/crypto/openssl/engines/e_capi.c Thu Apr 1 15:19:51 2010 (r206046) @@ -83,6 +83,10 @@ #define CERT_STORE_CREATE_NEW_FLAG 0x00002000 #endif +#ifndef CERT_SYSTEM_STORE_CURRENT_USER +#define CERT_SYSTEM_STORE_CURRENT_USER 0x00010000 +#endif + #include #include #include Modified: head/crypto/openssl/engines/e_chil.c ============================================================================== --- head/crypto/openssl/engines/e_chil.c Thu Apr 1 15:17:52 2010 (r206045) +++ head/crypto/openssl/engines/e_chil.c Thu Apr 1 15:19:51 2010 (r206046) @@ -1204,6 +1204,11 @@ static int hwcrhk_get_pass(const char *p pem_password_cb *callback = NULL; void *callback_data = NULL; UI_METHOD *ui_method = NULL; + /* Despite what the documentation says prompt_info can be + * an empty string. + */ + if (prompt_info && !*prompt_info) + prompt_info = NULL; if (cactx) { @@ -1305,8 +1310,10 @@ static int hwcrhk_insert_card(const char { char answer; char buf[BUFSIZ]; - - if (wrong_info) + /* Despite what the documentation says wrong_info can be + * an empty string. + */ + if (wrong_info && *wrong_info) BIO_snprintf(buf, sizeof(buf)-1, "Current card: \"%s\"\n", wrong_info); ok = UI_dup_info_string(ui, buf); Modified: head/crypto/openssl/fips/Makefile ============================================================================== --- head/crypto/openssl/fips/Makefile Thu Apr 1 15:17:52 2010 (r206045) +++ head/crypto/openssl/fips/Makefile Thu Apr 1 15:19:51 2010 (r206046) @@ -123,7 +123,7 @@ fips_premain_dso$(EXE_EXT): fips_premain $(FIPSLIBDIR)fipscanister.o ../libcrypto.a $(EX_LIBS) # this is executed only when linking with external fipscanister.o fips_standalone_sha1$(EXE_EXT): sha/fips_standalone_sha1.c - if [ -z $(HOSTCC) ] ; then \ + if [ -z "$(HOSTCC)" ] ; then \ $(CC) $(CFLAGS) -DFIPSCANISTER_O -o $@ sha/fips_standalone_sha1.c $(FIPSLIBDIR)fipscanister.o $(EX_LIBS) ; \ else \ $(HOSTCC) $(HOSTCFLAGS) -o $ $@ -I../include -I../crypto sha/fips_standalone_sha1.c ../crypto/sha/sha1dgst.c ; \ Modified: head/crypto/openssl/openssl.spec ============================================================================== --- head/crypto/openssl/openssl.spec Thu Apr 1 15:17:52 2010 (r206045) +++ head/crypto/openssl/openssl.spec Thu Apr 1 15:19:51 2010 (r206046) @@ -2,7 +2,7 @@ %define libmaj 0 %define libmin 9 %define librel 8 -%define librev m +%define librev n Release: 1 %define openssldir /var/ssl Modified: head/crypto/openssl/ssl/kssl.c ============================================================================== --- head/crypto/openssl/ssl/kssl.c Thu Apr 1 15:17:52 2010 (r206045) +++ head/crypto/openssl/ssl/kssl.c Thu Apr 1 15:19:51 2010 (r206046) @@ -1802,6 +1802,9 @@ kssl_ctx_show(KSSL_CTX *kssl_ctx) kssl_ctx->service_name ? kssl_ctx->service_name: KRB5SVC, KRB5_NT_SRV_HST, &princ); + if (krb5rc) + goto exit; + krb5rc = krb5_kt_get_entry(krb5context, krb5keytab, princ, 0 /* IGNORE_VNO */, Modified: head/crypto/openssl/ssl/s3_pkt.c ============================================================================== --- head/crypto/openssl/ssl/s3_pkt.c Thu Apr 1 15:17:52 2010 (r206045) +++ head/crypto/openssl/ssl/s3_pkt.c Thu Apr 1 15:19:51 2010 (r206046) @@ -291,9 +291,9 @@ again: if (version != s->version) { SSLerr(SSL_F_SSL3_GET_RECORD,SSL_R_WRONG_VERSION_NUMBER); - /* Send back error using their - * version number :-) */ - s->version=version; + if ((s->version & 0xFF00) == (version & 0xFF00)) + /* Send back error using their minor version number :-) */ + s->version = (unsigned short)version; al=SSL_AD_PROTOCOL_VERSION; goto f_err; } From owner-svn-src-head@FreeBSD.ORG Thu Apr 1 15:35:30 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 665F51065677; Thu, 1 Apr 2010 15:35:30 +0000 (UTC) (envelope-from simon@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 27D5E8FC19; Thu, 1 Apr 2010 15:35:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o31FZU28072025; Thu, 1 Apr 2010 15:35:30 GMT (envelope-from simon@svn.freebsd.org) Received: (from simon@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o31FZU6p072023; Thu, 1 Apr 2010 15:35:30 GMT (envelope-from simon@svn.freebsd.org) Message-Id: <201004011535.o31FZU6p072023@svn.freebsd.org> From: "Simon L. Nielsen" Date: Thu, 1 Apr 2010 15:35: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: r206047 - head/secure/lib/libcrypto X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Apr 2010 15:35:30 -0000 Author: simon Date: Thu Apr 1 15:35:29 2010 New Revision: 206047 URL: http://svn.freebsd.org/changeset/base/206047 Log: - Make it slightly simpler to update OpenSSL version information for regenerating OpenSSL manual pages. - Explicitly set the OpenSSL release date so manual pages contain the date OpenSSL was released and not just the date OpenSSL was imported into the FreeBSD base system. - Update for Makefile for OpenSSL 0.9.8n. Modified: head/secure/lib/libcrypto/Makefile.inc Modified: head/secure/lib/libcrypto/Makefile.inc ============================================================================== --- head/secure/lib/libcrypto/Makefile.inc Thu Apr 1 15:19:51 2010 (r206046) +++ head/secure/lib/libcrypto/Makefile.inc Thu Apr 1 15:35:29 2010 (r206047) @@ -2,6 +2,10 @@ .include +# OpenSSL version used for manual page generation +OPENSSL_VER= 0.9.8n +OPENSSL_DATE= 2010-03-24 + LCRYPTO_SRC= ${.CURDIR}/../../../crypto/openssl LCRYPTO_DOC= ${.CURDIR}/../../../crypto/openssl/doc @@ -34,7 +38,8 @@ man-update: @(sec=${manpage:E}; \ pod=${manpage:R}.pod; \ cp ${LCRYPTO_DOC}/${_docs}/$$pod .; \ - pod2man --section=$$sec --release="0.9.8m" --center="OpenSSL" \ + pod2man --section=$$sec --release="${OPENSSL_VER}" \ + --date="${OPENSSL_DATE}" --center="OpenSSL" \ $$pod > ${.CURDIR}/man/${manpage}; \ rm -f $$pod; \ ${ECHO} ${manpage}) From owner-svn-src-head@FreeBSD.ORG Thu Apr 1 15:37:40 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 485911065670; Thu, 1 Apr 2010 15:37:40 +0000 (UTC) (envelope-from simon@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 343078FC1A; Thu, 1 Apr 2010 15:37:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o31Fbeqj072612; Thu, 1 Apr 2010 15:37:40 GMT (envelope-from simon@svn.freebsd.org) Received: (from simon@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o31Fbdim072519; Thu, 1 Apr 2010 15:37:39 GMT (envelope-from simon@svn.freebsd.org) Message-Id: <201004011537.o31Fbdim072519@svn.freebsd.org> From: "Simon L. Nielsen" Date: Thu, 1 Apr 2010 15:37: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: r206048 - in head/secure: lib/libcrypto/man lib/libssl/man usr.bin/openssl/man X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Apr 2010 15:37:40 -0000 Author: simon Date: Thu Apr 1 15:37:38 2010 New Revision: 206048 URL: http://svn.freebsd.org/changeset/base/206048 Log: Regenerate manual pages for OpenSSL 0.9.8n. Modified: head/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 head/secure/lib/libcrypto/man/ASN1_STRING_length.3 head/secure/lib/libcrypto/man/ASN1_STRING_new.3 head/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 head/secure/lib/libcrypto/man/ASN1_generate_nconf.3 head/secure/lib/libcrypto/man/BIO_ctrl.3 head/secure/lib/libcrypto/man/BIO_f_base64.3 head/secure/lib/libcrypto/man/BIO_f_buffer.3 head/secure/lib/libcrypto/man/BIO_f_cipher.3 head/secure/lib/libcrypto/man/BIO_f_md.3 head/secure/lib/libcrypto/man/BIO_f_null.3 head/secure/lib/libcrypto/man/BIO_f_ssl.3 head/secure/lib/libcrypto/man/BIO_find_type.3 head/secure/lib/libcrypto/man/BIO_new.3 head/secure/lib/libcrypto/man/BIO_push.3 head/secure/lib/libcrypto/man/BIO_read.3 head/secure/lib/libcrypto/man/BIO_s_accept.3 head/secure/lib/libcrypto/man/BIO_s_bio.3 head/secure/lib/libcrypto/man/BIO_s_connect.3 head/secure/lib/libcrypto/man/BIO_s_fd.3 head/secure/lib/libcrypto/man/BIO_s_file.3 head/secure/lib/libcrypto/man/BIO_s_mem.3 head/secure/lib/libcrypto/man/BIO_s_null.3 head/secure/lib/libcrypto/man/BIO_s_socket.3 head/secure/lib/libcrypto/man/BIO_set_callback.3 head/secure/lib/libcrypto/man/BIO_should_retry.3 head/secure/lib/libcrypto/man/BN_BLINDING_new.3 head/secure/lib/libcrypto/man/BN_CTX_new.3 head/secure/lib/libcrypto/man/BN_CTX_start.3 head/secure/lib/libcrypto/man/BN_add.3 head/secure/lib/libcrypto/man/BN_add_word.3 head/secure/lib/libcrypto/man/BN_bn2bin.3 head/secure/lib/libcrypto/man/BN_cmp.3 head/secure/lib/libcrypto/man/BN_copy.3 head/secure/lib/libcrypto/man/BN_generate_prime.3 head/secure/lib/libcrypto/man/BN_mod_inverse.3 head/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 head/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 head/secure/lib/libcrypto/man/BN_new.3 head/secure/lib/libcrypto/man/BN_num_bytes.3 head/secure/lib/libcrypto/man/BN_rand.3 head/secure/lib/libcrypto/man/BN_set_bit.3 head/secure/lib/libcrypto/man/BN_swap.3 head/secure/lib/libcrypto/man/BN_zero.3 head/secure/lib/libcrypto/man/CONF_modules_free.3 head/secure/lib/libcrypto/man/CONF_modules_load_file.3 head/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 head/secure/lib/libcrypto/man/DH_generate_key.3 head/secure/lib/libcrypto/man/DH_generate_parameters.3 head/secure/lib/libcrypto/man/DH_get_ex_new_index.3 head/secure/lib/libcrypto/man/DH_new.3 head/secure/lib/libcrypto/man/DH_set_method.3 head/secure/lib/libcrypto/man/DH_size.3 head/secure/lib/libcrypto/man/DSA_SIG_new.3 head/secure/lib/libcrypto/man/DSA_do_sign.3 head/secure/lib/libcrypto/man/DSA_dup_DH.3 head/secure/lib/libcrypto/man/DSA_generate_key.3 head/secure/lib/libcrypto/man/DSA_generate_parameters.3 head/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 head/secure/lib/libcrypto/man/DSA_new.3 head/secure/lib/libcrypto/man/DSA_set_method.3 head/secure/lib/libcrypto/man/DSA_sign.3 head/secure/lib/libcrypto/man/DSA_size.3 head/secure/lib/libcrypto/man/ERR_GET_LIB.3 head/secure/lib/libcrypto/man/ERR_clear_error.3 head/secure/lib/libcrypto/man/ERR_error_string.3 head/secure/lib/libcrypto/man/ERR_get_error.3 head/secure/lib/libcrypto/man/ERR_load_crypto_strings.3 head/secure/lib/libcrypto/man/ERR_load_strings.3 head/secure/lib/libcrypto/man/ERR_print_errors.3 head/secure/lib/libcrypto/man/ERR_put_error.3 head/secure/lib/libcrypto/man/ERR_remove_state.3 head/secure/lib/libcrypto/man/ERR_set_mark.3 head/secure/lib/libcrypto/man/EVP_BytesToKey.3 head/secure/lib/libcrypto/man/EVP_DigestInit.3 head/secure/lib/libcrypto/man/EVP_EncryptInit.3 head/secure/lib/libcrypto/man/EVP_OpenInit.3 head/secure/lib/libcrypto/man/EVP_PKEY_new.3 head/secure/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 head/secure/lib/libcrypto/man/EVP_SealInit.3 head/secure/lib/libcrypto/man/EVP_SignInit.3 head/secure/lib/libcrypto/man/EVP_VerifyInit.3 head/secure/lib/libcrypto/man/OBJ_nid2obj.3 head/secure/lib/libcrypto/man/OPENSSL_Applink.3 head/secure/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3 head/secure/lib/libcrypto/man/OPENSSL_config.3 head/secure/lib/libcrypto/man/OPENSSL_ia32cap.3 head/secure/lib/libcrypto/man/OPENSSL_load_builtin_modules.3 head/secure/lib/libcrypto/man/OpenSSL_add_all_algorithms.3 head/secure/lib/libcrypto/man/PKCS12_create.3 head/secure/lib/libcrypto/man/PKCS12_parse.3 head/secure/lib/libcrypto/man/PKCS7_decrypt.3 head/secure/lib/libcrypto/man/PKCS7_encrypt.3 head/secure/lib/libcrypto/man/PKCS7_sign.3 head/secure/lib/libcrypto/man/PKCS7_verify.3 head/secure/lib/libcrypto/man/RAND_add.3 head/secure/lib/libcrypto/man/RAND_bytes.3 head/secure/lib/libcrypto/man/RAND_cleanup.3 head/secure/lib/libcrypto/man/RAND_egd.3 head/secure/lib/libcrypto/man/RAND_load_file.3 head/secure/lib/libcrypto/man/RAND_set_rand_method.3 head/secure/lib/libcrypto/man/RSA_blinding_on.3 head/secure/lib/libcrypto/man/RSA_check_key.3 head/secure/lib/libcrypto/man/RSA_generate_key.3 head/secure/lib/libcrypto/man/RSA_get_ex_new_index.3 head/secure/lib/libcrypto/man/RSA_new.3 head/secure/lib/libcrypto/man/RSA_padding_add_PKCS1_type_1.3 head/secure/lib/libcrypto/man/RSA_print.3 head/secure/lib/libcrypto/man/RSA_private_encrypt.3 head/secure/lib/libcrypto/man/RSA_public_encrypt.3 head/secure/lib/libcrypto/man/RSA_set_method.3 head/secure/lib/libcrypto/man/RSA_sign.3 head/secure/lib/libcrypto/man/RSA_sign_ASN1_OCTET_STRING.3 head/secure/lib/libcrypto/man/RSA_size.3 head/secure/lib/libcrypto/man/SMIME_read_PKCS7.3 head/secure/lib/libcrypto/man/SMIME_write_PKCS7.3 head/secure/lib/libcrypto/man/X509_NAME_ENTRY_get_object.3 head/secure/lib/libcrypto/man/X509_NAME_add_entry_by_txt.3 head/secure/lib/libcrypto/man/X509_NAME_get_index_by_NID.3 head/secure/lib/libcrypto/man/X509_NAME_print_ex.3 head/secure/lib/libcrypto/man/X509_new.3 head/secure/lib/libcrypto/man/bio.3 head/secure/lib/libcrypto/man/blowfish.3 head/secure/lib/libcrypto/man/bn.3 head/secure/lib/libcrypto/man/bn_internal.3 head/secure/lib/libcrypto/man/buffer.3 head/secure/lib/libcrypto/man/crypto.3 head/secure/lib/libcrypto/man/d2i_ASN1_OBJECT.3 head/secure/lib/libcrypto/man/d2i_DHparams.3 head/secure/lib/libcrypto/man/d2i_DSAPublicKey.3 head/secure/lib/libcrypto/man/d2i_PKCS8PrivateKey.3 head/secure/lib/libcrypto/man/d2i_RSAPublicKey.3 head/secure/lib/libcrypto/man/d2i_X509.3 head/secure/lib/libcrypto/man/d2i_X509_ALGOR.3 head/secure/lib/libcrypto/man/d2i_X509_CRL.3 head/secure/lib/libcrypto/man/d2i_X509_NAME.3 head/secure/lib/libcrypto/man/d2i_X509_REQ.3 head/secure/lib/libcrypto/man/d2i_X509_SIG.3 head/secure/lib/libcrypto/man/des.3 head/secure/lib/libcrypto/man/dh.3 head/secure/lib/libcrypto/man/dsa.3 head/secure/lib/libcrypto/man/ecdsa.3 head/secure/lib/libcrypto/man/engine.3 head/secure/lib/libcrypto/man/err.3 head/secure/lib/libcrypto/man/evp.3 head/secure/lib/libcrypto/man/hmac.3 head/secure/lib/libcrypto/man/lh_stats.3 head/secure/lib/libcrypto/man/lhash.3 head/secure/lib/libcrypto/man/md5.3 head/secure/lib/libcrypto/man/mdc2.3 head/secure/lib/libcrypto/man/pem.3 head/secure/lib/libcrypto/man/rand.3 head/secure/lib/libcrypto/man/rc4.3 head/secure/lib/libcrypto/man/ripemd.3 head/secure/lib/libcrypto/man/rsa.3 head/secure/lib/libcrypto/man/sha.3 head/secure/lib/libcrypto/man/threads.3 head/secure/lib/libcrypto/man/ui.3 head/secure/lib/libcrypto/man/ui_compat.3 head/secure/lib/libcrypto/man/x509.3 head/secure/lib/libssl/man/SSL_CIPHER_get_name.3 head/secure/lib/libssl/man/SSL_COMP_add_compression_method.3 head/secure/lib/libssl/man/SSL_CTX_add_extra_chain_cert.3 head/secure/lib/libssl/man/SSL_CTX_add_session.3 head/secure/lib/libssl/man/SSL_CTX_ctrl.3 head/secure/lib/libssl/man/SSL_CTX_flush_sessions.3 head/secure/lib/libssl/man/SSL_CTX_free.3 head/secure/lib/libssl/man/SSL_CTX_get_ex_new_index.3 head/secure/lib/libssl/man/SSL_CTX_get_verify_mode.3 head/secure/lib/libssl/man/SSL_CTX_load_verify_locations.3 head/secure/lib/libssl/man/SSL_CTX_new.3 head/secure/lib/libssl/man/SSL_CTX_sess_number.3 head/secure/lib/libssl/man/SSL_CTX_sess_set_cache_size.3 head/secure/lib/libssl/man/SSL_CTX_sess_set_get_cb.3 head/secure/lib/libssl/man/SSL_CTX_sessions.3 head/secure/lib/libssl/man/SSL_CTX_set_cert_store.3 head/secure/lib/libssl/man/SSL_CTX_set_cert_verify_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_cipher_list.3 head/secure/lib/libssl/man/SSL_CTX_set_client_CA_list.3 head/secure/lib/libssl/man/SSL_CTX_set_client_cert_cb.3 head/secure/lib/libssl/man/SSL_CTX_set_default_passwd_cb.3 head/secure/lib/libssl/man/SSL_CTX_set_generate_session_id.3 head/secure/lib/libssl/man/SSL_CTX_set_info_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_max_cert_list.3 head/secure/lib/libssl/man/SSL_CTX_set_mode.3 head/secure/lib/libssl/man/SSL_CTX_set_msg_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_options.3 head/secure/lib/libssl/man/SSL_CTX_set_quiet_shutdown.3 head/secure/lib/libssl/man/SSL_CTX_set_session_cache_mode.3 head/secure/lib/libssl/man/SSL_CTX_set_session_id_context.3 head/secure/lib/libssl/man/SSL_CTX_set_ssl_version.3 head/secure/lib/libssl/man/SSL_CTX_set_timeout.3 head/secure/lib/libssl/man/SSL_CTX_set_tmp_dh_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_tmp_rsa_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_verify.3 head/secure/lib/libssl/man/SSL_CTX_use_certificate.3 head/secure/lib/libssl/man/SSL_SESSION_free.3 head/secure/lib/libssl/man/SSL_SESSION_get_ex_new_index.3 head/secure/lib/libssl/man/SSL_SESSION_get_time.3 head/secure/lib/libssl/man/SSL_accept.3 head/secure/lib/libssl/man/SSL_alert_type_string.3 head/secure/lib/libssl/man/SSL_clear.3 head/secure/lib/libssl/man/SSL_connect.3 head/secure/lib/libssl/man/SSL_do_handshake.3 head/secure/lib/libssl/man/SSL_free.3 head/secure/lib/libssl/man/SSL_get_SSL_CTX.3 head/secure/lib/libssl/man/SSL_get_ciphers.3 head/secure/lib/libssl/man/SSL_get_client_CA_list.3 head/secure/lib/libssl/man/SSL_get_current_cipher.3 head/secure/lib/libssl/man/SSL_get_default_timeout.3 head/secure/lib/libssl/man/SSL_get_error.3 head/secure/lib/libssl/man/SSL_get_ex_data_X509_STORE_CTX_idx.3 head/secure/lib/libssl/man/SSL_get_ex_new_index.3 head/secure/lib/libssl/man/SSL_get_fd.3 head/secure/lib/libssl/man/SSL_get_peer_cert_chain.3 head/secure/lib/libssl/man/SSL_get_peer_certificate.3 head/secure/lib/libssl/man/SSL_get_rbio.3 head/secure/lib/libssl/man/SSL_get_session.3 head/secure/lib/libssl/man/SSL_get_verify_result.3 head/secure/lib/libssl/man/SSL_get_version.3 head/secure/lib/libssl/man/SSL_library_init.3 head/secure/lib/libssl/man/SSL_load_client_CA_file.3 head/secure/lib/libssl/man/SSL_new.3 head/secure/lib/libssl/man/SSL_pending.3 head/secure/lib/libssl/man/SSL_read.3 head/secure/lib/libssl/man/SSL_rstate_string.3 head/secure/lib/libssl/man/SSL_session_reused.3 head/secure/lib/libssl/man/SSL_set_bio.3 head/secure/lib/libssl/man/SSL_set_connect_state.3 head/secure/lib/libssl/man/SSL_set_fd.3 head/secure/lib/libssl/man/SSL_set_session.3 head/secure/lib/libssl/man/SSL_set_shutdown.3 head/secure/lib/libssl/man/SSL_set_verify_result.3 head/secure/lib/libssl/man/SSL_shutdown.3 head/secure/lib/libssl/man/SSL_state_string.3 head/secure/lib/libssl/man/SSL_want.3 head/secure/lib/libssl/man/SSL_write.3 head/secure/lib/libssl/man/d2i_SSL_SESSION.3 head/secure/lib/libssl/man/ssl.3 head/secure/usr.bin/openssl/man/CA.pl.1 head/secure/usr.bin/openssl/man/asn1parse.1 head/secure/usr.bin/openssl/man/ca.1 head/secure/usr.bin/openssl/man/ciphers.1 head/secure/usr.bin/openssl/man/crl.1 head/secure/usr.bin/openssl/man/crl2pkcs7.1 head/secure/usr.bin/openssl/man/dgst.1 head/secure/usr.bin/openssl/man/dhparam.1 head/secure/usr.bin/openssl/man/dsa.1 head/secure/usr.bin/openssl/man/dsaparam.1 head/secure/usr.bin/openssl/man/ec.1 head/secure/usr.bin/openssl/man/ecparam.1 head/secure/usr.bin/openssl/man/enc.1 head/secure/usr.bin/openssl/man/errstr.1 head/secure/usr.bin/openssl/man/gendsa.1 head/secure/usr.bin/openssl/man/genrsa.1 head/secure/usr.bin/openssl/man/nseq.1 head/secure/usr.bin/openssl/man/ocsp.1 head/secure/usr.bin/openssl/man/openssl.1 head/secure/usr.bin/openssl/man/passwd.1 head/secure/usr.bin/openssl/man/pkcs12.1 head/secure/usr.bin/openssl/man/pkcs7.1 head/secure/usr.bin/openssl/man/pkcs8.1 head/secure/usr.bin/openssl/man/rand.1 head/secure/usr.bin/openssl/man/req.1 head/secure/usr.bin/openssl/man/rsa.1 head/secure/usr.bin/openssl/man/rsautl.1 head/secure/usr.bin/openssl/man/s_client.1 head/secure/usr.bin/openssl/man/s_server.1 head/secure/usr.bin/openssl/man/s_time.1 head/secure/usr.bin/openssl/man/sess_id.1 head/secure/usr.bin/openssl/man/smime.1 head/secure/usr.bin/openssl/man/speed.1 head/secure/usr.bin/openssl/man/spkac.1 head/secure/usr.bin/openssl/man/verify.1 head/secure/usr.bin/openssl/man/version.1 head/secure/usr.bin/openssl/man/x509.1 head/secure/usr.bin/openssl/man/x509v3_config.1 Modified: head/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 ============================================================================== --- head/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_OBJECT_new 3" -.TH ASN1_OBJECT_new 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH ASN1_OBJECT_new 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" ASN1_OBJECT_new, ASN1_OBJECT_free, \- object allocation functions .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/ASN1_STRING_length.3 ============================================================================== --- head/secure/lib/libcrypto/man/ASN1_STRING_length.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/ASN1_STRING_length.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_STRING_length 3" -.TH ASN1_STRING_length 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH ASN1_STRING_length 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" ASN1_STRING_dup, ASN1_STRING_cmp, ASN1_STRING_set, ASN1_STRING_length, ASN1_STRING_length_set, ASN1_STRING_type, ASN1_STRING_data \- Modified: head/secure/lib/libcrypto/man/ASN1_STRING_new.3 ============================================================================== --- head/secure/lib/libcrypto/man/ASN1_STRING_new.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/ASN1_STRING_new.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_STRING_new 3" -.TH ASN1_STRING_new 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH ASN1_STRING_new 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" ASN1_STRING_new, ASN1_STRING_type_new, ASN1_STRING_free \- ASN1_STRING allocation functions Modified: head/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 ============================================================================== --- head/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_STRING_print_ex 3" -.TH ASN1_STRING_print_ex 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH ASN1_STRING_print_ex 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" ASN1_STRING_print_ex, ASN1_STRING_print_ex_fp \- ASN1_STRING output routines. .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/ASN1_generate_nconf.3 ============================================================================== --- head/secure/lib/libcrypto/man/ASN1_generate_nconf.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/ASN1_generate_nconf.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_generate_nconf 3" -.TH ASN1_generate_nconf 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH ASN1_generate_nconf 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" ASN1_generate_nconf, ASN1_generate_v3 \- ASN1 generation functions .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/BIO_ctrl.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_ctrl.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/BIO_ctrl.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BIO_ctrl 3" -.TH BIO_ctrl 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH BIO_ctrl 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" BIO_ctrl, BIO_callback_ctrl, BIO_ptr_ctrl, BIO_int_ctrl, BIO_reset, BIO_seek, BIO_tell, BIO_flush, BIO_eof, BIO_set_close, BIO_get_close, Modified: head/secure/lib/libcrypto/man/BIO_f_base64.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_f_base64.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/BIO_f_base64.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BIO_f_base64 3" -.TH BIO_f_base64 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH BIO_f_base64 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" BIO_f_base64 \- base64 BIO filter .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/BIO_f_buffer.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_f_buffer.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/BIO_f_buffer.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BIO_f_buffer 3" -.TH BIO_f_buffer 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH BIO_f_buffer 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" BIO_f_buffer \- buffering BIO .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/BIO_f_cipher.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_f_cipher.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/BIO_f_cipher.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BIO_f_cipher 3" -.TH BIO_f_cipher 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH BIO_f_cipher 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" BIO_f_cipher, BIO_set_cipher, BIO_get_cipher_status, BIO_get_cipher_ctx \- cipher BIO filter .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/BIO_f_md.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_f_md.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/BIO_f_md.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BIO_f_md 3" -.TH BIO_f_md 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH BIO_f_md 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" BIO_f_md, BIO_set_md, BIO_get_md, BIO_get_md_ctx \- message digest BIO filter .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/BIO_f_null.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_f_null.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/BIO_f_null.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BIO_f_null 3" -.TH BIO_f_null 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH BIO_f_null 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" BIO_f_null \- null filter .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/BIO_f_ssl.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_f_ssl.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/BIO_f_ssl.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BIO_f_ssl 3" -.TH BIO_f_ssl 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH BIO_f_ssl 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" BIO_f_ssl, BIO_set_ssl, BIO_get_ssl, BIO_set_ssl_mode, BIO_set_ssl_renegotiate_bytes, BIO_get_num_renegotiates, BIO_set_ssl_renegotiate_timeout, BIO_new_ssl, Modified: head/secure/lib/libcrypto/man/BIO_find_type.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_find_type.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/BIO_find_type.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BIO_find_type 3" -.TH BIO_find_type 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH BIO_find_type 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" BIO_find_type, BIO_next \- BIO chain traversal .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/BIO_new.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_new.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/BIO_new.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BIO_new 3" -.TH BIO_new 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH BIO_new 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" BIO_new, BIO_set, BIO_free, BIO_vfree, BIO_free_all \- BIO allocation and freeing functions .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/BIO_push.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_push.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/BIO_push.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BIO_push 3" -.TH BIO_push 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH BIO_push 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" BIO_push, BIO_pop \- add and remove BIOs from a chain. .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/BIO_read.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_read.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/BIO_read.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BIO_read 3" -.TH BIO_read 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH BIO_read 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" BIO_read, BIO_write, BIO_gets, BIO_puts \- BIO I/O functions .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/BIO_s_accept.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_s_accept.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/BIO_s_accept.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_accept 3" -.TH BIO_s_accept 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH BIO_s_accept 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" BIO_s_accept, BIO_set_accept_port, BIO_get_accept_port, BIO_set_nbio_accept, BIO_set_accept_bios, BIO_set_bind_mode, Modified: head/secure/lib/libcrypto/man/BIO_s_bio.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_s_bio.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/BIO_s_bio.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_bio 3" -.TH BIO_s_bio 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH BIO_s_bio 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" BIO_s_bio, BIO_make_bio_pair, BIO_destroy_bio_pair, BIO_shutdown_wr, BIO_set_write_buf_size, BIO_get_write_buf_size, BIO_new_bio_pair, Modified: head/secure/lib/libcrypto/man/BIO_s_connect.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_s_connect.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/BIO_s_connect.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_connect 3" -.TH BIO_s_connect 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH BIO_s_connect 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" BIO_s_connect, BIO_set_conn_hostname, BIO_set_conn_port, BIO_set_conn_ip, BIO_set_conn_int_port, BIO_get_conn_hostname, Modified: head/secure/lib/libcrypto/man/BIO_s_fd.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_s_fd.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/BIO_s_fd.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_fd 3" -.TH BIO_s_fd 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH BIO_s_fd 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" BIO_s_fd, BIO_set_fd, BIO_get_fd, BIO_new_fd \- file descriptor BIO .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/BIO_s_file.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_s_file.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/BIO_s_file.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_file 3" -.TH BIO_s_file 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH BIO_s_file 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" BIO_s_file, BIO_new_file, BIO_new_fp, BIO_set_fp, BIO_get_fp, BIO_read_filename, BIO_write_filename, BIO_append_filename, Modified: head/secure/lib/libcrypto/man/BIO_s_mem.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_s_mem.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/BIO_s_mem.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_mem 3" -.TH BIO_s_mem 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH BIO_s_mem 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" BIO_s_mem, BIO_set_mem_eof_return, BIO_get_mem_data, BIO_set_mem_buf, BIO_get_mem_ptr, BIO_new_mem_buf \- memory BIO Modified: head/secure/lib/libcrypto/man/BIO_s_null.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_s_null.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/BIO_s_null.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_null 3" -.TH BIO_s_null 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH BIO_s_null 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" BIO_s_null \- null data sink .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/BIO_s_socket.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_s_socket.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/BIO_s_socket.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_socket 3" -.TH BIO_s_socket 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH BIO_s_socket 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" BIO_s_socket, BIO_new_socket \- socket BIO .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/BIO_set_callback.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_set_callback.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/BIO_set_callback.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BIO_set_callback 3" -.TH BIO_set_callback 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH BIO_set_callback 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" BIO_set_callback, BIO_get_callback, BIO_set_callback_arg, BIO_get_callback_arg, BIO_debug_callback \- BIO callback functions Modified: head/secure/lib/libcrypto/man/BIO_should_retry.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_should_retry.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/BIO_should_retry.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BIO_should_retry 3" -.TH BIO_should_retry 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH BIO_should_retry 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" BIO_should_retry, BIO_should_read, BIO_should_write, BIO_should_io_special, BIO_retry_type, BIO_should_retry, Modified: head/secure/lib/libcrypto/man/BN_BLINDING_new.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_BLINDING_new.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/BN_BLINDING_new.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BN_BLINDING_new 3" -.TH BN_BLINDING_new 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH BN_BLINDING_new 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" BN_BLINDING_new, BN_BLINDING_free, BN_BLINDING_update, BN_BLINDING_convert, BN_BLINDING_invert, BN_BLINDING_convert_ex, BN_BLINDING_invert_ex, Modified: head/secure/lib/libcrypto/man/BN_CTX_new.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_CTX_new.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/BN_CTX_new.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BN_CTX_new 3" -.TH BN_CTX_new 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH BN_CTX_new 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" BN_CTX_new, BN_CTX_init, BN_CTX_free \- allocate and free BN_CTX structures .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/BN_CTX_start.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_CTX_start.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/BN_CTX_start.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BN_CTX_start 3" -.TH BN_CTX_start 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH BN_CTX_start 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" BN_CTX_start, BN_CTX_get, BN_CTX_end \- use temporary BIGNUM variables .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/BN_add.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_add.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/BN_add.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BN_add 3" -.TH BN_add 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH BN_add 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" BN_add, BN_sub, BN_mul, BN_sqr, BN_div, BN_mod, BN_nnmod, BN_mod_add, BN_mod_sub, BN_mod_mul, BN_mod_sqr, BN_exp, BN_mod_exp, BN_gcd \- Modified: head/secure/lib/libcrypto/man/BN_add_word.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_add_word.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/BN_add_word.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BN_add_word 3" -.TH BN_add_word 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH BN_add_word 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" BN_add_word, BN_sub_word, BN_mul_word, BN_div_word, BN_mod_word \- arithmetic functions on BIGNUMs with integers Modified: head/secure/lib/libcrypto/man/BN_bn2bin.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_bn2bin.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/BN_bn2bin.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BN_bn2bin 3" -.TH BN_bn2bin 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH BN_bn2bin 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" BN_bn2bin, BN_bin2bn, BN_bn2hex, BN_bn2dec, BN_hex2bn, BN_dec2bn, BN_print, BN_print_fp, BN_bn2mpi, BN_mpi2bn \- format conversions Modified: head/secure/lib/libcrypto/man/BN_cmp.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_cmp.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/BN_cmp.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BN_cmp 3" -.TH BN_cmp 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH BN_cmp 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" BN_cmp, BN_ucmp, BN_is_zero, BN_is_one, BN_is_word, BN_is_odd \- BIGNUM comparison and test functions .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/BN_copy.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_copy.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/BN_copy.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BN_copy 3" -.TH BN_copy 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH BN_copy 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" BN_copy, BN_dup \- copy BIGNUMs .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/BN_generate_prime.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_generate_prime.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/BN_generate_prime.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BN_generate_prime 3" -.TH BN_generate_prime 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH BN_generate_prime 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" BN_generate_prime, BN_is_prime, BN_is_prime_fasttest \- generate primes and test for primality .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/BN_mod_inverse.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_mod_inverse.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/BN_mod_inverse.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BN_mod_inverse 3" -.TH BN_mod_inverse 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH BN_mod_inverse 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" BN_mod_inverse \- compute inverse modulo n .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BN_mod_mul_montgomery 3" -.TH BN_mod_mul_montgomery 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH BN_mod_mul_montgomery 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" BN_mod_mul_montgomery, BN_MONT_CTX_new, BN_MONT_CTX_init, BN_MONT_CTX_free, BN_MONT_CTX_set, BN_MONT_CTX_copy, Modified: head/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BN_mod_mul_reciprocal 3" -.TH BN_mod_mul_reciprocal 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH BN_mod_mul_reciprocal 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" BN_mod_mul_reciprocal, BN_div_recp, BN_RECP_CTX_new, BN_RECP_CTX_init, BN_RECP_CTX_free, BN_RECP_CTX_set \- modular multiplication using Modified: head/secure/lib/libcrypto/man/BN_new.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_new.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/BN_new.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BN_new 3" -.TH BN_new 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH BN_new 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" BN_new, BN_init, BN_clear, BN_free, BN_clear_free \- allocate and free BIGNUMs .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/BN_num_bytes.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_num_bytes.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/BN_num_bytes.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BN_num_bytes 3" -.TH BN_num_bytes 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH BN_num_bytes 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" BN_num_bits, BN_num_bytes, BN_num_bits_word \- get BIGNUM size .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/BN_rand.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_rand.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/BN_rand.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BN_rand 3" -.TH BN_rand 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH BN_rand 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" BN_rand, BN_pseudo_rand \- generate pseudo\-random number .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/BN_set_bit.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_set_bit.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/BN_set_bit.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BN_set_bit 3" -.TH BN_set_bit 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH BN_set_bit 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" BN_set_bit, BN_clear_bit, BN_is_bit_set, BN_mask_bits, BN_lshift, BN_lshift1, BN_rshift, BN_rshift1 \- bit operations on BIGNUMs Modified: head/secure/lib/libcrypto/man/BN_swap.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_swap.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/BN_swap.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BN_swap 3" -.TH BN_swap 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH BN_swap 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" BN_swap \- exchange BIGNUMs .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/BN_zero.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_zero.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/BN_zero.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BN_zero 3" -.TH BN_zero 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH BN_zero 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" BN_zero, BN_one, BN_value_one, BN_set_word, BN_get_word \- BIGNUM assignment operations Modified: head/secure/lib/libcrypto/man/CONF_modules_free.3 ============================================================================== --- head/secure/lib/libcrypto/man/CONF_modules_free.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/CONF_modules_free.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "CONF_modules_free 3" -.TH CONF_modules_free 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH CONF_modules_free 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" .Vb 2 \& CONF_modules_free, CONF_modules_finish, CONF_modules_unload - Modified: head/secure/lib/libcrypto/man/CONF_modules_load_file.3 ============================================================================== --- head/secure/lib/libcrypto/man/CONF_modules_load_file.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/CONF_modules_load_file.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "CONF_modules_load_file 3" -.TH CONF_modules_load_file 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH CONF_modules_load_file 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" .Vb 1 \& CONF_modules_load_file, CONF_modules_load - OpenSSL configuration functions Modified: head/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 ============================================================================== --- head/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "CRYPTO_set_ex_data 3" -.TH CRYPTO_set_ex_data 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH CRYPTO_set_ex_data 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" CRYPTO_set_ex_data, CRYPTO_get_ex_data \- internal application specific data functions .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/DH_generate_key.3 ============================================================================== --- head/secure/lib/libcrypto/man/DH_generate_key.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/DH_generate_key.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "DH_generate_key 3" -.TH DH_generate_key 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH DH_generate_key 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" DH_generate_key, DH_compute_key \- perform Diffie\-Hellman key exchange .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/DH_generate_parameters.3 ============================================================================== --- head/secure/lib/libcrypto/man/DH_generate_parameters.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/DH_generate_parameters.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "DH_generate_parameters 3" -.TH DH_generate_parameters 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH DH_generate_parameters 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" DH_generate_parameters, DH_check \- generate and check Diffie\-Hellman parameters .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/DH_get_ex_new_index.3 ============================================================================== --- head/secure/lib/libcrypto/man/DH_get_ex_new_index.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/DH_get_ex_new_index.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "DH_get_ex_new_index 3" -.TH DH_get_ex_new_index 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH DH_get_ex_new_index 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" DH_get_ex_new_index, DH_set_ex_data, DH_get_ex_data \- add application specific data to DH structures .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/DH_new.3 ============================================================================== --- head/secure/lib/libcrypto/man/DH_new.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/DH_new.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "DH_new 3" -.TH DH_new 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH DH_new 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" DH_new, DH_free \- allocate and free DH objects .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/DH_set_method.3 ============================================================================== --- head/secure/lib/libcrypto/man/DH_set_method.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/DH_set_method.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "DH_set_method 3" -.TH DH_set_method 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH DH_set_method 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" DH_set_default_method, DH_get_default_method, DH_set_method, DH_new_method, DH_OpenSSL \- select DH method Modified: head/secure/lib/libcrypto/man/DH_size.3 ============================================================================== --- head/secure/lib/libcrypto/man/DH_size.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/DH_size.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "DH_size 3" -.TH DH_size 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH DH_size 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" DH_size \- get Diffie\-Hellman prime size .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/DSA_SIG_new.3 ============================================================================== --- head/secure/lib/libcrypto/man/DSA_SIG_new.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/DSA_SIG_new.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "DSA_SIG_new 3" -.TH DSA_SIG_new 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH DSA_SIG_new 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" DSA_SIG_new, DSA_SIG_free \- allocate and free DSA signature objects .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/DSA_do_sign.3 ============================================================================== --- head/secure/lib/libcrypto/man/DSA_do_sign.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/DSA_do_sign.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "DSA_do_sign 3" -.TH DSA_do_sign 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH DSA_do_sign 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" DSA_do_sign, DSA_do_verify \- raw DSA signature operations .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/DSA_dup_DH.3 ============================================================================== --- head/secure/lib/libcrypto/man/DSA_dup_DH.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/DSA_dup_DH.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "DSA_dup_DH 3" -.TH DSA_dup_DH 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH DSA_dup_DH 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" DSA_dup_DH \- create a DH structure out of DSA structure .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/DSA_generate_key.3 ============================================================================== --- head/secure/lib/libcrypto/man/DSA_generate_key.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/DSA_generate_key.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "DSA_generate_key 3" -.TH DSA_generate_key 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH DSA_generate_key 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" DSA_generate_key \- generate DSA key pair .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/DSA_generate_parameters.3 ============================================================================== --- head/secure/lib/libcrypto/man/DSA_generate_parameters.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/DSA_generate_parameters.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "DSA_generate_parameters 3" -.TH DSA_generate_parameters 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH DSA_generate_parameters 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" DSA_generate_parameters \- generate DSA parameters .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 ============================================================================== --- head/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "DSA_get_ex_new_index 3" -.TH DSA_get_ex_new_index 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH DSA_get_ex_new_index 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" DSA_get_ex_new_index, DSA_set_ex_data, DSA_get_ex_data \- add application specific data to DSA structures .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/DSA_new.3 ============================================================================== --- head/secure/lib/libcrypto/man/DSA_new.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/DSA_new.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "DSA_new 3" -.TH DSA_new 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH DSA_new 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" DSA_new, DSA_free \- allocate and free DSA objects .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/DSA_set_method.3 ============================================================================== --- head/secure/lib/libcrypto/man/DSA_set_method.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/DSA_set_method.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "DSA_set_method 3" -.TH DSA_set_method 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH DSA_set_method 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" DSA_set_default_method, DSA_get_default_method, DSA_set_method, DSA_new_method, DSA_OpenSSL \- select DSA method Modified: head/secure/lib/libcrypto/man/DSA_sign.3 ============================================================================== --- head/secure/lib/libcrypto/man/DSA_sign.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/DSA_sign.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "DSA_sign 3" -.TH DSA_sign 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH DSA_sign 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" DSA_sign, DSA_sign_setup, DSA_verify \- DSA signatures .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/DSA_size.3 ============================================================================== --- head/secure/lib/libcrypto/man/DSA_size.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/DSA_size.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "DSA_size 3" -.TH DSA_size 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH DSA_size 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" DSA_size \- get DSA signature size .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/ERR_GET_LIB.3 ============================================================================== --- head/secure/lib/libcrypto/man/ERR_GET_LIB.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/ERR_GET_LIB.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "ERR_GET_LIB 3" -.TH ERR_GET_LIB 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH ERR_GET_LIB 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" ERR_GET_LIB, ERR_GET_FUNC, ERR_GET_REASON \- get library, function and reason code Modified: head/secure/lib/libcrypto/man/ERR_clear_error.3 ============================================================================== --- head/secure/lib/libcrypto/man/ERR_clear_error.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/ERR_clear_error.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "ERR_clear_error 3" -.TH ERR_clear_error 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH ERR_clear_error 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" ERR_clear_error \- clear the error queue .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/ERR_error_string.3 ============================================================================== --- head/secure/lib/libcrypto/man/ERR_error_string.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/ERR_error_string.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "ERR_error_string 3" -.TH ERR_error_string 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH ERR_error_string 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" ERR_error_string, ERR_error_string_n, ERR_lib_error_string, ERR_func_error_string, ERR_reason_error_string \- obtain human\-readable Modified: head/secure/lib/libcrypto/man/ERR_get_error.3 ============================================================================== --- head/secure/lib/libcrypto/man/ERR_get_error.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/ERR_get_error.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "ERR_get_error 3" -.TH ERR_get_error 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH ERR_get_error 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" ERR_get_error, ERR_peek_error, ERR_peek_last_error, ERR_get_error_line, ERR_peek_error_line, ERR_peek_last_error_line, Modified: head/secure/lib/libcrypto/man/ERR_load_crypto_strings.3 ============================================================================== --- head/secure/lib/libcrypto/man/ERR_load_crypto_strings.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/ERR_load_crypto_strings.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "ERR_load_crypto_strings 3" -.TH ERR_load_crypto_strings 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH ERR_load_crypto_strings 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" ERR_load_crypto_strings, SSL_load_error_strings, ERR_free_strings \- load and free error strings Modified: head/secure/lib/libcrypto/man/ERR_load_strings.3 ============================================================================== --- head/secure/lib/libcrypto/man/ERR_load_strings.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/ERR_load_strings.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "ERR_load_strings 3" -.TH ERR_load_strings 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH ERR_load_strings 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" ERR_load_strings, ERR_PACK, ERR_get_next_error_library \- load arbitrary error strings Modified: head/secure/lib/libcrypto/man/ERR_print_errors.3 ============================================================================== --- head/secure/lib/libcrypto/man/ERR_print_errors.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/ERR_print_errors.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "ERR_print_errors 3" -.TH ERR_print_errors 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH ERR_print_errors 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" ERR_print_errors, ERR_print_errors_fp \- print error messages .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/ERR_put_error.3 ============================================================================== --- head/secure/lib/libcrypto/man/ERR_put_error.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/ERR_put_error.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "ERR_put_error 3" -.TH ERR_put_error 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH ERR_put_error 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" ERR_put_error, ERR_add_error_data \- record an error .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/ERR_remove_state.3 ============================================================================== --- head/secure/lib/libcrypto/man/ERR_remove_state.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/ERR_remove_state.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "ERR_remove_state 3" -.TH ERR_remove_state 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH ERR_remove_state 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" ERR_remove_state \- free a thread's error queue .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/ERR_set_mark.3 ============================================================================== --- head/secure/lib/libcrypto/man/ERR_set_mark.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/ERR_set_mark.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "ERR_set_mark 3" -.TH ERR_set_mark 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH ERR_set_mark 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" ERR_set_mark, ERR_pop_to_mark \- set marks and pop errors until mark .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/EVP_BytesToKey.3 ============================================================================== --- head/secure/lib/libcrypto/man/EVP_BytesToKey.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/EVP_BytesToKey.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "EVP_BytesToKey 3" -.TH EVP_BytesToKey 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH EVP_BytesToKey 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" EVP_BytesToKey \- password based encryption routine .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/EVP_DigestInit.3 ============================================================================== --- head/secure/lib/libcrypto/man/EVP_DigestInit.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/EVP_DigestInit.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "EVP_DigestInit 3" -.TH EVP_DigestInit 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH EVP_DigestInit 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" EVP_MD_CTX_init, EVP_MD_CTX_create, EVP_DigestInit_ex, EVP_DigestUpdate, EVP_DigestFinal_ex, EVP_MD_CTX_cleanup, EVP_MD_CTX_destroy, EVP_MAX_MD_SIZE, Modified: head/secure/lib/libcrypto/man/EVP_EncryptInit.3 ============================================================================== --- head/secure/lib/libcrypto/man/EVP_EncryptInit.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/EVP_EncryptInit.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "EVP_EncryptInit 3" -.TH EVP_EncryptInit 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH EVP_EncryptInit 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" EVP_CIPHER_CTX_init, EVP_EncryptInit_ex, EVP_EncryptUpdate, EVP_EncryptFinal_ex, EVP_DecryptInit_ex, EVP_DecryptUpdate, Modified: head/secure/lib/libcrypto/man/EVP_OpenInit.3 ============================================================================== --- head/secure/lib/libcrypto/man/EVP_OpenInit.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/EVP_OpenInit.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "EVP_OpenInit 3" -.TH EVP_OpenInit 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH EVP_OpenInit 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" EVP_OpenInit, EVP_OpenUpdate, EVP_OpenFinal \- EVP envelope decryption .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/EVP_PKEY_new.3 ============================================================================== --- head/secure/lib/libcrypto/man/EVP_PKEY_new.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/EVP_PKEY_new.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "EVP_PKEY_new 3" -.TH EVP_PKEY_new 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH EVP_PKEY_new 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" EVP_PKEY_new, EVP_PKEY_free \- private key allocation functions. .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 ============================================================================== --- head/secure/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "EVP_PKEY_set1_RSA 3" -.TH EVP_PKEY_set1_RSA 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH EVP_PKEY_set1_RSA 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" EVP_PKEY_set1_RSA, EVP_PKEY_set1_DSA, EVP_PKEY_set1_DH, EVP_PKEY_set1_EC_KEY, EVP_PKEY_get1_RSA, EVP_PKEY_get1_DSA, EVP_PKEY_get1_DH, EVP_PKEY_get1_EC_KEY, Modified: head/secure/lib/libcrypto/man/EVP_SealInit.3 ============================================================================== --- head/secure/lib/libcrypto/man/EVP_SealInit.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/EVP_SealInit.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "EVP_SealInit 3" -.TH EVP_SealInit 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH EVP_SealInit 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" EVP_SealInit, EVP_SealUpdate, EVP_SealFinal \- EVP envelope encryption .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/EVP_SignInit.3 ============================================================================== --- head/secure/lib/libcrypto/man/EVP_SignInit.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/EVP_SignInit.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "EVP_SignInit 3" -.TH EVP_SignInit 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH EVP_SignInit 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" EVP_SignInit, EVP_SignUpdate, EVP_SignFinal \- EVP signing functions .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/EVP_VerifyInit.3 ============================================================================== --- head/secure/lib/libcrypto/man/EVP_VerifyInit.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/EVP_VerifyInit.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "EVP_VerifyInit 3" -.TH EVP_VerifyInit 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH EVP_VerifyInit 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" EVP_VerifyInit, EVP_VerifyUpdate, EVP_VerifyFinal \- EVP signature verification functions .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/OBJ_nid2obj.3 ============================================================================== --- head/secure/lib/libcrypto/man/OBJ_nid2obj.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/OBJ_nid2obj.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "OBJ_nid2obj 3" -.TH OBJ_nid2obj 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH OBJ_nid2obj 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" OBJ_nid2obj, OBJ_nid2ln, OBJ_nid2sn, OBJ_obj2nid, OBJ_txt2nid, OBJ_ln2nid, OBJ_sn2nid, OBJ_cmp, OBJ_dup, OBJ_txt2obj, OBJ_obj2txt, OBJ_create, OBJ_cleanup \- ASN1 object utility Modified: head/secure/lib/libcrypto/man/OPENSSL_Applink.3 ============================================================================== --- head/secure/lib/libcrypto/man/OPENSSL_Applink.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/OPENSSL_Applink.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "OPENSSL_Applink 3" -.TH OPENSSL_Applink 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH OPENSSL_Applink 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" OPENSSL_Applink \- glue between OpenSSL BIO and Win32 compiler run\-time .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3 ============================================================================== --- head/secure/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "OPENSSL_VERSION_NUMBER 3" -.TH OPENSSL_VERSION_NUMBER 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH OPENSSL_VERSION_NUMBER 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" OPENSSL_VERSION_NUMBER, SSLeay, SSLeay_version \- get OpenSSL version number .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/OPENSSL_config.3 ============================================================================== --- head/secure/lib/libcrypto/man/OPENSSL_config.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/OPENSSL_config.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "OPENSSL_config 3" -.TH OPENSSL_config 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH OPENSSL_config 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" OPENSSL_config, OPENSSL_no_config \- simple OpenSSL configuration functions .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/OPENSSL_ia32cap.3 ============================================================================== --- head/secure/lib/libcrypto/man/OPENSSL_ia32cap.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/OPENSSL_ia32cap.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "OPENSSL_ia32cap 3" -.TH OPENSSL_ia32cap 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH OPENSSL_ia32cap 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" OPENSSL_ia32cap \- finding the IA\-32 processor capabilities .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/OPENSSL_load_builtin_modules.3 ============================================================================== --- head/secure/lib/libcrypto/man/OPENSSL_load_builtin_modules.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/OPENSSL_load_builtin_modules.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "OPENSSL_load_builtin_modules 3" -.TH OPENSSL_load_builtin_modules 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH OPENSSL_load_builtin_modules 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" OPENSSL_load_builtin_modules \- add standard configuration modules .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/OpenSSL_add_all_algorithms.3 ============================================================================== --- head/secure/lib/libcrypto/man/OpenSSL_add_all_algorithms.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/OpenSSL_add_all_algorithms.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "OpenSSL_add_all_algorithms 3" -.TH OpenSSL_add_all_algorithms 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH OpenSSL_add_all_algorithms 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" OpenSSL_add_all_algorithms, OpenSSL_add_all_ciphers, OpenSSL_add_all_digests \- add algorithms to internal table Modified: head/secure/lib/libcrypto/man/PKCS12_create.3 ============================================================================== --- head/secure/lib/libcrypto/man/PKCS12_create.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/PKCS12_create.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "PKCS12_create 3" -.TH PKCS12_create 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH PKCS12_create 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" PKCS12_create \- create a PKCS#12 structure .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/PKCS12_parse.3 ============================================================================== --- head/secure/lib/libcrypto/man/PKCS12_parse.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/PKCS12_parse.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "PKCS12_parse 3" -.TH PKCS12_parse 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH PKCS12_parse 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" PKCS12_parse \- parse a PKCS#12 structure *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Thu Apr 1 15:45:26 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 032EA1065670; Thu, 1 Apr 2010 15:45:26 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from mail-bw0-f216.google.com (mail-bw0-f216.google.com [209.85.218.216]) by mx1.freebsd.org (Postfix) with ESMTP id 032EE8FC19; Thu, 1 Apr 2010 15:45:24 +0000 (UTC) Received: by bwz8 with SMTP id 8so994602bwz.3 for ; Thu, 01 Apr 2010 08:45:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:received:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=Y+o66SHFE8oZPZZ24GjV9RBaO43UDWBrQBn4ryh9aEo=; b=sUxkirbSp67UH2UDzUi+XBzbIfSSq6Et4BbaPaSd9LRruvqmEHbg04tPW7+ypa9ZXT bQ6r4aSwJ5SzaFtc4JHhcK1aynTdVrnjhggPxv+ByB1NC1gd4C3dPBnaG5PxMsRRplAA UIZmgXWHD1jFDYDNlI3kDieexVlBzK0H7F+qg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=Ndx0YnHZKqpfFT8RPezmR3cEG2190epom1J+TA2hblvDBt+EjLv7x2z8NN1S+HYPoX chLY+leMAF86jglh3tf1AE0uP8/kjECeCe+HEDyjdDowdBrBkMaMLMO3WTi36FEOdkO4 BaaJSKt3hMWMnmMyEepajozvnXHxtwCcDm790= MIME-Version: 1.0 Received: by 10.204.47.232 with HTTP; Thu, 1 Apr 2010 08:45:22 -0700 (PDT) In-Reply-To: <201004011427.o31ERTaT056824@svn.freebsd.org> References: <201004011427.o31ERTaT056824@svn.freebsd.org> Date: Thu, 1 Apr 2010 19:45:22 +0400 Received: by 10.204.3.216 with SMTP id 24mr1661270bko.30.1270136722875; Thu, 01 Apr 2010 08:45:22 -0700 (PDT) Message-ID: From: pluknet To: Florent Thoumie 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: r206043 - in head/usr.sbin/pkg_install: add delete lib version X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Apr 2010 15:45:26 -0000 On 1 April 2010 18:27, Florent Thoumie wrote: > Author: flz > Date: Thu Apr =A01 14:27:29 2010 > New Revision: 206043 > URL: http://svn.freebsd.org/changeset/base/206043 > > Log: > =A0Various fixes. > > =A0- Replace hardcoded INDEX version. [1] > =A0- Fix a buffer overlap. [2] > =A0- Remove empty package when fetching fails and -K is used. [3] > =A0- Remove useless chmod2() after mkdtemp(3). [4] > =A0- Replace mkdir(1) call with mkdir(2). [5] > =A0- Get rid of some vsystem() calls. > =A0- Switch from lstat(2) to open(2) in fexists(). ^^ This closes bin/136419, too. > =A0- Try rename(2) in move_file() first. > =A0- Bump PKG_INSTALL_VERSION to 20100401. > > =A0PR: =A0 =A0 =A0 =A0 =A0 bin/145101 [1], bin/139492 [2], bin/144919 [3] > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0bin/144920 [4], bin/144921 [5] > =A0Submitted by: gcooper [1,2,3,4,5] --=20 wbr, pluknet From owner-svn-src-head@FreeBSD.ORG Thu Apr 1 16:18:16 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D58361065672; Thu, 1 Apr 2010 16:18:16 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C4B6D8FC20; Thu, 1 Apr 2010 16:18:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o31GIGRa081569; Thu, 1 Apr 2010 16:18:16 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o31GIGIl081567; Thu, 1 Apr 2010 16:18:16 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201004011618.o31GIGIl081567@svn.freebsd.org> From: Alexander Motin Date: Thu, 1 Apr 2010 16:18: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: r206049 - head/sys/netgraph X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Apr 2010 16:18:16 -0000 Author: mav Date: Thu Apr 1 16:18:16 2010 New Revision: 206049 URL: http://svn.freebsd.org/changeset/base/206049 Log: Remove alignment constraints. Modified: head/sys/netgraph/ng_deflate.c Modified: head/sys/netgraph/ng_deflate.c ============================================================================== --- head/sys/netgraph/ng_deflate.c Thu Apr 1 15:37:38 2010 (r206048) +++ head/sys/netgraph/ng_deflate.c Thu Apr 1 16:18:16 2010 (r206049) @@ -36,6 +36,7 @@ #include #include #include +#include #include #include @@ -505,8 +506,8 @@ ng_deflate_compress(node_p node, struct priv->stats.OutOctets+=inlen; } else { /* Install header. */ - ((u_int16_t *)priv->outbuf)[0] = htons(PROT_COMPD); - ((u_int16_t *)priv->outbuf)[1] = htons(priv->seqnum); + be16enc(priv->outbuf, PROT_COMPD); + be16enc(priv->outbuf + 2, priv->seqnum); /* Return packet in an mbuf. */ m_copyback(m, 0, outlen, (caddr_t)priv->outbuf); @@ -568,7 +569,7 @@ ng_deflate_decompress(node_p node, struc proto = priv->inbuf[0]; offset = 1; } else { - proto = ntohs(((uint16_t *)priv->inbuf)[0]); + proto = be16dec(priv->inbuf); offset = 2; } @@ -579,7 +580,7 @@ ng_deflate_decompress(node_p node, struc priv->stats.FramesComp++; /* Check sequence number. */ - rseqnum = ntohs(((uint16_t *)(priv->inbuf + offset))[0]); + rseqnum = be16dec(priv->inbuf + offset); offset += 2; if (rseqnum != priv->seqnum) { priv->stats.Errors++; From owner-svn-src-head@FreeBSD.ORG Thu Apr 1 16:20:36 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BDCB3106566C; Thu, 1 Apr 2010 16:20:36 +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 927738FC1E; Thu, 1 Apr 2010 16:20:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o31GKa9G082102; Thu, 1 Apr 2010 16:20:36 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o31GKa8L082100; Thu, 1 Apr 2010 16:20:36 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201004011620.o31GKa8L082100@svn.freebsd.org> From: Alexander Motin Date: Thu, 1 Apr 2010 16:20: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: r206050 - head/sys/netgraph X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Apr 2010 16:20:36 -0000 Author: mav Date: Thu Apr 1 16:20:36 2010 New Revision: 206050 URL: http://svn.freebsd.org/changeset/base/206050 Log: Remove alignment constraints. Modified: head/sys/netgraph/ng_pptpgre.c Modified: head/sys/netgraph/ng_pptpgre.c ============================================================================== --- head/sys/netgraph/ng_pptpgre.c Thu Apr 1 16:18:16 2010 (r206049) +++ head/sys/netgraph/ng_pptpgre.c Thu Apr 1 16:20:36 2010 (r206050) @@ -62,6 +62,7 @@ #include #include #include +#include #include #include @@ -572,9 +573,9 @@ ng_pptpgre_xmit(hpriv_p hpriv, item_p it } /* Build GRE header */ - ((u_int32_t *)gre)[0] = htonl(PPTP_INIT_VALUE); - gre->length = (m != NULL) ? htons((u_short)m->m_pkthdr.len) : 0; - gre->cid = htons(hpriv->conf.peerCid); + be32enc(gre, PPTP_INIT_VALUE); + be16enc(&gre->length, (m != NULL) ? m->m_pkthdr.len : 0); + be16enc(&gre->cid, hpriv->conf.peerCid); /* Include sequence number if packet contains any data */ if (m != NULL) { @@ -584,13 +585,13 @@ ng_pptpgre_xmit(hpriv_p hpriv, item_p it = ng_pptpgre_time(); } hpriv->xmitSeq++; - gre->data[0] = htonl(hpriv->xmitSeq); + be32enc(&gre->data[0], hpriv->xmitSeq); } /* Include acknowledgement (and stop send ack timer) if needed */ if (hpriv->conf.enableAlwaysAck || hpriv->xmitAck != hpriv->recvSeq) { gre->hasAck = 1; - gre->data[gre->hasSeq] = htonl(hpriv->recvSeq); + be32enc(&gre->data[gre->hasSeq], hpriv->recvSeq); hpriv->xmitAck = hpriv->recvSeq; if (hpriv->conf.enableDelayedAck) ng_uncallout(&hpriv->sackTimer, hpriv->node); @@ -705,18 +706,17 @@ ng_pptpgre_rcvdata_lower(hook_p hook, it /* Sanity check packet length and GRE header bits */ extralen = m->m_pkthdr.len - - (iphlen + grelen + gre->hasSeq * (u_int16_t)ntohs(gre->length)); + - (iphlen + grelen + gre->hasSeq * be16dec(&gre->length)); if (extralen < 0) { priv->stats.recvBadGRE++; ERROUT(EINVAL); } - if ((ntohl(*((const u_int32_t *)gre)) & PPTP_INIT_MASK) - != PPTP_INIT_VALUE) { + if ((be32dec(gre) & PPTP_INIT_MASK) != PPTP_INIT_VALUE) { priv->stats.recvBadGRE++; ERROUT(EINVAL); } - hpriv = ng_pptpgre_find_session(priv, ntohs(gre->cid)); + hpriv = ng_pptpgre_find_session(priv, be16dec(&gre->cid)); if (hpriv == NULL || hpriv->hook == NULL || !hpriv->conf.enabled) { priv->stats.recvBadCID++; ERROUT(EINVAL); @@ -725,7 +725,7 @@ ng_pptpgre_rcvdata_lower(hook_p hook, it /* Look for peer ack */ if (gre->hasAck) { - const u_int32_t ack = ntohl(gre->data[gre->hasSeq]); + const u_int32_t ack = be32dec(&gre->data[gre->hasSeq]); const int index = ack - hpriv->recvAck - 1; long sample; long diff; @@ -776,7 +776,7 @@ badAck: /* See if frame contains any data */ if (gre->hasSeq) { - const u_int32_t seq = ntohl(gre->data[0]); + const u_int32_t seq = be32dec(&gre->data[0]); /* Sanity check sequence number */ if (PPTP_SEQ_DIFF(seq, hpriv->recvSeq) <= 0) { From owner-svn-src-head@FreeBSD.ORG Thu Apr 1 16:21:36 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 635EE106568A; Thu, 1 Apr 2010 16:21:36 +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 387BE8FC23; Thu, 1 Apr 2010 16:21:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o31GLalO082376; Thu, 1 Apr 2010 16:21:36 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o31GLaF8082374; Thu, 1 Apr 2010 16:21:36 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201004011621.o31GLaF8082374@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Thu, 1 Apr 2010 16:21: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: r206051 - head/sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Apr 2010 16:21:36 -0000 Author: pjd Date: Thu Apr 1 16:21:35 2010 New Revision: 206051 URL: http://svn.freebsd.org/changeset/base/206051 Log: IOCPARM_MAX defines maximum size of a structure that can be passed directly to ioctl(2). Because of how ioctl command is build using _IO*() macros we have only 13 bits to encode structure size. So the structure can be up to 8kB-1. Currently we define IOCPARM_MAX as PAGE_SIZE. This is IMHO wrong for three main reasons: 1. It is confusing on archs with page size larger than 8kB (not really sure if we support such archs (sparc64?)), as even if PAGE_SIZE is bigger than 8kB, we won't be able to encode anything larger in ioctl command. 2. It is a waste. Why the structure can be only 4kB on most archs if we have 13 bits dedicated for that, not 12? 3. It shouldn't depend on architecture and page size. My ioctl command can work on one arch, but can't on the other? Increase IOCPARM_MAX to 8kB and make it independed of PAGE_SIZE and architecture it is compiled for. This allows to use all the bits on all the archs for size. Note that this doesn't mean we will copy more on every ioctl(2) call. No. We still copyin(9)/copyout(9) only exact number of bytes encoded in ioctl command. Practical use for this change is ZFS. zfs_cmd_t structure used for ZFS ioctls is larger than 4kB. Silence on: arch@ MFC after: 1 month Modified: head/sys/sys/ioccom.h Modified: head/sys/sys/ioccom.h ============================================================================== --- head/sys/sys/ioccom.h Thu Apr 1 16:20:36 2010 (r206050) +++ head/sys/sys/ioccom.h Thu Apr 1 16:21:35 2010 (r206051) @@ -38,12 +38,13 @@ * any in or out parameters in the upper word. The high 3 bits of the * upper word are used to encode the in/out status of the parameter. */ -#define IOCPARM_MASK 0x1fff /* parameter length, at most 13 bits */ +#define IOCPARM_SHIFT 13 /* number of bits for ioctl size */ +#define IOCPARM_MASK ((1 << IOCPARM_SHIFT) - 1) /* parameter length mask */ #define IOCPARM_LEN(x) (((x) >> 16) & IOCPARM_MASK) #define IOCBASECMD(x) ((x) & ~(IOCPARM_MASK << 16)) #define IOCGROUP(x) (((x) >> 8) & 0xff) -#define IOCPARM_MAX PAGE_SIZE /* max size of ioctl, mult. of PAGE_SIZE */ +#define IOCPARM_MAX (1 << IOCPARM_SHIFT) /* max size of ioctl */ #define IOC_VOID 0x20000000 /* no parameters */ #define IOC_OUT 0x40000000 /* copy out parameters */ #define IOC_IN 0x80000000 /* copy in parameters */ From owner-svn-src-head@FreeBSD.ORG Thu Apr 1 17:04:37 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7E66D1065670; Thu, 1 Apr 2010 17:04:37 +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 6E0748FC16; Thu, 1 Apr 2010 17:04:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o31H4boc091860; Thu, 1 Apr 2010 17:04:37 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o31H4bhv091858; Thu, 1 Apr 2010 17:04:37 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201004011704.o31H4bhv091858@svn.freebsd.org> From: Warner Losh Date: Thu, 1 Apr 2010 17:04: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: r206052 - head/usr.sbin X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Apr 2010 17:04:37 -0000 Author: imp Date: Thu Apr 1 17:04:37 2010 New Revision: 206052 URL: http://svn.freebsd.org/changeset/base/206052 Log: We don't need to note that mkproto is missing anymore. It is definitely OBE in a number of ways, and likely should have been removed in 2000, not 2010. Modified: head/usr.sbin/Makefile Modified: head/usr.sbin/Makefile ============================================================================== --- head/usr.sbin/Makefile Thu Apr 1 16:21:35 2010 (r206051) +++ head/usr.sbin/Makefile Thu Apr 1 17:04:37 2010 (r206052) @@ -3,7 +3,6 @@ .include -# XXX MISSING: mkproto SUBDIR= ${_ac} \ ${_accton} \ ${_acpi} \ From owner-svn-src-head@FreeBSD.ORG Thu Apr 1 18:17:54 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4A3F4106564A; Thu, 1 Apr 2010 18:17:54 +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 3983C8FC18; Thu, 1 Apr 2010 18:17:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o31IHsg6008043; Thu, 1 Apr 2010 18:17:54 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o31IHsXq008041; Thu, 1 Apr 2010 18:17:54 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201004011817.o31IHsXq008041@svn.freebsd.org> From: Alexander Motin Date: Thu, 1 Apr 2010 18:17:54 +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: r206053 - head/sys/arm/mv X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Apr 2010 18:17:54 -0000 Author: mav Date: Thu Apr 1 18:17:53 2010 New Revision: 206053 URL: http://svn.freebsd.org/changeset/base/206053 Log: Fill extended ATA command registers in cPRD to support 48bit commands. Modified: head/sys/arm/mv/mv_sata.c Modified: head/sys/arm/mv/mv_sata.c ============================================================================== --- head/sys/arm/mv/mv_sata.c Thu Apr 1 17:04:37 2010 (r206052) +++ head/sys/arm/mv/mv_sata.c Thu Apr 1 18:17:53 2010 (r206053) @@ -600,7 +600,12 @@ sata_channel_begin_transaction(struct at crqb->crqb_ata_lba_mid = request->u.ata.lba >> 8; crqb->crqb_ata_lba_high = request->u.ata.lba >> 16; crqb->crqb_ata_device = ((request->u.ata.lba >> 24) & 0x0F) | (1 << 6); + crqb->crqb_ata_lba_low_p = request->u.ata.lba >> 24; + crqb->crqb_ata_lba_mid_p = request->u.ata.lba >> 32; + crqb->crqb_ata_lba_high_p = request->u.ata.lba >> 40; + crqb->crqb_ata_feature_p = request->u.ata.feature >> 8; crqb->crqb_ata_count = request->u.ata.count; + crqb->crqb_ata_count_p = request->u.ata.count; bus_dmamap_sync(ch->dma.work_tag, ch->dma.work_map, BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); From owner-svn-src-head@FreeBSD.ORG Thu Apr 1 18:20:18 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 80D17106564A for ; Thu, 1 Apr 2010 18:20:18 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id 0E48F8FC26 for ; Thu, 1 Apr 2010 18:20:17 +0000 (UTC) Received: (qmail 25730 invoked by uid 399); 1 Apr 2010 18:20:17 -0000 Received: from localhost (HELO foreign.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 1 Apr 2010 18:20:17 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4BB4E3DF.8030407@FreeBSD.org> Date: Thu, 01 Apr 2010 11:20:15 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.1.9) Gecko/20100330 Thunderbird/3.0.4 MIME-Version: 1.0 To: "Simon L. Nielsen" References: <201004011519.o31FJpw2068549@svn.freebsd.org> In-Reply-To: <201004011519.o31FJpw2068549@svn.freebsd.org> X-Enigmail-Version: 1.0.1 OpenPGP: id=D5B2F0FB Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r206046 - in head/crypto/openssl: . apps crypto crypto/asn1 crypto/bio crypto/bn crypto/bn/asm crypto/engine crypto/evp crypto/ocsp crypto/rand engines fips ssl X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Apr 2010 18:20:18 -0000 On 04/01/10 08:19, Simon L. Nielsen wrote: > Author: simon > Date: Thu Apr 1 15:19:51 2010 > New Revision: 206046 > URL: http://svn.freebsd.org/changeset/base/206046 > > Log: > Merge OpenSSL 0.9.8n into head. Just curious, why not 1.0.0? Doug -- ... and that's just a little bit of history repeating. -- Propellerheads Improve the effectiveness of your Internet presence with a domain name makeover! http://SupersetSolutions.com/ From owner-svn-src-head@FreeBSD.ORG Thu Apr 1 19:05:43 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E7B50106564A; Thu, 1 Apr 2010 19:05:43 +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 D73118FC18; Thu, 1 Apr 2010 19:05:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o31J5hLs018465; Thu, 1 Apr 2010 19:05:43 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o31J5hDw018463; Thu, 1 Apr 2010 19:05:43 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201004011905.o31J5hDw018463@svn.freebsd.org> From: Alexander Motin Date: Thu, 1 Apr 2010 19:05: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: r206054 - head/sys/arm/mv X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Apr 2010 19:05:44 -0000 Author: mav Date: Thu Apr 1 19:05:43 2010 New Revision: 206054 URL: http://svn.freebsd.org/changeset/base/206054 Log: Oops! Wrong copy-paste in r206053. Modified: head/sys/arm/mv/mv_sata.c Modified: head/sys/arm/mv/mv_sata.c ============================================================================== --- head/sys/arm/mv/mv_sata.c Thu Apr 1 18:17:53 2010 (r206053) +++ head/sys/arm/mv/mv_sata.c Thu Apr 1 19:05:43 2010 (r206054) @@ -605,7 +605,7 @@ sata_channel_begin_transaction(struct at crqb->crqb_ata_lba_high_p = request->u.ata.lba >> 40; crqb->crqb_ata_feature_p = request->u.ata.feature >> 8; crqb->crqb_ata_count = request->u.ata.count; - crqb->crqb_ata_count_p = request->u.ata.count; + crqb->crqb_ata_count_p = request->u.ata.count >> 8; bus_dmamap_sync(ch->dma.work_tag, ch->dma.work_map, BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); From owner-svn-src-head@FreeBSD.ORG Thu Apr 1 20:43:26 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C203B1065678; Thu, 1 Apr 2010 20:43:26 +0000 (UTC) (envelope-from simon@nitro.dk) Received: from mx.nitro.dk (unknown [77.75.165.90]) by mx1.freebsd.org (Postfix) with ESMTP id 8165F8FC29; Thu, 1 Apr 2010 20:43:26 +0000 (UTC) Received: from arthur.nitro.dk (arthur.bofh [192.168.2.3]) by mx.nitro.dk (Postfix) with ESMTP id 658892D4841; Thu, 1 Apr 2010 20:43:25 +0000 (UTC) Received: by arthur.nitro.dk (Postfix, from userid 1000) id 4F5105C30; Thu, 1 Apr 2010 22:43:25 +0200 (CEST) Date: Thu, 1 Apr 2010 22:43:25 +0200 From: "Simon L. Nielsen" To: Doug Barton Message-ID: <20100401204324.GB1301@arthur.nitro.dk> References: <201004011519.o31FJpw2068549@svn.freebsd.org> <4BB4E3DF.8030407@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4BB4E3DF.8030407@FreeBSD.org> 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: r206046 - in head/crypto/openssl: . apps crypto crypto/asn1 crypto/bio crypto/bn crypto/bn/asm crypto/engine crypto/evp crypto/ocsp crypto/rand engines fips ssl X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Apr 2010 20:43:26 -0000 B0;253;0cOn 2010.04.01 11:20:15 -0700, Doug Barton wrote: > On 04/01/10 08:19, Simon L. Nielsen wrote: > > Author: simon > > Date: Thu Apr 1 15:19:51 2010 > > New Revision: 206046 > > URL: http://svn.freebsd.org/changeset/base/206046 > > > > Log: > > Merge OpenSSL 0.9.8n into head. > > Just curious, why not 1.0.0? The main reason is that 0.9.8n is needed for MFC to 7 and 8, so I prefered to get it tested a bit in -CURRENT first while I have the chance. I also prefered to get the security fixes for 0.9.8m into head faster - I don't know how much trouble 1.0.0 will be, but it will probably take some work. That said, given how long OpenSSL 1.0 has been under way it would have been perfect to commit it today of all days :-). -- Simon L. Nielsen From owner-svn-src-head@FreeBSD.ORG Thu Apr 1 20:47:26 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6F9711065675 for ; Thu, 1 Apr 2010 20:47:26 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id EDA938FC19 for ; Thu, 1 Apr 2010 20:47:25 +0000 (UTC) Received: (qmail 2691 invoked by uid 399); 1 Apr 2010 20:47:25 -0000 Received: from localhost (HELO foreign.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 1 Apr 2010 20:47:25 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4BB5065B.5000702@FreeBSD.org> Date: Thu, 01 Apr 2010 13:47:23 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.1.9) Gecko/20100330 Thunderbird/3.0.4 MIME-Version: 1.0 To: "Simon L. Nielsen" References: <201004011519.o31FJpw2068549@svn.freebsd.org> <4BB4E3DF.8030407@FreeBSD.org> <20100401204324.GB1301@arthur.nitro.dk> In-Reply-To: <20100401204324.GB1301@arthur.nitro.dk> X-Enigmail-Version: 1.0.1 OpenPGP: id=D5B2F0FB 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: r206046 - in head/crypto/openssl: . apps crypto crypto/asn1 crypto/bio crypto/bn crypto/bn/asm crypto/engine crypto/evp crypto/ocsp crypto/rand engines fips ssl X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Apr 2010 20:47:26 -0000 On 04/01/10 13:43, Simon L. Nielsen wrote: > B0;253;0cOn 2010.04.01 11:20:15 -0700, Doug Barton wrote: >> On 04/01/10 08:19, Simon L. Nielsen wrote: >>> Author: simon >>> Date: Thu Apr 1 15:19:51 2010 >>> New Revision: 206046 >>> URL: http://svn.freebsd.org/changeset/base/206046 >>> >>> Log: >>> Merge OpenSSL 0.9.8n into head. >> >> Just curious, why not 1.0.0? > > The main reason is that 0.9.8n is needed for MFC to 7 and 8, so I > prefered to get it tested a bit in -CURRENT first while I have the > chance. I also prefered to get the security fixes for 0.9.8m into > head faster - I don't know how much trouble 1.0.0 will be, but it will > probably take some work. Sounds reasonable, thanks for the explanation. > That said, given how long OpenSSL 1.0 has been under way it would have > been perfect to commit it today of all days :-). Yes. :) -- ... and that's just a little bit of history repeating. -- Propellerheads Improve the effectiveness of your Internet presence with a domain name makeover! http://SupersetSolutions.com/ From owner-svn-src-head@FreeBSD.ORG Thu Apr 1 21:20:20 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 20FE9106566C; Thu, 1 Apr 2010 21:20:20 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 106F58FC14; Thu, 1 Apr 2010 21:20:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o31LKJwM048278; Thu, 1 Apr 2010 21:20:19 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o31LKJLT048276; Thu, 1 Apr 2010 21:20:19 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201004012120.o31LKJLT048276@svn.freebsd.org> From: Bruce Cran Date: Thu, 1 Apr 2010 21:20: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: r206056 - head/contrib/top X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Apr 2010 21:20:20 -0000 Author: brucec Date: Thu Apr 1 21:20:19 2010 New Revision: 206056 URL: http://svn.freebsd.org/changeset/base/206056 Log: Specify the parameter in the format_k2 prototype. This fixes top on ARM, which assumes that format_k2 takes an int. Approved by: rrs (mentor) Modified: head/contrib/top/utils.h Modified: head/contrib/top/utils.h ============================================================================== --- head/contrib/top/utils.h Thu Apr 1 20:23:43 2010 (r206055) +++ head/contrib/top/utils.h Thu Apr 1 21:20:19 2010 (r206056) @@ -21,4 +21,4 @@ long percentages(); char *errmsg(); char *format_time(); char *format_k(); -char *format_k2(); +char *format_k2(unsigned long long); From owner-svn-src-head@FreeBSD.ORG Thu Apr 1 21:21:46 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 496511065670; Thu, 1 Apr 2010 21:21:46 +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 1ECB68FC0A; Thu, 1 Apr 2010 21:21:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o31LLkGk048650; Thu, 1 Apr 2010 21:21:46 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o31LLkoN048648; Thu, 1 Apr 2010 21:21:46 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201004012121.o31LLkoN048648@svn.freebsd.org> From: Xin LI Date: Thu, 1 Apr 2010 21:21: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: r206057 - head/lib/libz X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Apr 2010 21:21:46 -0000 Author: delphij Date: Thu Apr 1 21:21:45 2010 New Revision: 206057 URL: http://svn.freebsd.org/changeset/base/206057 Log: For now, hardcode FreeBSD configuration that will never change on zlib.h: unifdef -D_FILE_OFFSET_BITS=64 -U_LFS64_LARGEFILE -U_LARGEFILE64_SOURCE Modified: head/lib/libz/zlib.h Modified: head/lib/libz/zlib.h ============================================================================== --- head/lib/libz/zlib.h Thu Apr 1 21:20:19 2010 (r206056) +++ head/lib/libz/zlib.h Thu Apr 1 21:21:45 2010 (r206057) @@ -1556,38 +1556,13 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF( inflateBackInit_((strm), (windowBits), (window), \ ZLIB_VERSION, sizeof(z_stream)) -#if _LARGEFILE64_SOURCE == 1 && _LFS64_LARGEFILE == 1 - ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); - ZEXTERN off64_t ZEXPORT gzseek64 OF((gzFile, off64_t, int)); - ZEXTERN off64_t ZEXPORT gztell64 OF((gzFile)); - ZEXTERN off64_t ZEXPORT gzoffset64 OF((gzFile)); - ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, off64_t)); - ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, off64_t)); -#endif -#if !defined(ZLIB_INTERNAL) && _FILE_OFFSET_BITS == 64 && _LFS64_LARGEFILE == 1 -# define gzopen gzopen64 -# define gzseek gzseek64 -# define gztell gztell64 -# define gzoffset gzoffset64 -# define adler32_combine adler32_combine64 -# define crc32_combine crc32_combine64 -# if _LARGEFILE64_SOURCE != 1 - ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); - ZEXTERN off_t ZEXPORT gzseek64 OF((gzFile, off_t, int)); - ZEXTERN off_t ZEXPORT gztell64 OF((gzFile)); - ZEXTERN off_t ZEXPORT gzoffset64 OF((gzFile)); - ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, off_t)); - ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, off_t)); -# endif -#else ZEXTERN gzFile ZEXPORT gzopen OF((const char *, const char *)); ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile, z_off_t, int)); ZEXTERN z_off_t ZEXPORT gztell OF((gzFile)); ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile)); ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t)); ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t)); -#endif #if !defined(ZUTIL_H) && !defined(NO_DUMMY_DECL) struct internal_state {int dummy;}; /* hack for buggy compilers */ From owner-svn-src-head@FreeBSD.ORG Thu Apr 1 21:23:54 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D80851065673; Thu, 1 Apr 2010 21:23:54 +0000 (UTC) (envelope-from bruce@cran.org.uk) Received: from muon.cran.org.uk (unknown [IPv6:2001:470:1f09:679::1]) by mx1.freebsd.org (Postfix) with ESMTP id 9CA198FC0A; Thu, 1 Apr 2010 21:23:54 +0000 (UTC) Received: from muon.cran.org.uk (localhost [127.0.0.1]) by muon.cran.org.uk (Postfix) with ESMTP id D71EB93B1; Thu, 1 Apr 2010 21:23:53 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on muon.cran.org.uk X-Spam-Level: X-Spam-Status: No, score=-2.6 required=8.0 tests=AWL,BAYES_00,RDNS_DYNAMIC autolearn=no version=3.2.5 Received: from core.draftnet (87-194-158-129.bethere.co.uk [87.194.158.129]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by muon.cran.org.uk (Postfix) with ESMTPSA; Thu, 1 Apr 2010 21:23:53 +0000 (UTC) From: Bruce Cran To: Alexander Motin Date: Thu, 1 Apr 2010 22:23:49 +0100 User-Agent: KMail/1.13.1 (FreeBSD/9.0-CURRENT; KDE/4.4.1; amd64; ; ) References: <201003131117.o2DBHek2003410@svn.freebsd.org> <4BB2182C.4080203@FreeBSD.org> In-Reply-To: <4BB2182C.4080203@FreeBSD.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201004012223.49249.bruce@cran.org.uk> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Bruce Cran Subject: Re: svn commit: r205119 - head/contrib/top X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Apr 2010 21:23:55 -0000 On Tuesday 30 March 2010 16:26:36 Alexander Motin wrote: > Bruce Cran wrote: > > Author: brucec > > Date: Sat Mar 13 11:17:39 2010 > > New Revision: 205119 > > URL: http://svn.freebsd.org/changeset/base/205119 > > > > Log: > > Change the 'amt' parameter in format_k2 from int to unsigned long long > > to match the values passed in and prevent the SIZE field being > > corrupted when more than 2TB is allocated. > > This change seems broke top on ARM, as declaration in util.h doesn't > specifies argument type, and caller assumes int there. To make it work > correctly, second part should be done: > > --- top.prev/utils.h 2009-10-14 15:23:42.000000000 +0300 > +++ top/utils.h 2010-03-30 18:14:11.000000000 +0300 > @@ -21,4 +21,4 @@ long percentages(); > char *errmsg(); > char *format_time(); > char *format_k(); > -char *format_k2(); > +char *format_k2(unsigned long long); Sorry, I thought things would just work since format_k2 is only ever being called with a 64-bit argument. I've committed the patch in r206056. -- Bruce Cran From owner-svn-src-head@FreeBSD.ORG Thu Apr 1 22:52:10 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2B021106566B; Thu, 1 Apr 2010 22:52:10 +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 1A9258FC08; Thu, 1 Apr 2010 22:52:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o31Mq90B069005; Thu, 1 Apr 2010 22:52:09 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o31Mq9M6069003; Thu, 1 Apr 2010 22:52:09 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201004012252.o31Mq9M6069003@svn.freebsd.org> From: Xin LI Date: Thu, 1 Apr 2010 22:52: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: r206058 - head/lib/libz X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Apr 2010 22:52:10 -0000 Author: delphij Date: Thu Apr 1 22:52:09 2010 New Revision: 206058 URL: http://svn.freebsd.org/changeset/base/206058 Log: Remove _LARGEFILE64_SOURCE==1 case which is supposed to be always false on FreeBSD. Pointed out by: dougb Modified: head/lib/libz/zconf.h Modified: head/lib/libz/zconf.h ============================================================================== --- head/lib/libz/zconf.h Thu Apr 1 21:21:45 2010 (r206057) +++ head/lib/libz/zconf.h Thu Apr 1 22:52:09 2010 (r206058) @@ -364,7 +364,7 @@ typedef uLong FAR uLongf; # define Z_HAVE_UNISTD_H #endif -#if defined(Z_HAVE_UNISTD_H) || _LARGEFILE64_SOURCE == 1 +#if defined(Z_HAVE_UNISTD_H) # include /* for off_t */ # include /* for SEEK_* and off_t */ # ifdef VMS From owner-svn-src-head@FreeBSD.ORG Fri Apr 2 00:02:36 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7A043106566C; Fri, 2 Apr 2010 00:02:36 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from mail-qy0-f199.google.com (mail-qy0-f199.google.com [209.85.221.199]) by mx1.freebsd.org (Postfix) with ESMTP id C78338FC08; Fri, 2 Apr 2010 00:02:35 +0000 (UTC) Received: by qyk37 with SMTP id 37so1813548qyk.8 for ; Thu, 01 Apr 2010 17:02:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:received:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=T/Ani2z6IV/skKn8Gsg9shES/5oLmzedMMrbNCzV/ro=; b=S81HtxBnZo6ZbtR093S80HfIroP0YCNQFgmgHhDB4KiDbh8+eK1xqo5zpNjG6soswc kXeFjpA79rzU9t71PLMMGeBxyeDy0MK2Idtq5O2RFhAKLzbjH08RaRDVq1iOjJdkAQB9 braRKV4z5DKNGMsBulNjG4gKysTx82g2Qqr3I= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=xhUTLKNWtbSGrKW+pFGxB2zvpS9v5as0PPrHOUFNAqBnQYVAi7BKf5HKyy4Juqg5J+ 7p8nfrK0eCdTocRGHNVAf7h5MjU1c4gbtQN4N1CInD5rdMtWT8sx2ZXDZjECPpbO4qNr n4ZxB+yi85RzgfTnN+H3kuXnPZrGziXJ8A4Y8= MIME-Version: 1.0 Received: by 10.229.33.72 with HTTP; Thu, 1 Apr 2010 17:02:34 -0700 (PDT) In-Reply-To: <201004011427.o31ERTaT056824@svn.freebsd.org> References: <201004011427.o31ERTaT056824@svn.freebsd.org> Date: Thu, 1 Apr 2010 17:02:34 -0700 Received: by 10.229.222.205 with SMTP id ih13mr2557432qcb.73.1270166554849; Thu, 01 Apr 2010 17:02:34 -0700 (PDT) Message-ID: From: Garrett Cooper To: Florent Thoumie 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, rwatson@freebsd.org Subject: Re: svn commit: r206043 - in head/usr.sbin/pkg_install: add delete lib version X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Apr 2010 00:02:36 -0000 Hi Florent and Robert, On Thu, Apr 1, 2010 at 7:27 AM, Florent Thoumie wrote: > Author: flz > Date: Thu Apr =A01 14:27:29 2010 > New Revision: 206043 > URL: http://svn.freebsd.org/changeset/base/206043 > > Log: > =A0Various fixes. > > =A0- Replace hardcoded INDEX version. [1] > =A0- Fix a buffer overlap. [2] > =A0- Remove empty package when fetching fails and -K is used. [3] > =A0- Remove useless chmod2() after mkdtemp(3). [4] > =A0- Replace mkdir(1) call with mkdir(2). [5] > =A0- Get rid of some vsystem() calls. > =A0- Switch from lstat(2) to open(2) in fexists(). > =A0- Try rename(2) in move_file() first. > =A0- Bump PKG_INSTALL_VERSION to 20100401. > > =A0PR: =A0 =A0 =A0 =A0 =A0 bin/145101 [1], bin/139492 [2], bin/144919 [3] > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0bin/144920 [4], bin/144921 [5] > =A0Submitted by: gcooper [1,2,3,4,5] > > Modified: > =A0head/usr.sbin/pkg_install/add/futil.c > =A0head/usr.sbin/pkg_install/add/perform.c > =A0head/usr.sbin/pkg_install/delete/perform.c > =A0head/usr.sbin/pkg_install/lib/file.c > =A0head/usr.sbin/pkg_install/lib/lib.h > =A0head/usr.sbin/pkg_install/lib/match.c > =A0head/usr.sbin/pkg_install/lib/pen.c > =A0head/usr.sbin/pkg_install/lib/url.c > =A0head/usr.sbin/pkg_install/version/perform.c [...] > Modified: head/usr.sbin/pkg_install/add/perform.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/usr.sbin/pkg_install/add/perform.c =A0 =A0 Thu Apr =A01 13:27:27= 2010 =A0 =A0 =A0 =A0(r206042) > +++ head/usr.sbin/pkg_install/add/perform.c =A0 =A0 Thu Apr =A01 14:27:29= 2010 =A0 =A0 =A0 =A0(r206043) > @@ -78,6 +78,7 @@ pkg_do(char *pkg) > =A0 =A0 char pre_arg[FILENAME_MAX], post_arg[FILENAME_MAX]; > =A0 =A0 char *conflict[2]; > =A0 =A0 char **matched; > + =A0 =A0int fd; [...] > =A0 =A0 =A0 =A0/* Make sure pkg_info can read the entry */ > - =A0 =A0 =A0 vsystem("/bin/chmod a+rx %s", LogDir); > + =A0 =A0 =A0 fd =3D open(LogDir, O_RDWR); > + =A0 =A0 =A0 fstat(fd, &sb); > + =A0 =A0 =A0 fchmod(fd, sb.st_mode | S_IRALL | S_IXALL); =A0 =A0 /* be s= ure, chmod a+rx */ > + =A0 =A0 =A0 close(fd); Yipes... we really should be checking to make sure that fchmod, fstat, and open pass. This would look really bad if not. I would also argue that all of the files that aren't properly chmod'ed, etc are in fact the packager's fault and should be fixed by adding appropriate scripts because mtree should catch this stuff if it's setup appropriately. [...] > Modified: head/usr.sbin/pkg_install/lib/file.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/usr.sbin/pkg_install/lib/file.c =A0 =A0 =A0 =A0Thu Apr =A01 13:2= 7:27 2010 =A0 =A0 =A0 =A0(r206042) > +++ head/usr.sbin/pkg_install/lib/file.c =A0 =A0 =A0 =A0Thu Apr =A01 14:2= 7:29 2010 =A0 =A0 =A0 =A0(r206043) > @@ -31,10 +31,13 @@ __FBSDID("$FreeBSD$"); > =A0Boolean > =A0fexists(const char *fname) > =A0{ > - =A0 =A0struct stat dummy; > - =A0 =A0if (!lstat(fname, &dummy)) > - =A0 =A0 =A0 return TRUE; > - =A0 =A0return FALSE; > + =A0 =A0int fd; > + > + =A0 =A0if ((fd =3D open(fname, O_RDONLY)) =3D=3D -1) > + =A0 =A0 =A0 return FALSE; > + > + =A0 =A0close(fd); > + =A0 =A0return TRUE; > =A0} I was leery of this change because fexists is used widely across pkg_install for purposes other than just determining whether or not a file existed, in particular it's determining whether or not the end-file exists. The original submitter for the PR didn't actually test this point thoroughly so I need to go and write some tests to ensure that the code isn't actually regressing on accident :/. > =A0/* Quick check to see if something is a directory or symlink to a dire= ctory */ > @@ -279,17 +282,23 @@ copy_file(const char *dir, const char *f > =A0} > > =A0void > -move_file(const char *dir, const char *fname, const char *to) > +move_file(const char *dir, const char *fname, const char *tdir) > =A0{ > - =A0 =A0char cmd[FILENAME_MAX]; > + =A0 =A0char from[FILENAME_MAX]; > + =A0 =A0char to[FILENAME_MAX]; > > =A0 =A0 if (fname[0] =3D=3D '/') > - =A0 =A0 =A0 snprintf(cmd, FILENAME_MAX, "/bin/mv %s %s", fname, to); > + =A0 =A0 =A0 strncpy(from, fname, FILENAME_MAX); > =A0 =A0 else > - =A0 =A0 =A0 snprintf(cmd, FILENAME_MAX, "/bin/mv %s/%s %s", dir, fname,= to); > - =A0 =A0if (vsystem(cmd)) { > - =A0 =A0 =A0 cleanup(0); > - =A0 =A0 =A0 errx(2, "%s: could not perform '%s'", __func__, cmd); > + =A0 =A0 =A0 snprintf(from, FILENAME_MAX, "%s/%s", dir, fname); > + > + =A0 =A0snprintf(to, FILENAME_MAX, "%s/%s", tdir, fname); > + > + =A0 =A0if (rename(from, to) =3D=3D -1) { > + =A0 =A0 =A0 =A0if (vsystem("/bin/mv %s %s", from, to)) { > + =A0 =A0 =A0 =A0 =A0 cleanup(0); > + =A0 =A0 =A0 =A0 =A0 errx(2, "%s: could not move '%s' to '%s'", __func__= , from, to); > + =A0 =A0 =A0 } > =A0 =A0 } > =A0} 1. FILENAME_MAX could be less than PATH_MAX, and actually is on the BSDs (256 vs 1024). PATH_MAX allows for duplicate slashes and all sorts of whacky path crud and probably should be used more liberally in the pkg_install code. This however isn't always true in the NetBSD case because they're aiming for portability of pkg_install, however PATH_MAX is always guaranteed to be at least as large as FILENAME_MAX. 2. Does rename(2) copy [MAC] and other attributes properly? It appears to do the right thing, but I could be misreading the code... Thanks for the commits BTW :)! -Garrett From owner-svn-src-head@FreeBSD.ORG Fri Apr 2 01:53:49 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2FC041065673; Fri, 2 Apr 2010 01:53:49 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1EBF58FC1E; Fri, 2 Apr 2010 01:53:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o321rmpY012360; Fri, 2 Apr 2010 01:53:49 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o321rmxG012359; Fri, 2 Apr 2010 01:53:48 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201004020153.o321rmxG012359@svn.freebsd.org> From: Rick Macklem Date: Fri, 2 Apr 2010 01:53: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: r206061 - head/sys/fs/nfsserver X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Apr 2010 01:53:49 -0000 Author: rmacklem Date: Fri Apr 2 01:53:48 2010 New Revision: 206061 URL: http://svn.freebsd.org/changeset/base/206061 Log: Add SAVENAME to the cn_flags for all cases in the experimental NFS server for the CREATE cn_nameiop where SAVESTART isn't set. I was not aware that this needed to be done by the caller until recently. Tested by: lampa AT fit.vutbr.cz (link case) Submitted by: lampa AT fit.vutbr.cz (link case) MFC after: 2 weeks Modified: head/sys/fs/nfsserver/nfs_nfsdserv.c Modified: head/sys/fs/nfsserver/nfs_nfsdserv.c ============================================================================== --- head/sys/fs/nfsserver/nfs_nfsdserv.c Thu Apr 1 23:35:35 2010 (r206060) +++ head/sys/fs/nfsserver/nfs_nfsdserv.c Fri Apr 2 01:53:48 2010 (r206061) @@ -1086,7 +1086,7 @@ nfsrvd_mknod(struct nfsrv_descript *nd, case NFFIFO: break; case NFDIR: - cnflags = LOCKPARENT; + cnflags = (LOCKPARENT | SAVENAME); break; default: nd->nd_repstat = NFSERR_BADTYPE; @@ -1549,7 +1549,8 @@ nfsrvd_link(struct nfsrv_descript *nd, i NFSVOPUNLOCK(dp, 0, p); } } - NFSNAMEICNDSET(&named.ni_cnd, nd->nd_cred, CREATE, LOCKPARENT); + NFSNAMEICNDSET(&named.ni_cnd, nd->nd_cred, CREATE, + LOCKPARENT | SAVENAME); if (!nd->nd_repstat) { nfsvno_setpathbuf(&named, &bufp, &hashp); error = nfsrv_parsename(nd, bufp, hashp, &named.ni_pathlen); @@ -1743,7 +1744,8 @@ nfsrvd_mkdir(struct nfsrv_descript *nd, nfsrv_wcc(nd, dirfor_ret, &dirfor, diraft_ret, &diraft); return (0); } - NFSNAMEICNDSET(&named.ni_cnd, nd->nd_cred, CREATE, LOCKPARENT); + NFSNAMEICNDSET(&named.ni_cnd, nd->nd_cred, CREATE, + LOCKPARENT | SAVENAME); nfsvno_setpathbuf(&named, &bufp, &hashp); error = nfsrv_parsename(nd, bufp, hashp, &named.ni_pathlen); if (error) { From owner-svn-src-head@FreeBSD.ORG Fri Apr 2 02:19:29 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1F3AA1065672; Fri, 2 Apr 2010 02:19:29 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0E7C28FC15; Fri, 2 Apr 2010 02:19:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o322JSsb018091; Fri, 2 Apr 2010 02:19:28 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o322JSfA018089; Fri, 2 Apr 2010 02:19:28 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201004020219.o322JSfA018089@svn.freebsd.org> From: Rick Macklem Date: Fri, 2 Apr 2010 02:19: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: r206063 - head/sys/fs/nfsserver X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Apr 2010 02:19:29 -0000 Author: rmacklem Date: Fri Apr 2 02:19:28 2010 New Revision: 206063 URL: http://svn.freebsd.org/changeset/base/206063 Log: For the experimental NFS server, add a call to free the lookup path buffer for one case where it was missing when doing mkdir. This could have conceivably resulted in a leak of a buffer, but a leak was never observed during testing, so I suspect it would have occurred rarely, if ever, in practice. MFC after: 2 weeks Modified: head/sys/fs/nfsserver/nfs_nfsdport.c Modified: head/sys/fs/nfsserver/nfs_nfsdport.c ============================================================================== --- head/sys/fs/nfsserver/nfs_nfsdport.c Fri Apr 2 02:17:15 2010 (r206062) +++ head/sys/fs/nfsserver/nfs_nfsdport.c Fri Apr 2 02:19:28 2010 (r206063) @@ -869,6 +869,7 @@ nfsvno_mkdir(struct nameidata *ndp, stru else vput(ndp->ni_dvp); vrele(ndp->ni_vp); + nfsvno_relpathbuf(ndp); return (EEXIST); } error = VOP_MKDIR(ndp->ni_dvp, &ndp->ni_vp, &ndp->ni_cnd, From owner-svn-src-head@FreeBSD.ORG Fri Apr 2 06:50:28 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ACE9210656C4; Fri, 2 Apr 2010 06:50:28 +0000 (UTC) (envelope-from netchild@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9B2DB8FC0A; Fri, 2 Apr 2010 06:50:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o326oSDW078770; Fri, 2 Apr 2010 06:50:28 GMT (envelope-from netchild@svn.freebsd.org) Received: (from netchild@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o326oSRo078768; Fri, 2 Apr 2010 06:50:28 GMT (envelope-from netchild@svn.freebsd.org) Message-Id: <201004020650.o326oSRo078768@svn.freebsd.org> From: Alexander Leidinger Date: Fri, 2 Apr 2010 06:50: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: r206081 - head/sys/compat/linprocfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Apr 2010 06:50:28 -0000 Author: netchild Date: Fri Apr 2 06:50:28 2010 New Revision: 206081 URL: http://svn.freebsd.org/changeset/base/206081 Log: Re-apply r205683 with some modifications: Fix some bogus values in linprocfs. Submitted by: Petr Salinger Verified on: GNU/kFreeBSD debian 8.0-1-686 (by submitter) PR: 144584 Reviewed by / discussed with: kib, des, jhb, submitter Modified: head/sys/compat/linprocfs/linprocfs.c Modified: head/sys/compat/linprocfs/linprocfs.c ============================================================================== --- head/sys/compat/linprocfs/linprocfs.c Fri Apr 2 06:41:45 2010 (r206080) +++ head/sys/compat/linprocfs/linprocfs.c Fri Apr 2 06:50:28 2010 (r206081) @@ -110,12 +110,14 @@ __FBSDID("$FreeBSD$"); /* * Various conversion macros */ -#define T2J(x) (((x) * 100UL) / (stathz ? stathz : hz)) /* ticks to jiffies */ +#define T2J(x) ((long)(((x) * 100ULL) / (stathz ? stathz : hz))) /* ticks to jiffies */ +#define T2CS(x) ((unsigned long)(((x) * 100ULL) / (stathz ? stathz : hz))) /* ticks to centiseconds */ #define T2S(x) ((x) / (stathz ? stathz : hz)) /* ticks to seconds */ #define B2K(x) ((x) >> 10) /* bytes to kbytes */ #define B2P(x) ((x) >> PAGE_SHIFT) /* bytes to pages */ #define P2B(x) ((x) << PAGE_SHIFT) /* pages to bytes */ #define P2K(x) ((x) << (PAGE_SHIFT - 10)) /* pages to kbytes */ +#define TV2J(x) ((x)->tv_sec * 100UL + (x)->tv_usec / 10000) /** * @brief Mapping of ki_stat in struct kinfo_proc to the linux state @@ -505,9 +507,10 @@ linprocfs_douptime(PFS_FILL_ARGS) getmicrouptime(&tv); read_cpu_time(cp_time); - sbuf_printf(sb, "%lld.%02ld %ld.%02ld\n", + sbuf_printf(sb, "%lld.%02ld %ld.%02lu\n", (long long)tv.tv_sec, tv.tv_usec / 10000, - T2S(cp_time[CP_IDLE]), T2J(cp_time[CP_IDLE]) % 100); + T2S(cp_time[CP_IDLE] / mp_ncpus), + T2CS(cp_time[CP_IDLE] / mp_ncpus) % 100); return (0); } @@ -613,9 +616,17 @@ linprocfs_doprocstat(PFS_FILL_ARGS) struct kinfo_proc kp; char state; static int ratelimit = 0; + vm_offset_t startcode, startdata; PROC_LOCK(p); fill_kinfo_proc(p, &kp); + if (p->p_vmspace) { + startcode = (vm_offset_t)p->p_vmspace->vm_taddr; + startdata = (vm_offset_t)p->p_vmspace->vm_daddr; + } else { + startcode = 0; + startdata = 0; + }; sbuf_printf(sb, "%d", p->p_pid); #define PS_ADD(name, fmt, arg) sbuf_printf(sb, " " fmt, arg) PS_ADD("comm", "(%s)", p->p_comm); @@ -634,30 +645,27 @@ linprocfs_doprocstat(PFS_FILL_ARGS) PS_ADD("pgrp", "%d", p->p_pgid); PS_ADD("session", "%d", p->p_session->s_sid); PROC_UNLOCK(p); - PS_ADD("tty", "%d", 0); /* XXX */ + PS_ADD("tty", "%d", kp.ki_tdev); PS_ADD("tpgid", "%d", kp.ki_tpgid); PS_ADD("flags", "%u", 0); /* XXX */ PS_ADD("minflt", "%lu", kp.ki_rusage.ru_minflt); PS_ADD("cminflt", "%lu", kp.ki_rusage_ch.ru_minflt); PS_ADD("majflt", "%lu", kp.ki_rusage.ru_majflt); PS_ADD("cmajflt", "%lu", kp.ki_rusage_ch.ru_majflt); - PS_ADD("utime", "%ld", T2J(tvtohz(&kp.ki_rusage.ru_utime))); - PS_ADD("stime", "%ld", T2J(tvtohz(&kp.ki_rusage.ru_stime))); - PS_ADD("cutime", "%ld", T2J(tvtohz(&kp.ki_rusage_ch.ru_utime))); - PS_ADD("cstime", "%ld", T2J(tvtohz(&kp.ki_rusage_ch.ru_stime))); + PS_ADD("utime", "%ld", TV2J(&kp.ki_rusage.ru_utime)); + PS_ADD("stime", "%ld", TV2J(&kp.ki_rusage.ru_stime)); + PS_ADD("cutime", "%ld", TV2J(&kp.ki_rusage_ch.ru_utime)); + PS_ADD("cstime", "%ld", TV2J(&kp.ki_rusage_ch.ru_stime)); PS_ADD("priority", "%d", kp.ki_pri.pri_user); PS_ADD("nice", "%d", kp.ki_nice); /* 19 (nicest) to -19 */ PS_ADD("0", "%d", 0); /* removed field */ PS_ADD("itrealvalue", "%d", 0); /* XXX */ - /* XXX: starttime is not right, it is the _same_ for _every_ process. - It should be the number of jiffies between system boot and process - start. */ - PS_ADD("starttime", "%lu", T2J(tvtohz(&kp.ki_start))); + PS_ADD("starttime", "%lu", TV2J(&kp.ki_start) - TV2J(&boottime)); PS_ADD("vsize", "%ju", P2K((uintmax_t)kp.ki_size)); PS_ADD("rss", "%ju", (uintmax_t)kp.ki_rssize); PS_ADD("rlim", "%lu", kp.ki_rusage.ru_maxrss); - PS_ADD("startcode", "%u", (unsigned)0); - PS_ADD("endcode", "%u", 0); /* XXX */ + PS_ADD("startcode", "%ju", (uintmax_t)startcode); + PS_ADD("endcode", "%ju", (uintmax_t)startdata); PS_ADD("startstack", "%u", 0); /* XXX */ PS_ADD("kstkesp", "%u", 0); /* XXX */ PS_ADD("kstkeip", "%u", 0); /* XXX */ @@ -800,7 +808,7 @@ linprocfs_doprocstatus(PFS_FILL_ARGS) */ sbuf_printf(sb, "VmSize:\t%8ju kB\n", B2K((uintmax_t)kp.ki_size)); sbuf_printf(sb, "VmLck:\t%8u kB\n", P2K(0)); /* XXX */ - sbuf_printf(sb, "VmRss:\t%8ju kB\n", P2K((uintmax_t)kp.ki_rssize)); + sbuf_printf(sb, "VmRSS:\t%8ju kB\n", P2K((uintmax_t)kp.ki_rssize)); sbuf_printf(sb, "VmData:\t%8ju kB\n", P2K((uintmax_t)kp.ki_dsize)); sbuf_printf(sb, "VmStk:\t%8ju kB\n", P2K((uintmax_t)kp.ki_ssize)); sbuf_printf(sb, "VmExe:\t%8ju kB\n", P2K((uintmax_t)kp.ki_tsize)); From owner-svn-src-head@FreeBSD.ORG Fri Apr 2 06:55:32 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3FCC71065672; Fri, 2 Apr 2010 06:55:32 +0000 (UTC) (envelope-from netchild@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2CB678FC13; Fri, 2 Apr 2010 06:55:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o326tWZV079893; Fri, 2 Apr 2010 06:55:32 GMT (envelope-from netchild@svn.freebsd.org) Received: (from netchild@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o326tWax079882; Fri, 2 Apr 2010 06:55:32 GMT (envelope-from netchild@svn.freebsd.org) Message-Id: <201004020655.o326tWax079882@svn.freebsd.org> From: Alexander Leidinger Date: Fri, 2 Apr 2010 06:55: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: r206082 - in head: . share/man/man7 share/mk sys/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Apr 2010 06:55:32 -0000 Author: netchild Date: Fri Apr 2 06:55:31 2010 New Revision: 206082 URL: http://svn.freebsd.org/changeset/base/206082 Log: WITH_CTF can now be specified in src.conf (not recommended, there are some problems with static executables), make.conf (would also affect ports which do not use GNU make and do not override the compile targets) or in the kernel config (via "makeoptions WITH_CTF=yes"). Additional (related) changes: - propagate WITH_CTF to module builds - do not add -g to the linker flags, it's a noop there anyway (at least according to the man page of ld) - do not add -g to CFLAGS unconditionally we need to have a look if it is really needed (IMO not) or if there is a way to add it only when WITH_CTF is used Note: ctfconvert / ctfmerge lines will not appear in the build output, to protect the innocent (those which do not build with WITH_CTF would see the shell-test and may think WITH_CTF is used). Reviewed by: imp, jhb, scottl (earlier version) Discussed on: arch@ Modified: head/UPDATING head/share/man/man7/build.7 head/share/mk/bsd.lib.mk head/share/mk/bsd.port.mk head/share/mk/bsd.prog.mk head/share/mk/sys.mk head/sys/conf/kern.mk head/sys/conf/kern.post.mk head/sys/conf/kern.pre.mk head/sys/conf/kmod.mk Modified: head/UPDATING ============================================================================== --- head/UPDATING Fri Apr 2 06:50:28 2010 (r206081) +++ head/UPDATING Fri Apr 2 06:55:31 2010 (r206082) @@ -22,6 +22,16 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9. machines to maximize performance. (To disable malloc debugging, run ln -s aj /etc/malloc.conf.) +20100402: + WITH_CTF can now be specified in src.conf (not recommended, there + are some problems with static executables), make.conf (would also + affect ports which do not use GNU make and do not override the + compile targets) or in the kernel config (via "makeoptions + WITH_CTF=yes"). + When WITH_CTF was specified there before this was silently ignored, + so make sure that WITH_CTF is not used in places which could lead + to unwanted behavior. + 20100311: The kernel option COMPAT_IA32 has been replaced with COMPAT_FREEBSD32 to allow 32-bit compatibility on non-x86 platforms. All kernel Modified: head/share/man/man7/build.7 ============================================================================== --- head/share/man/man7/build.7 Fri Apr 2 06:50:28 2010 (r206081) +++ head/share/man/man7/build.7 Fri Apr 2 06:55:31 2010 (r206082) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 31, 2010 +.Dd April 02, 2010 .Dt BUILD 7 .Os .Sh NAME @@ -341,6 +341,15 @@ or the command line. .It Va NO_WERROR If defined, compiler warnings will not cause the build to halt, even if the makefile says otherwise. +.It Va WITH_CTF +If defined, the build process will run the DTrace CTF conversion +tools on built objects. +Please note that this WITH_ option is handled differently than all +other WITH_ options (there is no +.Va WITHOUT_CTF , +or corresponding +.Va MK_CTF +in the build system). .El .Pp Additionally, builds in Modified: head/share/mk/bsd.lib.mk ============================================================================== --- head/share/mk/bsd.lib.mk Fri Apr 2 06:50:28 2010 (r206081) +++ head/share/mk/bsd.lib.mk Fri Apr 2 06:55:31 2010 (r206082) @@ -33,6 +33,11 @@ CFLAGS+= -DNDEBUG NO_WERROR= .endif +# Enable CTF conversion on request. +.if defined(WITH_CTF) +.undef NO_CTF +.endif + .if defined(DEBUG_FLAGS) CFLAGS+= ${DEBUG_FLAGS} @@ -68,15 +73,11 @@ PO_FLAG=-pg .c.po: ${CC} ${PO_FLAG} ${PO_CFLAGS} -c ${.IMPSRC} -o ${.TARGET} -.if defined(CTFCONVERT) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .c.So: ${CC} ${PICFLAG} -DPIC ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET} -.if defined(CTFCONVERT) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .cc.po .C.po .cpp.po .cxx.po: ${CXX} ${PO_FLAG} ${PO_CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET} @@ -86,58 +87,40 @@ PO_FLAG=-pg .f.po: ${FC} -pg ${FFLAGS} -o ${.TARGET} -c ${.IMPSRC} -.if defined(CTFCONVERT) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .f.So: ${FC} ${PICFLAG} -DPIC ${FFLAGS} -o ${.TARGET} -c ${.IMPSRC} -.if defined(CTFCONVERT) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .m.po: ${OBJC} ${OBJCFLAGS} -pg -c ${.IMPSRC} -o ${.TARGET} -.if defined(CTFCONVERT) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .m.So: ${OBJC} ${PICFLAG} -DPIC ${OBJCFLAGS} -c ${.IMPSRC} -o ${.TARGET} -.if defined(CTFCONVERT) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .s.po .s.So: ${AS} ${AFLAGS} -o ${.TARGET} ${.IMPSRC} -.if defined(CTFCONVERT) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .asm.po: ${CC} -x assembler-with-cpp -DPROF ${PO_CFLAGS} -c ${.IMPSRC} -o ${.TARGET} -.if defined(CTFCONVERT) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .asm.So: ${CC} -x assembler-with-cpp ${PICFLAG} -DPIC ${CFLAGS} \ -c ${.IMPSRC} -o ${.TARGET} -.if defined(CTFCONVERT) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .S.po: ${CC} -DPROF ${PO_CFLAGS} -c ${.IMPSRC} -o ${.TARGET} -.if defined(CTFCONVERT) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .S.So: ${CC} ${PICFLAG} -DPIC ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET} -.if defined(CTFCONVERT) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} all: objwarn @@ -208,9 +191,7 @@ ${SHLIB_NAME}: ${SOBJS} -o ${.TARGET} -Wl,-soname,${SONAME} \ `NM='${NM}' lorder ${SOBJS} | tsort -q` ${LDADD} .endif -.if defined(CTFMERGE) - ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${SOBJS} -.endif + @[ -z "${CTFMERGE}" -o -n "${NO_CTF}" ] || ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${SOBJS} .endif .if defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB) && ${MK_TOOLCHAIN} != "no" Modified: head/share/mk/bsd.port.mk ============================================================================== --- head/share/mk/bsd.port.mk Fri Apr 2 06:50:28 2010 (r206081) +++ head/share/mk/bsd.port.mk Fri Apr 2 06:55:31 2010 (r206082) @@ -7,5 +7,10 @@ BSDPORTMK?= ${PORTSDIR}/Mk/bsd.port.mk # and setting MK_* variables when building ports. _WITHOUT_SRCCONF= +# Enable CTF conversion on request. +.if defined(WITH_CTF) +.undef NO_CTF +.endif + .include .include "${BSDPORTMK}" Modified: head/share/mk/bsd.prog.mk ============================================================================== --- head/share/mk/bsd.prog.mk Fri Apr 2 06:50:28 2010 (r206081) +++ head/share/mk/bsd.prog.mk Fri Apr 2 06:55:31 2010 (r206082) @@ -15,6 +15,11 @@ CFLAGS+= -DNDEBUG NO_WERROR= .endif +# Enable CTF conversion on request. +.if defined(WITH_CTF) +.undef NO_CTF +.endif + .if defined(DEBUG_FLAGS) CFLAGS+=${DEBUG_FLAGS} CXXFLAGS+=${DEBUG_FLAGS} @@ -61,9 +66,7 @@ ${PROG}: ${OBJS} .else ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${OBJS} ${LDADD} .endif -.if defined(CTFMERGE) - ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${OBJS} -.endif + @[ -z "${CTFMERGE}" -o -n "${NO_CTF}" ] || ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${OBJS} .else # !defined(SRCS) @@ -87,9 +90,7 @@ ${PROG}: ${OBJS} .else ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${OBJS} ${LDADD} .endif -.if defined(CTFMERGE) - ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${OBJS} -.endif + @[ -z "${CTFMERGE}" -o -n "${NO_CTF}" ] || ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${OBJS} .endif .endif Modified: head/share/mk/sys.mk ============================================================================== --- head/share/mk/sys.mk Fri Apr 2 06:50:28 2010 (r206081) +++ head/share/mk/sys.mk Fri Apr 2 06:55:31 2010 (r206082) @@ -55,14 +55,14 @@ NO_CTF = 1 # C Type Format data is required for DTrace CTFFLAGS ?= -L VERSION -.if !defined(NO_CTF) CTFCONVERT ?= ctfconvert CTFMERGE ?= ctfmerge .if defined(CFLAGS) && (${CFLAGS:M-g} != "") CTFFLAGS += -g .else -CFLAGS += -g -.endif +# XXX: What to do here? Is removing the CFLAGS part completely ok here? +# For now comment it out to not compile with -g unconditionally. +#CFLAGS += -g .endif CXX ?= c++ @@ -144,15 +144,11 @@ YFLAGS ?= -d # SINGLE SUFFIX RULES .c: ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.IMPSRC} -.if defined(CTFCONVERT) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .f: ${FC} ${FFLAGS} ${LDFLAGS} -o ${.TARGET} ${.IMPSRC} -.if defined(CTFCONVERT) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .sh: cp ${.IMPSRC} ${.TARGET} @@ -162,33 +158,25 @@ YFLAGS ?= -d .c.o: ${CC} ${CFLAGS} -c ${.IMPSRC} -.if defined(CTFCONVERT) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .f.o: ${FC} ${FFLAGS} -c ${.IMPSRC} -.if defined(CTFCONVERT) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .y.o: ${YACC} ${YFLAGS} ${.IMPSRC} ${CC} ${CFLAGS} -c y.tab.c rm -f y.tab.c mv y.tab.o ${.TARGET} -.if defined(CTFCONVERT) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .l.o: ${LEX} ${LFLAGS} ${.IMPSRC} ${CC} ${CFLAGS} -c lex.yy.c rm -f lex.yy.c mv lex.yy.o ${.TARGET} -.if defined(CTFCONVERT) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .y.c: ${YACC} ${YFLAGS} ${.IMPSRC} @@ -226,15 +214,11 @@ YFLAGS ?= -d .c: ${CC} ${CFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET} -.if defined(CTFCONVERT) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .c.o: ${CC} ${CFLAGS} -c ${.IMPSRC} -.if defined(CTFCONVERT) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .cc .cpp .cxx .C: ${CXX} ${CXXFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET} @@ -244,15 +228,11 @@ YFLAGS ?= -d .m.o: ${OBJC} ${OBJCFLAGS} -c ${.IMPSRC} -.if defined(CTFCONVERT) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .p.o: ${PC} ${PFLAGS} -c ${.IMPSRC} -.if defined(CTFCONVERT) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .e .r .F .f: ${FC} ${RFLAGS} ${EFLAGS} ${FFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} \ @@ -263,38 +243,28 @@ YFLAGS ?= -d .S.o: ${CC} ${CFLAGS} -c ${.IMPSRC} -.if defined(CTFCONVERT) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .asm.o: ${CC} -x assembler-with-cpp ${CFLAGS} -c ${.IMPSRC} -.if defined(CTFCONVERT) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .s.o: ${AS} ${AFLAGS} -o ${.TARGET} ${.IMPSRC} -.if defined(CTFCONVERT) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} # XXX not -j safe .y.o: ${YACC} ${YFLAGS} ${.IMPSRC} ${CC} ${CFLAGS} -c y.tab.c -o ${.TARGET} rm -f y.tab.c -.if defined(CTFCONVERT) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .l.o: ${LEX} -t ${LFLAGS} ${.IMPSRC} > ${.PREFIX}.tmp.c ${CC} ${CFLAGS} -c ${.PREFIX}.tmp.c -o ${.TARGET} rm -f ${.PREFIX}.tmp.c -.if defined(CTFCONVERT) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} # XXX not -j safe .y.c: @@ -306,34 +276,26 @@ YFLAGS ?= -d .s.out .c.out .o.out: ${CC} ${CFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET} -.if defined(CTFCONVERT) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .f.out .F.out .r.out .e.out: ${FC} ${EFLAGS} ${RFLAGS} ${FFLAGS} ${LDFLAGS} ${.IMPSRC} \ ${LDLIBS} -o ${.TARGET} rm -f ${.PREFIX}.o -.if defined(CTFCONVERT) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} # XXX not -j safe .y.out: ${YACC} ${YFLAGS} ${.IMPSRC} ${CC} ${CFLAGS} ${LDFLAGS} y.tab.c ${LDLIBS} -ly -o ${.TARGET} rm -f y.tab.c -.if defined(CTFCONVERT) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .l.out: ${LEX} -t ${LFLAGS} ${.IMPSRC} > ${.PREFIX}.tmp.c ${CC} ${CFLAGS} ${LDFLAGS} ${.PREFIX}.tmp.c ${LDLIBS} -ll -o ${.TARGET} rm -f ${.PREFIX}.tmp.c -.if defined(CTFCONVERT) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} # FreeBSD build pollution. Hide it in the non-POSIX part of the ifdef. __MAKE_CONF?=/etc/make.conf Modified: head/sys/conf/kern.mk ============================================================================== --- head/sys/conf/kern.mk Fri Apr 2 06:50:28 2010 (r206081) +++ head/sys/conf/kern.mk Fri Apr 2 06:55:31 2010 (r206082) @@ -108,3 +108,11 @@ CFLAGS+= -restrict ${MACHINE_ARCH} != "arm" && ${MACHINE_ARCH} != "mips" CFLAGS+= -fstack-protector .endif + +# +# Enable CTF conversation on request. +# +.if defined(WITH_CTF) +.undef NO_CTF +.endif + Modified: head/sys/conf/kern.post.mk ============================================================================== --- head/sys/conf/kern.post.mk Fri Apr 2 06:50:28 2010 (r206081) +++ head/sys/conf/kern.post.mk Fri Apr 2 06:55:31 2010 (r206082) @@ -19,6 +19,10 @@ MKMODULESENV+= KERNBUILDDIR="${.CURDIR}" MKMODULESENV+= CONF_CFLAGS="${CONF_CFLAGS}" .endif +.if defined(WITH_CTF) +MKMODULESENV+= WITH_CTF="${WITH_CTF}" +.endif + .MAIN: all .for target in all clean cleandepend cleandir clobber depend install \ @@ -90,9 +94,7 @@ ${FULLKERNEL}: ${SYSTEM_DEP} vers.o @rm -f ${.TARGET} @echo linking ${.TARGET} ${SYSTEM_LD} -.if defined(CTFMERGE) - ${SYSTEM_CTFMERGE} -.endif + @${SYSTEM_CTFMERGE} .if !defined(DEBUG) ${OBJCOPY} --strip-debug ${.TARGET} .endif @@ -240,9 +242,7 @@ kernel-reinstall: config.o env.o hints.o vers.o vnode_if.o: ${NORMAL_C} -.if defined(CTFCONVERT) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} config.ln env.ln hints.ln vers.ln vnode_if.ln: ${NORMAL_LINT} Modified: head/sys/conf/kern.pre.mk ============================================================================== --- head/sys/conf/kern.pre.mk Fri Apr 2 06:50:28 2010 (r206081) +++ head/sys/conf/kern.pre.mk Fri Apr 2 06:55:31 2010 (r206082) @@ -128,11 +128,7 @@ NORMAL_C_NOWERROR= ${CC} -c ${CFLAGS} ${ NORMAL_M= ${AWK} -f $S/tools/makeobjops.awk ${.IMPSRC} -c ; \ ${CC} -c ${CFLAGS} ${WERROR} ${PROF} ${.PREFIX}.c -.if defined(CTFCONVERT) -NORMAL_CTFCONVERT= ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.else -NORMAL_CTFCONVERT= -.endif +NORMAL_CTFCONVERT= [ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} NORMAL_LINT= ${LINT} ${LINTFLAGS} ${CFLAGS:M-[DIU]*} ${.IMPSRC} @@ -142,10 +138,7 @@ SYSTEM_DEP= Makefile ${SYSTEM_OBJS} SYSTEM_OBJS= locore.o ${MDOBJS} ${OBJS} SYSTEM_OBJS+= ${SYSTEM_CFILES:.c=.o} SYSTEM_OBJS+= hack.So -.if defined(CTFMERGE) -SYSTEM_CTFMERGE= ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${SYSTEM_OBJS} vers.o -LD+= -g -.endif +SYSTEM_CTFMERGE= [ -z "${CTFMERGE}" -o -n "${NO_CTF}" ] || ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${SYSTEM_OBJS} vers.o SYSTEM_LD= @${LD} -Bdynamic -T ${LDSCRIPT} \ -warn-common -export-dynamic -dynamic-linker /red/herring \ -o ${.TARGET} -X ${SYSTEM_OBJS} vers.o Modified: head/sys/conf/kmod.mk ============================================================================== --- head/sys/conf/kmod.mk Fri Apr 2 06:50:28 2010 (r206081) +++ head/sys/conf/kmod.mk Fri Apr 2 06:55:31 2010 (r206082) @@ -69,6 +69,11 @@ OBJCOPY?= objcopy .error "Do not use KMODDEPS on 5.0+; use MODULE_VERSION/MODULE_DEPEND" .endif +# Enable CTF conversion on request. +.if defined(WITH_CTF) +.undef NO_CTF +.endif + .include .SUFFIXES: .out .o .c .cc .cxx .C .y .l .s .S From owner-svn-src-head@FreeBSD.ORG Fri Apr 2 07:52:15 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 478BB1065673; Fri, 2 Apr 2010 07:52:15 +0000 (UTC) (envelope-from ndenev@gmail.com) Received: from mail-fx0-f209.google.com (mail-fx0-f209.google.com [209.85.220.209]) by mx1.freebsd.org (Postfix) with ESMTP id 7255A8FC14; Fri, 2 Apr 2010 07:52:13 +0000 (UTC) Received: by fxm1 with SMTP id 1so1291032fxm.13 for ; Fri, 02 Apr 2010 00:52:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:mime-version :content-type:from:in-reply-to:date:cc:content-transfer-encoding :message-id:references:to:x-mailer; bh=+j98N9MwjY3nz1iK2oAYRcIkQyPC3uFGwV5XfKCkT7M=; b=CCx6L/AMaDzvXM751mj1ZWzM6+9WPj3D49EgP7D3OOuHSjbCmiwTrCeHGkpuvNDR2X tfTI1cxsb1MHYwuv/brI3kZEAsszXr3AnYqNRiYGn72YW36Pig8wiV0GaAdHd85S/yIH yweyo3MuBsDobNaDYvx7sMjbi8WGgd0cVGBLI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; b=iXPEMbBu9bM+aKszZKHbHhjw1L6L9qCGElJU4UDHrV3+X0JxhV27uBLfyEP9Cg/2Gh LZlvBTn6/Y23zH0DZ9UCjKMNevJGvh9iYWACsLXJlXvYgt++OlQmaCc11JP3mKsuVij9 UgCHFNMKHsv+ggCVjH56iVrCO98eiloR62Txg= Received: by 10.223.101.80 with SMTP id b16mr1680144fao.25.1270194732196; Fri, 02 Apr 2010 00:52:12 -0700 (PDT) Received: from mbp-gige.totalterror.net (93-152-151-19.ddns.onlinedirect.bg [93.152.151.19]) by mx.google.com with ESMTPS id 19sm19490275fkr.39.2010.04.02.00.52.10 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 02 Apr 2010 00:52:10 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v1078) Content-Type: text/plain; charset=us-ascii From: Nikolay Denev In-Reply-To: <201004020655.o326tWax079882@svn.freebsd.org> Date: Fri, 2 Apr 2010 10:52:08 +0300 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201004020655.o326tWax079882@svn.freebsd.org> To: Alexander Leidinger X-Mailer: Apple Mail (2.1078) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r206082 - in head: . share/man/man7 share/mk sys/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Apr 2010 07:52:15 -0000 On 2 Apr, 2010, at 09:55 , Alexander Leidinger wrote: > Author: netchild > Date: Fri Apr 2 06:55:31 2010 > New Revision: 206082 > URL: http://svn.freebsd.org/changeset/base/206082 >=20 > Log: > WITH_CTF can now be specified in src.conf (not recommended, there > are some problems with static executables), make.conf (would also > affect ports which do not use GNU make and do not override the > compile targets) or in the kernel config (via "makeoptions > WITH_CTF=3Dyes"). >=20 > Additional (related) changes: > - propagate WITH_CTF to module builds > - do not add -g to the linker flags, it's a noop there anyway > (at least according to the man page of ld) > - do not add -g to CFLAGS unconditionally > we need to have a look if it is really needed (IMO not) or if = there > is a way to add it only when WITH_CTF is used >=20 > Note: ctfconvert / ctfmerge lines will not appear in the build = output, > to protect the innocent (those which do not build with WITH_CTF would > see the shell-test and may think WITH_CTF is used). >=20 > Reviewed by: imp, jhb, scottl (earlier version) > Discussed on: arch@ >=20 > Modified: > head/UPDATING > head/share/man/man7/build.7 > head/share/mk/bsd.lib.mk > head/share/mk/bsd.port.mk > head/share/mk/bsd.prog.mk > head/share/mk/sys.mk > head/sys/conf/kern.mk > head/sys/conf/kern.post.mk > head/sys/conf/kern.pre.mk > head/sys/conf/kmod.mk >=20 Finally! Thanks for this. I got tired of rebuilding kernels after = accidentally forgetting to put WITH_CTF on the make command line. :) I hope that this can also be MFC-ed to 8-STABLE at least. Regards, Niki= From owner-svn-src-head@FreeBSD.ORG Fri Apr 2 08:23:38 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8F4B01065672; Fri, 2 Apr 2010 08:23:38 +0000 (UTC) (envelope-from netchild@freebsd.org) Received: from mail.ebusiness-leidinger.de (mail.ebusiness-leidinger.de [217.11.53.44]) by mx1.freebsd.org (Postfix) with ESMTP id 3F3588FC08; Fri, 2 Apr 2010 08:23:38 +0000 (UTC) Received: from outgoing.leidinger.net (pD9E2CC21.dip.t-dialin.net [217.226.204.33]) by mail.ebusiness-leidinger.de (Postfix) with ESMTPSA id 15B428442CC; Fri, 2 Apr 2010 10:23:33 +0200 (CEST) Received: from webmail.leidinger.net (webmail.leidinger.net [192.168.1.102]) by outgoing.leidinger.net (Postfix) with ESMTP id E52515081; Fri, 2 Apr 2010 10:23:29 +0200 (CEST) Received: (from www@localhost) by webmail.leidinger.net (8.14.3/8.13.8/Submit) id o328NTTJ097447; Fri, 2 Apr 2010 10:23:29 +0200 (CEST) (envelope-from netchild@FreeBSD.org) Received: from pslux.cec.eu.int (pslux.cec.eu.int [158.169.9.14]) by webmail.leidinger.net (Horde Framework) with HTTP; Fri, 02 Apr 2010 10:23:29 +0200 Message-ID: <20100402102329.18472x2t5iwey7qc@webmail.leidinger.net> Date: Fri, 02 Apr 2010 10:23:29 +0200 From: Alexander Leidinger To: Nikolay Denev References: <201004020655.o326tWax079882@svn.freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Dynamic Internet Messaging Program (DIMP) H3 (1.1.4) X-EBL-MailScanner-Information: Please contact the ISP for more information X-EBL-MailScanner-ID: 15B428442CC.5A132 X-EBL-MailScanner: Found to be clean X-EBL-MailScanner-SpamCheck: not spam, spamhaus-ZEN, SpamAssassin (not cached, score=-1.363, required 6, autolearn=disabled, ALL_TRUSTED -1.44, TW_SV 0.08) X-EBL-MailScanner-From: netchild@freebsd.org X-EBL-MailScanner-Watermark: 1270801413.78583@8eLCW7O5TUj5x5le5I/1rg X-EBL-Spam-Status: No Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r206082 - in head: . share/man/man7 share/mk sys/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Apr 2010 08:23:38 -0000 Quoting Nikolay Denev (from Fri, 2 Apr 2010 10:52:08 +0300): >> Log: >> WITH_CTF can now be specified in src.conf (not recommended, there >> are some problems with static executables), make.conf (would also >> affect ports which do not use GNU make and do not override the >> compile targets) or in the kernel config (via "makeoptions >> WITH_CTF=yes"). > I hope that this can also be MFC-ed to 8-STABLE at least. Except for build.7 and UPDATING, I would expect that everything should just apply if you try it on 8-stable. Just go and try (and report back). Bye, Alexander. -- http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 Keep your boss's boss off your boss's back. From owner-svn-src-head@FreeBSD.ORG Fri Apr 2 09:56:23 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7A1ED106564A; Fri, 2 Apr 2010 09:56:23 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 53A6E8FC0C; Fri, 2 Apr 2010 09:56:23 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id 075A646B03; Fri, 2 Apr 2010 05:56:23 -0400 (EDT) Date: Fri, 2 Apr 2010 10:56:22 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Alexander Leidinger In-Reply-To: <201004020655.o326tWax079882@svn.freebsd.org> Message-ID: References: <201004020655.o326tWax079882@svn.freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) 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: r206082 - in head: . share/man/man7 share/mk sys/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Apr 2010 09:56:23 -0000 On Fri, 2 Apr 2010, Alexander Leidinger wrote: > WITH_CTF can now be specified in src.conf (not recommended, there > are some problems with static executables), make.conf (would also > affect ports which do not use GNU make and do not override the > compile targets) or in the kernel config (via "makeoptions > WITH_CTF=yes"). > > Additional (related) changes: > - propagate WITH_CTF to module builds > - do not add -g to the linker flags, it's a noop there anyway > (at least according to the man page of ld) > - do not add -g to CFLAGS unconditionally > we need to have a look if it is really needed (IMO not) or if there > is a way to add it only when WITH_CTF is used > > Note: ctfconvert / ctfmerge lines will not appear in the build output, > to protect the innocent (those which do not build with WITH_CTF would > see the shell-test and may think WITH_CTF is used). Excellent -- I'm really glad to see this getting sorted out at last. I think there's a reasonable argument that we should be compiling options KDTRACE_HOOKS into GENERIC, and likewise enabling CTF on the kernel by default in 9.x. Part of the point of DTrace is that it "just works", and we already compile CDDL modules by default (and the hooks don't affect the license of the base kernel as far as I'm aware). Any thoughts on this? Robert From owner-svn-src-head@FreeBSD.ORG Fri Apr 2 10:23:12 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6E84A106564A; Fri, 2 Apr 2010 10:23:12 +0000 (UTC) (envelope-from netchild@freebsd.org) Received: from mail.ebusiness-leidinger.de (mail.ebusiness-leidinger.de [217.11.53.44]) by mx1.freebsd.org (Postfix) with ESMTP id 127A18FC18; Fri, 2 Apr 2010 10:23:11 +0000 (UTC) Received: from outgoing.leidinger.net (pD9E2CC21.dip.t-dialin.net [217.226.204.33]) by mail.ebusiness-leidinger.de (Postfix) with ESMTPSA id 106008442CC; Fri, 2 Apr 2010 12:23:06 +0200 (CEST) Received: from webmail.leidinger.net (webmail.leidinger.net [192.168.1.102]) by outgoing.leidinger.net (Postfix) with ESMTP id A631F5043; Fri, 2 Apr 2010 12:23:02 +0200 (CEST) Received: (from www@localhost) by webmail.leidinger.net (8.14.3/8.13.8/Submit) id o32AN2eB026743; Fri, 2 Apr 2010 12:23:02 +0200 (CEST) (envelope-from netchild@FreeBSD.org) Received: from pslux.cec.eu.int (pslux.cec.eu.int [158.169.9.14]) by webmail.leidinger.net (Horde Framework) with HTTP; Fri, 02 Apr 2010 12:23:02 +0200 Message-ID: <20100402122302.48713ufeslsu6su8@webmail.leidinger.net> Date: Fri, 02 Apr 2010 12:23:02 +0200 From: Alexander Leidinger To: Robert Watson References: <201004020655.o326tWax079882@svn.freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Dynamic Internet Messaging Program (DIMP) H3 (1.1.4) X-EBL-MailScanner-Information: Please contact the ISP for more information X-EBL-MailScanner-ID: 106008442CC.7C645 X-EBL-MailScanner: Found to be clean X-EBL-MailScanner-SpamCheck: not spam, spamhaus-ZEN, SpamAssassin (not cached, score=-1.363, required 6, autolearn=disabled, ALL_TRUSTED -1.44, TW_SV 0.08) X-EBL-MailScanner-From: netchild@freebsd.org X-EBL-MailScanner-Watermark: 1270808587.13237@DowE8xAIp/qnQHuGQRykjw X-EBL-Spam-Status: No Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r206082 - in head: . share/man/man7 share/mk sys/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Apr 2010 10:23:12 -0000 Quoting Robert Watson (from Fri, 2 Apr 2010 10:56:22 +0100 (BST)): > > On Fri, 2 Apr 2010, Alexander Leidinger wrote: > >> WITH_CTF can now be specified in src.conf (not recommended, there >> are some problems with static executables), make.conf (would also >> affect ports which do not use GNU make and do not override the >> compile targets) or in the kernel config (via "makeoptions >> WITH_CTF=yes"). >> >> Additional (related) changes: >> - propagate WITH_CTF to module builds >> - do not add -g to the linker flags, it's a noop there anyway >> (at least according to the man page of ld) >> - do not add -g to CFLAGS unconditionally >> we need to have a look if it is really needed (IMO not) or if there >> is a way to add it only when WITH_CTF is used >> >> Note: ctfconvert / ctfmerge lines will not appear in the build output, >> to protect the innocent (those which do not build with WITH_CTF would >> see the shell-test and may think WITH_CTF is used). > > Excellent -- I'm really glad to see this getting sorted out at last. > > I think there's a reasonable argument that we should be compiling > options KDTRACE_HOOKS into GENERIC, and likewise enabling CTF on the > kernel by default in 9.x. Part of the point of DTrace is that it > "just works", and we already compile CDDL modules by default (and > the hooks don't affect the license of the base kernel as far as I'm > aware). Any thoughts on this? I'm in favour of this. You just need to commit 2 lines for GENERIC (and one for NOTES, I think)... Bye, Alexander. -- http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 BOFH excuse #36: dynamic software linking table corrupted From owner-svn-src-head@FreeBSD.ORG Fri Apr 2 10:36:40 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B48C106564A; Fri, 2 Apr 2010 10:36:40 +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 4A0868FC18; Fri, 2 Apr 2010 10:36:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o32Aae9T028434; Fri, 2 Apr 2010 10:36:40 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o32Aae4x028432; Fri, 2 Apr 2010 10:36:40 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201004021036.o32Aae4x028432@svn.freebsd.org> From: Marius Strobl Date: Fri, 2 Apr 2010 10:36:40 +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: r206086 - head/sys/sparc64/sparc64 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Apr 2010 10:36:40 -0000 Author: marius Date: Fri Apr 2 10:36:40 2010 New Revision: 206086 URL: http://svn.freebsd.org/changeset/base/206086 Log: - Try do deal gracefully with correctable ECC errors. - Improve the reporting of unhandled kernel and user traps. Modified: head/sys/sparc64/sparc64/trap.c Modified: head/sys/sparc64/sparc64/trap.c ============================================================================== --- head/sys/sparc64/sparc64/trap.c Fri Apr 2 08:57:39 2010 (r206085) +++ head/sys/sparc64/sparc64/trap.c Fri Apr 2 10:36:40 2010 (r206086) @@ -106,6 +106,7 @@ void trap(struct trapframe *tf); void syscall(struct trapframe *tf); static int fetch_syscall_args(struct thread *td, struct syscall_args *sa); +static int trap_cecc(void); static int trap_pfault(struct thread *td, struct trapframe *tf); extern char copy_fault[]; @@ -240,6 +241,10 @@ int debugger_on_signal = 0; SYSCTL_INT(_debug, OID_AUTO, debugger_on_signal, CTLFLAG_RW, &debugger_on_signal, 0, ""); +u_int corrected_ecc = 0; +SYSCTL_UINT(_machdep, OID_AUTO, corrected_ecc, CTLFLAG_RD, &corrected_ecc, 0, + "corrected ECC errors"); + /* * SUNW,set-trap-table allows to take over %tba from the PROM, which * will turn off interrupts and handle outstanding ones while doing so, @@ -308,10 +313,16 @@ trap(struct trapframe *tf) case T_SPILL: sig = rwindow_save(td); break; + case T_CORRECTED_ECC_ERROR: + sig = trap_cecc(); + break; default: - if (tf->tf_type < 0 || tf->tf_type >= T_MAX || - trap_sig[tf->tf_type] == -1) - panic("trap: bad trap type"); + if (tf->tf_type < 0 || tf->tf_type >= T_MAX) + panic("trap: bad trap type %#lx (user)", + tf->tf_type); + else if (trap_sig[tf->tf_type] == -1) + panic("trap: %s (user)", + trap_msg[tf->tf_type]); sig = trap_sig[tf->tf_type]; break; } @@ -400,18 +411,53 @@ trap(struct trapframe *tf) } error = 1; break; + case T_CORRECTED_ECC_ERROR: + error = trap_cecc(); + break; default: error = 1; break; } - if (error != 0) - panic("trap: %s", trap_msg[tf->tf_type & ~T_KERNEL]); + if (error != 0) { + tf->tf_type &= ~T_KERNEL; + if (tf->tf_type < 0 || tf->tf_type >= T_MAX) + panic("trap: bad trap type %#lx (kernel)", + tf->tf_type); + else if (trap_sig[tf->tf_type] == -1) + panic("trap: %s (kernel)", + trap_msg[tf->tf_type]); + } } CTR1(KTR_TRAP, "trap: td=%p return", td); } static int +trap_cecc(void) +{ + u_long eee; + + /* + * Turn off (non-)correctable error reporting while we're dealing + * with the error. + */ + eee = ldxa(0, ASI_ESTATE_ERROR_EN_REG); + stxa_sync(0, ASI_ESTATE_ERROR_EN_REG, eee & ~(AA_ESTATE_NCEEN | + AA_ESTATE_CEEN)); + /* Flush the caches in order ensure no corrupt data got installed. */ + cache_flush(); + /* Ensure the caches are still turned on (should be). */ + cache_enable(PCPU_GET(impl)); + /* Clear the the error from the AFSR. */ + stxa_sync(0, ASI_AFSR, ldxa(0, ASI_AFSR)); + corrected_ecc++; + printf("corrected ECC error\n"); + /* Turn (non-)correctable error reporting back on. */ + stxa_sync(0, ASI_ESTATE_ERROR_EN_REG, eee); + return (0); +} + +static int trap_pfault(struct thread *td, struct trapframe *tf) { struct vmspace *vm; @@ -664,7 +710,7 @@ syscall(struct trapframe *tf) */ WITNESS_WARN(WARN_PANIC, NULL, "System call %s returning", (sa.code >= 0 && sa.code < SYS_MAXSYSCALL) ? - syscallnames[sa.code] : "???"); + syscallnames[sa.code] : "???"); KASSERT(td->td_critnest == 0, ("System call %s returning in a critical section", (sa.code >= 0 && sa.code < SYS_MAXSYSCALL) ? From owner-svn-src-head@FreeBSD.ORG Fri Apr 2 11:05:59 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A543D106564A; Fri, 2 Apr 2010 11:05:59 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 949EB8FC1D; Fri, 2 Apr 2010 11:05:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o32B5xT7036800; Fri, 2 Apr 2010 11:05:59 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o32B5xcj036794; Fri, 2 Apr 2010 11:05:59 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201004021105.o32B5xcj036794@svn.freebsd.org> From: Ed Schouten Date: Fri, 2 Apr 2010 11:05: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: r206087 - head/usr.bin/getent X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Apr 2010 11:05:59 -0000 Author: ed Date: Fri Apr 2 11:05:59 2010 New Revision: 206087 URL: http://svn.freebsd.org/changeset/base/206087 Log: Change how getent utmpx works. - Always require active, log or lastlogin to be provided. - Allow the user to provide custom filenames. Modified: head/usr.bin/getent/getent.c Modified: head/usr.bin/getent/getent.c ============================================================================== --- head/usr.bin/getent/getent.c Fri Apr 2 10:36:40 2010 (r206086) +++ head/usr.bin/getent/getent.c Fri Apr 2 11:05:59 2010 (r206087) @@ -615,14 +615,13 @@ static int utmpx(int argc, char *argv[]) { const struct utmpx *ut; - int rv = RV_OK, db; + const char *file = NULL; + int rv = RV_OK, db = 0; assert(argc > 1); assert(argv != NULL); - if (argc == 2) { - db = UTXDB_ACTIVE; - } else if (argc == 3) { + if (argc == 3 || argc == 4) { if (strcmp(argv[2], "active") == 0) db = UTXDB_ACTIVE; else if (strcmp(argv[2], "lastlogin") == 0) @@ -631,15 +630,18 @@ utmpx(int argc, char *argv[]) db = UTXDB_LOG; else rv = RV_USAGE; + if (argc == 4) + file = argv[3]; } else { rv = RV_USAGE; } if (rv == RV_USAGE) { - fprintf(stderr, "Usage: %s utmpx [active | lastlogin | log]\n", + fprintf(stderr, + "Usage: %s utmpx active | lastlogin | log [filename]\n", getprogname()); } else if (rv == RV_OK) { - if (setutxdb(db, NULL) != 0) + if (setutxdb(db, file) != 0) return (RV_NOTFOUND); while ((ut = getutxent()) != NULL) utmpxprint(ut); From owner-svn-src-head@FreeBSD.ORG Fri Apr 2 11:13:12 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 34CDD1065673; Fri, 2 Apr 2010 11:13:12 +0000 (UTC) (envelope-from gallatin@cs.duke.edu) Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.1]) by mx1.freebsd.org (Postfix) with ESMTP id E86FC8FC08; Fri, 2 Apr 2010 11:13:11 +0000 (UTC) Received: from [172.31.193.10] (rrcs-98-101-145-84.midsouth.biz.rr.com [98.101.145.84]) (authenticated bits=0) by duke.cs.duke.edu (8.14.2/8.14.2) with ESMTP id o32BDA05019110 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 2 Apr 2010 07:13:10 -0400 (EDT) X-DKIM: Sendmail DKIM Filter v2.8.3 duke.cs.duke.edu o32BDA05019110 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=cs.duke.edu; s=mail; t=1270206791; bh=DGdYUvnKTJkzwF58dekUglT6oPjVraEel7+7CPSWkWw=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=eRCMYoiS988Wjwc3AO7ZpvElHrpkdeFks35VNo1wyE7dMh2bvaAQQuutKnDU3/bV2 KDwL2zjGRv75sRwEEy+MxDhxWC0wXIO6cK49jUliZlT3CViIWIYga9xVnTmJRhtcev lZ5PE4LaMuidQv6/TQID5aGEHXkJ2R0uLv6xj7CY= Message-ID: <4BB5D140.5070208@cs.duke.edu> Date: Fri, 02 Apr 2010 07:13:04 -0400 From: Andrew Gallatin User-Agent: Thunderbird 2.0.0.23 (X11/20090817) MIME-Version: 1.0 To: Robert Watson References: <201004020655.o326tWax079882@svn.freebsd.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Alexander Leidinger Subject: Re: svn commit: r206082 - in head: . share/man/man7 share/mk sys/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Apr 2010 11:13:12 -0000 Robert Watson wrote: > I think there's a reasonable argument that we should be compiling > options KDTRACE_HOOKS into GENERIC, and likewise enabling CTF on the > kernel by default in 9.x. Part of the point of DTrace is that it "just > works", and we already compile CDDL modules by default (and the hooks > don't affect the license of the base kernel as far as I'm aware). Any > thoughts on this? I vaguely remember that there were some problems where CTF was incompatible with debugging, and dumps from CTF enabled kernels were unhelpful. Was this true, and (more importantly), has it been fixed? Drew From owner-svn-src-head@FreeBSD.ORG Fri Apr 2 13:19:45 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A4391106566B; Fri, 2 Apr 2010 13:19:45 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 7BE718FC0A; Fri, 2 Apr 2010 13:19:45 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id E2BC646B23; Fri, 2 Apr 2010 09:19:44 -0400 (EDT) Date: Fri, 2 Apr 2010 14:19:44 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Andrew Gallatin In-Reply-To: <4BB5D140.5070208@cs.duke.edu> Message-ID: References: <201004020655.o326tWax079882@svn.freebsd.org> <4BB5D140.5070208@cs.duke.edu> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) 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, Alexander Leidinger Subject: Re: svn commit: r206082 - in head: . share/man/man7 share/mk sys/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Apr 2010 13:19:45 -0000 On Fri, 2 Apr 2010, Andrew Gallatin wrote: > Robert Watson wrote: > >> I think there's a reasonable argument that we should be compiling options >> KDTRACE_HOOKS into GENERIC, and likewise enabling CTF on the kernel by >> default in 9.x. Part of the point of DTrace is that it "just works", and >> we already compile CDDL modules by default (and the hooks don't affect the >> license of the base kernel as far as I'm aware). Any thoughts on this? > > I vaguely remember that there were some problems where CTF was incompatible > with debugging, and dumps from CTF enabled kernels were unhelpful. Was this > true, and (more importantly), has it been fixed? Hmm. I'll investigate that this weekend, I also have recollections of some issues here, but haven't been running into them myself so perhaps they were fixed. Robert From owner-svn-src-head@FreeBSD.ORG Fri Apr 2 13:23:50 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 09412106566B; Fri, 2 Apr 2010 13:23:50 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E98AC8FC17; Fri, 2 Apr 2010 13:23:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o32DNnnT066951; Fri, 2 Apr 2010 13:23:49 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o32DNnMY066946; Fri, 2 Apr 2010 13:23:49 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <201004021323.o32DNnMY066946@svn.freebsd.org> From: Fabien Thomas Date: Fri, 2 Apr 2010 13:23: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: r206089 - in head: lib/libpmc sys/amd64/include sys/conf sys/dev/hwpmc sys/i386/include sys/modules/hwpmc sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Apr 2010 13:23:50 -0000 Author: fabient Date: Fri Apr 2 13:23:49 2010 New Revision: 206089 URL: http://svn.freebsd.org/changeset/base/206089 Log: - Support for uncore counting events: one fixed PMC with the uncore domain clock, 8 programmable PMC. - Westmere based CPU (Xeon 5600, Corei7 980X) support. - New man pages with events list for core and uncore. - Updated Corei7 events with Intel 253669-033US December 2009 doc. There is some removed events in the documentation, they have been kept in the code but documented in the man page as obsolete. - Offcore response events can be setup with rsp token. Sponsored by: NETASQ Added: head/lib/libpmc/pmc.corei7.3 (contents, props changed) head/lib/libpmc/pmc.corei7uc.3 (contents, props changed) head/lib/libpmc/pmc.ucf.3 (contents, props changed) head/lib/libpmc/pmc.westmere.3 (contents, props changed) head/lib/libpmc/pmc.westmereuc.3 (contents, props changed) head/sys/dev/hwpmc/hwpmc_uncore.c (contents, props changed) head/sys/dev/hwpmc/hwpmc_uncore.h (contents, props changed) Modified: head/lib/libpmc/Makefile head/lib/libpmc/libpmc.c head/sys/amd64/include/pmc_mdep.h head/sys/conf/files.amd64 head/sys/conf/files.i386 head/sys/conf/files.pc98 head/sys/dev/hwpmc/hwpmc_core.c head/sys/dev/hwpmc/hwpmc_core.h head/sys/dev/hwpmc/hwpmc_intel.c head/sys/dev/hwpmc/pmc_events.h head/sys/i386/include/pmc_mdep.h head/sys/modules/hwpmc/Makefile head/sys/sys/pmc.h Modified: head/lib/libpmc/Makefile ============================================================================== --- head/lib/libpmc/Makefile Fri Apr 2 11:07:55 2010 (r206088) +++ head/lib/libpmc/Makefile Fri Apr 2 13:23:49 2010 (r206089) @@ -27,11 +27,16 @@ MAN+= pmc.atom.3 MAN+= pmc.core.3 MAN+= pmc.core2.3 MAN+= pmc.iaf.3 +MAN+= pmc.ucf.3 MAN+= pmc.k7.3 MAN+= pmc.k8.3 MAN+= pmc.p4.3 MAN+= pmc.p5.3 MAN+= pmc.p6.3 +MAN+= pmc.corei7.3 +MAN+= pmc.corei7uc.3 +MAN+= pmc.westmere.3 +MAN+= pmc.westmereuc.3 MAN+= pmc.tsc.3 .elif ${MACHINE_ARCH} == "arm" && ${CPUTYPE} == "xscale" MAN+= pmc.xscale.3 Modified: head/lib/libpmc/libpmc.c ============================================================================== --- head/lib/libpmc/libpmc.c Fri Apr 2 11:07:55 2010 (r206088) +++ head/lib/libpmc/libpmc.c Fri Apr 2 13:23:49 2010 (r206089) @@ -54,6 +54,10 @@ static int iaf_allocate_pmc(enum pmc_eve struct pmc_op_pmcallocate *_pmc_config); static int iap_allocate_pmc(enum pmc_event _pe, char *_ctrspec, struct pmc_op_pmcallocate *_pmc_config); +static int ucf_allocate_pmc(enum pmc_event _pe, char *_ctrspec, + struct pmc_op_pmcallocate *_pmc_config); +static int ucp_allocate_pmc(enum pmc_event _pe, char *_ctrspec, + struct pmc_op_pmcallocate *_pmc_config); static int k8_allocate_pmc(enum pmc_event _pe, char *_ctrspec, struct pmc_op_pmcallocate *_pmc_config); static int p4_allocate_pmc(enum pmc_event _pe, char *_ctrspec, @@ -144,6 +148,7 @@ PMC_CLASSDEP_TABLE(p5, P5); PMC_CLASSDEP_TABLE(p6, P6); PMC_CLASSDEP_TABLE(xscale, XSCALE); PMC_CLASSDEP_TABLE(mips24k, MIPS24K); +PMC_CLASSDEP_TABLE(ucf, UCF); #undef __PMC_EV_ALIAS #define __PMC_EV_ALIAS(N,CODE) { N, PMC_EV_##CODE }, @@ -169,6 +174,21 @@ static const struct pmc_event_descr core __PMC_EV_ALIAS_COREI7() }; +static const struct pmc_event_descr westmere_event_table[] = +{ + __PMC_EV_ALIAS_WESTMERE() +}; + +static const struct pmc_event_descr corei7uc_event_table[] = +{ + __PMC_EV_ALIAS_COREI7UC() +}; + +static const struct pmc_event_descr westmereuc_event_table[] = +{ + __PMC_EV_ALIAS_WESTMEREUC() +}; + /* * PMC_MDEP_TABLE(NAME, PRIMARYCLASS, ADDITIONAL_CLASSES...) * @@ -182,7 +202,8 @@ static const struct pmc_event_descr core PMC_MDEP_TABLE(atom, IAP, PMC_CLASS_IAF, PMC_CLASS_TSC); PMC_MDEP_TABLE(core, IAP, PMC_CLASS_TSC); PMC_MDEP_TABLE(core2, IAP, PMC_CLASS_IAF, PMC_CLASS_TSC); -PMC_MDEP_TABLE(corei7, IAP, PMC_CLASS_IAF, PMC_CLASS_TSC); +PMC_MDEP_TABLE(corei7, IAP, PMC_CLASS_IAF, PMC_CLASS_TSC, PMC_CLASS_UCF, PMC_CLASS_UCP); +PMC_MDEP_TABLE(westmere, IAP, PMC_CLASS_IAF, PMC_CLASS_TSC, PMC_CLASS_UCF, PMC_CLASS_UCP); PMC_MDEP_TABLE(k7, K7, PMC_CLASS_TSC); PMC_MDEP_TABLE(k8, K8, PMC_CLASS_TSC); PMC_MDEP_TABLE(p4, P4, PMC_CLASS_TSC); @@ -215,6 +236,10 @@ PMC_CLASS_TABLE_DESC(atom, IAP, atom, ia PMC_CLASS_TABLE_DESC(core, IAP, core, iap); PMC_CLASS_TABLE_DESC(core2, IAP, core2, iap); PMC_CLASS_TABLE_DESC(corei7, IAP, corei7, iap); +PMC_CLASS_TABLE_DESC(westmere, IAP, westmere, iap); +PMC_CLASS_TABLE_DESC(ucf, UCF, ucf, ucf); +PMC_CLASS_TABLE_DESC(corei7uc, UCP, corei7uc, ucp); +PMC_CLASS_TABLE_DESC(westmereuc, UCP, westmereuc, ucp); #endif #if defined(__i386__) PMC_CLASS_TABLE_DESC(k7, K7, k7, k7); @@ -302,7 +327,7 @@ struct pmc_masks { const uint32_t pm_value; }; #define PMCMASK(N,V) { .pm_name = #N, .pm_value = (V) } -#define NULLMASK PMCMASK(NULL,0) +#define NULLMASK { .pm_name = NULL } #if defined(__amd64__) || defined(__i386__) static int @@ -495,6 +520,8 @@ static struct pmc_event_alias core2_alia #define atom_aliases_without_iaf core2_aliases_without_iaf #define corei7_aliases core2_aliases #define corei7_aliases_without_iaf core2_aliases_without_iaf +#define westmere_aliases core2_aliases +#define westmere_aliases_without_iaf core2_aliases_without_iaf #define IAF_KW_OS "os" #define IAF_KW_USR "usr" @@ -545,6 +572,7 @@ iaf_allocate_pmc(enum pmc_event pe, char #define IAP_KW_SNOOPTYPE "snooptype" #define IAP_KW_TRANSITION "trans" #define IAP_KW_USR "usr" +#define IAP_KW_RSP "rsp" static struct pmc_masks iap_core_mask[] = { PMCMASK(all, (0x3 << 14)), @@ -592,19 +620,38 @@ static struct pmc_masks iap_transition_m NULLMASK }; +static struct pmc_masks iap_rsp_mask[] = { + PMCMASK(DMND_DATA_RD, (1 << 0)), + PMCMASK(DMND_RFO, (1 << 1)), + PMCMASK(DMND_IFETCH, (1 << 2)), + PMCMASK(WB, (1 << 3)), + PMCMASK(PF_DATA_RD, (1 << 4)), + PMCMASK(PF_RFO, (1 << 5)), + PMCMASK(PF_IFETCH, (1 << 6)), + PMCMASK(OTHER, (1 << 7)), + PMCMASK(UNCORE_HIT, (1 << 8)), + PMCMASK(OTHER_CORE_HIT_SNP, (1 << 9)), + PMCMASK(OTHER_CORE_HITM, (1 << 10)), + PMCMASK(REMOTE_CACHE_FWD, (1 << 12)), + PMCMASK(REMOTE_DRAM, (1 << 13)), + PMCMASK(LOCAL_DRAM, (1 << 14)), + PMCMASK(NON_DRAM, (1 << 15)), + NULLMASK +}; + static int iap_allocate_pmc(enum pmc_event pe, char *ctrspec, struct pmc_op_pmcallocate *pmc_config) { char *e, *p, *q; - uint32_t cachestate, evmask; + uint32_t cachestate, evmask, rsp; int count, n; pmc_config->pm_caps |= (PMC_CAP_READ | PMC_CAP_WRITE | PMC_CAP_QUALIFIER); pmc_config->pm_md.pm_iap.pm_iap_config = 0; - cachestate = evmask = 0; + cachestate = evmask = rsp = 0; /* Parse additional modifiers if present */ while ((p = strsep(&ctrspec, ",")) != NULL) { @@ -651,8 +698,7 @@ iap_allocate_pmc(enum pmc_event pe, char return (-1); } else if (cpu_info.pm_cputype == PMC_CPU_INTEL_ATOM || cpu_info.pm_cputype == PMC_CPU_INTEL_CORE2 || - cpu_info.pm_cputype == PMC_CPU_INTEL_CORE2EXTREME || - cpu_info.pm_cputype == PMC_CPU_INTEL_COREI7) { + cpu_info.pm_cputype == PMC_CPU_INTEL_CORE2EXTREME) { if (KWPREFIXMATCH(p, IAP_KW_SNOOPRESPONSE "=")) { n = pmc_parse_mask(iap_snoopresponse_mask, p, &evmask); @@ -661,6 +707,12 @@ iap_allocate_pmc(enum pmc_event pe, char &evmask); } else return (-1); + } else if (cpu_info.pm_cputype == PMC_CPU_INTEL_COREI7 || + cpu_info.pm_cputype == PMC_CPU_INTEL_WESTMERE) { + if (KWPREFIXMATCH(p, IAP_KW_RSP "=")) { + n = pmc_parse_mask(iap_rsp_mask, p, &rsp); + } else + return (-1); } else return (-1); @@ -693,6 +745,69 @@ iap_allocate_pmc(enum pmc_event pe, char } pmc_config->pm_md.pm_iap.pm_iap_config |= cachestate; + pmc_config->pm_md.pm_iap.pm_iap_rsp = rsp; + + return (0); +} + +/* + * Intel Uncore. + */ + +static int +ucf_allocate_pmc(enum pmc_event pe, char *ctrspec, + struct pmc_op_pmcallocate *pmc_config) +{ + (void) pe; + (void) ctrspec; + + pmc_config->pm_caps |= (PMC_CAP_READ | PMC_CAP_WRITE); + pmc_config->pm_md.pm_ucf.pm_ucf_flags = 0; + + return (0); +} + +#define UCP_KW_CMASK "cmask" +#define UCP_KW_EDGE "edge" +#define UCP_KW_INV "inv" + +static int +ucp_allocate_pmc(enum pmc_event pe, char *ctrspec, + struct pmc_op_pmcallocate *pmc_config) +{ + char *e, *p, *q; + int count, n; + + (void) pe; + + pmc_config->pm_caps |= (PMC_CAP_READ | PMC_CAP_WRITE | + PMC_CAP_QUALIFIER); + pmc_config->pm_md.pm_ucp.pm_ucp_config = 0; + + /* Parse additional modifiers if present */ + while ((p = strsep(&ctrspec, ",")) != NULL) { + + n = 0; + if (KWPREFIXMATCH(p, UCP_KW_CMASK "=")) { + q = strchr(p, '='); + if (*++q == '\0') /* skip '=' */ + return (-1); + count = strtol(q, &e, 0); + if (e == q || *e != '\0') + return (-1); + pmc_config->pm_caps |= PMC_CAP_THRESHOLD; + pmc_config->pm_md.pm_ucp.pm_ucp_config |= + UCP_CMASK(count); + } else if (KWMATCH(p, UCP_KW_EDGE)) { + pmc_config->pm_caps |= PMC_CAP_EDGE; + } else if (KWMATCH(p, UCP_KW_INV)) { + pmc_config->pm_caps |= PMC_CAP_INVERT; + } else + return (-1); + + if (n < 0) /* Parsing failed. */ + return (-1); + } return (0); } @@ -2392,6 +2507,31 @@ pmc_event_names_of_class(enum pmc_class ev = corei7_event_table; count = PMC_EVENT_TABLE_SIZE(corei7); break; + case PMC_CPU_INTEL_WESTMERE: + ev = westmere_event_table; + count = PMC_EVENT_TABLE_SIZE(westmere); + break; + } + break; + case PMC_CLASS_UCF: + ev = ucf_event_table; + count = PMC_EVENT_TABLE_SIZE(ucf); + break; + case PMC_CLASS_UCP: + /* + * Return the most appropriate set of event name + * spellings for the current CPU. + */ + switch (cpu_info.pm_cputype) { + default: + case PMC_CPU_INTEL_COREI7: + ev = corei7uc_event_table; + count = PMC_EVENT_TABLE_SIZE(corei7uc); + break; + case PMC_CPU_INTEL_WESTMERE: + ev = westmereuc_event_table; + count = PMC_EVENT_TABLE_SIZE(westmereuc); + break; } break; case PMC_CLASS_TSC: @@ -2605,8 +2745,15 @@ pmc_init(void) PMC_MDEP_INIT_INTEL_V2(core2); break; case PMC_CPU_INTEL_COREI7: + pmc_class_table[n++] = &ucf_class_table_descr; + pmc_class_table[n++] = &corei7uc_class_table_descr; PMC_MDEP_INIT_INTEL_V2(corei7); break; + case PMC_CPU_INTEL_WESTMERE: + pmc_class_table[n++] = &ucf_class_table_descr; + pmc_class_table[n++] = &westmereuc_class_table_descr; + PMC_MDEP_INIT_INTEL_V2(westmere); + break; case PMC_CPU_INTEL_PIV: PMC_MDEP_INIT(p4); pmc_class_table[n] = &p4_class_table_descr; @@ -2719,10 +2866,30 @@ _pmc_name_of_event(enum pmc_event pe, en ev = corei7_event_table; evfence = corei7_event_table + PMC_EVENT_TABLE_SIZE(corei7); break; + case PMC_CPU_INTEL_WESTMERE: + ev = westmere_event_table; + evfence = westmere_event_table + PMC_EVENT_TABLE_SIZE(westmere); + break; + default: /* Unknown CPU type. */ + break; + } + } else if (pe >= PMC_EV_UCF_FIRST && pe <= PMC_EV_UCF_LAST) { + ev = ucf_event_table; + evfence = ucf_event_table + PMC_EVENT_TABLE_SIZE(ucf); + } else if (pe >= PMC_EV_UCP_FIRST && pe <= PMC_EV_UCP_LAST) { + switch (cpu) { + case PMC_CPU_INTEL_COREI7: + ev = corei7uc_event_table; + evfence = corei7uc_event_table + PMC_EVENT_TABLE_SIZE(corei7uc); + break; + case PMC_CPU_INTEL_WESTMERE: + ev = westmereuc_event_table; + evfence = westmereuc_event_table + PMC_EVENT_TABLE_SIZE(westmereuc); + break; default: /* Unknown CPU type. */ break; } - } if (pe >= PMC_EV_K7_FIRST && pe <= PMC_EV_K7_LAST) { + } else if (pe >= PMC_EV_K7_FIRST && pe <= PMC_EV_K7_LAST) { ev = k7_event_table; evfence = k7_event_table + PMC_EVENT_TABLE_SIZE(k7); } else if (pe >= PMC_EV_K8_FIRST && pe <= PMC_EV_K8_LAST) { Added: head/lib/libpmc/pmc.corei7.3 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libpmc/pmc.corei7.3 Fri Apr 2 13:23:49 2010 (r206089) @@ -0,0 +1,1581 @@ +.\" Copyright (c) 2010 Fabien Thomas. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" This software is provided by Joseph Koshy ``as is'' and +.\" any express or implied warranties, including, but not limited to, the +.\" implied warranties of merchantability and fitness for a particular purpose +.\" are disclaimed. in no event shall Joseph Koshy be liable +.\" for any direct, indirect, incidental, special, exemplary, or consequential +.\" damages (including, but not limited to, procurement of substitute goods +.\" or services; loss of use, data, or profits; or business interruption) +.\" however caused and on any theory of liability, whether in contract, strict +.\" liability, or tort (including negligence or otherwise) arising in any way +.\" out of the use of this software, even if advised of the possibility of +.\" such damage. +.\" +.\" $FreeBSD$ +.\" +.Dd March 24, 2010 +.Os +.Dt PMC.COREI7 3 +.Sh NAME +.Nm pmc.corei7 +.Nd measurement events for +.Tn Intel +.Tn Core i7 and Xeon 5500 +family CPUs +.Sh LIBRARY +.Lb libpmc +.Sh SYNOPSIS +.In pmc.h +.Sh DESCRIPTION +.Tn Intel +.Tn "Core i7" +CPUs contain PMCs conforming to version 2 of the +.Tn Intel +performance measurement architecture. +These CPUs may contain up to three classes of PMCs: +.Bl -tag -width "Li PMC_CLASS_IAP" +.It Li PMC_CLASS_IAF +Fixed-function counters that count only one hardware event per counter. +.It Li PMC_CLASS_IAP +Programmable counters that may be configured to count one of a defined +set of hardware events. +.El +.Pp +The number of PMCs available in each class and their widths need to be +determined at run time by calling +.Xr pmc_cpuinfo 3 . +.Pp +Intel Core i7 and Xeon 5500 PMCs are documented in +.Rs +.%B "Intel(R) 64 and IA-32 Architectures Software Developes Manual" +.%T "Volume 3B: System Programming Guide, Part 2" +.%N "Order Number: 253669-033US" +.%D December 2009 +.%Q "Intel Corporation" +.Re +.Ss COREI7 AND XEON 5500 FIXED FUNCTION PMCS +These PMCs and their supported events are documented in +.Xr pmc.iaf 3 . +Not all CPUs in this family implement fixed-function counters. +.Ss COREI7 AND XEON 5500 PROGRAMMABLE PMCS +The programmable PMCs support the following capabilities: +.Bl -column "PMC_CAP_INTERRUPT" "Support" +.It Em Capability Ta Em Support +.It PMC_CAP_CASCADE Ta \&No +.It PMC_CAP_EDGE Ta Yes +.It PMC_CAP_INTERRUPT Ta Yes +.It PMC_CAP_INVERT Ta Yes +.It PMC_CAP_READ Ta Yes +.It PMC_CAP_PRECISE Ta \&No +.It PMC_CAP_SYSTEM Ta Yes +.It PMC_CAP_TAGGING Ta \&No +.It PMC_CAP_THRESHOLD Ta Yes +.It PMC_CAP_USER Ta Yes +.It PMC_CAP_WRITE Ta Yes +.El +.Ss Event Qualifiers +Event specifiers for these PMCs support the following common +qualifiers: +.Bl -tag -width indent +.It Li rsp= Ns Ar value +Configure the Off-core Response bits. +.Bl -tag -width indent +.It Li DMND_DATA_RD +Counts the number of demand and DCU prefetch data reads of full +and partial cachelines as well as demand data page table entry +cacheline reads. Does not count L2 data read prefetches or +instruction fetches. +.It Li DMND_RFO +Counts the number of demand and DCU prefetch reads for ownership +(RFO) requests generated by a write to data cacheline. Does not +count L2 RFO. +.It Li DMND_IFETCH +Counts the number of demand and DCU prefetch instruction cacheline +reads. Does not count L2 code read prefetches. +WB +Counts the number of writeback (modified to exclusive) transactions. +.It Li PF_DATA_RD +Counts the number of data cacheline reads generated by L2 prefetchers. +.It Li PF_RFO +Counts the number of RFO requests generated by L2 prefetchers. +.It Li PF_IFETCH +Counts the number of code reads generated by L2 prefetchers. +.It Li OTHER +Counts one of the following transaction types, including L3 invalidate, +I/O, full or partial writes, WC or non-temporal stores, CLFLUSH, Fences, +lock, unlock, split lock. +.It Li UNCORE_HIT +L3 Hit: local or remote home requests that hit L3 cache in the uncore +with no coherency actions required (snooping). +.It Li OTHER_CORE_HIT_SNP +L3 Hit: local or remote home requests that hit L3 cache in the uncore +and was serviced by another core with a cross core snoop where no modified +copies were found (clean). +.It Li OTHER_CORE_HITM +L3 Hit: local or remote home requests that hit L3 cache in the uncore +and was serviced by another core with a cross core snoop where modified +copies were found (HITM). +.It Li REMOTE_CACHE_FWD +L3 Miss: local homed requests that missed the L3 cache and was serviced +by forwarded data following a cross package snoop where no modified +copies found. (Remote home requests are not counted) +.It Li REMOTE_DRAM +L3 Miss: remote home requests that missed the L3 cache and were serviced +by remote DRAM. +.It Li LOCAL_DRAM +L3 Miss: local home requests that missed the L3 cache and were serviced +by local DRAM. +.It Li NON_DRAM +Non-DRAM requests that were serviced by IOH. +.El +.It Li cmask= Ns Ar value +Configure the PMC to increment only if the number of configured +events measured in a cycle is greater than or equal to +.Ar value . +.It Li edge +Configure the PMC to count the number of de-asserted to asserted +transitions of the conditions expressed by the other qualifiers. +If specified, the counter will increment only once whenever a +condition becomes true, irrespective of the number of clocks during +which the condition remains true. +.It Li inv +Invert the sense of comparison when the +.Dq Li cmask +qualifier is present, making the counter increment when the number of +events per cycle is less than the value specified by the +.Dq Li cmask +qualifier. +.It Li os +Configure the PMC to count events happening at processor privilege +level 0. +.It Li usr +Configure the PMC to count events occurring at privilege levels 1, 2 +or 3. +.El +.Pp +If neither of the +.Dq Li os +or +.Dq Li usr +qualifiers are specified, the default is to enable both. +.Ss Event Specifiers (Programmable PMCs) +Core i7 and Xeon 5500 programmable PMCs support the following events: +.Bl -tag -width indent +.It Li SB_DRAIN.ANY +.Pq Event 04H , Umask 07H +Counts the number of store buffer drains. +.It Li STORE_BLOCKS.AT_RET +.Pq Event 06H , Umask 04H +Counts number of loads delayed with at-Retirement block code. The following +loads need to be executed at retirement and wait for all senior stores on +the same thread to be drained: load splitting across 4K boundary (page +split), load accessing uncacheable (UC or USWC) memory, load lock, and load +with page table in UC or USWC memory region. +.It Li STORE_BLOCKS.L1D_BLOCK +.Pq Event 06H , Umask 08H +Cacheable loads delayed with L1D block code +.It Li PARTIAL_ADDRESS_ALIAS +.Pq Event 07H , Umask 01H +Counts false dependency due to partial address aliasing +.It Li DTLB_LOAD_MISSES.ANY +.Pq Event 08H , Umask 01H +Counts all load misses that cause a page walk +.It Li DTLB_LOAD_MISSES.WALK_COMPLETED +.Pq Event 08H , Umask 02H +Counts number of completed page walks due to load miss in the STLB. +.It Li DTLB_LOAD_MISSES.STLB_HIT +.Pq Event 08H , Umask 10H +Number of cache load STLB hits +.It Li DTLB_LOAD_MISSES.PDE_MISS +.Pq Event 08H , Umask 20H +Number of DTLB cache load misses where the low part of the linear to +physical address translation was missed. +.It Li DTLB_LOAD_MISSES.PDP_MISS +.Pq Event 08H , Umask 40H +Number of DTLB cache load misses where the high part of the linear to +physical address translation was missed. +.It Li DTLB_LOAD_MISSES.LARGE_WALK_COMPLETED +.Pq Event 08H , Umask 80H +Counts number of completed large page walks due to load miss in the STLB. +.It Li MEM_INST_RETIRED.LOADS +.Pq Event 0BH , Umask 01H +Counts the number of instructions with an architecturally-visible store +retired on the architected path. +In conjunction with ld_lat facility +.It Li MEM_INST_RETIRED.STORES +.Pq Event 0BH , Umask 02H +Counts the number of instructions with an architecturally-visible store +retired on the architected path. +In conjunction with ld_lat facility +.It Li MEM_INST_RETIRED.LATENCY_ABOVE_THRESHOLD +.Pq Event 0BH , Umask 10H +Counts the number of instructions exceeding the latency specified with +ld_lat facility. +In conjunction with ld_lat facility +.It Li MEM_STORE_RETIRED.DTLB_MISS +.Pq Event 0CH , Umask 01H +The event counts the number of retired stores that missed the DTLB. The DTLB +miss is not counted if the store operation causes a fault. Does not counter +prefetches. Counts both primary and secondary misses to the TLB +.It Li UOPS_ISSUED.ANY +.Pq Event 0EH , Umask 01H +Counts the number of Uops issued by the Register Allocation Table to the +Reservation Station, i.e. the UOPs issued from the front end to the back +end. +.It Li UOPS_ISSUED.STALLED_CYCLES +.Pq Event 0EH , Umask 01H +Counts the number of cycles no Uops issued by the Register Allocation Table +to the Reservation Station, i.e. the UOPs issued from the front end to the +back end. +set invert=1, cmask = 1 +.It Li UOPS_ISSUED.FUSED +.Pq Event 0EH , Umask 02H +Counts the number of fused Uops that were issued from the Register +Allocation Table to the Reservation Station. +.It Li MEM_UNCORE_RETIRED.L3_DATA_MISS_UNKNOWN +.Pq Event 0FH , Umask 01H +Counts number of memory load instructions retired where the memory reference +missed L3 and data source is unknown. +Available only for CPUID signature 06_2EH +.It Li MEM_UNCORE_RETIRED.OTHER_CORE_L2_HITM +.Pq Event 0FH , Umask 02H +Counts number of memory load instructions retired where the memory reference +hit modified data in a sibling core residing on the same socket. +.It Li MEM_UNCORE_RETIRED.REMOTE_CACHE_LOCAL_HOME_HIT +.Pq Event 0FH , Umask 08H +Counts number of memory load instructions retired where the memory reference +missed the L1, L2 and L3 caches and HIT in a remote socket's cache. Only +counts locally homed lines. +.It Li MEM_UNCORE_RETIRED.REMOTE_DRAM +.Pq Event 0FH , Umask 10H +Counts number of memory load instructions retired where the memory reference +missed the L1, L2 and L3 caches and was remotely homed. This includes both +DRAM access and HITM in a remote socket's cache for remotely homed lines. +.It Li MEM_UNCORE_RETIRED.LOCAL_DRAM +.Pq Event 0FH , Umask 20H +Counts number of memory load instructions retired where the memory reference +missed the L1, L2 and L3 caches and required a local socket memory +reference. This includes locally homed cachelines that were in a modified +state in another socket. +.It Li MEM_UNCORE_RETIRED.UNCACHEABLE +.Pq Event 0FH , Umask 80H +Counts number of memory load instructions retired where the memory reference +missed the L1, L2 and L3 caches and to perform I/O. +Available only for CPUID signature 06_2EH +.It Li FP_COMP_OPS_EXE.X87 +.Pq Event 10H , Umask 01H +Counts the number of FP Computational Uops Executed. The number of FADD, +FSUB, FCOM, FMULs, integer MULsand IMULs, FDIVs, FPREMs, FSQRTS, integer +DIVs, and IDIVs. This event does not distinguish an FADD used in the middle +of a transcendental flow from a separate FADD instruction. +.It Li FP_COMP_OPS_EXE.MMX +.Pq Event 10H , Umask 02H +Counts number of MMX Uops executed. +.It Li FP_COMP_OPS_EXE.SSE_FP +.Pq Event 10H , Umask 04H +Counts number of SSE and SSE2 FP uops executed. +.It Li FP_COMP_OPS_EXE.SSE2_INTEGER +.Pq Event 10H , Umask 08H +Counts number of SSE2 integer uops executed. +.It Li FP_COMP_OPS_EXE.SSE_FP_PACKED +.Pq Event 10H , Umask 10H +Counts number of SSE FP packed uops executed. +.It Li FP_COMP_OPS_EXE.SSE_FP_SCALAR +.Pq Event 10H , Umask 20H +Counts number of SSE FP scalar uops executed. +.It Li FP_COMP_OPS_EXE.SSE_SINGLE_PRECISION +.Pq Event 10H , Umask 40H +Counts number of SSE* FP single precision uops executed. +.It Li FP_COMP_OPS_EXE.SSE_DOUBLE_PRECISION +.Pq Event 10H , Umask 80H +Counts number of SSE* FP double precision uops executed. +.It Li SIMD_INT_128.PACKED_MPY +.Pq Event 12H , Umask 01H +Counts number of 128 bit SIMD integer multiply operations. +.It Li SIMD_INT_128.PACKED_SHIFT +.Pq Event 12H , Umask 02H +Counts number of 128 bit SIMD integer shift operations. +.It Li SIMD_INT_128.PACK +.Pq Event 12H , Umask 04H +Counts number of 128 bit SIMD integer pack operations. +.It Li SIMD_INT_128.UNPACK +.Pq Event 12H , Umask 08H +Counts number of 128 bit SIMD integer unpack operations. +.It Li SIMD_INT_128.PACKED_LOGICAL +.Pq Event 12H , Umask 10H +Counts number of 128 bit SIMD integer logical operations. +.It Li SIMD_INT_128.PACKED_ARITH +.Pq Event 12H , Umask 20H +Counts number of 128 bit SIMD integer arithmetic operations. +.It Li SIMD_INT_128.SHUFFLE_MOVE +.Pq Event 12H , Umask 40H +Counts number of 128 bit SIMD integer shuffle and move operations. +.It Li LOAD_DISPATCH.RS +.Pq Event 13H , Umask 01H +Counts number of loads dispatched from the Reservation Station that bypass +the Memory Order Buffer. +.It Li LOAD_DISPATCH.RS_DELAYED +.Pq Event 13H , Umask 02H +Counts the number of delayed RS dispatches at the stage latch. If an RS +dispatch can not bypass to LB, it has another chance to dispatch from the +one-cycle delayed staging latch before it is written into the LB. +.It Li LOAD_DISPATCH.MOB +.Pq Event 13H , Umask 04H +Counts the number of loads dispatched from the Reservation Station to the +Memory Order Buffer. +.It Li LOAD_DISPATCH.ANY +.Pq Event 13H , Umask 07H +Counts all loads dispatched from the Reservation Station. +.It Li ARITH.CYCLES_DIV_BUSY +.Pq Event 14H , Umask 01H +Counts the number of cycles the divider is busy executing divide or square +root operations. The divide can be integer, X87 or Streaming SIMD Extensions +(SSE). The square root operation can be either X87 or SSE. +Set 'edge =1, invert=1, cmask=1' to count the number of divides. +Count may be incorrect When SMT is on. +.It Li ARITH.MUL +.Pq Event 14H , Umask 02H +Counts the number of multiply operations executed. This includes integer as +well as floating point multiply operations but excludes DPPS mul and MPSAD. +Count may be incorrect When SMT is on +.It Li INST_QUEUE_WRITES +.Pq Event 17H , Umask 01H +Counts the number of instructions written into the instruction queue every +cycle. +.It Li INST_DECODED.DEC0 +.Pq Event 18H , Umask 01H +Counts number of instructions that require decoder 0 to be decoded. Usually, +this means that the instruction maps to more than 1 uop +.It Li TWO_UOP_INSTS_DECODED +.Pq Event 19H , Umask 01H +An instruction that generates two uops was decoded +.It Li INST_QUEUE_WRITE_CYCLES +.Pq Event 1EH , Umask 01H +This event counts the number of cycles during which instructions are written +to the instruction queue. Dividing this counter by the number of +instructions written to the instruction queue (INST_QUEUE_WRITES) yields the +average number of instructions decoded each cycle. If this number is less +than four and the pipe stalls, this indicates that the decoder is failing to +decode enough instructions per cycle to sustain the 4-wide pipeline. +If SSE* instructions that are 6 bytes or longer arrive one after another, +then front end throughput may limit execution speed. In such case, +.It Li LSD_OVERFLOW +.Pq Event 20H , Umask 01H +Counts number of loops that cant stream from the instruction queue. +.It Li L2_RQSTS.LD_HIT +.Pq Event 24H , Umask 01H +Counts number of loads that hit the L2 cache. L2 loads include both L1D +demand misses as well as L1D prefetches. L2 loads can be rejected for +various reasons. Only non rejected loads are counted. +.It Li L2_RQSTS.LD_MISS +.Pq Event 24H , Umask 02H +Counts the number of loads that miss the L2 cache. L2 loads include both L1D +demand misses as well as L1D prefetches. +.It Li L2_RQSTS.LOADS +.Pq Event 24H , Umask 03H +Counts all L2 load requests. L2 loads include both L1D demand misses as well +as L1D prefetches. +.It Li L2_RQSTS.RFO_HIT +.Pq Event 24H , Umask 04H +Counts the number of store RFO requests that hit the L2 cache. L2 RFO +requests include both L1D demand RFO misses as well as L1D RFO prefetches. +Count includes WC memory requests, where the data is not fetched but the +permission to write the line is required. +.It Li L2_RQSTS.RFO_MISS +.Pq Event 24H , Umask 08H +Counts the number of store RFO requests that miss the L2 cache. L2 RFO +requests include both L1D demand RFO misses as well as L1D RFO prefetches. +.It Li L2_RQSTS.RFOS +.Pq Event 24H , Umask 0CH +Counts all L2 store RFO requests. L2 RFO requests include both L1D demand +RFO misses as well as L1D RFO prefetches. +.It Li L2_RQSTS.IFETCH_HIT +.Pq Event 24H , Umask 10H +Counts number of instruction fetches that hit the L2 cache. L2 instruction +fetches include both L1I demand misses as well as L1I instruction +prefetches. +.It Li L2_RQSTS.IFETCH_MISS +.Pq Event 24H , Umask 20H +Counts number of instruction fetches that miss the L2 cache. L2 instruction +fetches include both L1I demand misses as well as L1I instruction +prefetches. +.It Li L2_RQSTS.IFETCHES +.Pq Event 24H , Umask 30H +Counts all instruction fetches. L2 instruction fetches include both L1I +demand misses as well as L1I instruction prefetches. +.It Li L2_RQSTS.PREFETCH_HIT +.Pq Event 24H , Umask 40H +Counts L2 prefetch hits for both code and data. +.It Li L2_RQSTS.PREFETCH_MISS +.Pq Event 24H , Umask 80H +Counts L2 prefetch misses for both code and data. +.It Li L2_RQSTS.PREFETCHES +.Pq Event 24H , Umask C0H +Counts all L2 prefetches for both code and data. +.It Li L2_RQSTS.MISS +.Pq Event 24H , Umask AAH +Counts all L2 misses for both code and data. +.It Li L2_RQSTS.REFERENCES +.Pq Event 24H , Umask FFH +Counts all L2 requests for both code and data. +.It Li L2_DATA_RQSTS.DEMAND.I_STATE +.Pq Event 26H , Umask 01H +Counts number of L2 data demand loads where the cache line to be loaded is +in the I (invalid) state, i.e. a cache miss. L2 demand loads are both L1D +demand misses and L1D prefetches. +.It Li L2_DATA_RQSTS.DEMAND.S_STATE +.Pq Event 26H , Umask 02H +Counts number of L2 data demand loads where the cache line to be loaded is +in the S (shared) state. L2 demand loads are both L1D demand misses and L1D +prefetches. +.It Li L2_DATA_RQSTS.DEMAND.E_STATE +.Pq Event 26H , Umask 04H +Counts number of L2 data demand loads where the cache line to be loaded is +in the E (exclusive) state. L2 demand loads are both L1D demand misses and +L1D prefetches. +.It Li L2_DATA_RQSTS.DEMAND.M_STATE +.Pq Event 26H , Umask 08H +Counts number of L2 data demand loads where the cache line to be loaded is +in the M (modified) state. L2 demand loads are both L1D demand misses and +L1D prefetches. +.It Li L2_DATA_RQSTS.DEMAND.MESI +.Pq Event 26H , Umask 0FH +Counts all L2 data demand requests. L2 demand loads are both L1D demand +misses and L1D prefetches. +.It Li L2_DATA_RQSTS.PREFETCH.I_STATE +.Pq Event 26H , Umask 10H +Counts number of L2 prefetch data loads where the cache line to be loaded is +in the I (invalid) state, i.e. a cache miss. +.It Li L2_DATA_RQSTS.PREFETCH.S_STATE +.Pq Event 26H , Umask 20H +Counts number of L2 prefetch data loads where the cache line to be loaded is +in the S (shared) state. A prefetch RFO will miss on an S state line, while +a prefetch read will hit on an S state line. +.It Li L2_DATA_RQSTS.PREFETCH.E_STATE +.Pq Event 26H , Umask 40H +Counts number of L2 prefetch data loads where the cache line to be loaded is +in the E (exclusive) state. +.It Li L2_DATA_RQSTS.PREFETCH.M_STATE +.Pq Event 26H , Umask 80H +Counts number of L2 prefetch data loads where the cache line to be loaded is +in the M (modified) state. +.It Li L2_DATA_RQSTS.PREFETCH.MESI +.Pq Event 26H , Umask F0H +Counts all L2 prefetch requests. +.It Li L2_DATA_RQSTS.ANY +.Pq Event 26H , Umask FFH +Counts all L2 data requests. +.It Li L2_WRITE.RFO.I_STATE +.Pq Event 27H , Umask 01H +Counts number of L2 demand store RFO requests where the cache line to be +loaded is in the I (invalid) state, i.e, a cache miss. The L1D prefetcher +does not issue a RFO prefetch. +This is a demand RFO request +.It Li L2_WRITE.RFO.S_STATE +.Pq Event 27H , Umask 02H +Counts number of L2 store RFO requests where the cache line to be loaded is +in the S (shared) state. The L1D prefetcher does not issue a RFO prefetch,. +This is a demand RFO request +.It Li L2_WRITE.RFO.M_STATE +.Pq Event 27H , Umask 08H +Counts number of L2 store RFO requests where the cache line to be loaded is +in the M (modified) state. The L1D prefetcher does not issue a RFO prefetch. +This is a demand RFO request +.It Li L2_WRITE.RFO.HIT +.Pq Event 27H , Umask 0EH +Counts number of L2 store RFO requests where the cache line to be loaded is +in either the S, E or M states. The L1D prefetcher does not issue a RFO +prefetch. +This is a demand RFO request +.It Li L2_WRITE.RFO.MESI +.Pq Event 27H , Umask 0FH +Counts all L2 store RFO requests.The L1D prefetcher does not issue a RFO +prefetch. +This is a demand RFO request +.It Li L2_WRITE.LOCK.I_STATE +.Pq Event 27H , Umask 10H +Counts number of L2 demand lock RFO requests where the cache line to be +loaded is in the I (invalid) state, i.e. a cache miss. +.It Li L2_WRITE.LOCK.S_STATE +.Pq Event 27H , Umask 20H +Counts number of L2 lock RFO requests where the cache line to be loaded is +in the S (shared) state. +.It Li L2_WRITE.LOCK.E_STATE +.Pq Event 27H , Umask 40H +Counts number of L2 demand lock RFO requests where the cache line to be +loaded is in the E (exclusive) state. +.It Li L2_WRITE.LOCK.M_STATE +.Pq Event 27H , Umask 80H +Counts number of L2 demand lock RFO requests where the cache line to be +loaded is in the M (modified) state. +.It Li L2_WRITE.LOCK.HIT +.Pq Event 27H , Umask E0H +Counts number of L2 demand lock RFO requests where the cache line to be +loaded is in either the S, E, or M state. +.It Li L2_WRITE.LOCK.MESI +.Pq Event 27H , Umask F0H +Counts all L2 demand lock RFO requests. +.It Li L1D_WB_L2.I_STATE +.Pq Event 28H , Umask 01H +Counts number of L1 writebacks to the L2 where the cache line to be written +is in the I (invalid) state, i.e. a cache miss. +.It Li L1D_WB_L2.S_STATE +.Pq Event 28H , Umask 02H +Counts number of L1 writebacks to the L2 where the cache line to be written +is in the S state. +.It Li L1D_WB_L2.E_STATE +.Pq Event 28H , Umask 04H +Counts number of L1 writebacks to the L2 where the cache line to be written +is in the E (exclusive) state. +.It Li L1D_WB_L2.M_STATE +.Pq Event 28H , Umask 08H +Counts number of L1 writebacks to the L2 where the cache line to be written +is in the M (modified) state. +.It Li L1D_WB_L2.MESI +.Pq Event 28H , Umask 0FH +Counts all L1 writebacks to the L2. +.It Li L3_LAT_CACHE.REFERENCE +.Pq Event 2EH , Umask 4FH +This event counts requests originating from the core that reference a cache +line in the last level cache. The event count includes speculative traffic +but excludes cache line fills due to a L2 hardware-prefetch. Because cache +hierarchy, cache sizes and other implementation-specific characteristics; +value comparison to estimate performance differences is not recommended. +see Table A-1 +.It Li L3_LAT_CACHE.MISS +.Pq Event 2EH , Umask 41H +This event counts each cache miss condition for references to the last level +cache. The event count may include speculative traffic but excludes cache +line fills due to L2 hardware-prefetches. Because cache hierarchy, cache +sizes and other implementation-specific characteristics; value comparison to +estimate performance differences is not recommended. +see Table A-1 +.It Li CPU_CLK_UNHALTED.THREAD_P +.Pq Event 3CH , Umask 00H +Counts the number of thread cycles while the thread is not in a halt state. +The thread enters the halt state when it is running the HLT instruction. The +core frequency may change from time to time due to power or thermal +throttling. +see Table A-1 +.It Li CPU_CLK_UNHALTED.REF_P +.Pq Event 3CH , Umask 01H +Increments at the frequency of TSC when not halted. +see Table A-1 +.It Li L1D_CACHE_LD.I_STATE +.Pq Event 40H , Umask 01H +Counts L1 data cache read requests where the cache line to be loaded is in +the I (invalid) state, i.e. the read request missed the cache. +Counter 0, 1 only +.It Li L1D_CACHE_LD.S_STATE +.Pq Event 40H , Umask 02H +Counts L1 data cache read requests where the cache line to be loaded is in +the S (shared) state. +Counter 0, 1 only +.It Li L1D_CACHE_LD.E_STATE +.Pq Event 40H , Umask 04H +Counts L1 data cache read requests where the cache line to be loaded is in +the E (exclusive) state. +Counter 0, 1 only +.It Li L1D_CACHE_LD.M_STATE +.Pq Event 40H , Umask 08H +Counts L1 data cache read requests where the cache line to be loaded is in +the M (modified) state. +Counter 0, 1 only +.It Li L1D_CACHE_LD.MESI +.Pq Event 40H , Umask 0FH +Counts L1 data cache read requests. +Counter 0, 1 only +.It Li L1D_CACHE_ST.S_STATE +.Pq Event 41H , Umask 02H +Counts L1 data cache store RFO requests where the cache line to be loaded is +in the S (shared) state. +Counter 0, 1 only +.It Li L1D_CACHE_ST.E_STATE +.Pq Event 41H , Umask 04H +Counts L1 data cache store RFO requests where the cache line to be loaded is +in the E (exclusive) state. +Counter 0, 1 only +.It Li L1D_CACHE_ST.M_STATE +.Pq Event 41H , Umask 08H +Counts L1 data cache store RFO requests where cache line to be loaded is in +the M (modified) state. +Counter 0, 1 only +.It Li L1D_CACHE_LOCK.HIT +.Pq Event 42H , Umask 01H +Counts retired load locks that hit in the L1 data cache or hit in an already +allocated fill buffer. The lock portion of the load lock transaction must +hit in the L1D. +The initial load will pull the lock into the L1 data cache. Counter 0, 1 +only +.It Li L1D_CACHE_LOCK.S_STATE +.Pq Event 42H , Umask 02H +Counts L1 data cache retired load locks that hit the target cache line in +the shared state. +Counter 0, 1 only +.It Li L1D_CACHE_LOCK.E_STATE +.Pq Event 42H , Umask 04H +Counts L1 data cache retired load locks that hit the target cache line in +the exclusive state. +Counter 0, 1 only +.It Li L1D_CACHE_LOCK.M_STATE +.Pq Event 42H , Umask 08H +Counts L1 data cache retired load locks that hit the target cache line in +the modified state. +Counter 0, 1 only +.It Li L1D_ALL_REF.ANY +.Pq Event 43H , Umask 01H +Counts all references (uncached, speculated and retired) to the L1 data +cache, including all loads and stores with any memory types. The event +counts memory accesses only when they are actually performed. For example, a +load blocked by unknown store address and later performed is only counted +once. +The event does not include non- memory accesses, such as I/O accesses. +Counter 0, 1 only +.It Li L1D_ALL_REF.CACHEABLE +.Pq Event 43H , Umask 02H +Counts all data reads and writes (speculated and retired) from cacheable +memory, including locked operations. +Counter 0, 1 only +.It Li L1D_PEND_MISS.LOAD_BUFFERS_FULL +.Pq Event 48H , Umask 02H +Counts cycles of L1 data cache load fill buffers full. +Counter 0, 1 only +.It Li DTLB_MISSES.ANY +.Pq Event 49H , Umask 01H +Counts the number of misses in the STLB which causes a page walk. +.It Li DTLB_MISSES.WALK_COMPLETED +.Pq Event 49H , Umask 02H +Counts number of misses in the STLB which resulted in a completed page walk. +.It Li DTLB_MISSES.STLB_HIT +.Pq Event 49H , Umask 10H +Counts the number of DTLB first level misses that hit in the second level +TLB. This event is only relevant if the core contains multiple DTLB levels. +.It Li LOAD_HIT_PRE +.Pq Event 4CH , Umask 01H +Counts load operations sent to the L1 data cache while a previous SSE +prefetch instruction to the same cache line has started prefetching but has +not yet finished. +.It Li L1D_PREFETCH.REQUESTS +.Pq Event 4EH , Umask 01H +Counts number of hardware prefetch requests dispatched out of the prefetch +FIFO. +.It Li L1D_PREFETCH.MISS +.Pq Event 4EH , Umask 02H +Counts number of hardware prefetch requests that miss the L1D. There are two *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Fri Apr 2 13:34:28 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E6D47106564A; Fri, 2 Apr 2010 13:34:28 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D56D08FC17; Fri, 2 Apr 2010 13:34:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o32DYSmH069521; Fri, 2 Apr 2010 13:34:28 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o32DYSCh069516; Fri, 2 Apr 2010 13:34:28 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <201004021334.o32DYSCh069516@svn.freebsd.org> From: Fabien Thomas Date: Fri, 2 Apr 2010 13:34: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: r206090 - head/usr.sbin/pmcstat X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Apr 2010 13:34:29 -0000 Author: fabient Date: Fri Apr 2 13:34:28 2010 New Revision: 206090 URL: http://svn.freebsd.org/changeset/base/206090 Log: Improve "top" header by: - Display sample received per PMCs (or merged PMCs). - Display percentage vs all samples Modified: head/usr.sbin/pmcstat/pmcpl_callgraph.c head/usr.sbin/pmcstat/pmcpl_calltree.c head/usr.sbin/pmcstat/pmcstat_log.c head/usr.sbin/pmcstat/pmcstat_log.h Modified: head/usr.sbin/pmcstat/pmcpl_callgraph.c ============================================================================== --- head/usr.sbin/pmcstat/pmcpl_callgraph.c Fri Apr 2 13:23:49 2010 (r206089) +++ head/usr.sbin/pmcstat/pmcpl_callgraph.c Fri Apr 2 13:34:28 2010 (r206090) @@ -341,6 +341,7 @@ pmcpl_cg_process(struct pmcstat_process parent = pmcstat_cgnode_hash_lookup_pc(pp, pmcid, pc, usermode); if (parent == NULL) { pmcstat_stats.ps_callchain_dubious_frames++; + pmcr->pr_dubious_frames++; return; } Modified: head/usr.sbin/pmcstat/pmcpl_calltree.c ============================================================================== --- head/usr.sbin/pmcstat/pmcpl_calltree.c Fri Apr 2 13:23:49 2010 (r206089) +++ head/usr.sbin/pmcstat/pmcpl_calltree.c Fri Apr 2 13:34:28 2010 (r206090) @@ -403,6 +403,10 @@ pmcpl_ct_node_dumptop(int pmcin, struct &pmcin, pmcpl_ct_arc_compare); for (i = 0; i < ct->pct_narc; i++) { + /* Skip this arc if there is no sample at all. */ + if (PMCPL_CT_SAMPLE(pmcin, + &ct->pct_arc[i].pcta_samples) == 0) + continue; if (PMCPL_CT_SAMPLEP(pmcin, &ct->pct_arc[i].pcta_samples) > pmcstat_threshold) { if (pmcpl_ct_node_dumptop(pmcin, @@ -516,6 +520,10 @@ pmcpl_ct_topdisplay(void) x = y = 0; for (i = 0; i < pmcpl_ct_root->pct_narc; i++) { + /* Skip this arc if there is no sample at all. */ + if (PMCPL_CT_SAMPLE(pmcin, + &pmcpl_ct_root->pct_arc[i].pcta_samples) == 0) + continue; if (pmcpl_ct_node_dumptop(pmcin, pmcpl_ct_root->pct_arc[i].pcta_child, &rsamples, x, &y, pmcstat_displayheight - 2)) { @@ -693,6 +701,7 @@ pmcpl_ct_process(struct pmcstat_process } if (n-- == 0) { pmcstat_stats.ps_callchain_dubious_frames++; + pmcr->pr_dubious_frames++; return; } Modified: head/usr.sbin/pmcstat/pmcstat_log.c ============================================================================== --- head/usr.sbin/pmcstat/pmcstat_log.c Fri Apr 2 13:23:49 2010 (r206089) +++ head/usr.sbin/pmcstat/pmcstat_log.c Fri Apr 2 13:34:28 2010 (r206090) @@ -247,6 +247,7 @@ static int pmcstat_string_compute_hash(c static void pmcstat_string_initialize(void); static int pmcstat_string_lookup_hash(pmcstat_interned_string _is); static void pmcstat_string_shutdown(void); +static void pmcstat_stats_reset(void); /* * A simple implementation of interned strings. Each interned string @@ -274,6 +275,21 @@ int pmcstat_npmcs; */ int pmcstat_pause; +static void +pmcstat_stats_reset(void) +{ + struct pmcstat_pmcrecord *pr; + + /* Flush PMCs stats. */ + LIST_FOREACH(pr, &pmcstat_pmcs, pr_next) { + pr->pr_samples = 0; + pr->pr_dubious_frames = 0; + } + + /* Flush global stats. */ + bzero(&pmcstat_stats, sizeof(struct pmcstat_stats)); +} + /* * Compute a 'hash' value for a string. */ @@ -1009,6 +1025,8 @@ pmcstat_pmcid_add(pmc_id_t pmcid, pmcsta pr->pr_pmcid = pmcid; pr->pr_pmcname = ps; pr->pr_pmcin = pmcstat_npmcs++; + pr->pr_samples = 0; + pr->pr_dubious_frames = 0; pr->pr_merge = prm == NULL ? pr : prm; LIST_INSERT_HEAD(&pmcstat_pmcs, pr, pr_next); @@ -1387,6 +1405,7 @@ pmcstat_analyze_log(void) /* Get PMC record. */ pmcr = pmcstat_lookup_pmcid(ev.pl_u.pl_s.pl_pmcid); assert(pmcr != NULL); + pmcr->pr_samples++; /* * Call the plugins processing @@ -1420,6 +1439,7 @@ pmcstat_analyze_log(void) /* Get PMC record. */ pmcr = pmcstat_lookup_pmcid(ev.pl_u.pl_cc.pl_pmcid); assert(pmcr != NULL); + pmcr->pr_samples++; /* * Call the plugins processing @@ -1787,32 +1807,46 @@ pmcstat_process_log(void) static void pmcstat_refresh_top(void) { + int v_attrs; + float v; char pmcname[40]; - const char *s; + struct pmcstat_pmcrecord *pmcpr; /* If in pause mode do not refresh display. */ if (pmcstat_pause) return; /* Wait until PMC pop in the log. */ - s = pmcstat_pmcindex_to_name(pmcstat_pmcinfilter); - if (s == NULL) + pmcpr = pmcstat_pmcindex_to_pmcr(pmcstat_pmcinfilter); + if (pmcpr == NULL) return; /* Format PMC name. */ if (pmcstat_mergepmc) - snprintf(pmcname, sizeof(pmcname), "[%s]", s); + snprintf(pmcname, sizeof(pmcname), "[%s]", + pmcstat_string_unintern(pmcpr->pr_pmcname)); else snprintf(pmcname, sizeof(pmcname), "%s.%d", - s, pmcstat_pmcinfilter); + pmcstat_string_unintern(pmcpr->pr_pmcname), + pmcstat_pmcinfilter); + + /* Format samples count. */ + if (pmcstat_stats.ps_samples_total > 0) + v = (pmcpr->pr_samples * 100.0) / + pmcstat_stats.ps_samples_total; + else + v = 0.; + v_attrs = PMCSTAT_ATTRPERCENT(v); PMCSTAT_PRINTBEGIN(); - PMCSTAT_PRINTW("PMC: %s Samples: %u processed, %u invalid\n\n", + PMCSTAT_PRINTW("PMC: %s Samples: %u ", pmcname, - pmcstat_stats.ps_samples_total, - pmcstat_stats.ps_samples_unknown_offset + - pmcstat_stats.ps_samples_indeterminable + - pmcstat_stats.ps_callchain_dubious_frames); + pmcpr->pr_samples); + PMCSTAT_ATTRON(v_attrs); + PMCSTAT_PRINTW("(%.1f%%) ", v); + PMCSTAT_ATTROFF(v_attrs); + PMCSTAT_PRINTW(", %u unresolved\n\n", + pmcpr->pr_dubious_frames); if (plugins[args.pa_plugin].pl_topdisplay != NULL) plugins[args.pa_plugin].pl_topdisplay(); PMCSTAT_PRINTEND(); @@ -1879,7 +1913,7 @@ pmcstat_keypress_log(void) */ if (plugins[args.pa_plugin].pl_shutdown != NULL) plugins[args.pa_plugin].pl_shutdown(NULL); - bzero(&pmcstat_stats, sizeof(struct pmcstat_stats)); + pmcstat_stats_reset(); if (plugins[args.pa_plugin].pl_init != NULL) plugins[args.pa_plugin].pl_init(); @@ -1900,7 +1934,7 @@ pmcstat_keypress_log(void) } while (plugins[args.pa_plugin].pl_topdisplay == NULL); /* Open new plugin. */ - bzero(&pmcstat_stats, sizeof(struct pmcstat_stats)); + pmcstat_stats_reset(); if (plugins[args.pa_plugin].pl_init != NULL) plugins[args.pa_plugin].pl_init(); wprintw(w, "switching to plugin %s", @@ -1949,7 +1983,7 @@ pmcstat_display_log(void) if (args.pa_topmode == PMCSTAT_TOP_DELTA) { if (plugins[args.pa_plugin].pl_shutdown != NULL) plugins[args.pa_plugin].pl_shutdown(NULL); - bzero(&pmcstat_stats, sizeof(struct pmcstat_stats)); + pmcstat_stats_reset(); if (plugins[args.pa_plugin].pl_init != NULL) plugins[args.pa_plugin].pl_init(); } Modified: head/usr.sbin/pmcstat/pmcstat_log.h ============================================================================== --- head/usr.sbin/pmcstat/pmcstat_log.h Fri Apr 2 13:23:49 2010 (r206089) +++ head/usr.sbin/pmcstat/pmcstat_log.h Fri Apr 2 13:34:28 2010 (r206090) @@ -146,6 +146,8 @@ struct pmcstat_pmcrecord { pmc_id_t pr_pmcid; int pr_pmcin; pmcstat_interned_string pr_pmcname; + int pr_samples; + int pr_dubious_frames; struct pmcstat_pmcrecord *pr_merge; }; extern LIST_HEAD(pmcstat_pmcs, pmcstat_pmcrecord) pmcstat_pmcs; /* PMC list */ From owner-svn-src-head@FreeBSD.ORG Fri Apr 2 14:03:01 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D9C98106564A; Fri, 2 Apr 2010 14:03:01 +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 AEB9B8FC14; Fri, 2 Apr 2010 14:03:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o32E31Ux076435; Fri, 2 Apr 2010 14:03:01 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o32E31o2076431; Fri, 2 Apr 2010 14:03:01 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201004021403.o32E31o2076431@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 2 Apr 2010 14:03: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: r206093 - in head/sys: fs/deadfs kern sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Apr 2010 14:03:02 -0000 Author: kib Date: Fri Apr 2 14:03:01 2010 New Revision: 206093 URL: http://svn.freebsd.org/changeset/base/206093 Log: Add function vop_rename_fail(9) that performs needed cleanup for locks and references of the VOP_RENAME(9) arguments. Use vop_rename_fail() in deadfs_rename(). Tested by: Mikolaj Golub MFC after: 1 week Modified: head/sys/fs/deadfs/dead_vnops.c head/sys/kern/vfs_subr.c head/sys/sys/vnode.h Modified: head/sys/fs/deadfs/dead_vnops.c ============================================================================== --- head/sys/fs/deadfs/dead_vnops.c Fri Apr 2 13:43:16 2010 (r206092) +++ head/sys/fs/deadfs/dead_vnops.c Fri Apr 2 14:03:01 2010 (r206093) @@ -225,13 +225,7 @@ dead_rename(ap) struct componentname *a_tcnp; } */ *ap; { - if (ap->a_tvp) - vput(ap->a_tvp); - if (ap->a_tdvp == ap->a_tvp) - vrele(ap->a_tdvp); - else - vput(ap->a_tdvp); - vrele(ap->a_fdvp); - vrele(ap->a_fvp); + + vop_rename_fail(ap); return (EXDEV); } Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Fri Apr 2 13:43:16 2010 (r206092) +++ head/sys/kern/vfs_subr.c Fri Apr 2 14:03:01 2010 (r206093) @@ -3751,6 +3751,20 @@ assert_vop_slocked(struct vnode *vp, con #endif /* DEBUG_VFS_LOCKS */ void +vop_rename_fail(struct vop_rename_args *ap) +{ + + if (ap->a_tvp != NULL) + vput(ap->a_tvp); + if (ap->a_tdvp == ap->a_tvp) + vrele(ap->a_tdvp); + else + vput(ap->a_tdvp); + vrele(ap->a_fdvp); + vrele(ap->a_fvp); +} + +void vop_rename_pre(void *ap) { struct vop_rename_args *a = ap; Modified: head/sys/sys/vnode.h ============================================================================== --- head/sys/sys/vnode.h Fri Apr 2 13:43:16 2010 (r206092) +++ head/sys/sys/vnode.h Fri Apr 2 14:03:01 2010 (r206093) @@ -720,6 +720,8 @@ void vop_symlink_post(void *a, int rc); void vop_unlock_post(void *a, int rc); void vop_unlock_pre(void *a); +void vop_rename_fail(struct vop_rename_args *ap); + #define VOP_WRITE_PRE(ap) \ struct vattr va; \ int error, osize, ooffset, noffset; \ From owner-svn-src-head@FreeBSD.ORG Fri Apr 2 14:03:43 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AED4F106566C; Fri, 2 Apr 2010 14:03:43 +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 9E9668FC16; Fri, 2 Apr 2010 14:03:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o32E3hBG076636; Fri, 2 Apr 2010 14:03:43 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o32E3hsM076634; Fri, 2 Apr 2010 14:03:43 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201004021403.o32E3hsM076634@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 2 Apr 2010 14:03: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: r206094 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Apr 2010 14:03:43 -0000 Author: kib Date: Fri Apr 2 14:03:43 2010 New Revision: 206094 URL: http://svn.freebsd.org/changeset/base/206094 Log: Supply default implementation of VOP_RENAME() that does neccessary unlocks and unreferences for argument vnodes, as expected by kern_renameat(9), and returns EOPNOTSUPP. This fixes locks and reference leaks when rename is attempted on fs that does not implement rename. PR: kern/107439 Based on submission by: Mikolaj Golub Tested by: Mikolaj Golub MFC after: 1 week Modified: head/sys/kern/vfs_default.c Modified: head/sys/kern/vfs_default.c ============================================================================== --- head/sys/kern/vfs_default.c Fri Apr 2 14:03:01 2010 (r206093) +++ head/sys/kern/vfs_default.c Fri Apr 2 14:03:43 2010 (r206094) @@ -67,6 +67,7 @@ __FBSDID("$FreeBSD$"); #include static int vop_nolookup(struct vop_lookup_args *); +static int vop_norename(struct vop_rename_args *); static int vop_nostrategy(struct vop_strategy_args *); static int get_next_dirent(struct vnode *vp, struct dirent **dpp, char *dirbuf, int dirbuflen, off_t *off, @@ -113,6 +114,7 @@ struct vop_vector default_vnodeops = { .vop_poll = vop_nopoll, .vop_putpages = vop_stdputpages, .vop_readlink = VOP_EINVAL, + .vop_rename = vop_norename, .vop_revoke = VOP_PANIC, .vop_strategy = vop_nostrategy, .vop_unlock = vop_stdunlock, @@ -206,6 +208,20 @@ vop_nolookup(ap) } /* + * vop_norename: + * + * Handle unlock and reference counting for arguments of vop_rename + * for filesystems that do not implement rename operation. + */ +static int +vop_norename(struct vop_rename_args *ap) +{ + + vop_rename_fail(ap); + return (EOPNOTSUPP); +} + +/* * vop_nostrategy: * * Strategy routine for VFS devices that have none. From owner-svn-src-head@FreeBSD.ORG Fri Apr 2 14:30:56 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 800811065678; Fri, 2 Apr 2010 14:30:56 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 700F58FC1F; Fri, 2 Apr 2010 14:30:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o32EUugC083890; Fri, 2 Apr 2010 14:30:56 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o32EUuXc083888; Fri, 2 Apr 2010 14:30:56 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201004021430.o32EUuXc083888@svn.freebsd.org> From: Ed Schouten Date: Fri, 2 Apr 2010 14:30: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: r206095 - head/usr.sbin/ac X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Apr 2010 14:30:56 -0000 Author: ed Date: Fri Apr 2 14:30:56 2010 New Revision: 206095 URL: http://svn.freebsd.org/changeset/base/206095 Log: Properly initialize the timestamp when using ac -w. When using ac -w, we must use the last timestamp to terminate the log file. I accidentally removed this when I ported the code to use utmpx. Reported by: avg Modified: head/usr.sbin/ac/ac.c Modified: head/usr.sbin/ac/ac.c ============================================================================== --- head/usr.sbin/ac/ac.c Fri Apr 2 14:03:43 2010 (r206094) +++ head/usr.sbin/ac/ac.c Fri Apr 2 14:30:56 2010 (r206095) @@ -583,10 +583,11 @@ ac(const char *file) endutxent(); if (!(Flags & AC_W)) usht.ut_tv.tv_sec = time(NULL); + else + usht.ut_tv.tv_sec = ut_timecopy;; usht.ut_type = SHUTDOWN_TIME; if (Flags & AC_D) { - ut_timecopy = usht.ut_tv.tv_sec; ltm = localtime(&ut_timecopy); if (day >= 0 && day != ltm->tm_yday) { /* From owner-svn-src-head@FreeBSD.ORG Fri Apr 2 15:12:31 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B177E106566B; Fri, 2 Apr 2010 15:12: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 A0D5A8FC15; Fri, 2 Apr 2010 15:12:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o32FCVYL093285; Fri, 2 Apr 2010 15:12:31 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o32FCVUM093282; Fri, 2 Apr 2010 15:12:31 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201004021512.o32FCVUM093282@svn.freebsd.org> From: Andriy Gapon Date: Fri, 2 Apr 2010 15:12: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: r206097 - in head/sys: geom kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Apr 2010 15:12:31 -0000 Author: avg Date: Fri Apr 2 15:12:31 2010 New Revision: 206097 URL: http://svn.freebsd.org/changeset/base/206097 Log: bo_bsize: revert r205860 and take an alternative approch in getblk In r205860 I missed the fact that there is code that strongly assumes that devvp bo_bsize is equal to underlying provider's sectorsize. In those places it is hard to obtain the sectorsize in an alternative way if devvp bo_bsize is set to something else. So, I am reverting bo_bsize assigment in g_vfs_open. Instead, in getblk I use DEV_BSIZE block size for b_offset calculation if vp is a disk vp as reported by vn_isdisk. This should coinside with vp being a devvp. Reported by: Mykola Dzham Tested by: Mykola Dzham Pointyhat to: avg MFC after: 2 weeks X-ToDo: convert bread(devvp) in all fs to use bo_bsize-d blocks Modified: head/sys/geom/geom_vfs.c head/sys/kern/vfs_bio.c Modified: head/sys/geom/geom_vfs.c ============================================================================== --- head/sys/geom/geom_vfs.c Fri Apr 2 14:37:55 2010 (r206096) +++ head/sys/geom/geom_vfs.c Fri Apr 2 15:12:31 2010 (r206097) @@ -179,7 +179,7 @@ g_vfs_open(struct vnode *vp, struct g_co bo = &vp->v_bufobj; bo->bo_ops = g_vfs_bufops; bo->bo_private = cp; - bo->bo_bsize = DEV_BSIZE; + bo->bo_bsize = pp->sectorsize; gp->softc = bo; return (error); Modified: head/sys/kern/vfs_bio.c ============================================================================== --- head/sys/kern/vfs_bio.c Fri Apr 2 14:37:55 2010 (r206096) +++ head/sys/kern/vfs_bio.c Fri Apr 2 15:12:31 2010 (r206097) @@ -2678,7 +2678,7 @@ loop: */ if (flags & GB_NOCREAT) return NULL; - bsize = bo->bo_bsize; + bsize = vn_isdisk(vp, NULL) ? DEV_BSIZE : bo->bo_bsize; offset = blkno * bsize; vmio = vp->v_object != NULL; maxsize = vmio ? size + (offset & PAGE_MASK) : size; From owner-svn-src-head@FreeBSD.ORG Fri Apr 2 15:22:23 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A61581065672; Fri, 2 Apr 2010 15:22:23 +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 95E2C8FC16; Fri, 2 Apr 2010 15:22:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o32FMNFZ095468; Fri, 2 Apr 2010 15:22:23 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o32FMNgu095467; Fri, 2 Apr 2010 15:22:23 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201004021522.o32FMNgu095467@svn.freebsd.org> From: Andriy Gapon Date: Fri, 2 Apr 2010 15:22: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: r206098 - head/sys/fs/msdosfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Apr 2010 15:22:23 -0000 Author: avg Date: Fri Apr 2 15:22:23 2010 New Revision: 206098 URL: http://svn.freebsd.org/changeset/base/206098 Log: mountmsdosfs: reject too high value of bytes per cluster Bytes per cluster are calcuated as bytes per sector times sectors per cluster. Too high value can overflow an internal variable with type that can hold only values in valid range. Trying to use a wider type results in an attempt to read more than MAXBSIZE at once, a panic. Unfortunately, it is FreeBSD newfs_msdos that produces filesystems with invalid parameters for certain types of media. Reported by: Fabian Keil , Paul B. Mahol Discussed with: bde, kib MFC after: 1 week X-ToDo: fix newfs_msdos Modified: head/sys/fs/msdosfs/msdosfs_vfsops.c Modified: head/sys/fs/msdosfs/msdosfs_vfsops.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_vfsops.c Fri Apr 2 15:12:31 2010 (r206097) +++ head/sys/fs/msdosfs/msdosfs_vfsops.c Fri Apr 2 15:22:23 2010 (r206098) @@ -580,6 +580,7 @@ mountmsdosfs(struct vnode *devvp, struct || (pmp->pm_BytesPerSec & (pmp->pm_BytesPerSec - 1)) || (pmp->pm_HugeSectors == 0) || (pmp->pm_FATsecs == 0) + || (SecPerClust * pmp->pm_BlkPerSec > MAXBSIZE / DEV_BSIZE) ) { error = EINVAL; goto error_exit; From owner-svn-src-head@FreeBSD.ORG Fri Apr 2 15:26:41 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 98BF11065674; Fri, 2 Apr 2010 15:26:41 +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 732268FC13; Fri, 2 Apr 2010 15:26:40 +0000 (UTC) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id SAA01840; Fri, 02 Apr 2010 18:26:38 +0300 (EEST) (envelope-from avg@freebsd.org) Message-ID: <4BB60CAE.4090000@freebsd.org> Date: Fri, 02 Apr 2010 18:26:38 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.24 (X11/20100319) MIME-Version: 1.0 To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201004021512.o32FCVUM093282@svn.freebsd.org> In-Reply-To: <201004021512.o32FCVUM093282@svn.freebsd.org> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Subject: Re: svn commit: r206097 - in head/sys: geom kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Apr 2010 15:26:41 -0000 on 02/04/2010 18:12 Andriy Gapon said the following: > Author: avg > Date: Fri Apr 2 15:12:31 2010 > New Revision: 206097 > URL: http://svn.freebsd.org/changeset/base/206097 > > Log: > bo_bsize: revert r205860 and take an alternative approch in getblk > > In r205860 I missed the fact that there is code that strongly assumes > that devvp bo_bsize is equal to underlying provider's sectorsize. > In those places it is hard to obtain the sectorsize in an alternative > way if devvp bo_bsize is set to something else. > So, I am reverting bo_bsize assigment in g_vfs_open. > Instead, in getblk I use DEV_BSIZE block size for b_offset calculation > if vp is a disk vp as reported by vn_isdisk. This should coinside with > vp being a devvp. > > Reported by: Mykola Dzham > Tested by: Mykola Dzham > Pointyhat to: avg > MFC after: 2 weeks > X-ToDo: convert bread(devvp) in all fs to use bo_bsize-d blocks I should have added that the issue was a panic like the following: panic: wrong length 512 for sectorsize 4096 Interesting part of stack trace: ... #9 0xffffffff8020642b in panic #10 0xffffffff801b4700 in g_io_request #11 0xffffffff803c33ae in vnode_pager_generic_getpages ... -- Andriy Gapon From owner-svn-src-head@FreeBSD.ORG Fri Apr 2 16:06:47 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 26637106566B; Fri, 2 Apr 2010 16:06:47 +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 0B8648FC17; Fri, 2 Apr 2010 16:06:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o32G6kjg005669; Fri, 2 Apr 2010 16:06:46 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o32G6k3m005667; Fri, 2 Apr 2010 16:06:46 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201004021606.o32G6k3m005667@svn.freebsd.org> From: Andriy Gapon Date: Fri, 2 Apr 2010 16:06: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: r206102 - head/share/examples/indent X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Apr 2010 16:06:47 -0000 Author: avg Date: Fri Apr 2 16:06:46 2010 New Revision: 206102 URL: http://svn.freebsd.org/changeset/base/206102 Log: add example indent.pro file believed to produce code with minimal differences from KNF This file is what bde uses! With addition of some types from queue(3) by hps. Please note that the output will not be KNF and currently it's not possible to achieve correct KNF with any combination of options. indent(1) needs to be made smarter. Some issues: o indent produces a space between a queue type macro and opening parenthesis o indent produces a tab before __packed and __aligned o indent produce a space after #define bde also notes difference in the following options between this profile and profile in /usr/src/admin/style of 4.4BSD: -cdb -ei -ip8 -nsob Also, NetBSD uses -di0 instead of -di8. Location for the profile is suggested by jh. Submitted by: Hans Petter Selasky (parts) Obtained from: bde :-) MFC after: 10 days X-ToDo: make indent able to produce proper (perfect) KNF X-Perhaps-ToDo: make KNF default output Added: head/share/examples/indent/ head/share/examples/indent/indent.pro (contents, props changed) Added: head/share/examples/indent/indent.pro ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/examples/indent/indent.pro Fri Apr 2 16:06:46 2010 (r206102) @@ -0,0 +1,129 @@ +-TFILE +-T__sighandler_t +-Tblist_t +-Tblmeta_t +-Tboolean_t +-Tbus_addr_t +-Tbus_dma_segment_t +-Tbus_dma_tag_t +-Tbus_dmamap_t +-Tbus_size_t +-Tbus_space_handle_t +-Tc_db_sym_t +-Tc_linker_sym_t +-Tcaddr_t +-Tclock_t +-Tcomp_t +-Tctor_t +-Td_close_t +-Td_ioctl_t +-Td_open_t +-Td_thread_t +-Tdaddr_t +-Tdb_addr_t +-Tdb_expr_t +-Tdb_sym_t +-Tdev_t +-Tdevice_t +-Tdriver_intr_t +-Tdriver_t +-Tdumper_t +-Telf_file_t +-Tfd_mask +-Tfd_set +-Tfixpt_t +-Tgid_t +-Tin_addr_t +-Tino_t +-Tint16_t +-Tint32_t +-Tint64_t +-Tint8_t +-Tintmax_t +-Tintptr_t +-Tkey_t +-Tkobj_class_t +-Tkobj_t +-Tlinker_file_t +-Tlinker_sym_tT +-Tlinker_symval_t +-Tmode_t +-Tmodeventhand_t +-Tmodeventtype_t +-Tmodspecific_t +-Tmoduledata_t +-Tnetisr_t +-Tng_ID_t +-Tnlink_t +-Toff_t +-Tpd_entry_t +-Tpid_t +-Tpmap_t +-Tpoll_handler_t +-Tpps_params_t +-Tprfpregset_t +-Tprpsinfo_t +-Tprstatus_t +-Tpt_entry_t +-Tqaddr_t +-Tquad_t +-Tregister_t +-Trlim_t +-Tsa_family_t +-Tsemid_t +-Tsiginfo_t +-Tsigset_t +-Tsize_t +-Tsocklen_t +-Tspeed_t +-Tssize_t +-Tstack_t +-Tsy_call_t +-Tsysinit_cfunc_t +-Ttime_t +-Tu_char +-Tu_daddr_t +-Tu_int +-Tu_int16_t +-Tu_int32_t +-Tu_int64_t +-Tu_int8_t +-Tu_long +-Tu_quad_t +-Tu_short +-Tudev_t +-Tufs1_daddr_t +-Tufs2_daddr_t +-Tuid_t +-Tuint16_t +-Tuint32_t +-Tuint64_t +-Tuint8_t +-Tuintfptr_t +-Tuintmax_t +-Tuintptr_t +-Tuma_slab_t +-Tuma_zone_t +-Tuoff_t +-Tv_caddr_t +-Tvaddr_t +-Tvm_map_t +-Tvm_object_t +-Tvm_offset_t +-Tvm_ooffset_t +-Tvm_paddr_t +-Tvm_page_t +-Tvm_pindex_t +-Tvm_size_t +-Tvop_t +-Txdrproc_t +-TTAILQ_HEAD +-TTAILQ_ENTRY +-TLIST_HEAD +-TLIST_ENTRY +-TSTAILQ_HEAD +-TSTAILQ_ENTRY +-TSLIST_HEAD +-TSLIST_ENTRY +-bad -bap -nbbb -nbc -br -nbs -c41 -cd41 -cdb -ce -ci4 -cli0 -d0 -di8 -ndj +-ei -nfc1 -nfcb -i8 -ip8 -l79 -lc77 -ldi0 -nlp -npcs -psl -sc -nsob -nv From owner-svn-src-head@FreeBSD.ORG Fri Apr 2 16:09:56 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 08DA8106566B; Fri, 2 Apr 2010 16:09:56 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ECA768FC14; Fri, 2 Apr 2010 16:09:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o32G9taq006420; Fri, 2 Apr 2010 16:09:55 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o32G9tZ8006418; Fri, 2 Apr 2010 16:09:55 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201004021609.o32G9tZ8006418@svn.freebsd.org> From: Andriy Gapon Date: Fri, 2 Apr 2010 16:09: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: r206103 - head/share/examples/indent X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Apr 2010 16:09:56 -0000 Author: avg Date: Fri Apr 2 16:09:55 2010 New Revision: 206103 URL: http://svn.freebsd.org/changeset/base/206103 Log: indent.pro: replace a bunch of -T types with -ta introduced in r205989 Suggested by: bde, Hans Petter Selasky MFC after: 10 days Modified: head/share/examples/indent/indent.pro Modified: head/share/examples/indent/indent.pro ============================================================================== --- head/share/examples/indent/indent.pro Fri Apr 2 16:06:46 2010 (r206102) +++ head/share/examples/indent/indent.pro Fri Apr 2 16:09:55 2010 (r206103) @@ -1,122 +1,11 @@ -TFILE --T__sighandler_t --Tblist_t --Tblmeta_t --Tboolean_t --Tbus_addr_t --Tbus_dma_segment_t --Tbus_dma_tag_t --Tbus_dmamap_t --Tbus_size_t --Tbus_space_handle_t --Tc_db_sym_t --Tc_linker_sym_t --Tcaddr_t --Tclock_t --Tcomp_t --Tctor_t --Td_close_t --Td_ioctl_t --Td_open_t --Td_thread_t --Tdaddr_t --Tdb_addr_t --Tdb_expr_t --Tdb_sym_t --Tdev_t --Tdevice_t --Tdriver_intr_t --Tdriver_t --Tdumper_t --Telf_file_t -Tfd_mask -Tfd_set --Tfixpt_t --Tgid_t --Tin_addr_t --Tino_t --Tint16_t --Tint32_t --Tint64_t --Tint8_t --Tintmax_t --Tintptr_t --Tkey_t --Tkobj_class_t --Tkobj_t --Tlinker_file_t -Tlinker_sym_tT --Tlinker_symval_t --Tmode_t --Tmodeventhand_t --Tmodeventtype_t --Tmodspecific_t --Tmoduledata_t --Tnetisr_t --Tng_ID_t --Tnlink_t --Toff_t --Tpd_entry_t --Tpid_t --Tpmap_t --Tpoll_handler_t --Tpps_params_t --Tprfpregset_t --Tprpsinfo_t --Tprstatus_t --Tpt_entry_t --Tqaddr_t --Tquad_t --Tregister_t --Trlim_t --Tsa_family_t --Tsemid_t --Tsiginfo_t --Tsigset_t --Tsize_t --Tsocklen_t --Tspeed_t --Tssize_t --Tstack_t --Tsy_call_t --Tsysinit_cfunc_t --Ttime_t -Tu_char --Tu_daddr_t -Tu_int --Tu_int16_t --Tu_int32_t --Tu_int64_t --Tu_int8_t -Tu_long --Tu_quad_t -Tu_short --Tudev_t --Tufs1_daddr_t --Tufs2_daddr_t --Tuid_t --Tuint16_t --Tuint32_t --Tuint64_t --Tuint8_t --Tuintfptr_t --Tuintmax_t --Tuintptr_t --Tuma_slab_t --Tuma_zone_t --Tuoff_t --Tv_caddr_t --Tvaddr_t --Tvm_map_t --Tvm_object_t --Tvm_offset_t --Tvm_ooffset_t --Tvm_paddr_t --Tvm_page_t --Tvm_pindex_t --Tvm_size_t --Tvop_t --Txdrproc_t -TTAILQ_HEAD -TTAILQ_ENTRY -TLIST_HEAD @@ -127,3 +16,4 @@ -TSLIST_ENTRY -bad -bap -nbbb -nbc -br -nbs -c41 -cd41 -cdb -ce -ci4 -cli0 -d0 -di8 -ndj -ei -nfc1 -nfcb -i8 -ip8 -l79 -lc77 -ldi0 -nlp -npcs -psl -sc -nsob -nv +-ta From owner-svn-src-head@FreeBSD.ORG Fri Apr 2 17:50:53 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 369061065702; Fri, 2 Apr 2010 17:50:53 +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 1BAD38FC15; Fri, 2 Apr 2010 17:50:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o32HorEP028995; Fri, 2 Apr 2010 17:50:53 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o32Hoq43028991; Fri, 2 Apr 2010 17:50:52 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201004021750.o32Hoq43028991@svn.freebsd.org> From: Navdeep Parhar Date: Fri, 2 Apr 2010 17:50: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: r206109 - head/sys/dev/cxgb X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Apr 2010 17:50:53 -0000 Author: np Date: Fri Apr 2 17:50:52 2010 New Revision: 206109 URL: http://svn.freebsd.org/changeset/base/206109 Log: Increase response queue size to avoid starvation, add a counter to track it when it does occur. Modified: head/sys/dev/cxgb/cxgb_adapter.h head/sys/dev/cxgb/cxgb_main.c head/sys/dev/cxgb/cxgb_sge.c Modified: head/sys/dev/cxgb/cxgb_adapter.h ============================================================================== --- head/sys/dev/cxgb/cxgb_adapter.h Fri Apr 2 17:48:01 2010 (r206108) +++ head/sys/dev/cxgb/cxgb_adapter.h Fri Apr 2 17:50:52 2010 (r206109) @@ -139,7 +139,7 @@ enum { #define FL_Q_SIZE 4096 #define JUMBO_Q_SIZE 1024 -#define RSPQ_Q_SIZE 1024 +#define RSPQ_Q_SIZE 2048 #define TX_ETH_Q_SIZE 1024 #define TX_OFLD_Q_SIZE 1024 #define TX_CTRL_Q_SIZE 256 @@ -179,6 +179,7 @@ struct sge_rspq { uint32_t offload_bundles; uint32_t pure_rsps; uint32_t unhandled_irqs; + uint32_t starved; bus_addr_t phys_addr; bus_dma_tag_t desc_tag; Modified: head/sys/dev/cxgb/cxgb_main.c ============================================================================== --- head/sys/dev/cxgb/cxgb_main.c Fri Apr 2 17:48:01 2010 (r206108) +++ head/sys/dev/cxgb/cxgb_main.c Fri Apr 2 17:50:52 2010 (r206109) @@ -2398,25 +2398,33 @@ cxgb_tick_handler(void *arg, int count) if (p->rev == T3_REV_B2 && p->nports < 4 && sc->open_device_map) check_t3b2_mac(sc); - cause = t3_read_reg(sc, A_SG_INT_CAUSE); - reset = 0; - if (cause & F_FLEMPTY) { + cause = t3_read_reg(sc, A_SG_INT_CAUSE) & (F_RSPQSTARVE | F_FLEMPTY); + if (cause) { struct sge_qset *qs = &sc->sge.qs[0]; + uint32_t mask, v; - i = 0; - reset |= F_FLEMPTY; + v = t3_read_reg(sc, A_SG_RSPQ_FL_STATUS) & ~0xff00; - cause = (t3_read_reg(sc, A_SG_RSPQ_FL_STATUS) >> - S_FL0EMPTY) & 0xffff; - while (cause) { - qs->fl[i].empty += (cause & 1); - if (i) - qs++; - i ^= 1; - cause >>= 1; + mask = 1; + for (i = 0; i < SGE_QSETS; i++) { + if (v & mask) + qs[i].rspq.starved++; + mask <<= 1; } + + mask <<= SGE_QSETS; /* skip RSPQXDISABLED */ + + for (i = 0; i < SGE_QSETS * 2; i++) { + if (v & mask) { + qs[i / 2].fl[i % 2].empty++; + } + mask <<= 1; + } + + /* clear */ + t3_write_reg(sc, A_SG_RSPQ_FL_STATUS, v); + t3_write_reg(sc, A_SG_INT_CAUSE, cause); } - t3_write_reg(sc, A_SG_INT_CAUSE, reset); for (i = 0; i < sc->params.nports; i++) { struct port_info *pi = &sc->port[i]; Modified: head/sys/dev/cxgb/cxgb_sge.c ============================================================================== --- head/sys/dev/cxgb/cxgb_sge.c Fri Apr 2 17:48:01 2010 (r206108) +++ head/sys/dev/cxgb/cxgb_sge.c Fri Apr 2 17:50:52 2010 (r206109) @@ -3586,6 +3586,9 @@ t3_add_configured_sysctls(adapter_t *sc) SYSCTL_ADD_UINT(ctx, rspqpoidlist, OID_AUTO, "credits", CTLFLAG_RD, &qs->rspq.credits, 0, "#credits"); + SYSCTL_ADD_UINT(ctx, rspqpoidlist, OID_AUTO, "starved", + CTLFLAG_RD, &qs->rspq.starved, + 0, "#times starved"); SYSCTL_ADD_XLONG(ctx, rspqpoidlist, OID_AUTO, "phys_addr", CTLFLAG_RD, &qs->rspq.phys_addr, "physical_address_of the queue"); From owner-svn-src-head@FreeBSD.ORG Fri Apr 2 18:15:24 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 16661106566C; Fri, 2 Apr 2010 18:15:24 +0000 (UTC) (envelope-from eri@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 00D018FC08; Fri, 2 Apr 2010 18:15:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o32IFNZ2035019; Fri, 2 Apr 2010 18:15:23 GMT (envelope-from eri@svn.freebsd.org) Received: (from eri@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o32IFNkN035017; Fri, 2 Apr 2010 18:15:23 GMT (envelope-from eri@svn.freebsd.org) Message-Id: <201004021815.o32IFNkN035017@svn.freebsd.org> From: Ermal Luçi Date: Fri, 2 Apr 2010 18:15: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: r206111 - head/sys/netipsec X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Apr 2010 18:15:24 -0000 Author: eri Date: Fri Apr 2 18:15:23 2010 New Revision: 206111 URL: http://svn.freebsd.org/changeset/base/206111 Log: Fix a logic error in ipsec code that extracts information from the packets. Reviewed by: bz, mlaier Approved by: mlaier(mentor) MFC after: 1 month Modified: head/sys/netipsec/ipsec.c Modified: head/sys/netipsec/ipsec.c ============================================================================== --- head/sys/netipsec/ipsec.c Fri Apr 2 17:52:50 2010 (r206110) +++ head/sys/netipsec/ipsec.c Fri Apr 2 18:15:23 2010 (r206111) @@ -592,7 +592,7 @@ ipsec4_get_ulp(struct mbuf *m, struct se IPSEC_ASSERT(m->m_pkthdr.len >= sizeof(struct ip),("packet too short")); /* NB: ip_input() flips it into host endian. XXX Need more checking. */ - if (m->m_len < sizeof (struct ip)) { + if (m->m_len >= sizeof (struct ip)) { struct ip *ip = mtod(m, struct ip *); if (ip->ip_off & (IP_MF | IP_OFFMASK)) goto done; From owner-svn-src-head@FreeBSD.ORG Fri Apr 2 20:08:45 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 52180106566B; Fri, 2 Apr 2010 20:08:45 +0000 (UTC) (envelope-from mjacob@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 414B18FC1D; Fri, 2 Apr 2010 20:08:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o32K8jnu064013; Fri, 2 Apr 2010 20:08:45 GMT (envelope-from mjacob@svn.freebsd.org) Received: (from mjacob@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o32K8jrU064011; Fri, 2 Apr 2010 20:08:45 GMT (envelope-from mjacob@svn.freebsd.org) Message-Id: <201004022008.o32K8jrU064011@svn.freebsd.org> From: Matt Jacob Date: Fri, 2 Apr 2010 20:08: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: r206112 - head/sys/cam/scsi X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Apr 2010 20:08:45 -0000 Author: mjacob Date: Fri Apr 2 20:08:44 2010 New Revision: 206112 URL: http://svn.freebsd.org/changeset/base/206112 Log: Nullify our periph pointer in dacleanup to try and catch race conditions in callbacks/downcalls. Modified: head/sys/cam/scsi/scsi_da.c Modified: head/sys/cam/scsi/scsi_da.c ============================================================================== --- head/sys/cam/scsi/scsi_da.c Fri Apr 2 18:15:23 2010 (r206111) +++ head/sys/cam/scsi/scsi_da.c Fri Apr 2 20:08:44 2010 (r206112) @@ -997,6 +997,11 @@ dacleanup(struct cam_periph *periph) xpt_print(periph->path, "can't remove sysctl context\n"); } + /* + * Nullify our periph pointer here to try and catch + * race conditions in callbacks/downcalls. + */ + softc->disk->d_drv1 = NULL; disk_destroy(softc->disk); callout_drain(&softc->sendordered_c); free(softc, M_DEVBUF); From owner-svn-src-head@FreeBSD.ORG Fri Apr 2 21:48:27 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C8AF5106566B; Fri, 2 Apr 2010 21:48:27 +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 9D5368FC0C; Fri, 2 Apr 2010 21:48:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o32LmRAe086122; Fri, 2 Apr 2010 21:48:27 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o32LmRD5086119; Fri, 2 Apr 2010 21:48:27 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201004022148.o32LmRD5086119@svn.freebsd.org> From: Marius Strobl Date: Fri, 2 Apr 2010 21:48: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: r206116 - in head/sys: dev/ofw powerpc/ofw X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Apr 2010 21:48:27 -0000 Author: marius Date: Fri Apr 2 21:48:27 2010 New Revision: 206116 URL: http://svn.freebsd.org/changeset/base/206116 Log: With r205496 in place we should ensure that nargs and nreturns are always set to sane values as they no longer default to 0, otherwise some OFW implementation might copy in or out arguments not based on what the actual function takes but what ever stack garbage nargs and nreturns supply. Reviewed by: nwhitehorn Modified: head/sys/dev/ofw/ofw_standard.c head/sys/powerpc/ofw/ofw_real.c Modified: head/sys/dev/ofw/ofw_standard.c ============================================================================== --- head/sys/dev/ofw/ofw_standard.c Fri Apr 2 21:35:10 2010 (r206115) +++ head/sys/dev/ofw/ofw_standard.c Fri Apr 2 21:48:27 2010 (r206116) @@ -589,6 +589,7 @@ ofw_std_close(ofw_t ofw, ihandle_t insta } args = { (cell_t)"close", 1, + 0, }; args.instance = instance; @@ -717,6 +718,7 @@ ofw_std_release(ofw_t ofw, void *virt, s } args = { (cell_t)"release", 2, + 0, }; args.virt = (cell_t)virt; @@ -738,6 +740,8 @@ ofw_std_enter(ofw_t ofw) cell_t nreturns; } args = { (cell_t)"enter", + 0, + 0, }; openfirmware(&args); @@ -754,6 +758,8 @@ ofw_std_exit(ofw_t ofw) cell_t nreturns; } args = { (cell_t)"exit", + 0, + 0, }; openfirmware(&args); Modified: head/sys/powerpc/ofw/ofw_real.c ============================================================================== --- head/sys/powerpc/ofw/ofw_real.c Fri Apr 2 21:35:10 2010 (r206115) +++ head/sys/powerpc/ofw/ofw_real.c Fri Apr 2 21:48:27 2010 (r206116) @@ -737,6 +737,7 @@ ofw_real_close(ofw_t ofw, ihandle_t inst } args = { (cell_t)"close", 1, + 0, }; args.instance = instance; @@ -876,6 +877,7 @@ ofw_real_release(ofw_t ofw, void *virt, } args = { (cell_t)"release", 2, + 0, }; args.virt = (cell_t)virt; @@ -897,6 +899,8 @@ ofw_real_enter(ofw_t ofw) cell_t nreturns; } args = { (cell_t)"enter", + 0, + 0, }; openfirmware(&args); @@ -913,6 +917,8 @@ ofw_real_exit(ofw_t ofw) cell_t nreturns; } args = { (cell_t)"exit", + 0, + 0, }; openfirmware(&args); From owner-svn-src-head@FreeBSD.ORG Fri Apr 2 23:04:32 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 93056106566C; Fri, 2 Apr 2010 23:04:32 +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 7E4248FC12; Fri, 2 Apr 2010 23:04:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o32N4Wwu002954; Fri, 2 Apr 2010 23:04:32 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o32N4WiA002944; Fri, 2 Apr 2010 23:04:32 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201004022304.o32N4WiA002944@svn.freebsd.org> From: Jung-uk Kim Date: Fri, 2 Apr 2010 23:04: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: r206117 - in head/sys: contrib/dev/acpica contrib/dev/acpica/common contrib/dev/acpica/compiler contrib/dev/acpica/debugger contrib/dev/acpica/events contrib/dev/acpica/executer contrib... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Apr 2010 23:04:32 -0000 Author: jkim Date: Fri Apr 2 23:04:31 2010 New Revision: 206117 URL: http://svn.freebsd.org/changeset/base/206117 Log: Merge ACPICA 20100331 (and four additional upstream patches). Modified: head/sys/contrib/dev/acpica/changes.txt head/sys/contrib/dev/acpica/common/dmextern.c head/sys/contrib/dev/acpica/compiler/aslanalyze.c head/sys/contrib/dev/acpica/compiler/aslcompiler.h head/sys/contrib/dev/acpica/compiler/aslpredef.c head/sys/contrib/dev/acpica/compiler/aslstubs.c head/sys/contrib/dev/acpica/compiler/asltypes.h head/sys/contrib/dev/acpica/debugger/dbdisply.c head/sys/contrib/dev/acpica/events/evgpe.c head/sys/contrib/dev/acpica/events/evgpeblk.c head/sys/contrib/dev/acpica/events/evxface.c head/sys/contrib/dev/acpica/events/evxfevnt.c head/sys/contrib/dev/acpica/executer/exdebug.c head/sys/contrib/dev/acpica/executer/exmutex.c head/sys/contrib/dev/acpica/executer/exoparg2.c head/sys/contrib/dev/acpica/executer/exregion.c head/sys/contrib/dev/acpica/include/acevents.h head/sys/contrib/dev/acpica/include/acexcep.h head/sys/contrib/dev/acpica/include/acglobal.h head/sys/contrib/dev/acpica/include/aclocal.h head/sys/contrib/dev/acpica/include/acpixf.h head/sys/contrib/dev/acpica/include/actables.h head/sys/contrib/dev/acpica/include/actypes.h head/sys/contrib/dev/acpica/include/platform/acfreebsd.h head/sys/contrib/dev/acpica/parser/psxface.c head/sys/contrib/dev/acpica/tables/tbutils.c head/sys/contrib/dev/acpica/tables/tbxface.c head/sys/contrib/dev/acpica/utilities/utglobal.c head/sys/dev/acpica/acpi.c head/sys/dev/acpica/acpi_button.c head/sys/dev/acpica/acpi_ec.c head/sys/dev/acpica/acpi_lid.c head/sys/dev/acpica/acpivar.h Directory Properties: head/sys/contrib/dev/acpica/ (props changed) Modified: head/sys/contrib/dev/acpica/changes.txt ============================================================================== --- head/sys/contrib/dev/acpica/changes.txt Fri Apr 2 21:48:27 2010 (r206116) +++ head/sys/contrib/dev/acpica/changes.txt Fri Apr 2 23:04:31 2010 (r206117) @@ -1,4 +1,79 @@ ---------------------------------------- +31 March 2010. Summary of changes for version 20100331: + +1) ACPI CA Core Subsystem: + +Completed a major update for the GPE support in order to improve support for +shared GPEs and to simplify both host OS and ACPICA code. Added a reference +count mechanism to support shared GPEs that require multiple device drivers. +Several external interfaces have changed. One external interface has been +removed. One new external interface was added. Most of the GPE external +interfaces now use the GPE spinlock instead of the events mutex (and the +Flags parameter for many GPE interfaces has been removed.) See the updated +ACPICA Programmer Reference for details. Matthew Garrett, Bob Moore, Rafael +Wysocki. ACPICA BZ 831. + +Changed: + AcpiEnableGpe, AcpiDisableGpe, AcpiClearGpe, AcpiGetGpeStatus +Removed: + AcpiSetGpeType +New: + AcpiSetGpe + +Implemented write support for DataTable operation regions. These regions are +defined via the DataTableRegion() operator. Previously, only read support was +implemented. The ACPI specification allows DataTableRegions to be read/write, +however. + +Implemented a new subsystem option to force a copy of the DSDT to local +memory. Optionally copy the entire DSDT to local memory (instead of simply +mapping it.) There are some (albeit very rare) BIOSs that corrupt or replace +the original DSDT, creating the need for this option. Default is FALSE, do +not copy the DSDT. + +Implemented detection of a corrupted or replaced DSDT. This change adds +support to detect a DSDT that has been corrupted and/or replaced from outside +the OS (by firmware). This is typically catastrophic for the system, but has +been seen on some machines. Once this problem has been detected, the DSDT +copy option can be enabled via system configuration. Lin Ming, Bob Moore. + +Fixed two problems with AcpiReallocateRootTable during the root table copy. +When copying the root table to the new allocation, the length used was +incorrect. The new size was used instead of the current table size, meaning +too much data was copied. Also, the count of available slots for ACPI tables +was not set correctly. Alexey Starikovskiy, Bob Moore. + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 6.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and has a +much larger code and data size. + + Previous Release: + Non-Debug Version: 87.5K Code, 18.4K Data, 105.9K Total + Debug Version: 163.4K Code, 51.1K Data, 214.5K Total + Current Release: + Non-Debug Version: 87.9K Code, 18.6K Data, 106.5K Total + Debug Version: 163.5K Code, 51.3K Data, 214.8K Total + +2) iASL Compiler/Disassembler and Tools: + +iASL: Implement limited typechecking for values returned from predefined +control methods. The type of any returned static (unnamed) object is now +validated. For example, Return(1). ACPICA BZ 786. + +iASL: Fixed a predefined name object verification regression. Fixes a problem +introduced in version 20100304. An error is incorrectly generated if a +predefined name is declared as a static named object with a value defined +using the keywords "Zero", "One", or "Ones". Lin Ming. + +iASL: Added Windows 7 support for the -g option (get local ACPI tables) by +reducing the requested registry access rights. ACPICA BZ 842. + +Disassembler: fixed a possible fault when generating External() statements. +Introduced in commit ae7d6fd: Properly handle externals with parent-prefix +(carat). Fixes a string length allocation calculation. Lin Ming. + +---------------------------------------- 04 March 2010. Summary of changes for version 20100304: 1) ACPI CA Core Subsystem: Modified: head/sys/contrib/dev/acpica/common/dmextern.c ============================================================================== --- head/sys/contrib/dev/acpica/common/dmextern.c Fri Apr 2 21:48:27 2010 (r206116) +++ head/sys/contrib/dev/acpica/common/dmextern.c Fri Apr 2 23:04:31 2010 (r206117) @@ -270,6 +270,15 @@ AcpiDmNormalizeParentPrefix ( } Length = (ACPI_STRLEN (ParentPath) + ACPI_STRLEN (Path) + 1); + if (ParentPath[1]) + { + /* + * If ParentPath is not just a simple '\', increment the length + * for the required dot separator (ParentPath.Path) + */ + Length++; + } + Fullpath = ACPI_ALLOCATE_ZEROED (Length); if (!Fullpath) { Modified: head/sys/contrib/dev/acpica/compiler/aslanalyze.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslanalyze.c Fri Apr 2 21:48:27 2010 (r206116) +++ head/sys/contrib/dev/acpica/compiler/aslanalyze.c Fri Apr 2 23:04:31 2010 (r206117) @@ -1157,6 +1157,12 @@ AnMethodAnalysisWalkEnd ( case PARSEOP_RETURN: /* + * If the parent is a predefined method name, attempt to typecheck + * the return value. Only static types can be validated. + */ + ApCheckPredefinedReturnValue (Op, MethodInfo); + + /* * The parent block does not "exit" and continue execution -- the * method is terminated here with the Return() statement. */ Modified: head/sys/contrib/dev/acpica/compiler/aslcompiler.h ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslcompiler.h Fri Apr 2 21:48:27 2010 (r206116) +++ head/sys/contrib/dev/acpica/compiler/aslcompiler.h Fri Apr 2 23:04:31 2010 (r206117) @@ -461,6 +461,11 @@ ApCheckForPredefinedMethod ( ACPI_PARSE_OBJECT *Op, ASL_METHOD_INFO *MethodInfo); +void +ApCheckPredefinedReturnValue ( + ACPI_PARSE_OBJECT *Op, + ASL_METHOD_INFO *MethodInfo); + UINT32 ApCheckForPredefinedName ( ACPI_PARSE_OBJECT *Op, Modified: head/sys/contrib/dev/acpica/compiler/aslpredef.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslpredef.c Fri Apr 2 21:48:27 2010 (r206116) +++ head/sys/contrib/dev/acpica/compiler/aslpredef.c Fri Apr 2 23:04:31 2010 (r206117) @@ -296,7 +296,11 @@ ApCheckForPredefinedMethod ( if (MethodInfo->NumReturnNoValue && PredefinedNames[Index].Info.ExpectedBtypes) { - sprintf (MsgBuffer, "%4.4s", PredefinedNames[Index].Info.Name); + ApGetExpectedTypes (StringBuffer, + PredefinedNames[Index].Info.ExpectedBtypes); + + sprintf (MsgBuffer, "%s required for %4.4s", + StringBuffer, PredefinedNames[Index].Info.Name); AslError (ASL_WARNING, ASL_MSG_RESERVED_RETURN_VALUE, Op, MsgBuffer); @@ -308,6 +312,90 @@ ApCheckForPredefinedMethod ( /******************************************************************************* * + * FUNCTION: ApCheckPredefinedReturnValue + * + * PARAMETERS: Op - A parse node of type "RETURN". + * MethodInfo - Saved info about this method + * + * RETURN: None + * + * DESCRIPTION: If method is a predefined name, attempt to validate the return + * value. Only "static" types can be validated - a simple return + * of an integer/string/buffer/package or a named reference to + * a static object. Values such as a Localx or Argx or a control + * method invocation are not checked. + * + ******************************************************************************/ + +void +ApCheckPredefinedReturnValue ( + ACPI_PARSE_OBJECT *Op, + ASL_METHOD_INFO *MethodInfo) +{ + UINT32 Index; + ACPI_PARSE_OBJECT *ReturnValueOp; + + + /* Check parent method for a match against the predefined name list */ + + Index = ApCheckForPredefinedName (MethodInfo->Op, + MethodInfo->Op->Asl.NameSeg); + + switch (Index) + { + case ACPI_NOT_RESERVED_NAME: /* No underscore or _Txx or _xxx name not matched */ + case ACPI_PREDEFINED_NAME: /* Resource Name or reserved scope name */ + case ACPI_COMPILER_RESERVED_NAME: /* A _Txx that was not emitted by compiler */ + case ACPI_EVENT_RESERVED_NAME: /* _Lxx, _Exx, and _Qxx methods */ + + /* Just return, nothing to do */ + return; + + default: /* a real predefined ACPI name */ + + /* Exit if no return value expected */ + + if (!PredefinedNames[Index].Info.ExpectedBtypes) + { + return; + } + + /* Get the object returned, it is the next argument */ + + ReturnValueOp = Op->Asl.Child; + switch (ReturnValueOp->Asl.ParseOpcode) + { + case PARSEOP_ZERO: + case PARSEOP_ONE: + case PARSEOP_ONES: + case PARSEOP_INTEGER: + case PARSEOP_STRING_LITERAL: + case PARSEOP_BUFFER: + case PARSEOP_PACKAGE: + + /* Static data return object - check against expected type */ + + ApCheckObjectType (ReturnValueOp, + PredefinedNames[Index].Info.ExpectedBtypes); + break; + + default: + + /* + * All other ops are very difficult or impossible to typecheck at + * compile time. These include all Localx, Argx, and method + * invocations. Also, NAMESEG and NAMESTRING because the type of + * any named object can be changed at runtime (for example, + * CopyObject will change the type of the target object.) + */ + break; + } + } +} + + +/******************************************************************************* + * * FUNCTION: ApCheckForPredefinedObject * * PARAMETERS: Op - A parse node @@ -441,7 +529,7 @@ ApCheckForPredefinedName ( * * RETURN: None * - * DESCRIPTION: Check for the "special" predefined names - + * DESCRIPTION: Check for the "special" predefined names - * _Lxx, _Exx, _Qxx, and _T_x * ******************************************************************************/ @@ -512,7 +600,7 @@ ApCheckForSpecialName ( * * FUNCTION: ApCheckObjectType * - * PARAMETERS: Op - A parse node + * PARAMETERS: Op - Current parse node * ExpectedBtypes - Bitmap of expected return type(s) * * RETURN: None @@ -529,11 +617,13 @@ ApCheckObjectType ( UINT32 ExpectedBtypes) { UINT32 ReturnBtype; - char TypeBuffer[48]; /* Room for 5 types */ switch (Op->Asl.ParseOpcode) { + case PARSEOP_ZERO: + case PARSEOP_ONE: + case PARSEOP_ONES: case PARSEOP_INTEGER: ReturnBtype = ACPI_RTYPE_INTEGER; break; @@ -552,11 +642,11 @@ ApCheckObjectType ( default: /* Not one of the supported object types */ - + goto TypeErrorExit; } - /* Is the object one of the expected types? */ + /* Exit if the object is one of the expected types */ if (ReturnBtype & ExpectedBtypes) { @@ -568,10 +658,13 @@ TypeErrorExit: /* Format the expected types and emit an error message */ - ApGetExpectedTypes (TypeBuffer, ExpectedBtypes); + ApGetExpectedTypes (StringBuffer, ExpectedBtypes); + + sprintf (MsgBuffer, "found %s, requires %s", + UtGetOpName (Op->Asl.ParseOpcode), StringBuffer); AslError (ASL_ERROR, ASL_MSG_RESERVED_OPERAND_TYPE, Op, - TypeBuffer); + MsgBuffer); } Modified: head/sys/contrib/dev/acpica/compiler/aslstubs.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslstubs.c Fri Apr 2 21:48:27 2010 (r206116) +++ head/sys/contrib/dev/acpica/compiler/aslstubs.c Fri Apr 2 23:04:31 2010 (r206117) @@ -243,13 +243,6 @@ AcpiEvInitializeRegion ( return (AE_OK); } -ACPI_STATUS -AcpiEvCheckForWakeOnlyGpe ( - ACPI_GPE_EVENT_INFO *GpeEventInfo) -{ - return (AE_OK); -} - void AcpiExDoDebugObject ( ACPI_OPERAND_OBJECT *SourceDesc, Modified: head/sys/contrib/dev/acpica/compiler/asltypes.h ============================================================================== --- head/sys/contrib/dev/acpica/compiler/asltypes.h Fri Apr 2 21:48:27 2010 (r206116) +++ head/sys/contrib/dev/acpica/compiler/asltypes.h Fri Apr 2 23:04:31 2010 (r206117) @@ -507,7 +507,7 @@ char *AslMessages /* ASL_MSG_RESERVED_ARG_COUNT_HI */ "Reserved method has too many arguments", /* ASL_MSG_RESERVED_ARG_COUNT_LO */ "Reserved method has too few arguments", /* ASL_MSG_RESERVED_METHOD */ "Reserved name must be a control method", -/* ASL_MSG_RESERVED_OPERAND_TYPE */ "Invalid object type for reserved name, must be", +/* ASL_MSG_RESERVED_OPERAND_TYPE */ "Invalid object type for reserved name", /* ASL_MSG_RESERVED_RETURN_VALUE */ "Reserved method must return a value", /* ASL_MSG_RESERVED_USE */ "Invalid use of reserved name", /* ASL_MSG_RESERVED_WORD */ "Use of reserved name", Modified: head/sys/contrib/dev/acpica/debugger/dbdisply.c ============================================================================== --- head/sys/contrib/dev/acpica/debugger/dbdisply.c Fri Apr 2 21:48:27 2010 (r206116) +++ head/sys/contrib/dev/acpica/debugger/dbdisply.c Fri Apr 2 23:04:31 2010 (r206117) @@ -848,13 +848,12 @@ AcpiDbDisplayGpes ( Block, GpeBlock, GpeBlock->Node, Buffer); AcpiOsPrintf (" Registers: %u (%u GPEs)\n", - GpeBlock->RegisterCount, - ACPI_MUL_8 (GpeBlock->RegisterCount)); + GpeBlock->RegisterCount, GpeBlock->GpeCount); - AcpiOsPrintf (" GPE range: 0x%X to 0x%X\n", + AcpiOsPrintf (" GPE range: 0x%X to 0x%X on interrupt %u\n", GpeBlock->BlockBaseNumber, - GpeBlock->BlockBaseNumber + - (GpeBlock->RegisterCount * 8) -1); + GpeBlock->BlockBaseNumber + (GpeBlock->GpeCount - 1), + GpeXruptInfo->InterruptNumber); AcpiOsPrintf ( " RegisterInfo: %p Status %8.8X%8.8X Enable %8.8X%8.8X\n", @@ -871,9 +870,12 @@ AcpiDbDisplayGpes ( GpeRegisterInfo = &GpeBlock->RegisterInfo[i]; AcpiOsPrintf ( - " Reg %u: WakeEnable %2.2X, RunEnable %2.2X Status %8.8X%8.8X Enable %8.8X%8.8X\n", - i, GpeRegisterInfo->EnableForWake, + " Reg %u: (GPE %.2X-%.2X) RunEnable %2.2X WakeEnable %2.2X" + " Status %8.8X%8.8X Enable %8.8X%8.8X\n", + i, GpeRegisterInfo->BaseGpeNumber, + GpeRegisterInfo->BaseGpeNumber + (ACPI_GPE_REGISTER_WIDTH - 1), GpeRegisterInfo->EnableForRun, + GpeRegisterInfo->EnableForWake, ACPI_FORMAT_UINT64 (GpeRegisterInfo->StatusAddress.Address), ACPI_FORMAT_UINT64 (GpeRegisterInfo->EnableAddress.Address)); @@ -886,17 +888,19 @@ AcpiDbDisplayGpes ( if (!(GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK)) { - /* This GPE is not used (no method or handler) */ + /* This GPE is not used (no method or handler), ignore it */ continue; } AcpiOsPrintf ( - " GPE %.3X: %p Flags %2.2X: ", - GpeBlock->BlockBaseNumber + GpeIndex, - GpeEventInfo, + " GPE %.2X: %p RunRefs %2.2X WakeRefs %2.2X Flags %2.2X (", + GpeBlock->BlockBaseNumber + GpeIndex, GpeEventInfo, + GpeEventInfo->RuntimeCount, GpeEventInfo->WakeupCount, GpeEventInfo->Flags); + /* Decode the flags byte */ + if (GpeEventInfo->Flags & ACPI_GPE_LEVEL_TRIGGERED) { AcpiOsPrintf ("Level, "); @@ -906,38 +910,13 @@ AcpiDbDisplayGpes ( AcpiOsPrintf ("Edge, "); } - switch (GpeEventInfo->Flags & ACPI_GPE_TYPE_MASK) - { - case ACPI_GPE_TYPE_WAKE: - AcpiOsPrintf ("WakeOnly: "); - break; - case ACPI_GPE_TYPE_RUNTIME: - AcpiOsPrintf (" RunOnly: "); - break; - case ACPI_GPE_TYPE_WAKE_RUN: - AcpiOsPrintf (" WakeRun: "); - break; - default: - AcpiOsPrintf (" NotUsed: "); - break; - } - - if (GpeEventInfo->Flags & ACPI_GPE_WAKE_ENABLED) - { - AcpiOsPrintf ("[Wake 1 "); - } - else - { - AcpiOsPrintf ("[Wake 0 "); - } - - if (GpeEventInfo->Flags & ACPI_GPE_RUN_ENABLED) + if (GpeEventInfo->Flags & ACPI_GPE_CAN_WAKE) { - AcpiOsPrintf ("Run 1], "); + AcpiOsPrintf ("CanWake, "); } else { - AcpiOsPrintf ("Run 0], "); + AcpiOsPrintf ("RunOnly, "); } switch (GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) @@ -957,7 +936,7 @@ AcpiDbDisplayGpes ( break; } - AcpiOsPrintf ("\n"); + AcpiOsPrintf (")\n"); } } Block++; Modified: head/sys/contrib/dev/acpica/events/evgpe.c ============================================================================== --- head/sys/contrib/dev/acpica/events/evgpe.c Fri Apr 2 21:48:27 2010 (r206116) +++ head/sys/contrib/dev/acpica/events/evgpe.c Fri Apr 2 23:04:31 2010 (r206117) @@ -134,71 +134,20 @@ AcpiEvAsynchEnableGpe ( /******************************************************************************* * - * FUNCTION: AcpiEvSetGpeType - * - * PARAMETERS: GpeEventInfo - GPE to set - * Type - New type - * - * RETURN: Status - * - * DESCRIPTION: Sets the new type for the GPE (wake, run, or wake/run) - * - ******************************************************************************/ - -ACPI_STATUS -AcpiEvSetGpeType ( - ACPI_GPE_EVENT_INFO *GpeEventInfo, - UINT8 Type) -{ - ACPI_STATUS Status; - - - ACPI_FUNCTION_TRACE (EvSetGpeType); - - - /* Validate type and update register enable masks */ - - switch (Type) - { - case ACPI_GPE_TYPE_WAKE: - case ACPI_GPE_TYPE_RUNTIME: - case ACPI_GPE_TYPE_WAKE_RUN: - break; - - default: - return_ACPI_STATUS (AE_BAD_PARAMETER); - } - - /* Disable the GPE if currently enabled */ - - Status = AcpiEvDisableGpe (GpeEventInfo); - - /* Clear the type bits and insert the new Type */ - - GpeEventInfo->Flags &= ~ACPI_GPE_TYPE_MASK; - GpeEventInfo->Flags |= Type; - return_ACPI_STATUS (Status); -} - - -/******************************************************************************* - * * FUNCTION: AcpiEvUpdateGpeEnableMasks * * PARAMETERS: GpeEventInfo - GPE to update - * Type - What to do: ACPI_GPE_DISABLE or - * ACPI_GPE_ENABLE * * RETURN: Status * - * DESCRIPTION: Updates GPE register enable masks based on the GPE type + * DESCRIPTION: Updates GPE register enable masks based upon whether there are + * references (either wake or run) to this GPE * ******************************************************************************/ ACPI_STATUS AcpiEvUpdateGpeEnableMasks ( - ACPI_GPE_EVENT_INFO *GpeEventInfo, - UINT8 Type) + ACPI_GPE_EVENT_INFO *GpeEventInfo) { ACPI_GPE_REGISTER_INFO *GpeRegisterInfo; UINT8 RegisterBit; @@ -216,36 +165,21 @@ AcpiEvUpdateGpeEnableMasks ( RegisterBit = (UINT8) (1 << (GpeEventInfo->GpeNumber - GpeRegisterInfo->BaseGpeNumber)); - /* 1) Disable case. Simply clear all enable bits */ + /* Clear the wake/run bits up front */ - if (Type == ACPI_GPE_DISABLE) - { - ACPI_CLEAR_BIT (GpeRegisterInfo->EnableForWake, RegisterBit); - ACPI_CLEAR_BIT (GpeRegisterInfo->EnableForRun, RegisterBit); - return_ACPI_STATUS (AE_OK); - } + ACPI_CLEAR_BIT (GpeRegisterInfo->EnableForWake, RegisterBit); + ACPI_CLEAR_BIT (GpeRegisterInfo->EnableForRun, RegisterBit); - /* 2) Enable case. Set/Clear the appropriate enable bits */ + /* Set the mask bits only if there are references to this GPE */ - switch (GpeEventInfo->Flags & ACPI_GPE_TYPE_MASK) + if (GpeEventInfo->RuntimeCount) { - case ACPI_GPE_TYPE_WAKE: - ACPI_SET_BIT (GpeRegisterInfo->EnableForWake, RegisterBit); - ACPI_CLEAR_BIT (GpeRegisterInfo->EnableForRun, RegisterBit); - break; - - case ACPI_GPE_TYPE_RUNTIME: - ACPI_CLEAR_BIT (GpeRegisterInfo->EnableForWake, RegisterBit); - ACPI_SET_BIT (GpeRegisterInfo->EnableForRun, RegisterBit); - break; - - case ACPI_GPE_TYPE_WAKE_RUN: - ACPI_SET_BIT (GpeRegisterInfo->EnableForWake, RegisterBit); - ACPI_SET_BIT (GpeRegisterInfo->EnableForRun, RegisterBit); - break; + ACPI_SET_BIT (GpeRegisterInfo->EnableForRun, RegisterBit); + } - default: - return_ACPI_STATUS (AE_BAD_PARAMETER); + if (GpeEventInfo->WakeupCount) + { + ACPI_SET_BIT (GpeRegisterInfo->EnableForWake, RegisterBit); } return_ACPI_STATUS (AE_OK); @@ -257,19 +191,19 @@ AcpiEvUpdateGpeEnableMasks ( * FUNCTION: AcpiEvEnableGpe * * PARAMETERS: GpeEventInfo - GPE to enable - * WriteToHardware - Enable now, or just mark data structs - * (WAKE GPEs should be deferred) * * RETURN: Status * - * DESCRIPTION: Enable a GPE based on the GPE type + * DESCRIPTION: Hardware-enable a GPE. Always enables the GPE, regardless + * of type or number of references. + * + * Note: The GPE lock should be already acquired when this function is called. * ******************************************************************************/ ACPI_STATUS AcpiEvEnableGpe ( - ACPI_GPE_EVENT_INFO *GpeEventInfo, - BOOLEAN WriteToHardware) + ACPI_GPE_EVENT_INFO *GpeEventInfo) { ACPI_STATUS Status; @@ -277,54 +211,37 @@ AcpiEvEnableGpe ( ACPI_FUNCTION_TRACE (EvEnableGpe); - /* Make sure HW enable masks are updated */ + /* + * We will only allow a GPE to be enabled if it has either an + * associated method (_Lxx/_Exx) or a handler. Otherwise, the + * GPE will be immediately disabled by AcpiEvGpeDispatch the + * first time it fires. + */ + if (!(GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK)) + { + return_ACPI_STATUS (AE_NO_HANDLER); + } + + /* Ensure the HW enable masks are current */ - Status = AcpiEvUpdateGpeEnableMasks (GpeEventInfo, ACPI_GPE_ENABLE); + Status = AcpiEvUpdateGpeEnableMasks (GpeEventInfo); if (ACPI_FAILURE (Status)) { return_ACPI_STATUS (Status); } - /* Mark wake-enabled or HW enable, or both */ + /* Clear the GPE (of stale events) */ - switch (GpeEventInfo->Flags & ACPI_GPE_TYPE_MASK) + Status = AcpiHwClearGpe (GpeEventInfo); + if (ACPI_FAILURE (Status)) { - case ACPI_GPE_TYPE_WAKE: - - ACPI_SET_BIT (GpeEventInfo->Flags, ACPI_GPE_WAKE_ENABLED); - break; - - case ACPI_GPE_TYPE_WAKE_RUN: - - ACPI_SET_BIT (GpeEventInfo->Flags, ACPI_GPE_WAKE_ENABLED); - - /*lint -fallthrough */ - - case ACPI_GPE_TYPE_RUNTIME: - - ACPI_SET_BIT (GpeEventInfo->Flags, ACPI_GPE_RUN_ENABLED); - - if (WriteToHardware) - { - /* Clear the GPE (of stale events), then enable it */ - - Status = AcpiHwClearGpe (GpeEventInfo); - if (ACPI_FAILURE (Status)) - { - return_ACPI_STATUS (Status); - } - - /* Enable the requested runtime GPE */ - - Status = AcpiHwWriteGpeEnableReg (GpeEventInfo); - } - break; - - default: - return_ACPI_STATUS (AE_BAD_PARAMETER); + return_ACPI_STATUS (Status); } - return_ACPI_STATUS (AE_OK); + /* Enable the requested GPE */ + + Status = AcpiHwWriteGpeEnableReg (GpeEventInfo); + return_ACPI_STATUS (Status); } @@ -336,7 +253,10 @@ AcpiEvEnableGpe ( * * RETURN: Status * - * DESCRIPTION: Disable a GPE based on the GPE type + * DESCRIPTION: Hardware-disable a GPE. Always disables the requested GPE, + * regardless of the type or number of references. + * + * Note: The GPE lock should be already acquired when this function is called. * ******************************************************************************/ @@ -356,40 +276,14 @@ AcpiEvDisableGpe ( * the GPE behind our back. */ - /* Make sure HW enable masks are updated */ + /* Ensure the HW enable masks are current */ - Status = AcpiEvUpdateGpeEnableMasks (GpeEventInfo, ACPI_GPE_DISABLE); + Status = AcpiEvUpdateGpeEnableMasks (GpeEventInfo); if (ACPI_FAILURE (Status)) { return_ACPI_STATUS (Status); } - /* Clear the appropriate enabled flags for this GPE */ - - switch (GpeEventInfo->Flags & ACPI_GPE_TYPE_MASK) - { - case ACPI_GPE_TYPE_WAKE: - - ACPI_CLEAR_BIT (GpeEventInfo->Flags, ACPI_GPE_WAKE_ENABLED); - break; - - case ACPI_GPE_TYPE_WAKE_RUN: - - ACPI_CLEAR_BIT (GpeEventInfo->Flags, ACPI_GPE_WAKE_ENABLED); - - /*lint -fallthrough */ - - case ACPI_GPE_TYPE_RUNTIME: - - /* Disable the requested runtime GPE */ - - ACPI_CLEAR_BIT (GpeEventInfo->Flags, ACPI_GPE_RUN_ENABLED); - break; - - default: - break; - } - /* * Always H/W disable this GPE, even if we don't know the GPE type. * Simply clear the enable bit for this particular GPE, but do not @@ -405,6 +299,49 @@ AcpiEvDisableGpe ( /******************************************************************************* * + * FUNCTION: AcpiEvLowGetGpeInfo + * + * PARAMETERS: GpeNumber - Raw GPE number + * GpeBlock - A GPE info block + * + * RETURN: A GPE EventInfo struct. NULL if not a valid GPE (The GpeNumber + * is not within the specified GPE block) + * + * DESCRIPTION: Returns the EventInfo struct associated with this GPE. This is + * the low-level implementation of EvGetGpeEventInfo. + * + ******************************************************************************/ + +ACPI_GPE_EVENT_INFO * +AcpiEvLowGetGpeInfo ( + UINT32 GpeNumber, + ACPI_GPE_BLOCK_INFO *GpeBlock) +{ + UINT32 GpeIndex; + + + /* + * Validate that the GpeNumber is within the specified GpeBlock. + * (Two steps) + */ + if (!GpeBlock || + (GpeNumber < GpeBlock->BlockBaseNumber)) + { + return (NULL); + } + + GpeIndex = GpeNumber - GpeBlock->BlockBaseNumber; + if (GpeIndex >= GpeBlock->GpeCount) + { + return (NULL); + } + + return (&GpeBlock->EventInfo[GpeIndex]); +} + + +/******************************************************************************* + * * FUNCTION: AcpiEvGetGpeEventInfo * * PARAMETERS: GpeDevice - Device node. NULL for GPE0/GPE1 @@ -426,7 +363,7 @@ AcpiEvGetGpeEventInfo ( UINT32 GpeNumber) { ACPI_OPERAND_OBJECT *ObjDesc; - ACPI_GPE_BLOCK_INFO *GpeBlock; + ACPI_GPE_EVENT_INFO *GpeInfo; UINT32 i; @@ -441,16 +378,11 @@ AcpiEvGetGpeEventInfo ( for (i = 0; i < ACPI_MAX_GPE_BLOCKS; i++) { - GpeBlock = AcpiGbl_GpeFadtBlocks[i]; - if (GpeBlock) + GpeInfo = AcpiEvLowGetGpeInfo (GpeNumber, + AcpiGbl_GpeFadtBlocks[i]); + if (GpeInfo) { - if ((GpeNumber >= GpeBlock->BlockBaseNumber) && - (GpeNumber < GpeBlock->BlockBaseNumber + - (GpeBlock->RegisterCount * 8))) - { - return (&GpeBlock->EventInfo[GpeNumber - - GpeBlock->BlockBaseNumber]); - } + return (GpeInfo); } } @@ -468,15 +400,7 @@ AcpiEvGetGpeEventInfo ( return (NULL); } - GpeBlock = ObjDesc->Device.GpeBlock; - - if ((GpeNumber >= GpeBlock->BlockBaseNumber) && - (GpeNumber < GpeBlock->BlockBaseNumber + (GpeBlock->RegisterCount * 8))) - { - return (&GpeBlock->EventInfo[GpeNumber - GpeBlock->BlockBaseNumber]); - } - - return (NULL); + return (AcpiEvLowGetGpeInfo (GpeNumber, ObjDesc->Device.GpeBlock)); } @@ -654,9 +578,9 @@ AcpiEvAsynchExecuteGpeMethod ( return_VOID; } - /* Set the GPE flags for return to enabled state */ + /* Update the GPE register masks for return to enabled state */ - (void) AcpiEvEnableGpe (GpeEventInfo, FALSE); + (void) AcpiEvUpdateGpeEnableMasks (GpeEventInfo); /* * Take a snapshot of the GPE info for this level - we copy the info to @@ -872,15 +796,18 @@ AcpiEvGpeDispatch ( default: - /* No handler or method to run! */ - + /* + * No handler or method to run! + * 03/2010: This case should no longer be possible. We will not allow + * a GPE to be enabled if it has no handler or method. + */ ACPI_ERROR ((AE_INFO, "No handler or method for GPE[0x%2X], disabling event", GpeNumber)); /* - * Disable the GPE. The GPE will remain disabled until the ACPICA - * Core Subsystem is restarted, or a handler is installed. + * Disable the GPE. The GPE will remain disabled a handler + * is installed or ACPICA is restarted. */ Status = AcpiEvDisableGpe (GpeEventInfo); if (ACPI_FAILURE (Status)) Modified: head/sys/contrib/dev/acpica/events/evgpeblk.c ============================================================================== --- head/sys/contrib/dev/acpica/events/evgpeblk.c Fri Apr 2 21:48:27 2010 (r206116) +++ head/sys/contrib/dev/acpica/events/evgpeblk.c Fri Apr 2 23:04:31 2010 (r206117) @@ -124,7 +124,7 @@ /* Local prototypes */ static ACPI_STATUS -AcpiEvSaveMethodInfo ( +AcpiEvMatchGpeMethod ( ACPI_HANDLE ObjHandle, UINT32 Level, void *ObjDesc, @@ -194,8 +194,7 @@ AcpiEvValidGpeEvent ( while (GpeBlock) { if ((&GpeBlock->EventInfo[0] <= GpeEventInfo) && - (&GpeBlock->EventInfo[((ACPI_SIZE) - GpeBlock->RegisterCount) * 8] > GpeEventInfo)) + (&GpeBlock->EventInfo[GpeBlock->GpeCount] > GpeEventInfo)) { return (TRUE); } @@ -328,7 +327,7 @@ AcpiEvDeleteGpeHandlers ( /******************************************************************************* * - * FUNCTION: AcpiEvSaveMethodInfo + * FUNCTION: AcpiEvMatchGpeMethod * * PARAMETERS: Callback from WalkNamespace * @@ -340,8 +339,7 @@ AcpiEvDeleteGpeHandlers ( * information for quick lookup during GPE dispatch * * The name of each GPE control method is of the form: - * "_Lxx" or "_Exx" - * Where: + * "_Lxx" or "_Exx", where: * L - means that the GPE is level triggered * E - means that the GPE is edge triggered * xx - is the GPE number [in HEX] @@ -349,38 +347,44 @@ AcpiEvDeleteGpeHandlers ( ******************************************************************************/ static ACPI_STATUS -AcpiEvSaveMethodInfo ( +AcpiEvMatchGpeMethod ( ACPI_HANDLE ObjHandle, UINT32 Level, void *ObjDesc, void **ReturnValue) { + ACPI_NAMESPACE_NODE *MethodNode = ACPI_CAST_PTR (ACPI_NAMESPACE_NODE, ObjHandle); ACPI_GPE_BLOCK_INFO *GpeBlock = (void *) ObjDesc; ACPI_GPE_EVENT_INFO *GpeEventInfo; UINT32 GpeNumber; char Name[ACPI_NAME_SIZE + 1]; UINT8 Type; - ACPI_STATUS Status; - ACPI_FUNCTION_TRACE (EvSaveMethodInfo); + ACPI_FUNCTION_TRACE (EvMatchGpeMethod); /* - * _Lxx and _Exx GPE method support + * Match and decode the _Lxx and _Exx GPE method names * - * 1) Extract the name from the object and convert to a string + * 1) Extract the method name and null terminate it */ - ACPI_MOVE_32_TO_32 ( - Name, &((ACPI_NAMESPACE_NODE *) ObjHandle)->Name.Integer); + ACPI_MOVE_32_TO_32 (Name, &MethodNode->Name.Integer); Name[ACPI_NAME_SIZE] = 0; + /* 2) Name must begin with an underscore */ + + if (Name[0] != '_') + { + return_ACPI_STATUS (AE_OK); /* Ignore this method */ + } + /* - * 2) Edge/Level determination is based on the 2nd character + * 3) Edge/Level determination is based on the 2nd character * of the method name * - * NOTE: Default GPE type is RUNTIME. May be changed later to WAKE - * if a _PRW object is found that points to this GPE. + * NOTE: Default GPE type is RUNTIME only. Later, if a _PRW object is + * found that points to this GPE, the ACPI_GPE_CAN_WAKE flag is set. */ switch (Name[1]) { @@ -393,16 +397,15 @@ AcpiEvSaveMethodInfo ( break; default: - /* Unknown method type, just ignore it! */ + /* Unknown method type, just ignore it */ ACPI_DEBUG_PRINT ((ACPI_DB_LOAD, "Ignoring unknown GPE method type: %s " - "(name not of form _Lxx or _Exx)", - Name)); + "(name not of form _Lxx or _Exx)", Name)); return_ACPI_STATUS (AE_OK); } - /* Convert the last two characters of the name to the GPE Number */ + /* 4) The last two characters of the name are the hex GPE Number */ GpeNumber = ACPI_STRTOUL (&Name[2], NULL, 16); if (GpeNumber == ACPI_UINT32_MAX) @@ -411,45 +414,34 @@ AcpiEvSaveMethodInfo ( ACPI_DEBUG_PRINT ((ACPI_DB_LOAD, "Could not extract GPE number from name: %s " - "(name is not of form _Lxx or _Exx)", - Name)); + "(name is not of form _Lxx or _Exx)", Name)); return_ACPI_STATUS (AE_OK); } /* Ensure that we have a valid GPE number for this GPE block */ - if ((GpeNumber < GpeBlock->BlockBaseNumber) || - (GpeNumber >= (GpeBlock->BlockBaseNumber + - (GpeBlock->RegisterCount * 8)))) + GpeEventInfo = AcpiEvLowGetGpeInfo (GpeNumber, GpeBlock); + if (!GpeEventInfo) { /* - * Not valid for this GPE block, just ignore it. However, it may be - * valid for a different GPE block, since GPE0 and GPE1 methods both - * appear under \_GPE. + * This GpeNumber is not valid for this GPE block, just ignore it. + * However, it may be valid for a different GPE block, since GPE0 + * and GPE1 methods both appear under \_GPE. */ return_ACPI_STATUS (AE_OK); } /* - * Now we can add this information to the GpeEventInfo block for use - * during dispatch of this GPE. Default type is RUNTIME, although this may - * change when the _PRW methods are executed later. + * Add the GPE information from above to the GpeEventInfo block for + * use during dispatch of this GPE. */ - GpeEventInfo = &GpeBlock->EventInfo[GpeNumber - GpeBlock->BlockBaseNumber]; - *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Sat Apr 3 00:47:49 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1F9C9106564A; Sat, 3 Apr 2010 00:47:49 +0000 (UTC) (envelope-from yar@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0EDE38FC0A; Sat, 3 Apr 2010 00:47:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o330lmcm025511; Sat, 3 Apr 2010 00:47:48 GMT (envelope-from yar@svn.freebsd.org) Received: (from yar@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o330lmHB025509; Sat, 3 Apr 2010 00:47:48 GMT (envelope-from yar@svn.freebsd.org) Message-Id: <201004030047.o330lmHB025509@svn.freebsd.org> From: Yar Tikhiy Date: Sat, 3 Apr 2010 00:47: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: r206118 - head/usr.sbin/mtree X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Apr 2010 00:47:49 -0000 Author: yar Date: Sat Apr 3 00:47:48 2010 New Revision: 206118 URL: http://svn.freebsd.org/changeset/base/206118 Log: Keep the list of default keywords sorted so that paranoid folks like me don't try to find a hidden meaning in the strange order. The list used to be sorted in rev. 1.1 from 4.4BSD but the order was broken as soon as in rev. 1.2 by a single-character fix. MFC after: 3 days Modified: head/usr.sbin/mtree/mtree.8 Modified: head/usr.sbin/mtree/mtree.8 ============================================================================== --- head/usr.sbin/mtree/mtree.8 Fri Apr 2 23:04:31 2010 (r206117) +++ head/usr.sbin/mtree/mtree.8 Sat Apr 3 00:47:48 2010 (r206118) @@ -257,10 +257,10 @@ socket The default set of keywords are .Cm flags , .Cm gid , +.Cm link , .Cm mode , .Cm nlink , .Cm size , -.Cm link , .Cm time , and .Cm uid . From owner-svn-src-head@FreeBSD.ORG Sat Apr 3 08:25:04 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 87E07106564A; Sat, 3 Apr 2010 08:25:04 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 77B7F8FC15; Sat, 3 Apr 2010 08:25:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o338P4bE029803; Sat, 3 Apr 2010 08:25:04 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o338P4Bd029801; Sat, 3 Apr 2010 08:25:04 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201004030825.o338P4Bd029801@svn.freebsd.org> From: Andriy Gapon Date: Sat, 3 Apr 2010 08:25: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: r206128 - head/sys/ufs/ffs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Apr 2010 08:25:04 -0000 Author: avg Date: Sat Apr 3 08:25:04 2010 New Revision: 206128 URL: http://svn.freebsd.org/changeset/base/206128 Log: ffs_mount: remove redundant assignment of geom consumer to devvp.v_bufobj The assignment is already done in g_vfs_open. Redundant assignment is harmless, but can become a problem if g_vfs_open logic is changed. MFC after: 1 week Modified: head/sys/ufs/ffs/ffs_vfsops.c Modified: head/sys/ufs/ffs/ffs_vfsops.c ============================================================================== --- head/sys/ufs/ffs/ffs_vfsops.c Sat Apr 3 08:24:28 2010 (r206127) +++ head/sys/ufs/ffs/ffs_vfsops.c Sat Apr 3 08:25:04 2010 (r206128) @@ -665,7 +665,6 @@ ffs_mountfs(devvp, mp, td) if (mp->mnt_iosize_max > MAXPHYS) mp->mnt_iosize_max = MAXPHYS; - devvp->v_bufobj.bo_private = cp; devvp->v_bufobj.bo_ops = &ffs_ops; fs = NULL; From owner-svn-src-head@FreeBSD.ORG Sat Apr 3 08:39:00 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F05D2106566B; Sat, 3 Apr 2010 08:39:00 +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 E007A8FC12; Sat, 3 Apr 2010 08:39:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o338d0kt032830; Sat, 3 Apr 2010 08:39:00 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o338d0VV032828; Sat, 3 Apr 2010 08:39:00 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201004030839.o338d0VV032828@svn.freebsd.org> From: Andriy Gapon Date: Sat, 3 Apr 2010 08:39: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: r206129 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Apr 2010 08:39:01 -0000 Author: avg Date: Sat Apr 3 08:39:00 2010 New Revision: 206129 URL: http://svn.freebsd.org/changeset/base/206129 Log: vn_stat: take into account va_blocksize when setting st_blksize As currently st_blksize is always PAGE_SIZE, it is playing safe to not use any smaller value. For some cases this might not be optimal, but at least nothing should get broken. Generally I don't expect this commit to change much for the following reasons (in case of VREG, VDIR): - application I/O and physical I/O are sufficiently decoupled by filesystem code, buffer cache code, cluster and read-ahead logic - not all applications use st_blksize as a hint, some use f_iosize, some use fixed block sizes I expect writes to the middle of files on ZFS to benefit the most from this change. Silence from: fs@ MFC after: 2 weeks Modified: head/sys/kern/vfs_vnops.c Modified: head/sys/kern/vfs_vnops.c ============================================================================== --- head/sys/kern/vfs_vnops.c Sat Apr 3 08:25:04 2010 (r206128) +++ head/sys/kern/vfs_vnops.c Sat Apr 3 08:39:00 2010 (r206129) @@ -792,11 +792,10 @@ vn_stat(vp, sb, active_cred, file_cred, * "a filesystem-specific preferred I/O block size for this * object. In some filesystem types, this may vary from file * to file" - * Default to PAGE_SIZE after much discussion. - * XXX: min(PAGE_SIZE, vp->v_bufobj.bo_bsize) may be more correct. + * Use miminum/default of PAGE_SIZE (e.g. for VCHR). */ - sb->st_blksize = PAGE_SIZE; + sb->st_blksize = max(PAGE_SIZE, vap->va_blocksize); sb->st_flags = vap->va_flags; if (priv_check(td, PRIV_VFS_GENERATION)) From owner-svn-src-head@FreeBSD.ORG Sat Apr 3 08:53:54 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2E4111065672; Sat, 3 Apr 2010 08:53:54 +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 1DF738FC13; Sat, 3 Apr 2010 08:53:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o338rsV4036113; Sat, 3 Apr 2010 08:53:54 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o338rrYB036111; Sat, 3 Apr 2010 08:53:53 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201004030853.o338rrYB036111@svn.freebsd.org> From: Andriy Gapon Date: Sat, 3 Apr 2010 08:53: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: r206130 - head/sys/geom X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Apr 2010 08:53:54 -0000 Author: avg Date: Sat Apr 3 08:53:53 2010 New Revision: 206130 URL: http://svn.freebsd.org/changeset/base/206130 Log: g_vfs_open: allow only one mount per device vnode In other words, deny multiple read-only mounts of the same device. Shared read-only mounts should theoretically be possible, but, unfortunately, can not be implemented correctly using current buffer cache code/interface and results in an eventual system crash. Also, using nullfs seems to be a more efficient way to achieve the same goal. This gets us back to where we were before GEOM and where other BSDs are. Submitted by: pjd (idea for checking for shared mounting) Discussed with: phk, pjd Silence from: fs@, geom@ MFC after: 2 weeks Modified: head/sys/geom/geom_vfs.c Modified: head/sys/geom/geom_vfs.c ============================================================================== --- head/sys/geom/geom_vfs.c Sat Apr 3 08:39:00 2010 (r206129) +++ head/sys/geom/geom_vfs.c Sat Apr 3 08:53:53 2010 (r206130) @@ -161,6 +161,10 @@ g_vfs_open(struct vnode *vp, struct g_co g_topology_assert(); *cpp = NULL; + bo = &vp->v_bufobj; + if (bo->bo_private != vp) + return (EBUSY); + pp = g_dev_getprovider(vp->v_rdev); if (pp == NULL) return (ENOENT); @@ -176,7 +180,7 @@ g_vfs_open(struct vnode *vp, struct g_co vnode_create_vobject(vp, pp->mediasize, curthread); VFS_UNLOCK_GIANT(vfslocked); *cpp = cp; - bo = &vp->v_bufobj; + cp->private = vp; bo->bo_ops = g_vfs_bufops; bo->bo_private = cp; bo->bo_bsize = pp->sectorsize; @@ -196,5 +200,6 @@ g_vfs_close(struct g_consumer *cp) gp = cp->geom; bo = gp->softc; bufobj_invalbuf(bo, V_SAVE, 0, 0); + bo->bo_private = cp->private; g_wither_geom_close(gp, ENXIO); } From owner-svn-src-head@FreeBSD.ORG Sat Apr 3 10:55:11 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C27801065672; Sat, 3 Apr 2010 10:55:11 +0000 (UTC) (envelope-from flz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B1C198FC0A; Sat, 3 Apr 2010 10:55:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o33AtBhm065798; Sat, 3 Apr 2010 10:55:11 GMT (envelope-from flz@svn.freebsd.org) Received: (from flz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o33AtBI7065797; Sat, 3 Apr 2010 10:55:11 GMT (envelope-from flz@svn.freebsd.org) Message-Id: <201004031055.o33AtBI7065797@svn.freebsd.org> From: Florent Thoumie Date: Sat, 3 Apr 2010 10:55: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: r206132 - head/usr.sbin/pkg_install/lib X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Apr 2010 10:55:11 -0000 Author: flz Date: Sat Apr 3 10:55:11 2010 New Revision: 206132 URL: http://svn.freebsd.org/changeset/base/206132 Log: Fix pkg_delete, check if the file we're trying to delete is a symlink before complaining that it doesn't exist. Typical case would be a leftover library symlink that's left over after the actual library has been removed. Reported by: tabthorpe Modified: head/usr.sbin/pkg_install/lib/plist.c Modified: head/usr.sbin/pkg_install/lib/plist.c ============================================================================== --- head/usr.sbin/pkg_install/lib/plist.c Sat Apr 3 10:07:10 2010 (r206131) +++ head/usr.sbin/pkg_install/lib/plist.c Sat Apr 3 10:55:11 2010 (r206132) @@ -551,7 +551,7 @@ delete_hierarchy(const char *dir, Boolea char *cp1, *cp2; cp1 = cp2 = strdup(dir); - if (!fexists(dir)) { + if (!fexists(dir) && !issymlink(dir)) { if (!ign_err) warnx("%s '%s' doesn't exist", isdir(dir) ? "directory" : "file", dir); From owner-svn-src-head@FreeBSD.ORG Sat Apr 3 10:57:14 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3653A1065670; Sat, 3 Apr 2010 10:57:14 +0000 (UTC) (envelope-from flz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 25ED38FC1B; Sat, 3 Apr 2010 10:57:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o33AvEKx066304; Sat, 3 Apr 2010 10:57:14 GMT (envelope-from flz@svn.freebsd.org) Received: (from flz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o33AvEeW066302; Sat, 3 Apr 2010 10:57:14 GMT (envelope-from flz@svn.freebsd.org) Message-Id: <201004031057.o33AvEeW066302@svn.freebsd.org> From: Florent Thoumie Date: Sat, 3 Apr 2010 10:57: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: r206133 - head/usr.sbin/pkg_install/lib X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Apr 2010 10:57:14 -0000 Author: flz Date: Sat Apr 3 10:57:13 2010 New Revision: 206133 URL: http://svn.freebsd.org/changeset/base/206133 Log: Bump PKG_INSTALL_VERSION to 20100403. Modified: head/usr.sbin/pkg_install/lib/lib.h Modified: head/usr.sbin/pkg_install/lib/lib.h ============================================================================== --- head/usr.sbin/pkg_install/lib/lib.h Sat Apr 3 10:55:11 2010 (r206132) +++ head/usr.sbin/pkg_install/lib/lib.h Sat Apr 3 10:57:13 2010 (r206133) @@ -99,7 +99,7 @@ * Version of the package tools - increase whenever you make a change * in the code that is not cosmetic only. */ -#define PKG_INSTALL_VERSION 20100401 +#define PKG_INSTALL_VERSION 20100403 #define PKG_WRAPCONF_FNAME "/var/db/pkg_install.conf" #define main(argc, argv) real_main(argc, argv) From owner-svn-src-head@FreeBSD.ORG Sat Apr 3 11:15:55 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7A069106564A; Sat, 3 Apr 2010 11:15:55 +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 6978C8FC08; Sat, 3 Apr 2010 11:15:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o33BFt8B070408; Sat, 3 Apr 2010 11:15:55 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o33BFtg3070406; Sat, 3 Apr 2010 11:15:55 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201004031115.o33BFtg3070406@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Sat, 3 Apr 2010 11:15: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: r206134 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Apr 2010 11:15:55 -0000 Author: pjd Date: Sat Apr 3 11:15:55 2010 New Revision: 206134 URL: http://svn.freebsd.org/changeset/base/206134 Log: Add missing mnt_kern_flag flags in 'show mount' output. Modified: head/sys/kern/vfs_subr.c Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Sat Apr 3 10:57:13 2010 (r206133) +++ head/sys/kern/vfs_subr.c Sat Apr 3 11:15:55 2010 (r206134) @@ -2839,14 +2839,18 @@ DB_SHOW_COMMAND(mount, db_show_mount) MNT_KERN_FLAG(MNTK_ASYNC); MNT_KERN_FLAG(MNTK_SOFTDEP); MNT_KERN_FLAG(MNTK_NOINSMNTQ); + MNT_KERN_FLAG(MNTK_DRAINING); + MNT_KERN_FLAG(MNTK_REFEXPIRE); + MNT_KERN_FLAG(MNTK_EXTENDED_SHARED); + MNT_KERN_FLAG(MNTK_SHARED_WRITES); MNT_KERN_FLAG(MNTK_UNMOUNT); MNT_KERN_FLAG(MNTK_MWAIT); MNT_KERN_FLAG(MNTK_SUSPEND); MNT_KERN_FLAG(MNTK_SUSPEND2); MNT_KERN_FLAG(MNTK_SUSPENDED); MNT_KERN_FLAG(MNTK_MPSAFE); - MNT_KERN_FLAG(MNTK_NOKNOTE); MNT_KERN_FLAG(MNTK_LOOKUP_SHARED); + MNT_KERN_FLAG(MNTK_NOKNOTE); #undef MNT_KERN_FLAG if (flags != 0) { if (buf[0] != '\0') From owner-svn-src-head@FreeBSD.ORG Sat Apr 3 11:19:21 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2AC2F1065672; Sat, 3 Apr 2010 11:19:21 +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 19A358FC12; Sat, 3 Apr 2010 11:19:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o33BJKJQ071195; Sat, 3 Apr 2010 11:19:20 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o33BJKCU071193; Sat, 3 Apr 2010 11:19:20 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201004031119.o33BJKCU071193@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Sat, 3 Apr 2010 11:19: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: r206135 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Apr 2010 11:19:21 -0000 Author: pjd Date: Sat Apr 3 11:19:20 2010 New Revision: 206135 URL: http://svn.freebsd.org/changeset/base/206135 Log: Fix some whitespace nits. Modified: head/sys/kern/vfs_subr.c Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Sat Apr 3 11:15:55 2010 (r206134) +++ head/sys/kern/vfs_subr.c Sat Apr 3 11:19:20 2010 (r206135) @@ -1378,7 +1378,7 @@ restartsync: /* * buf_splay() - splay tree core for the clean/dirty list of buffers in - * a vnode. + * a vnode. * * NOTE: We have to deal with the special case of a background bitmap * buffer, a situation where two buffers will have the same logical @@ -2100,13 +2100,13 @@ vget(struct vnode *vp, int flags, struct /* Upgrade our holdcnt to a usecount. */ v_upgrade_usecount(vp); /* - * We don't guarantee that any particular close will + * We don't guarantee that any particular close will * trigger inactive processing so just make a best effort * here at preventing a reference to a removed file. If * we don't succeed no harm is done. */ if (vp->v_iflag & VI_OWEINACT) { - if (VOP_ISLOCKED(vp) == LK_EXCLUSIVE && + if (VOP_ISLOCKED(vp) == LK_EXCLUSIVE && (flags & LK_NOWAIT) == 0) vinactive(vp, td); vp->v_iflag &= ~VI_OWEINACT; @@ -2362,7 +2362,7 @@ SYSCTL_INT(_debug, OID_AUTO, busyprt, CT #endif int -vflush( struct mount *mp, int rootrefs, int flags, struct thread *td) +vflush(struct mount *mp, int rootrefs, int flags, struct thread *td) { struct vnode *vp, *mvp, *rootvp = NULL; struct vattr vattr; @@ -2383,12 +2383,10 @@ vflush( struct mount *mp, int rootrefs, return (error); } vput(rootvp); - } MNT_ILOCK(mp); loop: MNT_VNODE_FOREACH(vp, mp, mvp) { - VI_LOCK(vp); vholdl(vp); MNT_IUNLOCK(mp); @@ -3530,7 +3528,7 @@ vaccess(enum vtype type, mode_t file_mod KASSERT((accmode & ~(VEXEC | VWRITE | VREAD | VADMIN | VAPPEND)) == 0, ("invalid bit in accmode")); KASSERT((accmode & VAPPEND) == 0 || (accmode & VWRITE), - ("VAPPEND without VWRITE")); + ("VAPPEND without VWRITE")); /* * Look for a normal, non-privileged way to access the file/directory From owner-svn-src-head@FreeBSD.ORG Sat Apr 3 12:34:32 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AC496106566C; Sat, 3 Apr 2010 12:34:32 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9B8418FC1A; Sat, 3 Apr 2010 12:34:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o33CYWZO087690; Sat, 3 Apr 2010 12:34:32 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o33CYWSa087688; Sat, 3 Apr 2010 12:34:32 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201004031234.o33CYWSa087688@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sat, 3 Apr 2010 12: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: r206136 - head/sys/compat/ia32 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Apr 2010 12:34:32 -0000 Author: bz Date: Sat Apr 3 12:34:32 2010 New Revision: 206136 URL: http://svn.freebsd.org/changeset/base/206136 Log: Add a forward declaration to silence a warning when compiling ia32_genassym.c. Reviewed by: kib MFC after: 3 days Modified: head/sys/compat/ia32/ia32_signal.h Modified: head/sys/compat/ia32/ia32_signal.h ============================================================================== --- head/sys/compat/ia32/ia32_signal.h Sat Apr 3 11:19:20 2010 (r206135) +++ head/sys/compat/ia32/ia32_signal.h Sat Apr 3 12:34:32 2010 (r206136) @@ -180,6 +180,7 @@ struct ia32_sigframe3 { #endif struct ksiginfo; +struct image_params; extern char ia32_sigcode[]; extern char freebsd4_ia32_sigcode[]; extern int sz_ia32_sigcode; From owner-svn-src-head@FreeBSD.ORG Sat Apr 3 15:19:46 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1AF781065672; Sat, 3 Apr 2010 15:19:46 +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 0A1B98FC21; Sat, 3 Apr 2010 15:19:43 +0000 (UTC) Received: from porto.topspin.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id SAA14703; Sat, 03 Apr 2010 18:19:42 +0300 (EEST) (envelope-from avg@freebsd.org) Received: from localhost.topspin.kiev.ua ([127.0.0.1]) by porto.topspin.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1Ny58P-0008xu-UM; Sat, 03 Apr 2010 18:19:41 +0300 Message-ID: <4BB75C8D.8070607@freebsd.org> Date: Sat, 03 Apr 2010 18:19:41 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.24 (X11/20100321) MIME-Version: 1.0 To: Xin LI References: <201003160048.o2G0mReg025652@svn.freebsd.org> In-Reply-To: <201003160048.o2G0mReg025652@svn.freebsd.org> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Pawel Jakub Dawidek , =?UTF-8?B?TWFydGluIE1hdHXFoWth?= Subject: Re: svn commit: r205198 - in head/cddl/contrib/opensolaris: cmd/zfs lib/libzfs/common X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Apr 2010 15:19:46 -0000 on 16/03/2010 02:48 Xin LI said the following: > Author: delphij > Date: Tue Mar 16 00:48:27 2010 > New Revision: 205198 > URL: http://svn.freebsd.org/changeset/base/205198 > > Log: > Merge OpenSolaris revision 8802:010b31dd4c53: > > 6773366 "zfs list" memory consumption can be further reduced > > PR: bin/144720 > Submitted by: mm > Approved by: pjd > Obtained from: OpenSolaris > MFC after: 1 month It seems that this commit causes a crash in zfs(1) when e.g. 'zfs list' is executed and one of the filesystems has a user property set on it. The crash is in zfs_prune_proplist function at cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c:4291. Relevant code snippet: 4286 4287 while (curr) { 4288 zfs_prop_t zfs_prop = zfs_name_to_prop(nvpair_name(curr)); 4289 nvpair_t *next = nvlist_next_nvpair(zhp->zfs_props, curr); 4290 4291 if (props[zfs_prop] == B_FALSE) 4292 (void) nvlist_remove(zhp->zfs_props, 4293 nvpair_name(curr), nvpair_type(curr)); 4294 curr = next; 4295 } zfs_prop is (-1) and nvpair_name(curr) is my custom property "avg:nobackup". Not sure if this was fixed in OpenSolaris or what. -- Andriy Gapon From owner-svn-src-head@FreeBSD.ORG Sat Apr 3 15:29:55 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6FE67106566B; Sat, 3 Apr 2010 15:29:55 +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 6D0A78FC0A; Sat, 3 Apr 2010 15:29:53 +0000 (UTC) Received: from porto.topspin.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id SAA14783; Sat, 03 Apr 2010 18:29:52 +0300 (EEST) (envelope-from avg@freebsd.org) Received: from localhost.topspin.kiev.ua ([127.0.0.1]) by porto.topspin.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1Ny5IF-0008yc-Jz; Sat, 03 Apr 2010 18:29:51 +0300 Message-ID: <4BB75EEF.8060201@freebsd.org> Date: Sat, 03 Apr 2010 18:29:51 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.24 (X11/20100321) MIME-Version: 1.0 To: Xin LI References: <201003160048.o2G0mReg025652@svn.freebsd.org> <4BB75C8D.8070607@freebsd.org> In-Reply-To: <4BB75C8D.8070607@freebsd.org> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Pawel Jakub Dawidek , =?UTF-8?B?TWFydGluIE1hdHXFoWth?= Subject: Re: svn commit: r205198 - in head/cddl/contrib/opensolaris: cmd/zfs lib/libzfs/common X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Apr 2010 15:29:55 -0000 on 03/04/2010 18:19 Andriy Gapon said the following: > It seems that this commit causes a crash in zfs(1) when e.g. 'zfs list' is > executed and one of the filesystems has a user property set on it. > > The crash is in zfs_prune_proplist function at > cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c:4291. > > Relevant code snippet: > 4286 > 4287 while (curr) { > 4288 zfs_prop_t zfs_prop = zfs_name_to_prop(nvpair_name(curr)); > 4289 nvpair_t *next = nvlist_next_nvpair(zhp->zfs_props, curr); > 4290 > 4291 if (props[zfs_prop] == B_FALSE) > 4292 (void) nvlist_remove(zhp->zfs_props, > 4293 nvpair_name(curr), nvpair_type(curr)); > 4294 curr = next; > 4295 } > > zfs_prop is (-1) and nvpair_name(curr) is my custom property "avg:nobackup". > Not sure if this was fixed in OpenSolaris or what. BTW, I use this simplistic change for time being, not sure if this is a correct fix. --- a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c +++ b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c @@ -4288,7 +4288,7 @@ zfs_prune_proplist(zfs_handle_t *zhp, uint8_t *props) zfs_prop_t zfs_prop = zfs_name_to_prop(nvpair_name(curr)); nvpair_t *next = nvlist_next_nvpair(zhp->zfs_props, curr); - if (props[zfs_prop] == B_FALSE) + if (zfs_prop != ZPROP_INVAL && props[zfs_prop] == B_FALSE) (void) nvlist_remove(zhp->zfs_props, nvpair_name(curr), nvpair_type(curr)); curr = next; -- Andriy Gapon From owner-svn-src-head@FreeBSD.ORG Sat Apr 3 15:40:14 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 86F10106564A; Sat, 3 Apr 2010 15:40: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 749278FC17; Sat, 3 Apr 2010 15:40:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o33FeE2W028457; Sat, 3 Apr 2010 15:40:14 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o33FeEmT028434; Sat, 3 Apr 2010 15:40:14 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201004031540.o33FeEmT028434@svn.freebsd.org> From: Michael Tuexen Date: Sat, 3 Apr 2010 15:40: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: r206137 - in head/sys: netinet netinet6 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Apr 2010 15:40:14 -0000 Author: tuexen Date: Sat Apr 3 15:40:14 2010 New Revision: 206137 URL: http://svn.freebsd.org/changeset/base/206137 Log: * Fix some race condition in SACK/NR-SACK processing. * Fix handling of mapping arrays when draining mbufs or processing FORWARD-TSN chunks. * Cleanup code (no duplicate code anymore for SACKs and NR-SACKs). Part of this code was developed together with rrs. MFC after: 2 weeks. Modified: head/sys/netinet/sctp_asconf.c head/sys/netinet/sctp_constants.h head/sys/netinet/sctp_indata.c head/sys/netinet/sctp_indata.h head/sys/netinet/sctp_input.c head/sys/netinet/sctp_output.c head/sys/netinet/sctp_output.h head/sys/netinet/sctp_pcb.c head/sys/netinet/sctp_pcb.h head/sys/netinet/sctp_structs.h head/sys/netinet/sctp_usrreq.c head/sys/netinet/sctp_var.h head/sys/netinet/sctputil.c head/sys/netinet/sctputil.h head/sys/netinet6/sctp6_usrreq.c Modified: head/sys/netinet/sctp_asconf.c ============================================================================== --- head/sys/netinet/sctp_asconf.c Sat Apr 3 12:34:32 2010 (r206136) +++ head/sys/netinet/sctp_asconf.c Sat Apr 3 15:40:14 2010 (r206137) @@ -556,9 +556,9 @@ sctp_process_asconf_set_primary(struct m * PRIMARY with DELETE IP ADDRESS of the previous primary * destination, unacknowledged DATA are retransmitted * immediately to the new primary destination for seamless - * handover. If the destination is UNCONFIRMED and marked - * to REQ_PRIM, The retransmission occur when reception of - * the HEARTBEAT-ACK. (See sctp_handle_heartbeat_ack in + * handover. If the destination is UNCONFIRMED and marked to + * REQ_PRIM, The retransmission occur when reception of the + * HEARTBEAT-ACK. (See sctp_handle_heartbeat_ack in * sctp_input.c) Also, when change of the primary * destination, it is better that all subsequent new DATA * containing already queued DATA are transmitted to the new @@ -1166,7 +1166,7 @@ sctp_path_check_and_react(struct sctp_tc /* * If number of local valid addresses is 1, the valid address is - * probably newly added address. Several valid addresses in this + * probably newly added address. Several valid addresses in this * association. A source address may not be changed. Additionally, * they can be configured on a same interface as "alias" addresses. * (by micchie) @@ -1210,7 +1210,7 @@ sctp_path_check_and_react(struct sctp_tc /* * Check if the nexthop is corresponding to the new address. * If the new address is corresponding to the current - * nexthop, the path will be changed. If the new address is + * nexthop, the path will be changed. If the new address is * NOT corresponding to the current nexthop, the path will * not be changed. */ Modified: head/sys/netinet/sctp_constants.h ============================================================================== --- head/sys/netinet/sctp_constants.h Sat Apr 3 12:34:32 2010 (r206136) +++ head/sys/netinet/sctp_constants.h Sat Apr 3 15:40:14 2010 (r206137) @@ -544,13 +544,7 @@ __FBSDID("$FreeBSD$"); #define SCTP_INITIAL_MAPPING_ARRAY 16 /* how much we grow the mapping array each call */ #define SCTP_MAPPING_ARRAY_INCR 32 -/* EY 05/13/08 - nr_sack version of the previous 3 constants */ -/* Maximum the nr mapping array will grow to (TSN mapping array) */ -#define SCTP_NR_MAPPING_ARRAY 512 -/* size of the inital malloc on the nr mapping array */ -#define SCTP_INITIAL_NR_MAPPING_ARRAY 16 -/* how much we grow the nr mapping array each call */ -#define SCTP_NR_MAPPING_ARRAY_INCR 32 + /* * Here we define the timer types used by the implementation as arguments in * the set/get timer type calls. @@ -933,6 +927,13 @@ __FBSDID("$FreeBSD$"); #define SCTP_IS_TSN_PRESENT(arry, gap) ((arry[(gap >> 3)] >> (gap & 0x07)) & 0x01) #define SCTP_SET_TSN_PRESENT(arry, gap) (arry[(gap >> 3)] |= (0x01 << ((gap & 0x07)))) #define SCTP_UNSET_TSN_PRESENT(arry, gap) (arry[(gap >> 3)] &= ((~(0x01 << ((gap & 0x07)))) & 0xff)) +#define SCTP_CALC_TSN_TO_GAP(gap, tsn, mapping_tsn) do { \ + if (tsn >= mapping_tsn) { \ + gap = tsn - mapping_tsn; \ + } else { \ + gap = (MAX_TSN - mapping_tsn) + tsn + 1; \ + } \ + } while(0) #define SCTP_RETRAN_DONE -1 Modified: head/sys/netinet/sctp_indata.c ============================================================================== --- head/sys/netinet/sctp_indata.c Sat Apr 3 12:34:32 2010 (r206136) +++ head/sys/netinet/sctp_indata.c Sat Apr 3 15:40:14 2010 (r206137) @@ -45,13 +45,6 @@ __FBSDID("$FreeBSD$"); #include #include -#define SCTP_CALC_TSN_TO_GAP(gap, tsn, mapping_tsn) do { \ - if (tsn >= mapping_tsn) { \ - gap = tsn - mapping_tsn; \ - } else { \ - gap = (MAX_TSN - mapping_tsn) + tsn + 1; \ - } \ - } while(0) /* * NOTES: On the outbound side of things I need to check the sack timer to @@ -303,13 +296,13 @@ sctp_mark_non_revokable(struct sctp_asso return; } SCTP_CALC_TSN_TO_GAP(gap, tsn, asoc->mapping_array_base_tsn); -#ifdef INVARIANTS if (!SCTP_IS_TSN_PRESENT(asoc->mapping_array, gap)) { printf("gap:%x tsn:%x\n", gap, tsn); sctp_print_mapping_array(asoc); +#ifdef INVARIANTS panic("Things are really messed up now!!"); - } #endif + } SCTP_SET_TSN_PRESENT(asoc->nr_mapping_array, gap); SCTP_UNSET_TSN_PRESENT(asoc->mapping_array, gap); if (compare_with_wrap(tsn, asoc->highest_tsn_inside_nr_map, MAX_TSN)) { @@ -317,7 +310,8 @@ sctp_mark_non_revokable(struct sctp_asso } if (tsn == asoc->highest_tsn_inside_map) { /* We must back down to see what the new highest is */ - for (i = tsn - 1; compare_with_wrap(i, asoc->mapping_array_base_tsn, MAX_TSN); i--) { + for (i = tsn - 1; (compare_with_wrap(i, asoc->mapping_array_base_tsn, MAX_TSN) || + (i == asoc->mapping_array_base_tsn)); i--) { SCTP_CALC_TSN_TO_GAP(gap, i, asoc->mapping_array_base_tsn); if (SCTP_IS_TSN_PRESENT(asoc->mapping_array, gap)) { asoc->highest_tsn_inside_map = i; @@ -411,6 +405,7 @@ abandon: end = 1; else end = 0; + sctp_mark_non_revokable(asoc, chk->rec.data.TSN_seq); sctp_add_to_readq(stcb->sctp_ep, stcb, control, &stcb->sctp_socket->so_rcv, end, SCTP_READ_LOCK_NOT_HELD, SCTP_SO_NOT_LOCKED); @@ -420,6 +415,7 @@ abandon: end = 1; else end = 0; + sctp_mark_non_revokable(asoc, chk->rec.data.TSN_seq); if (sctp_append_to_readq(stcb->sctp_ep, stcb, stcb->asoc.control_pdapi, chk->data, end, chk->rec.data.TSN_seq, @@ -454,7 +450,6 @@ abandon: } /* pull it we did it */ TAILQ_REMOVE(&asoc->reasmqueue, chk, sctp_next); - sctp_mark_non_revokable(asoc, chk->rec.data.TSN_seq); if (chk->rec.data.rcv_flags & SCTP_DATA_LAST_FRAG) { asoc->fragmented_delivery_inprogress = 0; if ((chk->rec.data.rcv_flags & SCTP_DATA_UNORDERED) == 0) { @@ -501,11 +496,11 @@ abandon: asoc->size_on_all_streams -= ctl->length; sctp_ucount_decr(asoc->cnt_on_all_streams); strm->last_sequence_delivered++; + sctp_mark_non_revokable(asoc, ctl->sinfo_tsn); sctp_add_to_readq(stcb->sctp_ep, stcb, ctl, &stcb->sctp_socket->so_rcv, 1, SCTP_READ_LOCK_NOT_HELD, SCTP_SO_NOT_LOCKED); - sctp_mark_non_revokable(asoc, ctl->sinfo_tsn); ctl = ctlat; } else { break; @@ -616,11 +611,11 @@ protocol_error: sctp_ucount_decr(asoc->cnt_on_all_streams); strm->last_sequence_delivered++; + sctp_mark_non_revokable(asoc, control->sinfo_tsn); sctp_add_to_readq(stcb->sctp_ep, stcb, control, &stcb->sctp_socket->so_rcv, 1, SCTP_READ_LOCK_NOT_HELD, SCTP_SO_NOT_LOCKED); - sctp_mark_non_revokable(asoc, control->sinfo_tsn); control = TAILQ_FIRST(&strm->inqueue); while (control != NULL) { /* all delivered */ @@ -641,13 +636,12 @@ protocol_error: sctp_log_strm_del(control, NULL, SCTP_STR_LOG_FROM_IMMED_DEL); } - /* EY will be used to calculate nr-gap */ + sctp_mark_non_revokable(asoc, control->sinfo_tsn); sctp_add_to_readq(stcb->sctp_ep, stcb, control, &stcb->sctp_socket->so_rcv, 1, SCTP_READ_LOCK_NOT_HELD, SCTP_SO_NOT_LOCKED); - sctp_mark_non_revokable(asoc, control->sinfo_tsn); control = at; continue; } @@ -965,8 +959,7 @@ sctp_queue_data_for_reasm(struct sctp_tc *abort_flag = 1; } else if ((asoc->fragment_flags & SCTP_DATA_UNORDERED) != SCTP_DATA_UNORDERED && - chk->rec.data.stream_seq != - asoc->ssn_of_pdapi) { + chk->rec.data.stream_seq != asoc->ssn_of_pdapi) { /* Got to be the right STR Seq */ SCTPDBG(SCTP_DEBUG_INDATA1, "Gak, Evil plot, it IS not same stream seq %d vs %d\n", chk->rec.data.stream_seq, @@ -1623,7 +1616,6 @@ sctp_process_a_data_chunk(struct sctp_tc } SCTP_STAT_INCR(sctps_badsid); SCTP_TCB_LOCK_ASSERT(stcb); - SCTP_SET_TSN_PRESENT(asoc->nr_mapping_array, gap); if (compare_with_wrap(tsn, asoc->highest_tsn_inside_nr_map, MAX_TSN)) { asoc->highest_tsn_inside_nr_map = tsn; @@ -1787,6 +1779,7 @@ sctp_process_a_data_chunk(struct sctp_tc SCTP_STR_LOG_FROM_EXPRS_DEL); } control = NULL; + SCTP_SET_TSN_PRESENT(asoc->nr_mapping_array, gap); if (compare_with_wrap(tsn, asoc->highest_tsn_inside_nr_map, MAX_TSN)) { asoc->highest_tsn_inside_nr_map = tsn; @@ -1853,10 +1846,6 @@ failed_express_del: need_reasm_check = 1; } } - SCTP_SET_TSN_PRESENT(asoc->nr_mapping_array, gap); - if (compare_with_wrap(tsn, asoc->highest_tsn_inside_nr_map, MAX_TSN)) { - asoc->highest_tsn_inside_nr_map = tsn; - } control = NULL; goto finish_express_del; } @@ -2059,10 +2048,10 @@ failed_pdapi_express_del: /* ok, if we reach here we have passed the sanity checks */ if (chunk_flags & SCTP_DATA_UNORDERED) { /* queue directly into socket buffer */ + sctp_mark_non_revokable(asoc, control->sinfo_tsn); sctp_add_to_readq(stcb->sctp_ep, stcb, control, &stcb->sctp_socket->so_rcv, 1, SCTP_READ_LOCK_NOT_HELD, SCTP_SO_NOT_LOCKED); - } else { /* * Special check for when streams are resetting. We @@ -2134,10 +2123,6 @@ failed_pdapi_express_del: } } finish_express_del: - if (tsn == (asoc->cumulative_tsn + 1)) { - /* Update cum-ack */ - asoc->cumulative_tsn = tsn; - } if (last_chunk) { *m = NULL; } @@ -2215,43 +2200,43 @@ finish_express_del: } int8_t sctp_map_lookup_tab[256] = { - -1, 0, -1, 1, -1, 0, -1, 2, - -1, 0, -1, 1, -1, 0, -1, 3, - -1, 0, -1, 1, -1, 0, -1, 2, - -1, 0, -1, 1, -1, 0, -1, 4, - -1, 0, -1, 1, -1, 0, -1, 2, - -1, 0, -1, 1, -1, 0, -1, 3, - -1, 0, -1, 1, -1, 0, -1, 2, - -1, 0, -1, 1, -1, 0, -1, 5, - -1, 0, -1, 1, -1, 0, -1, 2, - -1, 0, -1, 1, -1, 0, -1, 3, - -1, 0, -1, 1, -1, 0, -1, 2, - -1, 0, -1, 1, -1, 0, -1, 4, - -1, 0, -1, 1, -1, 0, -1, 2, - -1, 0, -1, 1, -1, 0, -1, 3, - -1, 0, -1, 1, -1, 0, -1, 2, - -1, 0, -1, 1, -1, 0, -1, 6, - -1, 0, -1, 1, -1, 0, -1, 2, - -1, 0, -1, 1, -1, 0, -1, 3, - -1, 0, -1, 1, -1, 0, -1, 2, - -1, 0, -1, 1, -1, 0, -1, 4, - -1, 0, -1, 1, -1, 0, -1, 2, - -1, 0, -1, 1, -1, 0, -1, 3, - -1, 0, -1, 1, -1, 0, -1, 2, - -1, 0, -1, 1, -1, 0, -1, 5, - -1, 0, -1, 1, -1, 0, -1, 2, - -1, 0, -1, 1, -1, 0, -1, 3, - -1, 0, -1, 1, -1, 0, -1, 2, - -1, 0, -1, 1, -1, 0, -1, 4, - -1, 0, -1, 1, -1, 0, -1, 2, - -1, 0, -1, 1, -1, 0, -1, 3, - -1, 0, -1, 1, -1, 0, -1, 2, - -1, 0, -1, 1, -1, 0, -1, 7, + 0, 1, 0, 2, 0, 1, 0, 3, + 0, 1, 0, 2, 0, 1, 0, 4, + 0, 1, 0, 2, 0, 1, 0, 3, + 0, 1, 0, 2, 0, 1, 0, 5, + 0, 1, 0, 2, 0, 1, 0, 3, + 0, 1, 0, 2, 0, 1, 0, 4, + 0, 1, 0, 2, 0, 1, 0, 3, + 0, 1, 0, 2, 0, 1, 0, 6, + 0, 1, 0, 2, 0, 1, 0, 3, + 0, 1, 0, 2, 0, 1, 0, 4, + 0, 1, 0, 2, 0, 1, 0, 3, + 0, 1, 0, 2, 0, 1, 0, 5, + 0, 1, 0, 2, 0, 1, 0, 3, + 0, 1, 0, 2, 0, 1, 0, 4, + 0, 1, 0, 2, 0, 1, 0, 3, + 0, 1, 0, 2, 0, 1, 0, 7, + 0, 1, 0, 2, 0, 1, 0, 3, + 0, 1, 0, 2, 0, 1, 0, 4, + 0, 1, 0, 2, 0, 1, 0, 3, + 0, 1, 0, 2, 0, 1, 0, 5, + 0, 1, 0, 2, 0, 1, 0, 3, + 0, 1, 0, 2, 0, 1, 0, 4, + 0, 1, 0, 2, 0, 1, 0, 3, + 0, 1, 0, 2, 0, 1, 0, 6, + 0, 1, 0, 2, 0, 1, 0, 3, + 0, 1, 0, 2, 0, 1, 0, 4, + 0, 1, 0, 2, 0, 1, 0, 3, + 0, 1, 0, 2, 0, 1, 0, 5, + 0, 1, 0, 2, 0, 1, 0, 3, + 0, 1, 0, 2, 0, 1, 0, 4, + 0, 1, 0, 2, 0, 1, 0, 3, + 0, 1, 0, 2, 0, 1, 0, 8 }; void -sctp_sack_check(struct sctp_tcb *stcb, int ok_to_sack, int was_a_gap, int *abort_flag) +sctp_slide_mapping_arrays(struct sctp_tcb *stcb) { /* * Now we also need to check the mapping array in a couple of ways. @@ -2259,7 +2244,6 @@ sctp_sack_check(struct sctp_tcb *stcb, i */ struct sctp_association *asoc; int at; - int last_all_ones = 0; int slide_from, slide_end, lgap, distance; /* EY nr_mapping array variables */ @@ -2279,19 +2263,16 @@ sctp_sack_check(struct sctp_tcb *stcb, i * offset of the current cum-ack as the starting point. */ at = 0; - for (slide_from = 0; slide_from < stcb->asoc.nr_mapping_array_size; slide_from++) { + for (slide_from = 0; slide_from < stcb->asoc.mapping_array_size; slide_from++) { if (asoc->nr_mapping_array[slide_from] == 0xff) { at += 8; - last_all_ones = 1; } else { /* there is a 0 bit */ at += sctp_map_lookup_tab[asoc->nr_mapping_array[slide_from]]; - last_all_ones = 0; break; } } - asoc->cumulative_tsn = asoc->nr_mapping_array_base_tsn + (at - last_all_ones); - at++; + asoc->cumulative_tsn = asoc->mapping_array_base_tsn + (at - 1); if (compare_with_wrap(asoc->cumulative_tsn, asoc->highest_tsn_inside_map, MAX_TSN) && compare_with_wrap(asoc->cumulative_tsn, asoc->highest_tsn_inside_nr_map, MAX_TSN) @@ -2320,18 +2301,22 @@ sctp_sack_check(struct sctp_tcb *stcb, i if ((asoc->cumulative_tsn == highest_tsn) && (at >= 8)) { /* The complete array was completed by a single FR */ /* highest becomes the cum-ack */ - int clr; + int clr, i; /* clear the array */ - clr = (at >> 3) + 1; + clr = ((at + 7) >> 3); if (clr > asoc->mapping_array_size) { clr = asoc->mapping_array_size; } memset(asoc->mapping_array, 0, clr); memset(asoc->nr_mapping_array, 0, clr); - + for (i = 0; i < asoc->mapping_array_size; i++) { + if ((asoc->mapping_array[i]) || (asoc->nr_mapping_array[i])) { + printf("Error Mapping array's not clean at clear\n"); + sctp_print_mapping_array(asoc); + } + } asoc->mapping_array_base_tsn = asoc->cumulative_tsn + 1; - asoc->nr_mapping_array_base_tsn = asoc->cumulative_tsn + 1; asoc->highest_tsn_inside_nr_map = asoc->highest_tsn_inside_map = asoc->cumulative_tsn; } else if (at >= 8) { /* we can slide the mapping array down */ @@ -2393,12 +2378,11 @@ sctp_sack_check(struct sctp_tcb *stcb, i asoc->nr_mapping_array[slide_from + ii]; } - for (ii = distance; ii <= slide_end; ii++) { + for (ii = distance; ii <= asoc->mapping_array_size; ii++) { asoc->mapping_array[ii] = 0; asoc->nr_mapping_array[ii] = 0; } asoc->mapping_array_base_tsn += (slide_from << 3); - asoc->nr_mapping_array_base_tsn += (slide_from << 3); if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_MAP_LOGGING_ENABLE) { sctp_log_map(asoc->mapping_array_base_tsn, asoc->cumulative_tsn, asoc->highest_tsn_inside_map, @@ -2406,95 +2390,95 @@ sctp_sack_check(struct sctp_tcb *stcb, i } } } +} + + +void +sctp_sack_check(struct sctp_tcb *stcb, int was_a_gap, int *abort_flag) +{ + struct sctp_association *asoc; + uint32_t highest_tsn; + + asoc = &stcb->asoc; + if (compare_with_wrap(asoc->highest_tsn_inside_nr_map, + asoc->highest_tsn_inside_map, + MAX_TSN)) { + highest_tsn = asoc->highest_tsn_inside_nr_map; + } else { + highest_tsn = asoc->highest_tsn_inside_map; + } + /* * Now we need to see if we need to queue a sack or just start the * timer (if allowed). */ - if (ok_to_sack) { - if (SCTP_GET_STATE(asoc) == SCTP_STATE_SHUTDOWN_SENT) { - /* - * Ok special case, in SHUTDOWN-SENT case. here we - * maker sure SACK timer is off and instead send a - * SHUTDOWN and a SACK - */ - if (SCTP_OS_TIMER_PENDING(&stcb->asoc.dack_timer.timer)) { - sctp_timer_stop(SCTP_TIMER_TYPE_RECV, - stcb->sctp_ep, stcb, NULL, SCTP_FROM_SCTP_INDATA + SCTP_LOC_18); - } - sctp_send_shutdown(stcb, stcb->asoc.primary_destination); - /* - * EY if nr_sacks used then send an nr-sack , a sack - * otherwise - */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && stcb->asoc.peer_supports_nr_sack) - sctp_send_nr_sack(stcb); - else - sctp_send_sack(stcb); - } else { - int is_a_gap; + if (SCTP_GET_STATE(asoc) == SCTP_STATE_SHUTDOWN_SENT) { + /* + * Ok special case, in SHUTDOWN-SENT case. here we maker + * sure SACK timer is off and instead send a SHUTDOWN and a + * SACK + */ + if (SCTP_OS_TIMER_PENDING(&stcb->asoc.dack_timer.timer)) { + sctp_timer_stop(SCTP_TIMER_TYPE_RECV, + stcb->sctp_ep, stcb, NULL, SCTP_FROM_SCTP_INDATA + SCTP_LOC_18); + } + sctp_send_shutdown(stcb, stcb->asoc.primary_destination); + sctp_send_sack(stcb); + } else { + int is_a_gap; - /* is there a gap now ? */ - is_a_gap = compare_with_wrap(highest_tsn, stcb->asoc.cumulative_tsn, MAX_TSN); + /* is there a gap now ? */ + is_a_gap = compare_with_wrap(highest_tsn, stcb->asoc.cumulative_tsn, MAX_TSN); - /* - * CMT DAC algorithm: increase number of packets - * received since last ack - */ - stcb->asoc.cmt_dac_pkts_rcvd++; + /* + * CMT DAC algorithm: increase number of packets received + * since last ack + */ + stcb->asoc.cmt_dac_pkts_rcvd++; - if ((stcb->asoc.send_sack == 1) || /* We need to send a - * SACK */ - ((was_a_gap) && (is_a_gap == 0)) || /* was a gap, but no - * longer is one */ - (stcb->asoc.numduptsns) || /* we have dup's */ - (is_a_gap) || /* is still a gap */ - (stcb->asoc.delayed_ack == 0) || /* Delayed sack disabled */ - (stcb->asoc.data_pkts_seen >= stcb->asoc.sack_freq) /* hit limit of pkts */ - ) { + if ((stcb->asoc.send_sack == 1) || /* We need to send a + * SACK */ + ((was_a_gap) && (is_a_gap == 0)) || /* was a gap, but no + * longer is one */ + (stcb->asoc.numduptsns) || /* we have dup's */ + (is_a_gap) || /* is still a gap */ + (stcb->asoc.delayed_ack == 0) || /* Delayed sack disabled */ + (stcb->asoc.data_pkts_seen >= stcb->asoc.sack_freq) /* hit limit of pkts */ + ) { - if ((SCTP_BASE_SYSCTL(sctp_cmt_on_off)) && - (SCTP_BASE_SYSCTL(sctp_cmt_use_dac)) && - (stcb->asoc.send_sack == 0) && - (stcb->asoc.numduptsns == 0) && - (stcb->asoc.delayed_ack) && - (!SCTP_OS_TIMER_PENDING(&stcb->asoc.dack_timer.timer))) { + if ((SCTP_BASE_SYSCTL(sctp_cmt_on_off)) && + (SCTP_BASE_SYSCTL(sctp_cmt_use_dac)) && + (stcb->asoc.send_sack == 0) && + (stcb->asoc.numduptsns == 0) && + (stcb->asoc.delayed_ack) && + (!SCTP_OS_TIMER_PENDING(&stcb->asoc.dack_timer.timer))) { - /* - * CMT DAC algorithm: With CMT, - * delay acks even in the face of - * - * reordering. Therefore, if acks that - * do not have to be sent because of - * the above reasons, will be - * delayed. That is, acks that would - * have been sent due to gap reports - * will be delayed with DAC. Start - * the delayed ack timer. - */ - sctp_timer_start(SCTP_TIMER_TYPE_RECV, - stcb->sctp_ep, stcb, NULL); - } else { - /* - * Ok we must build a SACK since the - * timer is pending, we got our - * first packet OR there are gaps or - * duplicates. - */ - (void)SCTP_OS_TIMER_STOP(&stcb->asoc.dack_timer.timer); - /* - * EY if nr_sacks used then send an - * nr-sack , a sack otherwise - */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && stcb->asoc.peer_supports_nr_sack) - sctp_send_nr_sack(stcb); - else - sctp_send_sack(stcb); - } + /* + * CMT DAC algorithm: With CMT, delay acks + * even in the face of + * + * reordering. Therefore, if acks that do not + * have to be sent because of the above + * reasons, will be delayed. That is, acks + * that would have been sent due to gap + * reports will be delayed with DAC. Start + * the delayed ack timer. + */ + sctp_timer_start(SCTP_TIMER_TYPE_RECV, + stcb->sctp_ep, stcb, NULL); } else { - if (!SCTP_OS_TIMER_PENDING(&stcb->asoc.dack_timer.timer)) { - sctp_timer_start(SCTP_TIMER_TYPE_RECV, - stcb->sctp_ep, stcb, NULL); - } + /* + * Ok we must build a SACK since the timer + * is pending, we got our first packet OR + * there are gaps or duplicates. + */ + (void)SCTP_OS_TIMER_STOP(&stcb->asoc.dack_timer.timer); + sctp_send_sack(stcb); + } + } else { + if (!SCTP_OS_TIMER_PENDING(&stcb->asoc.dack_timer.timer)) { + sctp_timer_start(SCTP_TIMER_TYPE_RECV, + stcb->sctp_ep, stcb, NULL); } } } @@ -2834,14 +2818,7 @@ sctp_process_data(struct mbuf **mm, int if (SCTP_OS_TIMER_PENDING(&stcb->asoc.dack_timer.timer)) { (void)SCTP_OS_TIMER_STOP(&stcb->asoc.dack_timer.timer); } - /* - * EY if nr_sacks used then send an nr-sack , a sack - * otherwise - */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && stcb->asoc.peer_supports_nr_sack) - sctp_send_nr_sack(stcb); - else - sctp_send_sack(stcb); + sctp_send_sack(stcb); } else { if (!SCTP_OS_TIMER_PENDING(&stcb->asoc.dack_timer.timer)) { sctp_timer_start(SCTP_TIMER_TYPE_RECV, @@ -2849,7 +2826,7 @@ sctp_process_data(struct mbuf **mm, int } } } else { - sctp_sack_check(stcb, 1, was_a_gap, &abort_flag); + sctp_sack_check(stcb, was_a_gap, &abort_flag); } if (abort_flag) return (2); @@ -2867,7 +2844,7 @@ sctp_process_segment_range(struct sctp_t { struct sctp_tmit_chunk *tp1; unsigned int theTSN; - int j, wake_him = 0; + int j, wake_him = 0, circled = 0; /* Recover the tp1 we last saw */ tp1 = *p_tp1; @@ -3045,12 +3022,6 @@ sctp_process_segment_range(struct sctp_t } /* NR Sack code here */ if (nr_sacking) { - if (tp1->sent != SCTP_FORWARD_TSN_SKIP) - tp1->sent = SCTP_DATAGRAM_NR_MARKED; - /* - * TAILQ_REMOVE(&asoc->sent_q - * ueue, tp1, sctp_next); - */ if (tp1->data) { /* * sa_ignore @@ -3058,13 +3029,8 @@ sctp_process_segment_range(struct sctp_t */ sctp_free_bufspace(stcb, &stcb->asoc, tp1, 1); sctp_m_freem(tp1->data); + tp1->data = NULL; } - tp1->data = NULL; - /* asoc->sent_queue_cnt--; */ - /* - * sctp_free_a_chunk(stcb, - * tp1); - */ wake_him++; } } @@ -3075,11 +3041,16 @@ sctp_process_segment_range(struct sctp_t break; tp1 = TAILQ_NEXT(tp1, sctp_next); + if ((tp1 == NULL) && (circled == 0)) { + circled++; + tp1 = TAILQ_FIRST(&stcb->asoc.sent_queue); + } } /* end while (tp1) */ - /* In case the fragments were not in order we must reset */ if (tp1 == NULL) { + circled = 0; tp1 = TAILQ_FIRST(&stcb->asoc.sent_queue); } + /* In case the fragments were not in order we must reset */ } /* end for (j = fragStart */ *p_tp1 = tp1; return (wake_him); /* Return value only used for nr-sack */ @@ -3158,6 +3129,9 @@ sctp_handle_segments(struct mbuf *m, int } else { non_revocable = 1; } + if (i == num_seg) { + tp1 = NULL; + } if (sctp_process_segment_range(stcb, &tp1, last_tsn, frag_strt, frag_end, non_revocable, &num_frs, biggest_newly_acked_tsn, this_sack_lowest_newack, ecn_seg_sums)) { @@ -3961,6 +3935,7 @@ sctp_express_handle_sack(struct sctp_tcb #ifdef INVARIANTS panic("Impossible sack 1"); #else + *abort_now = 1; /* XXX */ oper = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) + sizeof(uint32_t)), @@ -4439,50 +4414,6 @@ again: } } -/* EY- nr_sack */ -/* Identifies the non-renegable tsns that are revoked*/ -static void -sctp_check_for_nr_revoked(struct sctp_tcb *stcb, - struct sctp_association *asoc, uint32_t cumack, - uint32_t biggest_tsn_acked) -{ - struct sctp_tmit_chunk *tp1; - - for (tp1 = TAILQ_FIRST(&asoc->sent_queue); tp1; tp1 = TAILQ_NEXT(tp1, sctp_next)) { - if (compare_with_wrap(tp1->rec.data.TSN_seq, cumack, - MAX_TSN)) { - /* - * ok this guy is either ACK or MARKED. If it is - * ACKED it has been previously acked but not this - * time i.e. revoked. If it is MARKED it was ACK'ed - * again. - */ - if (compare_with_wrap(tp1->rec.data.TSN_seq, biggest_tsn_acked, - MAX_TSN)) - break; - - - if (tp1->sent == SCTP_DATAGRAM_NR_ACKED) { - /* - * EY! a non-renegable TSN is revoked, need - * to abort the association - */ - /* - * EY TODO: put in the code to abort the - * assoc. - */ - return; - } else if (tp1->sent == SCTP_DATAGRAM_NR_MARKED) { - /* it has been re-acked in this SACK */ - tp1->sent = SCTP_DATAGRAM_NR_ACKED; - } - } - if (tp1->sent == SCTP_DATAGRAM_UNSENT) - break; - } - return; -} - void sctp_handle_sack(struct mbuf *m, int offset_seg, int offset_dup, struct sctp_tcb *stcb, struct sctp_nets *net_from, @@ -4588,22 +4519,23 @@ sctp_handle_sack(struct mbuf *m, int off sctpchunk_listhead); send_s = tp1->rec.data.TSN_seq + 1; } else { + tp1 = NULL; send_s = asoc->sending_seq; } if (cum_ack == send_s || compare_with_wrap(cum_ack, send_s, MAX_TSN)) { -#ifndef INVARIANTS struct mbuf *oper; -#endif -#ifdef INVARIANTS - hopeless_peer: - panic("Impossible sack 1"); -#else /* * no way, we have not even sent this TSN out yet. * Peer is hopelessly messed up with us. */ + printf("NEW cum_ack:%x send_s:%x is smaller or equal\n", + cum_ack, send_s); + if (tp1) { + printf("Got send_s from tsn:%x + 1 of tp1:%p\n", + tp1->rec.data.TSN_seq, tp1); + } hopeless_peer: *abort_now = 1; /* XXX */ @@ -4624,7 +4556,6 @@ sctp_handle_sack(struct mbuf *m, int off stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_25; sctp_abort_an_association(stcb->sctp_ep, stcb, SCTP_PEER_FAULTY, oper, SCTP_SO_NOT_LOCKED); return; -#endif } } /**********************/ @@ -4844,6 +4775,10 @@ sctp_handle_sack(struct mbuf *m, int off * peer is either confused or we are under * attack. We must abort. */ + printf("Hopeless peer! biggest_tsn_acked:%x largest seq:%x\n", + biggest_tsn_acked, + send_s); + goto hopeless_peer; } } @@ -4991,15 +4926,9 @@ done_with_it: */ if ((tp1->sent == SCTP_DATAGRAM_NR_ACKED) || (tp1->sent == SCTP_DATAGRAM_NR_MARKED)) { - /* - * EY! - TODO: Something previously - * nr_gapped is reneged, abort the - * association - */ - return; + continue; } - if ((tp1->sent > SCTP_DATAGRAM_RESEND) && - (tp1->sent < SCTP_FORWARD_TSN_SKIP)) { + if (tp1->sent == SCTP_DATAGRAM_ACKED) { tp1->sent = SCTP_DATAGRAM_SENT; if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_FLIGHT_LOGGING_ENABLE) { sctp_misc_ints(SCTP_FLIGHT_LOG_UP_REVOKE, @@ -5028,15 +4957,11 @@ done_with_it: } asoc->saw_sack_with_frags = 0; } - if (num_seg) + if (num_seg || num_nr_seg) asoc->saw_sack_with_frags = 1; else asoc->saw_sack_with_frags = 0; - /* EY! - not sure about if there should be an IF */ - if (num_nr_seg > 0) - sctp_check_for_nr_revoked(stcb, asoc, cum_ack, biggest_tsn_acked); - /* JRS - Use the congestion control given in the CC module */ asoc->cc_functions.sctp_cwnd_update_after_sack(stcb, asoc, accum_moved, reneged_all, will_exit_fast_recovery); @@ -5457,11 +5382,10 @@ sctp_kick_prsctp_reorder_queue(struct sc sctp_ucount_decr(asoc->cnt_on_all_streams); /* deliver it to at least the delivery-q */ if (stcb->sctp_socket) { - /* EY need the tsn info for calculating nr */ + sctp_mark_non_revokable(asoc, ctl->sinfo_tsn); sctp_add_to_readq(stcb->sctp_ep, stcb, ctl, &stcb->sctp_socket->so_rcv, 1, SCTP_READ_LOCK_HELD, SCTP_SO_NOT_LOCKED); - sctp_mark_non_revokable(asoc, ctl->sinfo_tsn); } } else { /* no more delivery now. */ @@ -5486,10 +5410,10 @@ sctp_kick_prsctp_reorder_queue(struct sc /* deliver it to at least the delivery-q */ strmin->last_sequence_delivered = ctl->sinfo_ssn; if (stcb->sctp_socket) { + sctp_mark_non_revokable(asoc, ctl->sinfo_tsn); sctp_add_to_readq(stcb->sctp_ep, stcb, ctl, &stcb->sctp_socket->so_rcv, 1, SCTP_READ_LOCK_HELD, SCTP_SO_NOT_LOCKED); - sctp_mark_non_revokable(asoc, ctl->sinfo_tsn); } tt = strmin->last_sequence_delivered + 1; @@ -5593,7 +5517,8 @@ sctp_flush_reassm_for_str_seq(struct sct void sctp_handle_forward_tsn(struct sctp_tcb *stcb, - struct sctp_forward_tsn_chunk *fwd, int *abort_flag, struct mbuf *m, int offset) + struct sctp_forward_tsn_chunk *fwd, + int *abort_flag, struct mbuf *m, int offset) { /* * ISSUES that MUST be fixed for ECN! When we are the sender of the @@ -5619,8 +5544,8 @@ sctp_handle_forward_tsn(struct sctp_tcb * report where we are. */ struct sctp_association *asoc; - uint32_t new_cum_tsn, gap; - unsigned int i, fwd_sz, cumack_set_flag, m_size; + uint32_t new_cum_tsn, tsn, gap; + unsigned int i, fwd_sz, cumack_set_flag, m_size, fnd = 0; uint32_t str_seq; struct sctp_stream_in *strm; struct sctp_tmit_chunk *chk, *at; @@ -5657,7 +5582,7 @@ sctp_handle_forward_tsn(struct sctp_tcb * now we know the new TSN is more advanced, let's find the actual * gap */ - SCTP_CALC_TSN_TO_GAP(gap, new_cum_tsn, asoc->nr_mapping_array_base_tsn); + SCTP_CALC_TSN_TO_GAP(gap, new_cum_tsn, asoc->mapping_array_base_tsn); asoc->cumulative_tsn = new_cum_tsn; if (gap >= m_size) { if ((long)gap > sctp_sbspace(&stcb->asoc, &stcb->sctp_socket->so_rcv)) { @@ -5697,8 +5622,7 @@ sctp_handle_forward_tsn(struct sctp_tcb asoc->mapping_array_base_tsn = new_cum_tsn + 1; asoc->highest_tsn_inside_map = new_cum_tsn; - memset(stcb->asoc.nr_mapping_array, 0, stcb->asoc.nr_mapping_array_size); - asoc->nr_mapping_array_base_tsn = new_cum_tsn + 1; + memset(stcb->asoc.nr_mapping_array, 0, stcb->asoc.mapping_array_size); asoc->highest_tsn_inside_nr_map = new_cum_tsn; if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_MAP_LOGGING_ENABLE) { @@ -5710,14 +5634,32 @@ sctp_handle_forward_tsn(struct sctp_tcb for (i = 0; i <= gap; i++) { SCTP_UNSET_TSN_PRESENT(asoc->mapping_array, i); SCTP_SET_TSN_PRESENT(asoc->nr_mapping_array, i); + /* FIX ME add something to set up highest TSN in map */ + } + if (compare_with_wrap(new_cum_tsn, asoc->highest_tsn_inside_nr_map, MAX_TSN)) { + asoc->highest_tsn_inside_nr_map = new_cum_tsn; + } + if (compare_with_wrap(new_cum_tsn, asoc->highest_tsn_inside_map, MAX_TSN) || + new_cum_tsn == asoc->highest_tsn_inside_map) { + /* We must back down to see what the new highest is */ + for (tsn = new_cum_tsn; (compare_with_wrap(tsn, asoc->mapping_array_base_tsn, MAX_TSN) || + (tsn == asoc->mapping_array_base_tsn)); tsn--) { + SCTP_CALC_TSN_TO_GAP(gap, tsn, asoc->mapping_array_base_tsn); + if (SCTP_IS_TSN_PRESENT(asoc->mapping_array, gap)) { + asoc->highest_tsn_inside_map = tsn; + fnd = 1; + break; + } + } + if (!fnd) { + asoc->highest_tsn_inside_map = asoc->mapping_array_base_tsn - 1; + } } /* * Now after marking all, slide thing forward but no sack * please. */ - sctp_sack_check(stcb, 0, 0, abort_flag); - if (*abort_flag) - return; + sctp_slide_mapping_arrays(stcb); } /*************************************************************/ /* 2. Clear up re-assembly queue */ Modified: head/sys/netinet/sctp_indata.h ============================================================================== --- head/sys/netinet/sctp_indata.h Sat Apr 3 12:34:32 2010 (r206136) +++ head/sys/netinet/sctp_indata.h Sat Apr 3 15:40:14 2010 (r206137) @@ -121,7 +121,9 @@ sctp_process_data(struct mbuf **, int, i struct sctp_inpcb *, struct sctp_tcb *, struct sctp_nets *, uint32_t *); -void sctp_sack_check(struct sctp_tcb *, int, int, int *); +void sctp_slide_mapping_arrays(struct sctp_tcb *stcb); + +void sctp_sack_check(struct sctp_tcb *, int, int *); #endif #endif Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Sat Apr 3 12:34:32 2010 (r206136) +++ head/sys/netinet/sctp_input.c Sat Apr 3 15:40:14 2010 (r206137) @@ -343,11 +343,6 @@ sctp_process_init(struct sctp_init_chunk asoc->str_reset_seq_in = asoc->asconf_seq_in + 1; asoc->mapping_array_base_tsn = ntohl(init->initial_tsn); - /* - * EY 05/13/08 - nr_sack: initialize nr_mapping array's base tsn - * like above - */ - asoc->nr_mapping_array_base_tsn = ntohl(init->initial_tsn); asoc->tsn_last_delivered = asoc->cumulative_tsn = asoc->asconf_seq_in; asoc->last_echo_tsn = asoc->asconf_seq_in; asoc->advanced_peer_ack_point = asoc->last_acked_seq; @@ -1862,7 +1857,7 @@ sctp_process_cookie_existing(struct mbuf } if (asoc->nr_mapping_array) { memset(asoc->nr_mapping_array, 0, - asoc->nr_mapping_array_size); + asoc->mapping_array_size); } SCTP_TCB_UNLOCK(stcb); SCTP_INP_INFO_WLOCK(); @@ -2027,7 +2022,7 @@ sctp_process_cookie_new(struct mbuf *m, * socket is unbound and we must do an implicit bind. Since we are * getting a cookie, we cannot be unbound. */ - stcb = sctp_aloc_assoc(inp, init_src, 0, &error, + stcb = sctp_aloc_assoc(inp, init_src, &error, ntohl(initack_cp->init.initiate_tag), vrf_id, (struct thread *)NULL ); @@ -3236,13 +3231,10 @@ process_chunk_drop(struct sctp_tcb *stcb } break; case SCTP_SELECTIVE_ACK: + case SCTP_NR_SELECTIVE_ACK: /* resend the sack */ sctp_send_sack(stcb); break; - /* EY for nr_sacks */ - case SCTP_NR_SELECTIVE_ACK: - sctp_send_nr_sack(stcb); /* EY resend the nr-sack */ - break; case SCTP_HEARTBEAT_REQUEST: /* resend a demand HB */ if ((stcb->asoc.overall_error_count + 3) < stcb->asoc.max_send_times) { @@ -3514,8 +3506,7 @@ sctp_handle_stream_reset_response(struct memset(stcb->asoc.mapping_array, 0, stcb->asoc.mapping_array_size); stcb->asoc.highest_tsn_inside_nr_map = stcb->asoc.highest_tsn_inside_map; - stcb->asoc.nr_mapping_array_base_tsn = stcb->asoc.mapping_array_base_tsn; - memset(stcb->asoc.nr_mapping_array, 0, stcb->asoc.nr_mapping_array_size); + memset(stcb->asoc.nr_mapping_array, 0, stcb->asoc.mapping_array_size); stcb->asoc.sending_seq = ntohl(resp->receivers_next_tsn); stcb->asoc.last_acked_seq = stcb->asoc.cumulative_tsn; @@ -3624,8 +3615,7 @@ sctp_handle_str_reset_request_tsn(struct stcb->asoc.mapping_array_base_tsn = stcb->asoc.highest_tsn_inside_map + 1; memset(stcb->asoc.mapping_array, 0, stcb->asoc.mapping_array_size); stcb->asoc.highest_tsn_inside_nr_map = stcb->asoc.highest_tsn_inside_map; - stcb->asoc.nr_mapping_array_base_tsn = stcb->asoc.highest_tsn_inside_map + 1; - memset(stcb->asoc.nr_mapping_array, 0, stcb->asoc.nr_mapping_array_size); + memset(stcb->asoc.nr_mapping_array, 0, stcb->asoc.mapping_array_size); atomic_add_int(&stcb->asoc.sending_seq, 1); /* save off historical data for retrans */ stcb->asoc.last_sending_seq[1] = stcb->asoc.last_sending_seq[0]; @@ -5636,7 +5626,7 @@ sctp_common_input_processing(struct mbuf was_a_gap = 1; } stcb->asoc.send_sack = 1; - sctp_sack_check(stcb, 1, was_a_gap, &abort_flag); + sctp_sack_check(stcb, was_a_gap, &abort_flag); if (abort_flag) { /* Again, we aborted so NO UNLOCK needed */ goto out_now; Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Sat Apr 3 12:34:32 2010 (r206136) +++ head/sys/netinet/sctp_output.c Sat Apr 3 15:40:14 2010 (r206137) @@ -9003,6 +9003,11 @@ sctp_chunk_retransmission(struct sctp_in /* No, not sent to this net or not ready for rtx */ continue; } + if (chk->data == NULL) { + printf("TSN:%x chk->snd_count:%d chk->sent:%d can't retran - no data\n", + chk->rec.data.TSN_seq, chk->snd_count, chk->sent); + continue; + } if ((SCTP_BASE_SYSCTL(sctp_max_retran_chunk)) && (chk->snd_count >= SCTP_BASE_SYSCTL(sctp_max_retran_chunk))) { /* Gak, we have exceeded max unlucky retran, abort! */ @@ -9426,14 +9431,7 @@ sctp_chunk_output(struct sctp_inpcb *inp * running, if so piggy-back the sack. */ if (SCTP_OS_TIMER_PENDING(&stcb->asoc.dack_timer.timer)) { - /* - * EY if nr_sacks used then send an nr-sack , a sack - * otherwise - */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && asoc->peer_supports_nr_sack) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Sat Apr 3 16:20:22 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CBEDE1065688; Sat, 3 Apr 2010 16:20:22 +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 BBF058FC13; Sat, 3 Apr 2010 16:20:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o33GKMnZ037334; Sat, 3 Apr 2010 16:20:22 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o33GKM0n037332; Sat, 3 Apr 2010 16:20:22 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201004031620.o33GKM0n037332@svn.freebsd.org> From: Alan Cox Date: Sat, 3 Apr 2010 16:20: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: r206140 - head/sys/vm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Apr 2010 16:20:22 -0000 Author: alc Date: Sat Apr 3 16:20:22 2010 New Revision: 206140 URL: http://svn.freebsd.org/changeset/base/206140 Log: Re-enable the call to pmap_release() by vmspace_dofree(). The accounting problem that is described in the comment has been addressed. Submitted by: kib Tested by: pho (a few months ago) MFC after: 6 weeks Modified: head/sys/vm/vm_map.c Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Sat Apr 3 15:52:32 2010 (r206139) +++ head/sys/vm/vm_map.c Sat Apr 3 16:20:22 2010 (r206140) @@ -313,6 +313,7 @@ vm_init2(void) static inline void vmspace_dofree(struct vmspace *vm) { + CTR1(KTR_VM, "vmspace_free: %p", vm); /* @@ -329,12 +330,8 @@ vmspace_dofree(struct vmspace *vm) (void)vm_map_remove(&vm->vm_map, vm->vm_map.min_offset, vm->vm_map.max_offset); - /* - * XXX Comment out the pmap_release call for now. The - * vmspace_zone is marked as UMA_ZONE_NOFREE, and bugs cause - * pmap.resident_count to be != 0 on exit sometimes. - */ -/* pmap_release(vmspace_pmap(vm)); */ + pmap_release(vmspace_pmap(vm)); + vm->vm_map.pmap = NULL; uma_zfree(vmspace_zone, vm); } From owner-svn-src-head@FreeBSD.ORG Sat Apr 3 17:22:28 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D76BD106564A; Sat, 3 Apr 2010 17:22:28 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C77528FC15; Sat, 3 Apr 2010 17:22:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o33HMSRE050946; Sat, 3 Apr 2010 17:22:28 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o33HMSZh050945; Sat, 3 Apr 2010 17:22:28 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201004031722.o33HMSZh050945@svn.freebsd.org> From: Ed Schouten Date: Sat, 3 Apr 2010 17:22: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: r206141 - head/sys/teken X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Apr 2010 17:22:28 -0000 Author: ed Date: Sat Apr 3 17:22:28 2010 New Revision: 206141 URL: http://svn.freebsd.org/changeset/base/206141 Log: Just use instead of . We don't need it here. Modified: head/sys/teken/teken.c Modified: head/sys/teken/teken.c ============================================================================== --- head/sys/teken/teken.c Sat Apr 3 16:20:22 2010 (r206140) +++ head/sys/teken/teken.c Sat Apr 3 17:22:28 2010 (r206141) @@ -36,7 +36,7 @@ #else /* !(__FreeBSD__ && _KERNEL) */ #include #include -#include +#include #include #include #define teken_assert(x) assert(x) From owner-svn-src-head@FreeBSD.ORG Sat Apr 3 19:07:06 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 37ABE106564A; Sat, 3 Apr 2010 19:07:06 +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 2657A8FC0A; Sat, 3 Apr 2010 19:07:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o33J76Kr073750; Sat, 3 Apr 2010 19:07:06 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o33J76Ck073746; Sat, 3 Apr 2010 19:07:06 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201004031907.o33J76Ck073746@svn.freebsd.org> From: Alan Cox Date: Sat, 3 Apr 2010 19:07: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: r206142 - in head/sys: kern vm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Apr 2010 19:07:06 -0000 Author: alc Date: Sat Apr 3 19:07:05 2010 New Revision: 206142 URL: http://svn.freebsd.org/changeset/base/206142 Log: Make _vm_map_init() the one place where the vm map's pmap field is initialized. Reviewed by: kib Modified: head/sys/kern/init_main.c head/sys/vm/vm_map.c head/sys/vm/vm_map.h Modified: head/sys/kern/init_main.c ============================================================================== --- head/sys/kern/init_main.c Sat Apr 3 17:22:28 2010 (r206141) +++ head/sys/kern/init_main.c Sat Apr 3 19:07:05 2010 (r206142) @@ -510,9 +510,8 @@ proc0_init(void *dummy __unused) * proc0 is not expected to enter usermode, so there is no special * handling for sv_minuser here, like is done for exec_new_vmspace(). */ - vm_map_init(&vmspace0.vm_map, p->p_sysent->sv_minuser, - p->p_sysent->sv_maxuser); - vmspace0.vm_map.pmap = vmspace_pmap(&vmspace0); + vm_map_init(&vmspace0.vm_map, vmspace_pmap(&vmspace0), + p->p_sysent->sv_minuser, p->p_sysent->sv_maxuser); /*- * call the init and ctor for the new thread and proc Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Sat Apr 3 17:22:28 2010 (r206141) +++ head/sys/vm/vm_map.c Sat Apr 3 19:07:05 2010 (r206142) @@ -126,7 +126,8 @@ static int vmspace_zinit(void *mem, int static void vmspace_zfini(void *mem, int size); static int vm_map_zinit(void *mem, int ize, int flags); static void vm_map_zfini(void *mem, int size); -static void _vm_map_init(vm_map_t map, vm_offset_t min, vm_offset_t max); +static void _vm_map_init(vm_map_t map, pmap_t pmap, vm_offset_t min, + vm_offset_t max); static void vm_map_entry_dispose(vm_map_t map, vm_map_entry_t entry); #ifdef INVARIANTS static void vm_map_zdtor(void *mem, int size, void *arg); @@ -281,8 +282,7 @@ vmspace_alloc(min, max) return (NULL); } CTR1(KTR_VM, "vmspace_alloc: %p", vm); - _vm_map_init(&vm->vm_map, min, max); - vm->vm_map.pmap = vmspace_pmap(vm); /* XXX */ + _vm_map_init(&vm->vm_map, vmspace_pmap(vm), min, max); vm->vm_refcnt = 1; vm->vm_shm = NULL; vm->vm_swrss = 0; @@ -678,23 +678,22 @@ vm_map_create(pmap_t pmap, vm_offset_t m result = uma_zalloc(mapzone, M_WAITOK); CTR1(KTR_VM, "vm_map_create: %p", result); - _vm_map_init(result, min, max); - result->pmap = pmap; + _vm_map_init(result, pmap, min, max); return (result); } /* * Initialize an existing vm_map structure * such as that in the vmspace structure. - * The pmap is set elsewhere. */ static void -_vm_map_init(vm_map_t map, vm_offset_t min, vm_offset_t max) +_vm_map_init(vm_map_t map, pmap_t pmap, vm_offset_t min, vm_offset_t max) { map->header.next = map->header.prev = &map->header; map->needs_wakeup = FALSE; map->system_map = 0; + map->pmap = pmap; map->min_offset = min; map->max_offset = max; map->flags = 0; @@ -704,9 +703,10 @@ _vm_map_init(vm_map_t map, vm_offset_t m } void -vm_map_init(vm_map_t map, vm_offset_t min, vm_offset_t max) +vm_map_init(vm_map_t map, pmap_t pmap, vm_offset_t min, vm_offset_t max) { - _vm_map_init(map, min, max); + + _vm_map_init(map, pmap, min, max); mtx_init(&map->system_mtx, "system map", NULL, MTX_DEF | MTX_DUPOK); sx_init(&map->lock, "user map"); } Modified: head/sys/vm/vm_map.h ============================================================================== --- head/sys/vm/vm_map.h Sat Apr 3 17:22:28 2010 (r206141) +++ head/sys/vm/vm_map.h Sat Apr 3 19:07:05 2010 (r206142) @@ -346,7 +346,7 @@ int vm_map_fixed(vm_map_t, vm_object_t, vm_prot_t, vm_prot_t, int); int vm_map_findspace (vm_map_t, vm_offset_t, vm_size_t, vm_offset_t *); int vm_map_inherit (vm_map_t, vm_offset_t, vm_offset_t, vm_inherit_t); -void vm_map_init (struct vm_map *, vm_offset_t, vm_offset_t); +void vm_map_init(vm_map_t, pmap_t, vm_offset_t, vm_offset_t); int vm_map_insert (vm_map_t, vm_object_t, vm_ooffset_t, vm_offset_t, vm_offset_t, vm_prot_t, vm_prot_t, int); int vm_map_lookup (vm_map_t *, vm_offset_t, vm_prot_t, vm_map_entry_t *, vm_object_t *, vm_pindex_t *, vm_prot_t *, boolean_t *); From owner-svn-src-head@FreeBSD.ORG Sat Apr 3 20:14:11 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2819A1065670; Sat, 3 Apr 2010 20:14:11 +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 0BA1F8FC0A; Sat, 3 Apr 2010 20:14:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o33KEA0G088376; Sat, 3 Apr 2010 20:14:10 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o33KEA2O088375; Sat, 3 Apr 2010 20:14:10 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201004032014.o33KEA2O088375@svn.freebsd.org> From: Jilles Tjoelker Date: Sat, 3 Apr 2010 20:14: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: r206143 - head/tools/regression/bin/sh/expansion X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Apr 2010 20:14:11 -0000 Author: jilles Date: Sat Apr 3 20:14:10 2010 New Revision: 206143 URL: http://svn.freebsd.org/changeset/base/206143 Log: sh: Add some testcases for the working parts of ${v%...} and ${v#...}. Added: head/tools/regression/bin/sh/expansion/trim1.0 (contents, props changed) Added: head/tools/regression/bin/sh/expansion/trim1.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/expansion/trim1.0 Sat Apr 3 20:14:10 2010 (r206143) @@ -0,0 +1,85 @@ +# $FreeBSD$ + +e= q='?' a='*' t=texttext s='ast*que?non' p='/et[c]/' w='a b c' b='{{(#)}}' +h='##' +failures='' +ok='' + +testcase() { + code="$1" + expected="$2" + oIFS="$IFS" + eval "$code" + IFS='|' + result="$#|$*" + IFS="$oIFS" + if [ "x$result" = "x$expected" ]; then + ok=x$ok + else + failures=x$failures + echo "For $code, expected $expected actual $result" + fi +} + +testcase 'set -- ${t%t}' '1|texttex' +testcase 'set -- "${t%t}"' '1|texttex' +testcase 'set -- ${t%e*}' '1|textt' +testcase 'set -- "${t%e*}"' '1|textt' +testcase 'set -- ${t%%e*}' '1|t' +testcase 'set -- "${t%%e*}"' '1|t' +testcase 'set -- ${t%%*}' '0|' +testcase 'set -- "${t%%*}"' '1|' +testcase 'set -- ${t#t}' '1|exttext' +testcase 'set -- "${t#t}"' '1|exttext' +testcase 'set -- ${t#*x}' '1|ttext' +testcase 'set -- "${t#*x}"' '1|ttext' +testcase 'set -- ${t##*x}' '1|t' +testcase 'set -- "${t##*x}"' '1|t' +testcase 'set -- ${t##*}' '0|' +testcase 'set -- "${t##*}"' '1|' +testcase 'set -- ${t%e$a}' '1|textt' + +set -f +testcase 'set -- ${s%[?]*}' '1|ast*que' +testcase 'set -- "${s%[?]*}"' '1|ast*que' +testcase 'set -- ${s%[*]*}' '1|ast' +testcase 'set -- "${s%[*]*}"' '1|ast' +set +f + +testcase 'set -- $b' '1|{{(#)}}' +testcase 'set -- ${b%\}}' '1|{{(#)}' +testcase 'set -- ${b#{}' '1|{(#)}}' +testcase 'set -- "${b#{}"' '1|{(#)}}' +# Parentheses are special in ksh, check that they can be escaped +testcase 'set -- ${b%\)*}' '1|{{(#' +testcase 'set -- ${b#{}' '1|{(#)}}' +testcase 'set -- $h' '1|##' +testcase 'set -- ${h#\#}' '1|#' +testcase 'set -- ${h###}' '1|#' +testcase 'set -- "${h###}"' '1|#' +testcase 'set -- ${h%#}' '1|#' +testcase 'set -- "${h%#}"' '1|#' + +set -f +testcase 'set -- ${s%"${s#?}"}' '1|a' +testcase 'set -- ${s%"${s#????}"}' '1|ast*' +testcase 'set -- ${s%"${s#????????}"}' '1|ast*que?' +testcase 'set -- ${s#"${s%?}"}' '1|n' +testcase 'set -- ${s#"${s%????}"}' '1|?non' +testcase 'set -- ${s#"${s%????????}"}' '1|*que?non' +set +f +testcase 'set -- "${s%"${s#?}"}"' '1|a' +testcase 'set -- "${s%"${s#????}"}"' '1|ast*' +testcase 'set -- "${s%"${s#????????}"}"' '1|ast*que?' +testcase 'set -- "${s#"${s%?}"}"' '1|n' +testcase 'set -- "${s#"${s%????}"}"' '1|?non' +testcase 'set -- "${s#"${s%????????}"}"' '1|*que?non' +testcase 'set -- ${p#${p}}' '1|/etc/' +testcase 'set -- "${p#${p}}"' '1|/et[c]/' +testcase 'set -- ${p#*[[]}' '1|c]/' +testcase 'set -- "${p#*[[]}"' '1|c]/' +testcase 'set -- ${p#*\[}' '1|c]/' +testcase 'set -- ${p#*"["}' '1|c]/' +testcase 'set -- "${p#*"["}"' '1|c]/' + +test "x$failures" = x From owner-svn-src-head@FreeBSD.ORG Sat Apr 3 20:35:39 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 84D5E106564A; Sat, 3 Apr 2010 20:35:39 +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 73C418FC12; Sat, 3 Apr 2010 20:35:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o33KZdC2093114; Sat, 3 Apr 2010 20:35:39 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o33KZdoS093112; Sat, 3 Apr 2010 20:35:39 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201004032035.o33KZdoS093112@svn.freebsd.org> From: Jilles Tjoelker Date: Sat, 3 Apr 2010 20:35: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: r206144 - head/bin/sh X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Apr 2010 20:35:39 -0000 Author: jilles Date: Sat Apr 3 20:35:39 2010 New Revision: 206144 URL: http://svn.freebsd.org/changeset/base/206144 Log: sh: Treat unexpected newlines in substitutions as a syntax error. The old approach was wrong because PS2 was not used and seems unlikely to parse extensions (ksh93's ${ COMMAND} may well fail to parse). Exp-run done by: erwin (with some other sh(1) changes) Modified: head/bin/sh/parser.c Modified: head/bin/sh/parser.c ============================================================================== --- head/bin/sh/parser.c Sat Apr 3 20:14:10 2010 (r206143) +++ head/bin/sh/parser.c Sat Apr 3 20:35:39 2010 (r206144) @@ -1401,6 +1401,8 @@ parsesub: { subtype = VSERROR; if (c == '}') pungetc(); + else if (c == '\n' || c == PEOF) + synerror("Unexpected end of line in substitution"); else USTPUTC(c, out); } else { @@ -1417,6 +1419,8 @@ parsesub: { default: p = strchr(types, c); if (p == NULL) { + if (c == '\n' || c == PEOF) + synerror("Unexpected end of line in substitution"); if (flags == VSNUL) STPUTC(':', out); STPUTC(c, out); From owner-svn-src-head@FreeBSD.ORG Sat Apr 3 20:55:57 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 144F31065672; Sat, 3 Apr 2010 20:55:57 +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 014128FC1B; Sat, 3 Apr 2010 20:55:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o33Ktvxg097602; Sat, 3 Apr 2010 20:55:57 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o33KtvTr097599; Sat, 3 Apr 2010 20:55:57 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201004032055.o33KtvTr097599@svn.freebsd.org> From: Jilles Tjoelker Date: Sat, 3 Apr 2010 20:55: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: r206145 - in head: bin/sh tools/regression/bin/sh/expansion tools/regression/bin/sh/parser X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Apr 2010 20:55:57 -0000 Author: jilles Date: Sat Apr 3 20:55:56 2010 New Revision: 206145 URL: http://svn.freebsd.org/changeset/base/206145 Log: sh: Fix various things about expansions: * remove the backslash from \} inside double quotes inside +-=? substitutions, e.g. "${$+\}a}" * maintain separate double-quote state for ${v#...} and ${v%...}; single and double quotes are special inside, even in a double-quoted string or here document * keep track of correct order of substitutions and arithmetic This is different from dash's approach, which does not track individual double quotes in the parser, trying to fix this up during expansion. This treats single quotes inside "${v#...}" incorrectly, however. This is similar to NetBSD's approach (as submitted in PR bin/57554), but recognizes the difference between +-=? and #% substitutions hinted at in POSIX and is more refined for arithmetic expansion and here documents. PR: bin/57554 Exp-run done by: erwin (with some other sh(1) changes) Added: head/tools/regression/bin/sh/expansion/plus-minus2.0 (contents, props changed) head/tools/regression/bin/sh/parser/heredoc2.0 (contents, props changed) Modified: head/bin/sh/parser.c Modified: head/bin/sh/parser.c ============================================================================== --- head/bin/sh/parser.c Sat Apr 3 20:35:39 2010 (r206144) +++ head/bin/sh/parser.c Sat Apr 3 20:55:56 2010 (r206145) @@ -79,6 +79,10 @@ struct heredoc { int striptabs; /* if set, strip leading tabs */ }; +struct parser_temp { + struct parser_temp *next; + void *data; +}; STATIC struct heredoc *heredoclist; /* list of here documents to read */ @@ -94,6 +98,7 @@ STATIC struct heredoc *heredoc; STATIC int quoteflag; /* set if (part of) last token was quoted */ STATIC int startlinno; /* line # where last token started */ STATIC int funclinno; /* line # where the current function started */ +STATIC struct parser_temp *parser_temp; /* XXX When 'noaliases' is set to one, no alias expansion takes place. */ static int noaliases = 0; @@ -117,6 +122,73 @@ STATIC void synerror(const char *); STATIC void setprompt(int); +STATIC void * +parser_temp_alloc(size_t len) +{ + struct parser_temp *t; + + INTOFF; + t = ckmalloc(sizeof(*t)); + t->data = NULL; + t->next = parser_temp; + parser_temp = t; + t->data = ckmalloc(len); + INTON; + return t->data; +} + + +STATIC void * +parser_temp_realloc(void *ptr, size_t len) +{ + struct parser_temp *t; + + INTOFF; + t = parser_temp; + if (ptr != t->data) + error("bug: parser_temp_realloc misused"); + t->data = ckrealloc(t->data, len); + INTON; + return t->data; +} + + +STATIC void +parser_temp_free_upto(void *ptr) +{ + struct parser_temp *t; + int done = 0; + + INTOFF; + while (parser_temp != NULL && !done) { + t = parser_temp; + parser_temp = t->next; + done = t->data == ptr; + ckfree(t->data); + ckfree(t); + } + INTON; + if (!done) + error("bug: parser_temp_free_upto misused"); +} + + +STATIC void +parser_temp_free_all(void) +{ + struct parser_temp *t; + + INTOFF; + while (parser_temp != NULL) { + t = parser_temp; + parser_temp = t->next; + ckfree(t->data); + ckfree(t); + } + INTON; +} + + /* * Read and parse a command. Returns NEOF on end of file. (NULL is a * valid parse tree indicating a blank line.) @@ -127,6 +199,11 @@ parsecmd(int interact) { int t; + /* This assumes the parser is not re-entered, + * which could happen if we add command substitution on PS1/PS2. + */ + parser_temp_free_all(); + tokpushback = 0; doprompt = interact; if (doprompt) @@ -863,6 +940,21 @@ breakloop: } +#define MAXNEST_STATIC 8 +struct tokenstate +{ + const char *syntax; /* *SYNTAX */ + int parenlevel; /* levels of parentheses in arithmetic */ + enum tokenstate_category + { + TSTATE_TOP, + TSTATE_VAR_OLD, /* ${var+-=?}, inherits dquotes */ + TSTATE_VAR_NEW, /* other ${var...}, own dquote state */ + TSTATE_ARITH + } category; +}; + + /* * Called to parse command substitutions. */ @@ -1040,7 +1132,7 @@ done: #define PARSEARITH() {goto parsearith; parsearith_return:;} STATIC int -readtoken1(int firstc, char const *syntax, char *eofmark, int striptabs) +readtoken1(int firstc, char const *initialsyntax, char *eofmark, int striptabs) { int c = firstc; char *out; @@ -1048,22 +1140,21 @@ readtoken1(int firstc, char const *synta char line[EOFMARKLEN + 1]; struct nodelist *bqlist; int quotef; - int dblquote; - int varnest; /* levels of variables expansion */ - int arinest; /* levels of arithmetic expansion */ - int parenlevel; /* levels of parens in arithmetic */ - char const *prevsyntax; /* syntax before arithmetic */ + int newvarnest; + int level; int synentry; + struct tokenstate state_static[MAXNEST_STATIC]; + int maxnest = MAXNEST_STATIC; + struct tokenstate *state = state_static; startlinno = plinno; - dblquote = 0; - if (syntax == DQSYNTAX) - dblquote = 1; quotef = 0; bqlist = NULL; - varnest = 0; - arinest = 0; - parenlevel = 0; + newvarnest = 0; + level = 0; + state[level].syntax = initialsyntax; + state[level].parenlevel = 0; + state[level].category = TSTATE_TOP; STARTSTACKSTR(out); loop: { /* for each line, until end of word */ @@ -1071,11 +1162,11 @@ readtoken1(int firstc, char const *synta for (;;) { /* until end of line or end of word */ CHECKSTRSPACE(3, out); /* permit 3 calls to USTPUTC */ - synentry = syntax[c]; + synentry = state[level].syntax[c]; switch(synentry) { case CNL: /* '\n' */ - if (syntax == BASESYNTAX) + if (state[level].syntax == BASESYNTAX) goto endword; /* exit outer loop */ USTPUTC(c, out); plinno++; @@ -1089,7 +1180,7 @@ readtoken1(int firstc, char const *synta USTPUTC(c, out); break; case CCTL: - if (eofmark == NULL || dblquote) + if (eofmark == NULL || initialsyntax != SQSYNTAX) USTPUTC(CTLESC, out); USTPUTC(c, out); break; @@ -1105,41 +1196,37 @@ readtoken1(int firstc, char const *synta else setprompt(0); } else { - if (dblquote && c != '\\' && - c != '`' && c != '$' && - (c != '"' || eofmark != NULL)) + if (state[level].syntax == DQSYNTAX && + c != '\\' && c != '`' && c != '$' && + (c != '"' || (eofmark != NULL && + newvarnest == 0)) && + (c != '}' || state[level].category != TSTATE_VAR_OLD)) USTPUTC('\\', out); if (SQSYNTAX[c] == CCTL) USTPUTC(CTLESC, out); - else if (eofmark == NULL) + else if (eofmark == NULL || + newvarnest > 0) USTPUTC(CTLQUOTEMARK, out); USTPUTC(c, out); quotef++; } break; case CSQUOTE: - if (eofmark == NULL) - USTPUTC(CTLQUOTEMARK, out); - syntax = SQSYNTAX; + USTPUTC(CTLQUOTEMARK, out); + state[level].syntax = SQSYNTAX; break; case CDQUOTE: - if (eofmark == NULL) - USTPUTC(CTLQUOTEMARK, out); - syntax = DQSYNTAX; - dblquote = 1; + USTPUTC(CTLQUOTEMARK, out); + state[level].syntax = DQSYNTAX; break; case CENDQUOTE: - if (eofmark != NULL && arinest == 0 && - varnest == 0) { + if (eofmark != NULL && newvarnest == 0) USTPUTC(c, out); - } else { - if (arinest) { - syntax = ARISYNTAX; - dblquote = 0; - } else if (eofmark == NULL) { - syntax = BASESYNTAX; - dblquote = 0; - } + else { + if (state[level].category == TSTATE_ARITH) + state[level].syntax = ARISYNTAX; + else + state[level].syntax = BASESYNTAX; quotef++; } break; @@ -1147,30 +1234,33 @@ readtoken1(int firstc, char const *synta PARSESUB(); /* parse substitution */ break; case CENDVAR: /* '}' */ - if (varnest > 0) { - varnest--; + if (level > 0 && + (state[level].category == TSTATE_VAR_OLD || + state[level].category == TSTATE_VAR_NEW)) { + if (state[level].category == TSTATE_VAR_OLD) + state[level - 1].syntax = state[level].syntax; + else + newvarnest--; + level--; USTPUTC(CTLENDVAR, out); } else { USTPUTC(c, out); } break; case CLP: /* '(' in arithmetic */ - parenlevel++; + state[level].parenlevel++; USTPUTC(c, out); break; case CRP: /* ')' in arithmetic */ - if (parenlevel > 0) { + if (state[level].parenlevel > 0) { USTPUTC(c, out); - --parenlevel; + --state[level].parenlevel; } else { if (pgetc() == ')') { - if (--arinest == 0) { + if (level > 0 && + state[level].category == TSTATE_ARITH) { + level--; USTPUTC(CTLENDARI, out); - syntax = prevsyntax; - if (syntax == DQSYNTAX) - dblquote = 1; - else - dblquote = 0; } else USTPUTC(')', out); } else { @@ -1184,13 +1274,15 @@ readtoken1(int firstc, char const *synta } break; case CBQUOTE: /* '`' */ - out = parsebackq(out, &bqlist, 1, dblquote, - arinest || dblquote); + out = parsebackq(out, &bqlist, 1, + state[level].syntax == DQSYNTAX && + (eofmark == NULL || newvarnest > 0), + state[level].syntax == DQSYNTAX || state[level].syntax == ARISYNTAX); break; case CEOF: goto endword; /* exit outer loop */ default: - if (varnest == 0) + if (level == 0) goto endword; /* exit outer loop */ USTPUTC(c, out); } @@ -1198,14 +1290,17 @@ readtoken1(int firstc, char const *synta } } endword: - if (syntax == ARISYNTAX) + if (state[level].syntax == ARISYNTAX) synerror("Missing '))'"); - if (syntax != BASESYNTAX && eofmark == NULL) + if (state[level].syntax != BASESYNTAX && eofmark == NULL) synerror("Unterminated quoted string"); - if (varnest != 0) { + if (state[level].category == TSTATE_VAR_OLD || + state[level].category == TSTATE_VAR_NEW) { startlinno = plinno; synerror("Missing '}'"); } + if (state != state_static) + parser_temp_free_upto(state); USTPUTC('\0', out); len = out - stackblock(); out = stackblock(); @@ -1228,7 +1323,6 @@ endword: /* end of readtoken routine */ - /* * Check to see whether we are at the end of the here document. When this * is called, c is set to the first character of the next input line. If @@ -1345,8 +1439,11 @@ parsesub: { PARSEARITH(); } else { pungetc(); - out = parsebackq(out, &bqlist, 0, dblquote, - arinest || dblquote); + out = parsebackq(out, &bqlist, 0, + state[level].syntax == DQSYNTAX && + (eofmark == NULL || newvarnest > 0), + state[level].syntax == DQSYNTAX || + state[level].syntax == ARISYNTAX); } } else { USTPUTC(CTLVAR, out); @@ -1446,11 +1543,44 @@ parsesub: { pungetc(); } STPUTC('=', out); - if (subtype != VSLENGTH && (dblquote || arinest)) + if (subtype != VSLENGTH && (state[level].syntax == DQSYNTAX || + state[level].syntax == ARISYNTAX)) flags |= VSQUOTE; *(stackblock() + typeloc) = subtype | flags; - if (subtype != VSNORMAL) - varnest++; + if (subtype != VSNORMAL) { + if (level + 1 >= maxnest) { + maxnest *= 2; + if (state == state_static) { + state = parser_temp_alloc( + maxnest * sizeof(*state)); + memcpy(state, state_static, + MAXNEST_STATIC * sizeof(*state)); + } else + state = parser_temp_realloc(state, + maxnest * sizeof(*state)); + } + level++; + state[level].parenlevel = 0; + if (subtype == VSMINUS || subtype == VSPLUS || + subtype == VSQUESTION || subtype == VSASSIGN) { + /* + * For operators that were in the Bourne shell, + * inherit the double-quote state. + */ + state[level].syntax = state[level - 1].syntax; + state[level].category = TSTATE_VAR_OLD; + } else { + /* + * The other operators take a pattern, + * so go to BASESYNTAX. + * Also, ' and " are now special, even + * in here documents. + */ + state[level].syntax = BASESYNTAX; + state[level].category = TSTATE_VAR_NEW; + newvarnest++; + } + } } goto parsesub_return; } @@ -1461,21 +1591,26 @@ parsesub: { */ parsearith: { - if (++arinest == 1) { - prevsyntax = syntax; - syntax = ARISYNTAX; - USTPUTC(CTLARI, out); - if (dblquote) - USTPUTC('"',out); - else - USTPUTC(' ',out); - } else { - /* - * we collapse embedded arithmetic expansion to - * parenthesis, which should be equivalent - */ - USTPUTC('(', out); + if (level + 1 >= maxnest) { + maxnest *= 2; + if (state == state_static) { + state = parser_temp_alloc( + maxnest * sizeof(*state)); + memcpy(state, state_static, + MAXNEST_STATIC * sizeof(*state)); + } else + state = parser_temp_realloc(state, + maxnest * sizeof(*state)); } + level++; + state[level].syntax = ARISYNTAX; + state[level].parenlevel = 0; + state[level].category = TSTATE_ARITH; + USTPUTC(CTLARI, out); + if (state[level - 1].syntax == DQSYNTAX) + USTPUTC('"',out); + else + USTPUTC(' ',out); goto parsearith_return; } Added: head/tools/regression/bin/sh/expansion/plus-minus2.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/expansion/plus-minus2.0 Sat Apr 3 20:55:56 2010 (r206145) @@ -0,0 +1,4 @@ +# $FreeBSD$ + +e= +test "${e:-\}}" = '}' Added: head/tools/regression/bin/sh/parser/heredoc2.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/parser/heredoc2.0 Sat Apr 3 20:55:56 2010 (r206145) @@ -0,0 +1,44 @@ +# $FreeBSD$ + +failures=0 + +check() { + if ! eval "[ $* ]"; then + echo "Failed: $*" + : $((failures += 1)) + fi +} + +s='ast*que?non' sq=\' dq=\" + +check '"$(cat < Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6067C106566B; Sat, 3 Apr 2010 21:01:01 +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 4F6588FC14; Sat, 3 Apr 2010 21:01:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o33L11hi098767; Sat, 3 Apr 2010 21:01:01 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o33L111r098764; Sat, 3 Apr 2010 21:01:01 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201004032101.o33L111r098764@svn.freebsd.org> From: Jilles Tjoelker Date: Sat, 3 Apr 2010 21:01: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: r206146 - head/bin/sh X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Apr 2010 21:01:01 -0000 Author: jilles Date: Sat Apr 3 21:01:01 2010 New Revision: 206146 URL: http://svn.freebsd.org/changeset/base/206146 Log: sh: Remove special handling for ' and " in arithmetic. They will be treated like normal characters, resulting in a runtime arithmetic expression error. Exp-run done by: erwin (with some other sh(1) changes) Modified: head/bin/sh/mksyntax.c head/bin/sh/parser.c Modified: head/bin/sh/mksyntax.c ============================================================================== --- head/bin/sh/mksyntax.c Sat Apr 3 20:55:56 2010 (r206145) +++ head/bin/sh/mksyntax.c Sat Apr 3 21:01:01 2010 (r206146) @@ -232,8 +232,6 @@ main(int argc __unused, char **argv __un add("\n", "CNL"); add("\\", "CBACK"); add("`", "CBQUOTE"); - add("'", "CSQUOTE"); - add("\"", "CDQUOTE"); add("$", "CVAR"); add("}", "CENDVAR"); add("(", "CLP"); Modified: head/bin/sh/parser.c ============================================================================== --- head/bin/sh/parser.c Sat Apr 3 20:55:56 2010 (r206145) +++ head/bin/sh/parser.c Sat Apr 3 21:01:01 2010 (r206146) @@ -1223,10 +1223,7 @@ readtoken1(int firstc, char const *initi if (eofmark != NULL && newvarnest == 0) USTPUTC(c, out); else { - if (state[level].category == TSTATE_ARITH) - state[level].syntax = ARISYNTAX; - else - state[level].syntax = BASESYNTAX; + state[level].syntax = BASESYNTAX; quotef++; } break; From owner-svn-src-head@FreeBSD.ORG Sat Apr 3 21:07:51 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 02889106566B; Sat, 3 Apr 2010 21:07:51 +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 CAF358FC15; Sat, 3 Apr 2010 21:07:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o33L7okK000407; Sat, 3 Apr 2010 21:07:50 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o33L7os9000404; Sat, 3 Apr 2010 21:07:50 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201004032107.o33L7os9000404@svn.freebsd.org> From: Jilles Tjoelker Date: Sat, 3 Apr 2010 21:07: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: r206147 - in head: bin/sh tools/regression/bin/sh/expansion X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Apr 2010 21:07:51 -0000 Author: jilles Date: Sat Apr 3 21:07:50 2010 New Revision: 206147 URL: http://svn.freebsd.org/changeset/base/206147 Log: sh: Allow quoting pattern match characters in ${v%pat} and ${v#pat}. Note that this depends on r206145 for allowing pattern match characters to have their special meaning inside a double-quoted expansion like "${v%pat}". PR: bin/117748 Exp-run done by: erwin (with some other sh(1) changes) Added: head/tools/regression/bin/sh/expansion/trim2.0 (contents, props changed) Modified: head/bin/sh/expand.c Modified: head/bin/sh/expand.c ============================================================================== --- head/bin/sh/expand.c Sat Apr 3 21:01:01 2010 (r206146) +++ head/bin/sh/expand.c Sat Apr 3 21:07:50 2010 (r206147) @@ -506,7 +506,9 @@ subevalvar(char *p, char *str, int strlo int amount; herefd = -1; - argstr(p, 0); + argstr(p, subtype == VSTRIMLEFT || subtype == VSTRIMLEFTMAX || + subtype == VSTRIMRIGHT || subtype == VSTRIMRIGHTMAX ? + EXP_CASE : 0); STACKSTRNUL(expdest); herefd = saveherefd; argbackq = saveargbackq; Added: head/tools/regression/bin/sh/expansion/trim2.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/expansion/trim2.0 Sat Apr 3 21:07:50 2010 (r206147) @@ -0,0 +1,55 @@ +# $FreeBSD$ + +e= q='?' a='*' t=texttext s='ast*que?non' p='/et[c]/' w='a b c' b='{{(#)}}' +h='##' +failures='' +ok='' + +testcase() { + code="$1" + expected="$2" + oIFS="$IFS" + eval "$code" + IFS='|' + result="$#|$*" + IFS="$oIFS" + if [ "x$result" = "x$expected" ]; then + ok=x$ok + else + failures=x$failures + echo "For $code, expected $expected actual $result" + fi +} + +set -f +testcase 'set -- $s' '1|ast*que?non' +testcase 'set -- ${s%\?*}' '1|ast*que' +testcase 'set -- "${s%\?*}"' '1|ast*que' +testcase 'set -- ${s%\**}' '1|ast' +testcase 'set -- "${s%\**}"' '1|ast' +testcase 'set -- ${s%"$q"*}' '1|ast*que' +testcase 'set -- "${s%"$q"*}"' '1|ast*que' +testcase 'set -- ${s%"$a"*}' '1|ast' +testcase 'set -- "${s%"$a"*}"' '1|ast' +testcase 'set -- ${s%"$q"$a}' '1|ast*que' +testcase 'set -- "${s%"$q"$a}"' '1|ast*que' +testcase 'set -- ${s%"$a"$a}' '1|ast' +testcase 'set -- "${s%"$a"$a}"' '1|ast' +set +f + +testcase 'set -- "${b%\}}"' '1|{{(#)}' +# Parentheses are special in ksh, check that they can be escaped +testcase 'set -- "${b%\)*}"' '1|{{(#' +testcase 'set -- "${h#\#}"' '1|#' + +testcase 'set -- ${p%"${p#?}"}' '1|/' +testcase 'set -- ${p%"${p#??????}"}' '1|/etc' +testcase 'set -- ${p%"${p#???????}"}' '1|/etc/' +testcase 'set -- "${p%"${p#?}"}"' '1|/' +testcase 'set -- "${p%"${p#??????}"}"' '1|/et[c]' +testcase 'set -- "${p%"${p#???????}"}"' '1|/et[c]/' +testcase 'set -- ${p#"${p}"}' '0|' +testcase 'set -- "${p#"${p}"}"' '1|' +testcase 'set -- "${p#*\[}"' '1|c]/' + +test "x$failures" = x From owner-svn-src-head@FreeBSD.ORG Sat Apr 3 21:32:22 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 56CA21065672; Sat, 3 Apr 2010 21:32:22 +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 455FE8FC17; Sat, 3 Apr 2010 21:32:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o33LWMCd005733; Sat, 3 Apr 2010 21:32:22 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o33LWMTN005731; Sat, 3 Apr 2010 21:32:22 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201004032132.o33LWMTN005731@svn.freebsd.org> From: Jilles Tjoelker Date: Sat, 3 Apr 2010 21:32: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: r206148 - head/tools/regression/bin/sh/expansion X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Apr 2010 21:32:22 -0000 Author: jilles Date: Sat Apr 3 21:32:22 2010 New Revision: 206148 URL: http://svn.freebsd.org/changeset/base/206148 Log: sh: Add some testcases for the working parts of tilde expansion. Added: head/tools/regression/bin/sh/expansion/tilde1.0 (contents, props changed) Added: head/tools/regression/bin/sh/expansion/tilde1.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/expansion/tilde1.0 Sat Apr 3 21:32:22 2010 (r206148) @@ -0,0 +1,56 @@ +# $FreeBSD$ + +HOME=/tmp +roothome=~root +if [ "$roothome" = "~root" ]; then + echo "~root is not expanded!" + exit 2 +fi + +testcase() { + code="$1" + expected="$2" + oIFS="$IFS" + eval "$code" + IFS='|' + result="$#|$*" + IFS="$oIFS" + if [ "x$result" = "x$expected" ]; then + ok=x$ok + else + failures=x$failures + echo "For $code, expected $expected actual $result" + fi +} + +testcase 'set -- ~' '1|/tmp' +testcase 'set -- ~/foo' '1|/tmp/foo' +testcase 'set -- x~' '1|x~' +testcase 'set -- ~root' "1|$roothome" +h=~ +testcase 'set -- "$h"' '1|/tmp' +oIFS=$IFS +IFS=m +testcase 'set -- ~' '1|/tmp' +testcase 'set -- ~/foo' '1|/tmp/foo' +testcase 'set -- $h' '2|/t|p' +IFS=$oIFS +t=\~ +testcase 'set -- $t' '1|~' +r=$(cat < Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A6FB31065673; Sat, 3 Apr 2010 21:56:24 +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 95ABE8FC13; Sat, 3 Apr 2010 21:56:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o33LuOMr011168; Sat, 3 Apr 2010 21:56:24 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o33LuOgg011166; Sat, 3 Apr 2010 21:56:24 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201004032156.o33LuOgg011166@svn.freebsd.org> From: Jilles Tjoelker Date: Sat, 3 Apr 2010 21:56: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: r206149 - head/tools/regression/bin/sh/expansion X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Apr 2010 21:56:24 -0000 Author: jilles Date: Sat Apr 3 21:56:24 2010 New Revision: 206149 URL: http://svn.freebsd.org/changeset/base/206149 Log: sh: Fix duplicate variable name in test. Modified: head/tools/regression/bin/sh/expansion/tilde1.0 Modified: head/tools/regression/bin/sh/expansion/tilde1.0 ============================================================================== --- head/tools/regression/bin/sh/expansion/tilde1.0 Sat Apr 3 21:32:22 2010 (r206148) +++ head/tools/regression/bin/sh/expansion/tilde1.0 Sat Apr 3 21:56:24 2010 (r206149) @@ -29,12 +29,12 @@ testcase 'set -- x~' '1|x~' testcase 'set -- ~root' "1|$roothome" h=~ testcase 'set -- "$h"' '1|/tmp' -oIFS=$IFS +ooIFS=$IFS IFS=m testcase 'set -- ~' '1|/tmp' testcase 'set -- ~/foo' '1|/tmp/foo' testcase 'set -- $h' '2|/t|p' -IFS=$oIFS +IFS=$ooIFS t=\~ testcase 'set -- $t' '1|~' r=$(cat < Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 484ED106566B; Sat, 3 Apr 2010 22:04:45 +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 36B2E8FC12; Sat, 3 Apr 2010 22:04:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o33M4jAl013345; Sat, 3 Apr 2010 22:04:45 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o33M4jh4013342; Sat, 3 Apr 2010 22:04:45 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201004032204.o33M4jh4013342@svn.freebsd.org> From: Jilles Tjoelker Date: Sat, 3 Apr 2010 22:04: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: r206150 - in head: bin/sh tools/regression/bin/sh/expansion X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Apr 2010 22:04:45 -0000 Author: jilles Date: Sat Apr 3 22:04:44 2010 New Revision: 206150 URL: http://svn.freebsd.org/changeset/base/206150 Log: sh: Do tilde expansion in substitutions. This applies to word in ${v-word}, ${v+word}, ${v=word}, ${v?word} (which inherits quoting from the outside) and in ${v%word}, ${v%%word}, ${v#word}, ${v##word} (which does not inherit any quoting). In all cases tilde expansion is only attempted at the start of word, even if word contains spaces. This agrees with POSIX and other shells. This is the last part of the patch tested in the exp-run. Exp-run done by: erwin (with some other sh(1) changes) Added: head/tools/regression/bin/sh/expansion/tilde2.0 (contents, props changed) Modified: head/bin/sh/expand.c Modified: head/bin/sh/expand.c ============================================================================== --- head/bin/sh/expand.c Sat Apr 3 21:56:24 2010 (r206149) +++ head/bin/sh/expand.c Sat Apr 3 22:04:44 2010 (r206150) @@ -273,7 +273,6 @@ exptilde(char *p, int flag) switch(c) { case CTLESC: /* This means CTL* are always considered quoted. */ case CTLVAR: - case CTLENDVAR: case CTLBACKQ: case CTLBACKQ | CTLQUOTE: case CTLARI: @@ -285,6 +284,7 @@ exptilde(char *p, int flag) goto done; break; case '/': + case CTLENDVAR: goto done; } p++; @@ -506,9 +506,9 @@ subevalvar(char *p, char *str, int strlo int amount; herefd = -1; - argstr(p, subtype == VSTRIMLEFT || subtype == VSTRIMLEFTMAX || + argstr(p, (subtype == VSTRIMLEFT || subtype == VSTRIMLEFTMAX || subtype == VSTRIMRIGHT || subtype == VSTRIMRIGHTMAX ? - EXP_CASE : 0); + EXP_CASE : 0) | EXP_TILDE); STACKSTRNUL(expdest); herefd = saveherefd; argbackq = saveargbackq; Added: head/tools/regression/bin/sh/expansion/tilde2.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/expansion/tilde2.0 Sat Apr 3 22:04:44 2010 (r206150) @@ -0,0 +1,90 @@ +# $FreeBSD$ + +HOME=/tmp +roothome=~root +if [ "$roothome" = "~root" ]; then + echo "~root is not expanded!" + exit 2 +fi + +testcase() { + code="$1" + expected="$2" + oIFS="$IFS" + eval "$code" + IFS='|' + result="$#|$*" + IFS="$oIFS" + if [ "x$result" = "x$expected" ]; then + ok=x$ok + else + failures=x$failures + echo "For $code, expected $expected actual $result" + fi +} + +testcase 'set -- ${$+~}' '1|/tmp' +testcase 'set -- ${$+~/}' '1|/tmp/' +testcase 'set -- ${$+~/foo}' '1|/tmp/foo' +testcase 'set -- ${$+x~}' '1|x~' +testcase 'set -- ${$+~root}' "1|$roothome" +testcase 'set -- ${$+"~"}' '1|~' +testcase 'set -- ${$+"~/"}' '1|~/' +testcase 'set -- ${$+"~/foo"}' '1|~/foo' +testcase 'set -- ${$+"x~"}' '1|x~' +testcase 'set -- ${$+"~root"}' "1|~root" +testcase 'set -- "${$+~}"' '1|~' +testcase 'set -- "${$+~/}"' '1|~/' +testcase 'set -- "${$+~/foo}"' '1|~/foo' +testcase 'set -- "${$+x~}"' '1|x~' +testcase 'set -- "${$+~root}"' "1|~root" +testcase 'set -- ${HOME#~}' '0|' +h=~ +testcase 'set -- "$h"' '1|/tmp' +f=~/foo +testcase 'set -- "$f"' '1|/tmp/foo' +testcase 'set -- ${f#~}' '1|/foo' +testcase 'set -- ${f#~/}' '1|foo' + +ooIFS=$IFS +IFS=m +testcase 'set -- ${$+~}' '1|/tmp' +testcase 'set -- ${$+~/foo}' '1|/tmp/foo' +testcase 'set -- ${$+$h}' '2|/t|p' +testcase 'set -- ${HOME#~}' '0|' +IFS=$ooIFS + +t=\~ +testcase 'set -- ${$+$t}' '1|~' +r=$(cat < Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2FF471065673; Sat, 3 Apr 2010 23:51: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 1E3358FC13; Sat, 3 Apr 2010 23:51:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o33NpggS037180; Sat, 3 Apr 2010 23:51:42 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o33Npf9p037178; Sat, 3 Apr 2010 23:51:41 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201004032351.o33Npf9p037178@svn.freebsd.org> From: Michael Tuexen Date: Sat, 3 Apr 2010 23:51: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: r206151 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Apr 2010 23:51:42 -0000 Author: tuexen Date: Sat Apr 3 23:51:41 2010 New Revision: 206151 URL: http://svn.freebsd.org/changeset/base/206151 Log: Use also SCTP/IPv6 checksum offloading in special cases. MFC after: 2 weeks Modified: head/sys/netinet/sctp_output.c Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Sat Apr 3 22:04:44 2010 (r206150) +++ head/sys/netinet/sctp_output.c Sat Apr 3 23:51:41 2010 (r206151) @@ -3709,7 +3709,7 @@ sctp_lowlevel_chunk_output(struct sctp_i (stcb) && (stcb->asoc.loopback_scope))) { m->m_pkthdr.csum_flags = CSUM_SCTP; - m->m_pkthdr.csum_data = 0; /* FIXME MT */ + m->m_pkthdr.csum_data = 0; SCTP_STAT_INCR(sctps_sendhwcrc); } else { SCTP_STAT_INCR(sctps_sendnocrc); @@ -4021,7 +4021,7 @@ sctp_lowlevel_chunk_output(struct sctp_i (stcb) && (stcb->asoc.loopback_scope))) { m->m_pkthdr.csum_flags = CSUM_SCTP; - m->m_pkthdr.csum_data = 0; /* FIXME MT */ + m->m_pkthdr.csum_data = 0; SCTP_STAT_INCR(sctps_sendhwcrc); } else { SCTP_STAT_INCR(sctps_sendnocrc); @@ -10542,7 +10542,7 @@ sctp_send_shutdown_complete2(struct mbuf SCTP_ENABLE_UDP_CSUM(mout); } else { mout->m_pkthdr.csum_flags = CSUM_SCTP; - mout->m_pkthdr.csum_data = 0; /* FIXME MT */ + mout->m_pkthdr.csum_data = 0; SCTP_STAT_INCR(sctps_sendhwcrc); } SCTP_ATTACH_CHAIN(o_pak, mout, mlen); @@ -10566,14 +10566,29 @@ sctp_send_shutdown_complete2(struct mbuf if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_LAST_PACKET_TRACING) sctp_packet_log(mout, mlen); #endif - comp_cp->sh.checksum = sctp_calculate_cksum(mout, offset_out); - SCTP_STAT_INCR(sctps_sendswcrc); SCTP_ATTACH_CHAIN(o_pak, mout, mlen); if (port) { - if ((udp->uh_sum = in6_cksum(o_pak, IPPROTO_UDP, sizeof(struct ip6_hdr), - sizeof(struct sctp_shutdown_complete_msg) + sizeof(struct udphdr))) == 0) { + if (!(SCTP_BASE_SYSCTL(sctp_no_csum_on_loopback) && + (stcb) && + (stcb->asoc.loopback_scope))) { + comp_cp->sh.checksum = sctp_calculate_cksum(mout, sizeof(struct ip6_hdr) + sizeof(struct udphdr)); + SCTP_STAT_INCR(sctps_sendswcrc); + } else { + SCTP_STAT_INCR(sctps_sendnocrc); + } + if ((udp->uh_sum = in6_cksum(o_pak, IPPROTO_UDP, sizeof(struct ip6_hdr), mlen - sizeof(struct ip6_hdr))) == 0) { udp->uh_sum = 0xffff; } + } else { + if (!(SCTP_BASE_SYSCTL(sctp_no_csum_on_loopback) && + (stcb) && + (stcb->asoc.loopback_scope))) { + mout->m_pkthdr.csum_flags = CSUM_SCTP; + mout->m_pkthdr.csum_data = 0; + SCTP_STAT_INCR(sctps_sendhwcrc); + } else { + SCTP_STAT_INCR(sctps_sendnocrc); + } } SCTP_IP6_OUTPUT(ret, o_pak, &ro, &ifp, stcb, vrf_id); @@ -11593,7 +11608,7 @@ sctp_send_abort(struct mbuf *m, int iphl SCTP_ENABLE_UDP_CSUM(o_pak); } else { mout->m_pkthdr.csum_flags = CSUM_SCTP; - mout->m_pkthdr.csum_data = 0; /* FIXME MT */ + mout->m_pkthdr.csum_data = 0; SCTP_STAT_INCR(sctps_sendhwcrc); } SCTP_IP_OUTPUT(ret, o_pak, &ro, stcb, vrf_id); @@ -11621,13 +11636,29 @@ sctp_send_abort(struct mbuf *m, int iphl if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_LAST_PACKET_TRACING) sctp_packet_log(mout, len); #endif - abm->sh.checksum = sctp_calculate_cksum(mout, iphlen_out); - SCTP_STAT_INCR(sctps_sendswcrc); SCTP_ATTACH_CHAIN(o_pak, mout, len); if (port) { + if (!(SCTP_BASE_SYSCTL(sctp_no_csum_on_loopback) && + (stcb) && + (stcb->asoc.loopback_scope))) { + abm->sh.checksum = sctp_calculate_cksum(mout, sizeof(struct ip6_hdr) + sizeof(struct udphdr)); + SCTP_STAT_INCR(sctps_sendswcrc); + } else { + SCTP_STAT_INCR(sctps_sendnocrc); + } if ((udp->uh_sum = in6_cksum(o_pak, IPPROTO_UDP, sizeof(struct ip6_hdr), len - sizeof(struct ip6_hdr))) == 0) { udp->uh_sum = 0xffff; } + } else { + if (!(SCTP_BASE_SYSCTL(sctp_no_csum_on_loopback) && + (stcb) && + (stcb->asoc.loopback_scope))) { + mout->m_pkthdr.csum_flags = CSUM_SCTP; + mout->m_pkthdr.csum_data = 0; + SCTP_STAT_INCR(sctps_sendhwcrc); + } else { + SCTP_STAT_INCR(sctps_sendnocrc); + } } SCTP_IP6_OUTPUT(ret, o_pak, &ro, &ifp, stcb, vrf_id); @@ -11815,7 +11846,7 @@ sctp_send_operr_to(struct mbuf *m, int i SCTP_ENABLE_UDP_CSUM(o_pak); } else { mout->m_pkthdr.csum_flags = CSUM_SCTP; - mout->m_pkthdr.csum_data = 0; /* FIXME MT */ + mout->m_pkthdr.csum_data = 0; SCTP_STAT_INCR(sctps_sendhwcrc); } SCTP_IP_OUTPUT(ret, o_pak, &ro, stcb, vrf_id); @@ -11841,13 +11872,29 @@ sctp_send_operr_to(struct mbuf *m, int i if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_LAST_PACKET_TRACING) sctp_packet_log(mout, len); #endif - sh_out->checksum = sctp_calculate_cksum(mout, iphlen_out); - SCTP_STAT_INCR(sctps_sendswcrc); SCTP_ATTACH_CHAIN(o_pak, mout, len); if (port) { + if (!(SCTP_BASE_SYSCTL(sctp_no_csum_on_loopback) && + (stcb) && + (stcb->asoc.loopback_scope))) { + sh_out->checksum = sctp_calculate_cksum(mout, sizeof(struct ip6_hdr) + sizeof(struct udphdr)); + SCTP_STAT_INCR(sctps_sendswcrc); + } else { + SCTP_STAT_INCR(sctps_sendnocrc); + } if ((udp->uh_sum = in6_cksum(o_pak, IPPROTO_UDP, sizeof(struct ip6_hdr), len - sizeof(struct ip6_hdr))) == 0) { udp->uh_sum = 0xffff; } + } else { + if (!(SCTP_BASE_SYSCTL(sctp_no_csum_on_loopback) && + (stcb) && + (stcb->asoc.loopback_scope))) { + mout->m_pkthdr.csum_flags = CSUM_SCTP; + mout->m_pkthdr.csum_data = 0; + SCTP_STAT_INCR(sctps_sendhwcrc); + } else { + SCTP_STAT_INCR(sctps_sendnocrc); + } } SCTP_IP6_OUTPUT(ret, o_pak, &ro, &ifp, stcb, vrf_id);