Re: svn commit: r197212 - head/sys/nfsclient

2009-09-15 Thread Bjoern A. Zeeb

On Tue, 15 Sep 2009, Qing Li wrote:


Author: qingli
Date: Tue Sep 15 02:22:57 2009
New Revision: 197212
URL: http://svn.freebsd.org/changeset/base/197212

Log:
 Simply remove the code instead of using #if 0.

 Pointed out by sam


In this case the block just above that should probably removed as
well?



Modified:
 head/sys/nfsclient/nfs_vfsops.c

Modified: head/sys/nfsclient/nfs_vfsops.c
==
--- head/sys/nfsclient/nfs_vfsops.c Tue Sep 15 02:04:16 2009
(r197211)
+++ head/sys/nfsclient/nfs_vfsops.c Tue Sep 15 02:22:57 2009
(r197212)
@@ -464,12 +464,6 @@ nfs_mountroot(struct mount *mp)
}
#endif

-#if 0 /* QL: XXX */
-   error = ifioctl(so, SIOCAIFADDR, (caddr_t)nd-myif, td);
-   if (error)
-   panic(nfs_mountroot: SIOCAIFADDR: %d, error);
-#endif
-
if ((cp = getenv(boot.netif.mtu)) != NULL) {
ir.ifr_mtu = strtol(cp, NULL, 10);
bcopy(nd-myif.ifra_name, ir.ifr_name, IFNAMSIZ);



--
Bjoern A. Zeeb   What was I talking about and who are you again?
___
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-unsubscr...@freebsd.org


svn commit: r197215 - in stable/8: . cddl/compat/opensolaris cddl/compat/opensolaris/include cddl/contrib/opensolaris cddl/contrib/opensolaris/cmd/zdb cddl/contrib/opensolaris/head cddl/contrib/ope...

2009-09-15 Thread Pawel Jakub Dawidek
 try to access corrupted directory the kernel will panic.
  Until the bug is properly fixed, try to recover from it and log that it
  happened.
  
  Reported by:  marck
  OpenSolaris bug:  6709336
  
  r197151:
  Be sure not to overflow struct fid.
  
  r197152:
  Extend scope of the z_teardown_lock lock for consistency and just in case.
  
  r197153:
  When zfs.ko is compiled with debug, make sure that znode and vnode point at
  each other.
  
  r197167:
  Work-around READDIRPLUS problem with .zfs/ and .zfs/snapshot/ directories
  by just returning EOPNOTSUPP. This will allow NFS server to fall back to
  regular READDIR.
  Note that converting inode number to snapshot's vnode is expensive operation.
  Snapshots are stored in AVL tree, but based on their names, not inode numbers,
  so to convert inode to snapshot vnode we have to interate over all snalshots.
  This is not a problem in OpenSolaris, because in their READDIRPLUS
  implementation they use VOP_LOOKUP() on d_name, instead of VFS_VGET() on
  d_fileno as we do.
  
  PR:   kern/125149
  Reported by:  Weldon Godfrey wgodf...@ena.com
  Analysis by:  Jaakko Heinonen j...@saunalahti.fi
  
  r197172:
  Add missing \n.
  
  Reported by:  marck
  
  r197177:
  Support both case: when snapshot is already mounted and when it is not yet
  mounted.
  
  r197200:
  Modify mount(8) to skip MNT_IGNORE file systems by default, just like df(1)
  does. This is not POLA violation, because there is no single file system in 
the
  base that use MNT_IGNORE currently, although ZFS snapshots will be mounted 
with
  MNT_IGNORE after next commit.
  
  Reviewed by:  kib
  
  r197201:
  - Mount ZFS snapshots with MNT_IGNORE flag, so they are not visible in regular
df(1) and mount(8) output. This is a bit smilar to OpenSolaris and follows
ZFS route of not listing snapshots by default with 'zfs list' command.
  - Add UPDATING entry to note that ZFS snapshots are no longer visible in
mount(8) and df(1) output by default.
  
  Reviewed by:  kib
  
  Approved by:  re (bz)

Added:
  stable/8/cddl/compat/opensolaris/include/assert.h
 - copied unchanged from r196992, 
head/cddl/compat/opensolaris/include/assert.h
Deleted:
  stable/8/cddl/contrib/opensolaris/head/assert.h
  stable/8/sys/cddl/contrib/opensolaris/uts/common/rpc/
Modified:
  stable/8/UPDATING
  stable/8/cddl/compat/opensolaris/   (props changed)
  stable/8/cddl/contrib/opensolaris/   (props changed)
  stable/8/cddl/contrib/opensolaris/cmd/zdb/zdb.c
  stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_mount.c
  stable/8/sbin/mount/   (props changed)
  stable/8/sbin/mount/mount.8
  stable/8/sbin/mount/mount.c
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/compat/opensolaris/kern/opensolaris_vfs.c
  stable/8/sys/cddl/compat/opensolaris/sys/mutex.h
  stable/8/sys/cddl/compat/opensolaris/sys/proc.h
  stable/8/sys/cddl/compat/opensolaris/sys/vfs.h
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c
  stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c
  stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c
  stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c
  stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h
  stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h
  stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
  stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c
  stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c
  stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
  stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
  stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
  stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c
  stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c
  stable/8/sys/cddl/contrib/opensolaris/uts/common/sys/callb.h
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/UPDATING
==
--- stable/8/UPDATING   Tue Sep 15 02:25:03 2009(r197214)
+++ stable/8/UPDATING   Tue Sep 15 11:13:40 2009(r197215)
@@ -22,6 +22,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8.
to maximize performance.  (To disable malloc debugging, run
ln -s aj /etc/malloc.conf.)
 
+20090915:
+   ZFS snapshots are now mounted with MNT_IGNORE flag. Use -v option for
+   mount(8) and -a option for df(1) to see them.
+
 20090813:
Remove the option STOP_NMI.  The default action is now to use NMI
only for KDB via the newly introduced function stop_cpus_hard()

Copied: stable/8/cddl/compat/opensolaris/include/assert.h (from r196992

svn commit: r197216 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci nfsserver

2009-09-15 Thread Pawel Jakub Dawidek
Author: pjd
Date: Tue Sep 15 11:20:23 2009
New Revision: 197216
URL: http://svn.freebsd.org/changeset/base/197216

Log:
  MFC r197039, r197040:
  
  Fix usecount leak in mknod(2) on file system exported over NFS.
  
  While I'm here, correct typo in comment.
  
  Reviewed by:  kan, kib
  Approved by:  re (bz)

Modified:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/sys/nfsserver/nfs_serv.c

Modified: stable/8/sys/nfsserver/nfs_serv.c
==
--- stable/8/sys/nfsserver/nfs_serv.c   Tue Sep 15 11:13:40 2009
(r197215)
+++ stable/8/sys/nfsserver/nfs_serv.c   Tue Sep 15 11:20:23 2009
(r197216)
@@ -1686,7 +1686,7 @@ out:
if (dirp) {
vn_lock(dirp, LK_EXCLUSIVE | LK_RETRY);
diraft_ret = VOP_GETATTR(dirp, diraft, cred);
-   VOP_UNLOCK(dirp, 0);
+   vput(dirp);
}
 ereply:
nfsm_reply(NFSX_SRVFH(1) + NFSX_POSTOPATTR(1) + NFSX_WCCDATA(1));
@@ -3825,7 +3825,7 @@ nfsmout:
  * what the heck.
  *
  * The exception to rule 2 is EPERM. If a file is IMMUTABLE, VOP_ACCESS()
- * will return EPERM instead of EACCESS. EPERM is always an error.
+ * will return EPERM instead of EACCES. EPERM is always an error.
  */
 static int
 nfsrv_access(struct vnode *vp, accmode_t accmode, struct ucred *cred,
___
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-unsubscr...@freebsd.org


svn commit: r197217 - in stable/8/sys: . amd64/include/xen cam/scsi cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/ata dev/xen/xenpci geom

2009-09-15 Thread Pawel Jakub Dawidek
Author: pjd
Date: Tue Sep 15 11:23:59 2009
New Revision: 197217
URL: http://svn.freebsd.org/changeset/base/197217

Log:
  MFC r196822, r196823, r196824:
  
  Remove 'ad:' prefix from disk serial number. We don't want serial number
  to change when we reconnect the disk in a way that it is accessible through
  CAM for example.
  
  Discussed with:   trasz
  
  Simplify g_disk_ident_adjust() function and allow any printable character
  in serial number.
  
  Discussed with:   trasz
  Obtained from:Wheel Sp. z o.o. (http://www.wheel.pl)
  
  Make serial numbers of daX disks visible by GEOM.
  
  No objections from:   scottl
  Obtained from:Wheel Sp. z o.o. (http://www.wheel.pl)
  
  Approved by:  re (kib)

Modified:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cam/scsi/scsi_da.c
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/ata/ata-disk.c
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/sys/geom/geom_disk.c

Modified: stable/8/sys/cam/scsi/scsi_da.c
==
--- stable/8/sys/cam/scsi/scsi_da.c Tue Sep 15 11:20:23 2009
(r197216)
+++ stable/8/sys/cam/scsi/scsi_da.c Tue Sep 15 11:23:59 2009
(r197217)
@@ -1266,6 +1266,8 @@ daregister(struct cam_periph *periph, vo
softc-disk-d_flags = 0;
if ((softc-quirks  DA_Q_NO_SYNC_CACHE) == 0)
softc-disk-d_flags |= DISKFLAG_CANFLUSHCACHE;
+   strlcpy(softc-disk-d_ident, cgd-serial_num,
+   MIN(sizeof(softc-disk-d_ident), cgd-serial_num_len + 1));
disk_create(softc-disk, DISK_VERSION);
mtx_lock(periph-sim-mtx);
 

Modified: stable/8/sys/dev/ata/ata-disk.c
==
--- stable/8/sys/dev/ata/ata-disk.c Tue Sep 15 11:20:23 2009
(r197216)
+++ stable/8/sys/dev/ata/ata-disk.c Tue Sep 15 11:23:59 2009
(r197217)
@@ -136,8 +136,8 @@ ad_attach(device_t dev)
 if ((atadev-param.support.command2  ATA_SUPPORT_CFA) ||
atadev-param.config == ATA_PROTO_CFA)
adp-disk-d_flags = DISKFLAG_CANDELETE;
-snprintf(adp-disk-d_ident, sizeof(adp-disk-d_ident), ad:%s,
-   atadev-param.serial);
+strlcpy(adp-disk-d_ident, atadev-param.serial,
+   sizeof(adp-disk-d_ident));
 disk_create(adp-disk, DISK_VERSION);
 device_add_child(dev, subdisk, device_get_unit(dev));
 ad_firmware_geom_adjust(dev, adp-disk);

Modified: stable/8/sys/geom/geom_disk.c
==
--- stable/8/sys/geom/geom_disk.c   Tue Sep 15 11:20:23 2009
(r197216)
+++ stable/8/sys/geom/geom_disk.c   Tue Sep 15 11:23:59 2009
(r197217)
@@ -44,6 +44,7 @@ __FBSDID($FreeBSD$);
 #include sys/sysctl.h
 #include sys/bio.h
 #include sys/conf.h
+#include sys/ctype.h
 #include sys/fcntl.h
 #include sys/malloc.h
 #include sys/sysctl.h
@@ -400,39 +401,25 @@ g_disk_destroy(void *ptr, int flag)
 }
 
 /*
- * We only allow [a-za-z0-...@#%.:] characters, the rest is converted to 
'xHH'.
+ * We only allow printable characters in disk ident,
+ * the rest is converted to 'xHH'.
  */
 static void
 g_disk_ident_adjust(char *ident, size_t size)
 {
-   char newid[DISK_IDENT_SIZE], tmp[4];
-   size_t len;
-   char *p;
-
-   bzero(newid, sizeof(newid));
-   len = 0;
-   for (p = ident; *p != '\0'  len  sizeof(newid) - 1; p++) {
-   switch (*p) {
-   default:
-   if ((*p  'a' || *p  'z') 
-   (*p  'A' || *p  'Z') 
-   (*p  '0' || *p  '9')) {
-   snprintf(tmp, sizeof(tmp), x%02hhx, *p);
-   strlcat(newid, tmp, sizeof(newid));
-   len += 3;
-   break;
-   }
-   /* FALLTHROUGH */
-   case '-':
-   case '_':
-   case '@':
-   case '#':
-   case '%':
-   case '.':
-   case ':':
-   newid[len++] = *p;
-   break;
+   char *p, tmp[4], newid[DISK_IDENT_SIZE];
+
+   newid[0] = '\0';
+   for (p = ident; *p != '\0'; p++) {
+   if (isprint(*p)) {
+   tmp[0] = *p;
+   tmp[1] = '\0';
+   } else {
+   snprintf(tmp, sizeof(tmp), x%02hhx,
+   *(unsigned char *)p);
}
+   if (strlcat(newid, tmp, sizeof(newid)) = sizeof(newid))
+   break;
}
bzero(ident, size);
strlcpy(ident, newid, size);

svn commit: r197218 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2009-09-15 Thread Pawel Jakub Dawidek
Author: pjd
Date: Tue Sep 15 11:34:53 2009
New Revision: 197218
URL: http://svn.freebsd.org/changeset/base/197218

Log:
  We believe ZFS is ready for production use. Remove a warning about it being
  experimental. :)

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
==
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Tue Sep 
15 11:23:59 2009(r197217)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Tue Sep 
15 11:34:53 2009(r197218)
@@ -3072,8 +3072,6 @@ zfs_modevent(module_t mod, int type, voi
switch (type) {
case MOD_LOAD:
zfs_root_token = root_mount_hold(ZFS);
-   printf(WARNING: ZFS is considered to be an experimental 
-   feature in FreeBSD.\n);
 
mutex_init(zfs_share_lock, NULL, MUTEX_DEFAULT, NULL);
 
___
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-unsubscr...@freebsd.org


svn commit: r197219 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2009-09-15 Thread Pawel Jakub Dawidek
Author: pjd
Date: Tue Sep 15 11:42:08 2009
New Revision: 197219
URL: http://svn.freebsd.org/changeset/base/197219

Log:
  Forced unmounts work just fine in my tests under heavy load. There might
  still be a problem, but it isn't worth a warning.

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
==
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.cTue Sep 
15 11:34:53 2009(r197218)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.cTue Sep 
15 11:42:08 2009(r197219)
@@ -994,11 +994,6 @@ zfs_umount(vfs_t *vfsp, int fflag)
cred_t *cr = curthread-td_ucred;
int ret;
 
-   if (fflag  MS_FORCE) {
-   /* TODO: Force unmount is not well implemented yet, so deny it. 
*/
-   ZFS_LOG(0, Force unmount is experimental - report any 
problems.);
-   }
-
ret = secpolicy_fs_unmount(cr, vfsp);
if (ret) {
ret = dsl_deleg_access((char *)refstr_value(vfsp-vfs_resource),
___
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-unsubscr...@freebsd.org


svn commit: r197220 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris cddl/contrib/opensolaris/uts/common/fs/zfs contrib/dev/acpica contrib/pf dev/xen/xenpci

2009-09-15 Thread Pawel Jakub Dawidek
Author: pjd
Date: Tue Sep 15 12:19:34 2009
New Revision: 197220
URL: http://svn.freebsd.org/changeset/base/197220

Log:
  MFC r197219:
  
  Forced unmounts work just fine in my tests under heavy load. There might
  still be a problem, but it isn't worth a warning.
  
  Approved by:  re (kib)

Modified:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
==
--- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
Tue Sep 15 11:42:08 2009(r197219)
+++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
Tue Sep 15 12:19:34 2009(r197220)
@@ -994,11 +994,6 @@ zfs_umount(vfs_t *vfsp, int fflag)
cred_t *cr = curthread-td_ucred;
int ret;
 
-   if (fflag  MS_FORCE) {
-   /* TODO: Force unmount is not well implemented yet, so deny it. 
*/
-   ZFS_LOG(0, Force unmount is experimental - report any 
problems.);
-   }
-
ret = secpolicy_fs_unmount(cr, vfsp);
if (ret) {
ret = dsl_deleg_access((char *)refstr_value(vfsp-vfs_resource),
___
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-unsubscr...@freebsd.org


svn commit: r197221 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris cddl/contrib/opensolaris/uts/common/fs/zfs contrib/dev/acpica contrib/pf dev/xen/xenpci

2009-09-15 Thread Pawel Jakub Dawidek
Author: pjd
Date: Tue Sep 15 12:21:06 2009
New Revision: 197221
URL: http://svn.freebsd.org/changeset/base/197221

Log:
  MFC r197218:
  
  We believe ZFS is ready for production use. Remove a warning about it being
  experimental. :)
  
  Approved by:  re (kib)

Modified:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
==
--- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Tue Sep 
15 12:19:34 2009(r197220)
+++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Tue Sep 
15 12:21:06 2009(r197221)
@@ -3072,8 +3072,6 @@ zfs_modevent(module_t mod, int type, voi
switch (type) {
case MOD_LOAD:
zfs_root_token = root_mount_hold(ZFS);
-   printf(WARNING: ZFS is considered to be an experimental 
-   feature in FreeBSD.\n);
 
mutex_init(zfs_share_lock, NULL, MUTEX_DEFAULT, NULL);
 
___
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-unsubscr...@freebsd.org


Re: svn commit: r197221 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris cddl/contrib/opensolaris/uts/common/fs/zfs contrib/dev/acpica contrib/pf dev/xen/xenpci

2009-09-15 Thread Artis Caune
2009/9/15 Pawel Jakub Dawidek p...@freebsd.org:
 Author: pjd
 Date: Tue Sep 15 12:21:06 2009
 New Revision: 197221
 URL: http://svn.freebsd.org/changeset/base/197221

 Log:
  MFC r197218:

  We believe ZFS is ready for production use. Remove a warning about it being
  experimental. :)


Some time ago, someone told that FreeBSD 7 will be the best FreeBSD
ever, but I think It's not true anymore. :)

Thank you Pawel and all other!




-- 
Artis Caune

Everything should be made as simple as possible, but not simpler.
___
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-unsubscr...@freebsd.org


svn commit: r197222 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci ufs/ffs

2009-09-15 Thread Konstantin Belousov
Author: kib
Date: Tue Sep 15 12:51:22 2009
New Revision: 197222
URL: http://svn.freebsd.org/changeset/base/197222

Log:
  MFC r196888:
  The clear_remove() and clear_inodedeps() call vn_start_write(NULL, mp,
  V_NOWAIT) on the non-busied mount point. Unmount might free ufs-specific
  mp data, causing ffs_vgetf() to access freed memory.
  
  Busy mountpoint before dropping softdep lk.
  
  Approved by:  re (kensmith)

Modified:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/sys/ufs/ffs/ffs_softdep.c

Modified: stable/8/sys/ufs/ffs/ffs_softdep.c
==
--- stable/8/sys/ufs/ffs/ffs_softdep.c  Tue Sep 15 12:21:06 2009
(r197221)
+++ stable/8/sys/ufs/ffs/ffs_softdep.c  Tue Sep 15 12:51:22 2009
(r197222)
@@ -5977,12 +5977,19 @@ clear_remove(td)
if (vn_start_write(NULL, mp, V_NOWAIT) != 0)
continue;
FREE_LOCK(lk);
-   if ((error = ffs_vgetf(mp, ino, LK_EXCLUSIVE, vp,
-FFSV_FORCEINSMQ))) {
+
+   /*
+* Let unmount clear deps
+*/
+   error = vfs_busy(mp, MBF_NOWAIT);
+   if (error != 0)
+   goto finish_write;
+   error = ffs_vgetf(mp, ino, LK_EXCLUSIVE, vp,
+FFSV_FORCEINSMQ);
+   vfs_unbusy(mp);
+   if (error != 0) {
softdep_error(clear_remove: vget, error);
-   vn_finished_write(mp);
-   ACQUIRE_LOCK(lk);
-   return;
+   goto finish_write;
}
if ((error = ffs_syncvnode(vp, MNT_NOWAIT)))
softdep_error(clear_remove: fsync, error);
@@ -5991,6 +5998,7 @@ clear_remove(td)
drain_output(vp);
BO_UNLOCK(bo);
vput(vp);
+   finish_write:
vn_finished_write(mp);
ACQUIRE_LOCK(lk);
return;
@@ -6050,13 +6058,21 @@ clear_inodedeps(td)
if (vn_start_write(NULL, mp, V_NOWAIT) != 0)
continue;
FREE_LOCK(lk);
+   error = vfs_busy(mp, MBF_NOWAIT); /* Let unmount clear deps */
+   if (error != 0) {
+   vn_finished_write(mp);
+   ACQUIRE_LOCK(lk);
+   return;
+   }
if ((error = ffs_vgetf(mp, ino, LK_EXCLUSIVE, vp,
FFSV_FORCEINSMQ)) != 0) {
softdep_error(clear_inodedeps: vget, error);
+   vfs_unbusy(mp);
vn_finished_write(mp);
ACQUIRE_LOCK(lk);
return;
}
+   vfs_unbusy(mp);
if (ino == lastino) {
if ((error = ffs_syncvnode(vp, MNT_WAIT)))
softdep_error(clear_inodedeps: fsync1, error);
___
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-unsubscr...@freebsd.org


Re: svn commit: r197221 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris cddl/contrib/opensolaris/uts/common/fs/zfs contrib/dev/acpica contrib/pf dev/xen/xenpci

2009-09-15 Thread Ivan Voras
2009/9/15 Pawel Jakub Dawidek p...@freebsd.org:
 Author: pjd
 Date: Tue Sep 15 12:21:06 2009
 New Revision: 197221
 URL: http://svn.freebsd.org/changeset/base/197221

 Log:
  MFC r197218:

  We believe ZFS is ready for production use. Remove a warning about it being
  experimental. :)

Wh :)
___
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-unsubscr...@freebsd.org


Re: svn commit: r197218 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2009-09-15 Thread Sam Leffler

Pawel Jakub Dawidek wrote:

Author: pjd
Date: Tue Sep 15 11:34:53 2009
New Revision: 197218
URL: http://svn.freebsd.org/changeset/base/197218

Log:
  We believe ZFS is ready for production use. Remove a warning about it being
  experimental. :)


This is great news!  Is this amd64 only (or i386 too)?  How about 
non-x86 architectures (have people tested on sparc64, ppc, etc)?


Sam
___
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-unsubscr...@freebsd.org


Re: svn commit: r197218 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2009-09-15 Thread Ivan Voras
2009/9/15 Sam Leffler s...@errno.com:
 Pawel Jakub Dawidek wrote:

 Author: pjd
 Date: Tue Sep 15 11:34:53 2009
 New Revision: 197218
 URL: http://svn.freebsd.org/changeset/base/197218

 Log:
  We believe ZFS is ready for production use. Remove a warning about it
 being
  experimental. :)

 This is great news!  Is this amd64 only (or i386 too)?  How about non-x86
 architectures (have people tested on sparc64, ppc, etc)?

Also, is there some official recommendation about tuning?

Pawel, Kip and others - can you please review
http://wiki.freebsd.org/ZFSTuningGuide and see what information, if
any, is still important, or if anything new needs to be added?
___
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-unsubscr...@freebsd.org


Re: svn commit: r197218 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2009-09-15 Thread Ben Kelly


On Sep 15, 2009, at 9:19 AM, Sam Leffler wrote:


Pawel Jakub Dawidek wrote:

Author: pjd
Date: Tue Sep 15 11:34:53 2009
New Revision: 197218
URL: http://svn.freebsd.org/changeset/base/197218
Log:
 We believe ZFS is ready for production use. Remove a warning about  
it being

 experimental. :)


This is great news!  Is this amd64 only (or i386 too)?  How about  
non-x86 architectures (have people tested on sparc64, ppc, etc)?


My experience with i386 was that the zfs ARC code caused significant  
kmem fragmentation.  While I have not tested this with recent commits,  
I haven't seen anything that would lead me to believe its fixed  
either.  I seem to recall Kip said he was working on UMA changes or  
something like that to address the problem.


- Ben
___
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-unsubscr...@freebsd.org


Re: svn commit: r197218 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2009-09-15 Thread Pawel Jakub Dawidek
On Tue, Sep 15, 2009 at 06:19:11AM -0700, Sam Leffler wrote:
 Pawel Jakub Dawidek wrote:
 Author: pjd
 Date: Tue Sep 15 11:34:53 2009
 New Revision: 197218
 URL: http://svn.freebsd.org/changeset/base/197218
 
 Log:
   We believe ZFS is ready for production use. Remove a warning about it 
   being
   experimental. :)
 
 This is great news!  Is this amd64 only (or i386 too)?  How about 
 non-x86 architectures (have people tested on sparc64, ppc, etc)?

I do most of my tests on i386 with 1GB of RAM. It isn't optimal hardware
configuration for ZFS, but it seems to work fine in most cases. For the
other archs I think I tried sparc64 in the past and Marcel committed
some fixes so it can work on ia64. When it comes to powerpc, arm, mips,
etc. I haven't done any testing and I wouldn't recommend ZFS for those
archs anyway. We should probably also warn about that.

-- 
Pawel Jakub Dawidek   http://www.wheel.pl
p...@freebsd.org   http://www.FreeBSD.org
FreeBSD committer Am I Evil? Yes, I Am!


pgpYzhKLhcaUy.pgp
Description: PGP signature


Re: svn commit: r197210 - in head/sys: netinet nfsclient

2009-09-15 Thread Bjoern A. Zeeb

On Tue, 15 Sep 2009, Qing Li wrote:


Author: qingli
Date: Tue Sep 15 01:01:03 2009
New Revision: 197210
URL: http://svn.freebsd.org/changeset/base/197210

Log:
 The bootp code installs an interface address and the nfs client
 module tries to install the same address again. This extra code
 is removed, which was discovered by the removal of a call to
 in_ifscrub() in r196714. This call to in_ifscrub is put back here
 because the SIOCAIFADDR command can be used to change the prefix
 length of an existing alias.

 Reviewed by:kmacy


This broke NFS Root for me in the netperf clsuter setup.
The NFS Root mount hang for ages (I reset the box after 1 hour).

Backing out r197212 and this and it boots just fine again.



Modified:
 head/sys/netinet/in.c
 head/sys/nfsclient/nfs_vfsops.c

Modified: head/sys/netinet/in.c
==
--- head/sys/netinet/in.c   Tue Sep 15 00:26:23 2009(r197209)
+++ head/sys/netinet/in.c   Tue Sep 15 01:01:03 2009(r197210)
@@ -536,6 +536,16 @@ in_control(struct socket *so, u_long cmd
hostIsNew = 0;
}
if (ifra-ifra_mask.sin_len) {
+   /*
+* QL: XXX
+* Need to scrub the prefix here in case
+* the issued command is SIOCAIFADDR with
+* the same address, but with a different
+* prefix length. And if the prefix length
+* is the same as before, then the call is
+* un-necessarily executed here.
+*/
+   in_ifscrub(ifp, ia);
ia-ia_sockmask = ifra-ifra_mask;
ia-ia_sockmask.sin_family = AF_INET;
ia-ia_subnetmask =
@@ -544,6 +554,7 @@ in_control(struct socket *so, u_long cmd
}
if ((ifp-if_flags  IFF_POINTOPOINT) 
(ifra-ifra_dstaddr.sin_family == AF_INET)) {
+   in_ifscrub(ifp, ia);
ia-ia_dstaddr = ifra-ifra_dstaddr;
maskIsNew  = 1; /* We lie; but the effect's the same */
}

Modified: head/sys/nfsclient/nfs_vfsops.c
==
--- head/sys/nfsclient/nfs_vfsops.c Tue Sep 15 00:26:23 2009
(r197209)
+++ head/sys/nfsclient/nfs_vfsops.c Tue Sep 15 01:01:03 2009
(r197210)
@@ -463,9 +463,13 @@ nfs_mountroot(struct mount *mp)
break;
}
#endif
+
+#if 0 /* QL: XXX */
error = ifioctl(so, SIOCAIFADDR, (caddr_t)nd-myif, td);
if (error)
panic(nfs_mountroot: SIOCAIFADDR: %d, error);
+#endif
+
if ((cp = getenv(boot.netif.mtu)) != NULL) {
ir.ifr_mtu = strtol(cp, NULL, 10);
bcopy(nd-myif.ifra_name, ir.ifr_name, IFNAMSIZ);



--
Bjoern A. Zeeb   What was I talking about and who are you again?
___
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-unsubscr...@freebsd.org


Re: svn commit: r197218 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2009-09-15 Thread Sam Leffler

Pawel Jakub Dawidek wrote:

On Tue, Sep 15, 2009 at 06:19:11AM -0700, Sam Leffler wrote:

Pawel Jakub Dawidek wrote:

Author: pjd
Date: Tue Sep 15 11:34:53 2009
New Revision: 197218
URL: http://svn.freebsd.org/changeset/base/197218

Log:
 We believe ZFS is ready for production use. Remove a warning about it 
 being

 experimental. :)
This is great news!  Is this amd64 only (or i386 too)?  How about 
non-x86 architectures (have people tested on sparc64, ppc, etc)?


I do most of my tests on i386 with 1GB of RAM. It isn't optimal hardware
configuration for ZFS, but it seems to work fine in most cases. For the
other archs I think I tried sparc64 in the past and Marcel committed
some fixes so it can work on ia64. When it comes to powerpc, arm, mips,
etc. I haven't done any testing and I wouldn't recommend ZFS for those
archs anyway. We should probably also warn about that.



Thank you for the explanation. ppc has support for Xserve if I recall 
(or perhaps in process); that should be suitable.  I was mostly trying 
to understand which arch's zfs has been successfully deployed on.


Sam
___
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-unsubscr...@freebsd.org


svn commit: r197223 - head/sys/kern

2009-09-15 Thread Attilio Rao
Author: attilio
Date: Tue Sep 15 16:56:17 2009
New Revision: 197223
URL: http://svn.freebsd.org/changeset/base/197223

Log:
  Fix sched_switch_migrate():
  - In 8.x and above the run-queue locks are nomore shared even in the
HTT case, so remove the special case.
  - The deadlock explained in the removed comment here is still possible
even with different locks, with the contribution of tdq_lock_pair().
An explanation is here:
(hypotesis: a thread needs to migrate on another CPU, thread1 is doing
sched_switch_migrate() and thread2 is the one handling the sched_switch()
request or in other words, thread1 is the thread that needs to migrate
and thread2 is a thread that is going to be preempted, most likely an
idle thread. Also, 'old' is referred to the context (in terms of
run-queue and CPU) thread1 is leaving and 'new' is referred to the
context thread1 is going into.  Finally, thread3 is doing tdq_idletd()
or sched_balance() and definitively doing tdq_lock_pair())
  
* thread1 blocks its td_lock. Now td_lock is 'blocked'
* thread1 drops its old runqueue lock
* thread1 acquires the new runqueue lock
* thread1 adds itself to the new runqueue and sends an IPI_PREEMPT
  through tdq_notify() to the new CPU
* thread1 drops the new lock
* thread3, scanning the runqueues, locks the old lock
* thread2 received the IPI_PREEMPT and does thread_lock() with td_lock
  pointing to the new runqueue
* thread3 wants to acquire the new runqueue lock, but it can't because
  it is held by thread2 so it spins
* thread1 wants to acquire old lock, but as long as it is held by
  thread3 it can't
* thread2 going further, at some point wants to switchin in thread1,
  but it will wait forever because thread1-td_lock is in blocked state
  
  This deadlock has been manifested mostly on 7.x and reported several time
  on mailing lists under the voice 'spinlock held too long'.
  Many thanks to des@ for having worked hard on producing suitable textdumps
  and Jeff for help on the comment wording.
  
  Reviewed by:  jeff
  Reported by:  des, others
  Tested by:des, Giovanni Trematerra
giovanni dot trematerra at gmail dot com
(STABLE_7 based version)

Modified:
  head/sys/kern/sched_ule.c

Modified: head/sys/kern/sched_ule.c
==
--- head/sys/kern/sched_ule.c   Tue Sep 15 12:51:22 2009(r197222)
+++ head/sys/kern/sched_ule.c   Tue Sep 15 16:56:17 2009(r197223)
@@ -1749,19 +1749,19 @@ sched_switch_migrate(struct tdq *tdq, st
 */
spinlock_enter();
thread_block_switch(td);/* This releases the lock on tdq. */
-   TDQ_LOCK(tdn);
-   tdq_add(tdn, td, flags);
-   tdq_notify(tdn, td);
+
/*
-* After we unlock tdn the new cpu still can't switch into this
-* thread until we've unblocked it in cpu_switch().  The lock
-* pointers may match in the case of HTT cores.  Don't unlock here
-* or we can deadlock when the other CPU runs the IPI handler.
+* Acquire both run-queue locks before placing the thread on the new
+* run-queue to avoid deadlocks created by placing a thread with a
+* blocked lock on the run-queue of a remote processor.  The deadlock
+* occurs when a third processor attempts to lock the two queues in
+* question while the target processor is spinning with its own
+* run-queue lock held while waiting for the blocked lock to clear.
 */
-   if (TDQ_LOCKPTR(tdn) != TDQ_LOCKPTR(tdq)) {
-   TDQ_UNLOCK(tdn);
-   TDQ_LOCK(tdq);
-   }
+   tdq_lock_pair(tdn, tdq);
+   tdq_add(tdn, td, flags);
+   tdq_notify(tdn, td);
+   TDQ_UNLOCK(tdn);
spinlock_exit();
 #endif
return (TDQ_LOCKPTR(tdn));
___
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-unsubscr...@freebsd.org


svn commit: r197224 - in head: lib/libdevinfo sys/sys

2009-09-15 Thread Attilio Rao
Author: attilio
Date: Tue Sep 15 16:59:52 2009
New Revision: 197224
URL: http://svn.freebsd.org/changeset/base/197224

Log:
  Use explicit int values for the device states in order to allow,
  if necessary, in the future, adds of new states without breaking ABI
  between revisions.
  
  Proposed by:  kib
  Approved by:  imp

Modified:
  head/lib/libdevinfo/devinfo.h
  head/sys/sys/bus.h

Modified: head/lib/libdevinfo/devinfo.h
==
--- head/lib/libdevinfo/devinfo.h   Tue Sep 15 16:56:17 2009
(r197223)
+++ head/lib/libdevinfo/devinfo.h   Tue Sep 15 16:59:52 2009
(r197224)
@@ -41,10 +41,10 @@ typedef __uintptr_t devinfo_handle_t;
  */
 /* XXX not sure if I want a copy here, or expose sys/bus.h */
 typedef enum devinfo_state {
-   DIS_NOTPRESENT, /* not probed or probe failed */
-   DIS_ALIVE,  /* probe succeeded */
-   DIS_ATTACHED,   /* attach method called */
-   DIS_BUSY/* device is open */
+   DIS_NOTPRESENT = 10,/* not probed or probe failed */
+   DIS_ALIVE = 20, /* probe succeeded */
+   DIS_ATTACHED = 30,  /* attach method called */
+   DIS_BUSY = 40   /* device is open */
 } devinfo_state_t;
 
 struct devinfo_dev {

Modified: head/sys/sys/bus.h
==
--- head/sys/sys/bus.h  Tue Sep 15 16:56:17 2009(r197223)
+++ head/sys/sys/bus.h  Tue Sep 15 16:59:52 2009(r197224)
@@ -50,10 +50,10 @@ struct u_businfo {
  * @brief State of the device.
  */
 typedef enum device_state {
-   DS_NOTPRESENT,  /** @brief not probed or probe failed 
*/
-   DS_ALIVE,   /** @brief probe succeeded */
-   DS_ATTACHED,/** @brief attach method called */
-   DS_BUSY /** @brief device is open */
+   DS_NOTPRESENT = 10, /** @brief not probed or probe failed 
*/
+   DS_ALIVE = 20,  /** @brief probe succeeded */
+   DS_ATTACHED = 30,   /** @brief attach method called */
+   DS_BUSY = 40/** @brief device is open */
 } device_state_t;
 
 /**
___
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-unsubscr...@freebsd.org


Re: svn commit: r197223 - head/sys/kern

2009-09-15 Thread John Baldwin
On Tuesday 15 September 2009 12:56:18 pm Attilio Rao wrote:
 Author: attilio
 Date: Tue Sep 15 16:56:17 2009
 New Revision: 197223
 URL: http://svn.freebsd.org/changeset/base/197223
 
 Log:
   Fix sched_switch_migrate():

Good catch!

-- 
John Baldwin
___
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-unsubscr...@freebsd.org


svn commit: r197225 - head/sys/netinet

2009-09-15 Thread Qing Li
Author: qingli
Date: Tue Sep 15 18:39:27 2009
New Revision: 197225
URL: http://svn.freebsd.org/changeset/base/197225

Log:
  This patch enables the node to respond to ARP requests for
  configured proxy ARP entries.
  
  Reviewed by:  bz
  MFC after:immediately

Modified:
  head/sys/netinet/if_ether.c

Modified: head/sys/netinet/if_ether.c
==
--- head/sys/netinet/if_ether.c Tue Sep 15 16:59:52 2009(r197224)
+++ head/sys/netinet/if_ether.c Tue Sep 15 18:39:27 2009(r197225)
@@ -714,62 +714,70 @@ reply:
} else {
struct llentry *lle = NULL;
 
-   if (!V_arp_proxyall)
-   goto drop;
-
sin.sin_addr = itaddr;
-   /* XXX MRT use table 0 for arp reply  */
-   rt = in_rtalloc1((struct sockaddr *)sin, 0, 0UL, 0);
-   if (!rt)
-   goto drop;
-
-   /*
-* Don't send proxies for nodes on the same interface
-* as this one came out of, or we'll get into a fight
-* over who claims what Ether address.
-*/
-   if (!rt-rt_ifp || rt-rt_ifp == ifp) {
-   RTFREE_LOCKED(rt);
-   goto drop;
-   }
-   IF_AFDATA_LOCK(rt-rt_ifp); 
-   lle = lla_lookup(LLTABLE(rt-rt_ifp), 0, (struct sockaddr 
*)sin);
-   IF_AFDATA_UNLOCK(rt-rt_ifp);
-   RTFREE_LOCKED(rt);
+   IF_AFDATA_LOCK(ifp); 
+   lle = lla_lookup(LLTABLE(ifp), 0, (struct sockaddr *)sin);
+   IF_AFDATA_UNLOCK(ifp);
 
-   if (lle != NULL) {
+   if ((lle != NULL)  (lle-la_flags  LLE_PUB)) {
(void)memcpy(ar_tha(ah), ar_sha(ah), ah-ar_hln);
(void)memcpy(ar_sha(ah), lle-ll_addr, ah-ar_hln);
LLE_RUNLOCK(lle);
-   } else
-   goto drop;
+   } else {
 
-   /*
-* Also check that the node which sent the ARP packet
-* is on the the interface we expect it to be on. This
-* avoids ARP chaos if an interface is connected to the
-* wrong network.
-*/
-   sin.sin_addr = isaddr;
+   if (lle != NULL)
+   LLE_RUNLOCK(lle);
 
-   /* XXX MRT use table 0 for arp checks */
-   rt = in_rtalloc1((struct sockaddr *)sin, 0, 0UL, 0);
-   if (!rt)
-   goto drop;
-   if (rt-rt_ifp != ifp) {
-   log(LOG_INFO, arp_proxy: ignoring request
-from %s via %s, expecting %s\n,
-   inet_ntoa(isaddr), ifp-if_xname,
-   rt-rt_ifp-if_xname);
+   if (!V_arp_proxyall)
+   goto drop;
+   
+   sin.sin_addr = itaddr;
+   /* XXX MRT use table 0 for arp reply  */
+   rt = in_rtalloc1((struct sockaddr *)sin, 0, 0UL, 0);
+   if (!rt)
+   goto drop;
+
+   /*
+* Don't send proxies for nodes on the same interface
+* as this one came out of, or we'll get into a fight
+* over who claims what Ether address.
+*/
+   if (!rt-rt_ifp || rt-rt_ifp == ifp) {
+   RTFREE_LOCKED(rt);
+   goto drop;
+   }
+   RTFREE_LOCKED(rt);
+
+   (void)memcpy(ar_tha(ah), ar_sha(ah), ah-ar_hln);
+   (void)memcpy(ar_sha(ah), enaddr, ah-ar_hln);
+
+   /*
+* Also check that the node which sent the ARP packet
+* is on the the interface we expect it to be on. This
+* avoids ARP chaos if an interface is connected to the
+* wrong network.
+*/
+   sin.sin_addr = isaddr;
+   
+   /* XXX MRT use table 0 for arp checks */
+   rt = in_rtalloc1((struct sockaddr *)sin, 0, 0UL, 0);
+   if (!rt)
+   goto drop;
+   if (rt-rt_ifp != ifp) {
+   log(LOG_INFO, arp_proxy: ignoring request
+from %s via %s, expecting %s\n,
+   inet_ntoa(isaddr), ifp-if_xname,
+   rt-rt_ifp-if_xname);
+   RTFREE_LOCKED(rt);
+   

svn commit: r197226 - stable/8/sys/kern

2009-09-15 Thread Attilio Rao
Author: attilio
Date: Tue Sep 15 19:14:25 2009
New Revision: 197226
URL: http://svn.freebsd.org/changeset/base/197226

Log:
  MFC r197223:
  Fix sched_switch_migrate() by assuming locks cannot be shared and a
  deadlock between 3 different threads by acquiring both runqueue locks
  when doing the migration.
  
  Please note that this is a special condition as we want this fix in
  before RC1 as we assume it is critical and so it has been handled
  as an instant-merge.  For the STABLE_7 branch, 1 week before the MFC
  is assumed.
  
  Approved by:  re (kib)

Modified:
  stable/8/sys/kern/sched_ule.c

Modified: stable/8/sys/kern/sched_ule.c
==
--- stable/8/sys/kern/sched_ule.c   Tue Sep 15 18:39:27 2009
(r197225)
+++ stable/8/sys/kern/sched_ule.c   Tue Sep 15 19:14:25 2009
(r197226)
@@ -1749,19 +1749,19 @@ sched_switch_migrate(struct tdq *tdq, st
 */
spinlock_enter();
thread_block_switch(td);/* This releases the lock on tdq. */
-   TDQ_LOCK(tdn);
-   tdq_add(tdn, td, flags);
-   tdq_notify(tdn, td);
+
/*
-* After we unlock tdn the new cpu still can't switch into this
-* thread until we've unblocked it in cpu_switch().  The lock
-* pointers may match in the case of HTT cores.  Don't unlock here
-* or we can deadlock when the other CPU runs the IPI handler.
+* Acquire both run-queue locks before placing the thread on the new
+* run-queue to avoid deadlocks created by placing a thread with a
+* blocked lock on the run-queue of a remote processor.  The deadlock
+* occurs when a third processor attempts to lock the two queues in
+* question while the target processor is spinning with its own
+* run-queue lock held while waiting for the blocked lock to clear.
 */
-   if (TDQ_LOCKPTR(tdn) != TDQ_LOCKPTR(tdq)) {
-   TDQ_UNLOCK(tdn);
-   TDQ_LOCK(tdq);
-   }
+   tdq_lock_pair(tdn, tdq);
+   tdq_add(tdn, td, flags);
+   tdq_notify(tdn, td);
+   TDQ_UNLOCK(tdn);
spinlock_exit();
 #endif
return (TDQ_LOCKPTR(tdn));
___
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-unsubscr...@freebsd.org


svn commit: r197227 - in head/sys: net netinet netinet6

2009-09-15 Thread Qing Li
Author: qingli
Date: Tue Sep 15 19:18:34 2009
New Revision: 197227
URL: http://svn.freebsd.org/changeset/base/197227

Log:
  Self pointing routes are installed for configured interface addresses
  and address aliases. After an interface is brought down and brought
  back up again, those self pointing routes disappeared. This patch
  ensures after an interface is brought back up, the loopback routes
  are reinstalled properly.
  
  Reviewed by:  bz
  MFC after:immediately

Modified:
  head/sys/net/if.c
  head/sys/net/if_var.h
  head/sys/netinet/in.c
  head/sys/netinet/raw_ip.c
  head/sys/netinet6/in6.c

Modified: head/sys/net/if.c
==
--- head/sys/net/if.c   Tue Sep 15 19:14:25 2009(r197226)
+++ head/sys/net/if.c   Tue Sep 15 19:18:34 2009(r197227)
@@ -1414,6 +1414,59 @@ ifa_free(struct ifaddr *ifa)
}
 }
 
+int
+ifa_add_loopback_route(struct ifaddr *ifa, struct sockaddr *ia)
+{
+   int error = 0;
+   struct rtentry *rt = NULL;
+   struct rt_addrinfo info;
+   static struct sockaddr_dl null_sdl = {sizeof(null_sdl), AF_LINK};
+
+   bzero(info, sizeof(info));
+   info.rti_ifp = V_loif;
+   info.rti_flags = ifa-ifa_flags | RTF_HOST | RTF_STATIC;
+   info.rti_info[RTAX_DST] = ia;
+   info.rti_info[RTAX_GATEWAY] = (struct sockaddr *)null_sdl;
+   error = rtrequest1_fib(RTM_ADD, info, rt, 0);
+
+   if (error == 0  rt != NULL) {
+   RT_LOCK(rt);
+   ((struct sockaddr_dl *)rt-rt_gateway)-sdl_type  =
+   rt-rt_ifp-if_type;
+   ((struct sockaddr_dl *)rt-rt_gateway)-sdl_index =
+   rt-rt_ifp-if_index;
+   RT_REMREF(rt);
+   RT_UNLOCK(rt);
+   } else if (error != 0)
+   log(LOG_INFO, ifa_add_loopback_route: insertion failed\n);
+
+   return (error);
+}
+
+int
+ifa_del_loopback_route(struct ifaddr *ifa, struct sockaddr *ia)
+{
+   int error = 0;
+   struct rt_addrinfo info;
+   struct sockaddr_dl null_sdl;
+
+   bzero(null_sdl, sizeof(null_sdl));
+   null_sdl.sdl_len = sizeof(null_sdl);
+   null_sdl.sdl_family = AF_LINK;
+   null_sdl.sdl_type = ifa-ifa_ifp-if_type;
+   null_sdl.sdl_index = ifa-ifa_ifp-if_index;
+   bzero(info, sizeof(info));
+   info.rti_flags = ifa-ifa_flags | RTF_HOST | RTF_STATIC;
+   info.rti_info[RTAX_DST] = ia;
+   info.rti_info[RTAX_GATEWAY] = (struct sockaddr *)null_sdl;
+   error = rtrequest1_fib(RTM_DELETE, info, NULL, 0);
+
+   if (error != 0)
+   log(LOG_INFO, ifa_del_loopback_route: deletion failed\n);
+
+   return (error);
+}
+
 /*
  * XXX: Because sockaddr_dl has deeper structure than the sockaddr
  * structs used to represent other address families, it is necessary

Modified: head/sys/net/if_var.h
==
--- head/sys/net/if_var.h   Tue Sep 15 19:14:25 2009(r197226)
+++ head/sys/net/if_var.h   Tue Sep 15 19:18:34 2009(r197227)
@@ -854,6 +854,9 @@ struct  ifnet *ifunit_ref(const char *);
 void   ifq_init(struct ifaltq *, struct ifnet *ifp);
 void   ifq_delete(struct ifaltq *);
 
+intifa_add_loopback_route(struct ifaddr *, struct sockaddr *);
+intifa_del_loopback_route(struct ifaddr *, struct sockaddr *);
+
 struct ifaddr *ifa_ifwithaddr(struct sockaddr *);
 intifa_ifwithaddr_check(struct sockaddr *);
 struct ifaddr *ifa_ifwithbroadaddr(struct sockaddr *);

Modified: head/sys/netinet/in.c
==
--- head/sys/netinet/in.c   Tue Sep 15 19:14:25 2009(r197226)
+++ head/sys/netinet/in.c   Tue Sep 15 19:18:34 2009(r197227)
@@ -827,9 +827,6 @@ in_ifinit(struct ifnet *ifp, struct in_i
 {
register u_long i = ntohl(sin-sin_addr.s_addr);
struct sockaddr_in oldaddr;
-   struct rtentry *rt = NULL;
-   struct rt_addrinfo info;
-   static struct sockaddr_dl null_sdl = {sizeof(null_sdl), AF_LINK};
int s = splimp(), flags = RTF_UP, error = 0;
 
oldaddr = ia-ia_addr;
@@ -927,25 +924,9 @@ in_ifinit(struct ifnet *ifp, struct in_i
/*
 * add a loopback route to self
 */
-   if (V_useloopback  !(ifp-if_flags  IFF_LOOPBACK)) {
-   bzero(info, sizeof(info));
-   info.rti_ifp = V_loif;
-   info.rti_flags = ia-ia_flags | RTF_HOST | RTF_STATIC;
-   info.rti_info[RTAX_DST] = (struct sockaddr *)ia-ia_addr;
-   info.rti_info[RTAX_GATEWAY] = (struct sockaddr *)null_sdl;
-   error = rtrequest1_fib(RTM_ADD, info, rt, 0);
-
-   if (error == 0  rt != NULL) {
-   RT_LOCK(rt);
-   ((struct sockaddr_dl *)rt-rt_gateway)-sdl_type  =
-   rt-rt_ifp-if_type;
-   

svn commit: r197228 - in stable/8: lib/libdevinfo sys/sys

2009-09-15 Thread Attilio Rao
Author: attilio
Date: Tue Sep 15 19:24:18 2009
New Revision: 197228
URL: http://svn.freebsd.org/changeset/base/197228

Log:
  MFC r197224:
  Use explicit int values for the device states in order to allow, if
  necessary, in the future, adds of new states without breaking ABI
  between revisions.
  
  Please note that this is a special condition as we want this fix in
  before RC1 as we assume it is critical and so it has been handled
  as an instant-merge.
  
  Approved by:  re (kib)

Modified:
  stable/8/lib/libdevinfo/devinfo.h
  stable/8/sys/sys/bus.h

Modified: stable/8/lib/libdevinfo/devinfo.h
==
--- stable/8/lib/libdevinfo/devinfo.h   Tue Sep 15 19:18:34 2009
(r197227)
+++ stable/8/lib/libdevinfo/devinfo.h   Tue Sep 15 19:24:18 2009
(r197228)
@@ -41,10 +41,10 @@ typedef __uintptr_t devinfo_handle_t;
  */
 /* XXX not sure if I want a copy here, or expose sys/bus.h */
 typedef enum devinfo_state {
-   DIS_NOTPRESENT, /* not probed or probe failed */
-   DIS_ALIVE,  /* probe succeeded */
-   DIS_ATTACHED,   /* attach method called */
-   DIS_BUSY/* device is open */
+   DIS_NOTPRESENT = 10,/* not probed or probe failed */
+   DIS_ALIVE = 20, /* probe succeeded */
+   DIS_ATTACHED = 30,  /* attach method called */
+   DIS_BUSY = 40   /* device is open */
 } devinfo_state_t;
 
 struct devinfo_dev {

Modified: stable/8/sys/sys/bus.h
==
--- stable/8/sys/sys/bus.h  Tue Sep 15 19:18:34 2009(r197227)
+++ stable/8/sys/sys/bus.h  Tue Sep 15 19:24:18 2009(r197228)
@@ -50,10 +50,10 @@ struct u_businfo {
  * @brief State of the device.
  */
 typedef enum device_state {
-   DS_NOTPRESENT,  /** @brief not probed or probe failed 
*/
-   DS_ALIVE,   /** @brief probe succeeded */
-   DS_ATTACHED,/** @brief attach method called */
-   DS_BUSY /** @brief device is open */
+   DS_NOTPRESENT = 10, /** @brief not probed or probe failed 
*/
+   DS_ALIVE = 20,  /** @brief probe succeeded */
+   DS_ATTACHED = 30,   /** @brief attach method called */
+   DS_BUSY = 40/** @brief device is open */
 } device_state_t;
 
 /**
___
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-unsubscr...@freebsd.org


svn commit: r197230 - stable/8/release

2009-09-15 Thread Marc Fonvieille
Author: blackend (doc committer)
Date: Tue Sep 15 19:56:35 2009
New Revision: 197230
URL: http://svn.freebsd.org/changeset/base/197230

Log:
  MFC: r196588
  
  Log:
Update some comments to match the removal of the docset compilation
during the release build.
  
  Approved by:  re (kib)

Modified:
  stable/8/release/Makefile

Modified: stable/8/release/Makefile
==
--- stable/8/release/Makefile   Tue Sep 15 19:38:29 2009(r197229)
+++ stable/8/release/Makefile   Tue Sep 15 19:56:35 2009(r197230)
@@ -1163,10 +1163,10 @@ iso.1:
 .endif
 
 #
-# --==## Documentation Project files such as the Handbook and FAQ ##==--
+# --==## Documentation Project tools required to build the release notes ##==--
 #
 doc.1:
-   @echo Making docs...
+   @echo Making docproj tools...
@for i in ${DOCPORTS}; do \
cd /usr/ports/$$i  \
env -i FTP_PASSIVE_MODE=$${FTP_PASSIVE_MODE:-no} PATH=$${PATH} \
___
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-unsubscr...@freebsd.org


svn commit: r197231 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci netinet

2009-09-15 Thread Qing Li
Author: qingli
Date: Tue Sep 15 19:58:33 2009
New Revision: 197231
URL: http://svn.freebsd.org/changeset/base/197231

Log:
  MFC   r196714
  
  This patch fixes the following issues:
  
  - Routing messages are not generated when adding and removing
interface address aliases.
  - Loopback route installed for an interface address alias is
not deleted from the routing table when that address alias
is removed from the associated interface.
  - Function in_ifscrub() is called extraneously.
  
  Reviewed by:  gnn, kmacy, sam
  Approved by:  re

Modified:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/sys/netinet/in.c

Modified: stable/8/sys/netinet/in.c
==
--- stable/8/sys/netinet/in.c   Tue Sep 15 19:56:35 2009(r197230)
+++ stable/8/sys/netinet/in.c   Tue Sep 15 19:58:33 2009(r197231)
@@ -536,7 +536,6 @@ in_control(struct socket *so, u_long cmd
hostIsNew = 0;
}
if (ifra-ifra_mask.sin_len) {
-   in_ifscrub(ifp, ia);
ia-ia_sockmask = ifra-ifra_mask;
ia-ia_sockmask.sin_family = AF_INET;
ia-ia_subnetmask =
@@ -545,7 +544,6 @@ in_control(struct socket *so, u_long cmd
}
if ((ifp-if_flags  IFF_POINTOPOINT) 
(ifra-ifra_dstaddr.sin_family == AF_INET)) {
-   in_ifscrub(ifp, ia);
ia-ia_dstaddr = ifra-ifra_dstaddr;
maskIsNew  = 1; /* We lie; but the effect's the same */
}
@@ -991,6 +989,40 @@ in_addprefix(struct in_ifaddr *target, i
IN_IFADDR_RUNLOCK();
return (EEXIST);
} else {
+   struct route pfx_ro;
+   struct sockaddr_in *pfx_addr;
+   struct rtentry msg_rt;
+
+   /* QL: XXX
+* This is a bit questionable because there is 
no
+* additional route entry added for an address 
alias.
+* Therefore this route report is inaccurate. 
Perhaps
+* it's better to supply a empty rtentry as how 
it
+* is done in in_scrubprefix().
+*/
+   bzero(pfx_ro, sizeof(pfx_ro));
+   pfx_addr = (struct sockaddr_in 
*)(pfx_ro.ro_dst);
+   pfx_addr-sin_len = sizeof(*pfx_addr);
+   pfx_addr-sin_family = AF_INET;
+   pfx_addr-sin_addr = prefix;
+   rtalloc_ign_fib(pfx_ro, 0, 0);
+   if (pfx_ro.ro_rt != NULL) {
+   msg_rt = *pfx_ro.ro_rt;
+   /* QL: XXX
+* Point the gateway to the given 
interface
+* address as if a new prefix route 
entry has 
+* been added through the new address 
alias. 
+* All other parts of the rtentry is 
accurate, 
+* e.g., rt_key, rt_mask, rt_ifp etc.
+*/
+   msg_rt.rt_gateway = 
+   (struct sockaddr *)ia-ia_addr;
+   rt_newaddrmsg(RTM_ADD, 
+ (struct ifaddr *)target,
+ 0, msg_rt);
+   RTFREE(pfx_ro.ro_rt);
+   }
+
IN_IFADDR_RUNLOCK();
return (0);
}
@@ -1024,9 +1056,6 @@ in_scrubprefix(struct in_ifaddr *target)
struct rt_addrinfo info;
struct sockaddr_dl null_sdl;
 
-   if ((target-ia_flags  IFA_ROUTE) == 0)
-   return (0);
-
/*
 * Remove the loopback route to the interface address.
 * The useloopback setting is not consulted because if the
@@ -1054,6 +1083,20 @@ in_scrubprefix(struct in_ifaddr *target)
log(LOG_INFO, in_scrubprefix: deletion failed\n);
}
 
+   if ((target-ia_flags  IFA_ROUTE) == 0) {
+   struct rtentry rt;
+
+ 

svn commit: r197232 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci

2009-09-15 Thread Attilio Rao
Author: attilio
Date: Tue Sep 15 20:21:10 2009
New Revision: 197232
URL: http://svn.freebsd.org/changeset/base/197232

Log:
  Record merge for MFC of r197223, done in r197226.
  
  Requested by: kib
  Approved by:  re (kib)

Modified:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
___
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-unsubscr...@freebsd.org


svn commit: r197233 - in stable/8: lib/libdevinfo sys sys/amd64/include/xen sys/cddl/contrib/opensolaris sys/contrib/dev/acpica sys/contrib/pf sys/dev/xen/xenpci

2009-09-15 Thread Attilio Rao
Author: attilio
Date: Tue Sep 15 20:28:29 2009
New Revision: 197233
URL: http://svn.freebsd.org/changeset/base/197233

Log:
  ecorde merge for MFC of r197224, done in r197228.
  
  Requested by: kib
  Approved by:  re (kib)

Modified:
  stable/8/lib/libdevinfo/   (props changed)
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
___
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-unsubscr...@freebsd.org


svn commit: r197234 - head/lib/libc/regex/grot

2009-09-15 Thread Diomidis Spinellis
Author: dds
Date: Tue Sep 15 21:15:29 2009
New Revision: 197234
URL: http://svn.freebsd.org/changeset/base/197234

Log:
  Add two test cases from PR 130504.
  An additional one coming from http://www.research.att.com/~gsf/testregex/
  was not added; at some point the entire ATT regression test harness
  should be imported here.
  But that would also mean commitment to fix the uncovered errors.
  
  PR:   130504
  Submitted by: Chris Kuklewicz

Modified:
  head/lib/libc/regex/grot/tests

Modified: head/lib/libc/regex/grot/tests
==
--- head/lib/libc/regex/grot/tests  Tue Sep 15 20:28:29 2009
(r197233)
+++ head/lib/libc/regex/grot/tests  Tue Sep 15 21:15:29 2009
(r197234)
@@ -472,3 +472,6 @@ abcdefghijklmnopi   abcdefghijklmnopabcd
 abcdefghijklmnopqrstuv i   abcdefghijklmnopqrstuv  abcdefghijklmnopqrstuv
 (ALAK)|(ALT[AB])|(CC[123]1)|(CM[123]1)|(GAMC)|(LC[23][EO 
])|(SEM[1234])|(SL[ES][12])|(SLWW)|(SLF 
)|(SLDT)|(VWH[12])|(WH[34][EW])|(WP1[ESN])-   CC11CC11
 CC[13]1|a{21}[23][EO][123][Es][12]a{15}aa[34][EW]aaa[X]a   -   CC11
CC11
+# PR 130504
+(.|())(b)  -   ab  ab
+(()|.)(b)  -   ab  ab
___
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-unsubscr...@freebsd.org


svn commit: r197235 - head/sys/nfsclient

2009-09-15 Thread Qing Li
Author: qingli
Date: Tue Sep 15 22:09:42 2009
New Revision: 197235
URL: http://svn.freebsd.org/changeset/base/197235

Log:
  Reverting the previous change for now. Some users reports the patch
  fixes their issues but one reports a failure in NFS ROOT. Revert
  the change for now pending further investigation.
  
  Reviewed by:  bz
  MFC after:immediately

Modified:
  head/sys/nfsclient/nfs_vfsops.c

Modified: head/sys/nfsclient/nfs_vfsops.c
==
--- head/sys/nfsclient/nfs_vfsops.c Tue Sep 15 21:15:29 2009
(r197234)
+++ head/sys/nfsclient/nfs_vfsops.c Tue Sep 15 22:09:42 2009
(r197235)
@@ -464,6 +464,10 @@ nfs_mountroot(struct mount *mp)
}
 #endif
 
+   error = ifioctl(so, SIOCAIFADDR, (caddr_t)nd-myif, td);
+   if (error)
+   panic(nfs_mountroot: SIOCAIFADDR: %d, error);
+
if ((cp = getenv(boot.netif.mtu)) != NULL) {
ir.ifr_mtu = strtol(cp, NULL, 10);
bcopy(nd-myif.ifra_name, ir.ifr_name, IFNAMSIZ);
___
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-unsubscr...@freebsd.org


svn commit: r197236 - in head/sys: conf kern netinet

2009-09-15 Thread Andre Oppermann
Author: andre
Date: Tue Sep 15 22:23:45 2009
New Revision: 197236
URL: http://svn.freebsd.org/changeset/base/197236

Log:
  -Put the optimized soreceive_stream() under a compile time option called
  TCP_SORECEIVE_STREAM for the time being.
  
  Requested by: brooks
  
  Once compiled in make it easily switchable for testers by using a tuneable
   net.inet.tcp.soreceive_stream
  and a corresponding read-only sysctl to report the current state.
  
  Suggested by: rwatson
  
  MFC after:2 days
  -This line, and those below, will be ignored--
   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.
  
  Msys/conf/options
  Msys/kern/uipc_socket.c
  Msys/netinet/tcp_subr.c
  Msys/netinet/tcp_usrreq.c

Modified:
  head/sys/conf/options
  head/sys/kern/uipc_socket.c
  head/sys/netinet/tcp_subr.c
  head/sys/netinet/tcp_usrreq.c

Modified: head/sys/conf/options
==
--- head/sys/conf/options   Tue Sep 15 22:09:42 2009(r197235)
+++ head/sys/conf/options   Tue Sep 15 22:23:45 2009(r197236)
@@ -416,6 +416,7 @@ SLIP_IFF_OPTS   opt_slip.h
 TCPDEBUG
 TCP_OFFLOAD_DISABLEopt_inet.h #Disable code to dispatch tcp offloading
 TCP_SIGNATURE  opt_inet.h
+TCP_SORECEIVE_STREAM   opt_inet.h
 VLAN_ARRAY opt_vlan.h
 XBONEHACK
 FLOWTABLE  opt_route.h

Modified: head/sys/kern/uipc_socket.c
==
--- head/sys/kern/uipc_socket.c Tue Sep 15 22:09:42 2009(r197235)
+++ head/sys/kern/uipc_socket.c Tue Sep 15 22:23:45 2009(r197236)
@@ -1870,6 +1870,7 @@ release:
 /*
  * Optimized version of soreceive() for stream (TCP) sockets.
  */
+#ifdef TCP_SORECEIVE_STREAM
 int
 soreceive_stream(struct socket *so, struct sockaddr **psa, struct uio *uio,
 struct mbuf **mp0, struct mbuf **controlp, int *flagsp)
@@ -2062,6 +2063,7 @@ out:
sbunlock(sb);
return (error);
 }
+#endif /* TCP_SORECEIVE_STREAM */
 
 /*
  * Optimized version of soreceive() for simple datagram cases from userspace.

Modified: head/sys/netinet/tcp_subr.c
==
--- head/sys/netinet/tcp_subr.c Tue Sep 15 22:09:42 2009(r197235)
+++ head/sys/netinet/tcp_subr.c Tue Sep 15 22:23:45 2009(r197236)
@@ -259,6 +259,12 @@ SYSCTL_VNET_INT(_net_inet_tcp_inflight, 
 VNET_NAME(tcp_inflight_stab), 0,
 Inflight Algorithm Stabilization 20 = 2 packets);
 
+#ifdef TCP_SORECEIVE_STREAM
+static int tcp_soreceive_stream = 0;
+SYSCTL_INT(_net_inet_tcp, OID_AUTO, soreceive_stream, CTLFLAG_RDTUN,
+tcp_soreceive_stream, 0, Using soreceive_stream for TCP sockets);
+#endif
+
 VNET_DEFINE(uma_zone_t, sack_hole_zone);
 #defineV_sack_hole_zoneVNET(sack_hole_zone)
 
@@ -420,6 +426,14 @@ tcp_init(void)
tcp_finwait2_timeout = TCPTV_FINWAIT2_TIMEOUT;
tcp_tcbhashsize = hashsize;
 
+#ifdef TCP_SORECEIVE_STREAM
+   TUNABLE_INT_FETCH(net.inet.tcp.soreceive_stream, 
tcp_soreceive_stream);
+   if (tcp_soreceive_stream) {
+   tcp_usrreqs.pru_soreceive = soreceive_stream;
+   tcp6_usrreqs.pru_soreceive = soreceive_stream;
+   }
+#endif
+
 #ifdef INET6
 #define TCP_MINPROTOHDR (sizeof(struct ip6_hdr) + sizeof(struct tcphdr))
 #else /* INET6 */

Modified: head/sys/netinet/tcp_usrreq.c
==
--- head/sys/netinet/tcp_usrreq.c   Tue Sep 15 22:09:42 2009
(r197235)
+++ head/sys/netinet/tcp_usrreq.c   Tue Sep 15 22:23:45 2009
(r197236)
@@ -1015,9 +1015,6 @@ struct pr_usrreqs tcp_usrreqs = {
.pru_send = tcp_usr_send,
.pru_shutdown = tcp_usr_shutdown,
.pru_sockaddr = in_getsockaddr,
-#if 0
-   .pru_soreceive =soreceive_stream,
-#endif
.pru_sosetlabel =   in_pcbsosetlabel,
.pru_close =tcp_usr_close,
 };
@@ -1039,9 +1036,6 @@ struct pr_usrreqs tcp6_usrreqs = {
.pru_send = tcp_usr_send,
.pru_shutdown = tcp_usr_shutdown,
.pru_sockaddr = in6_mapped_sockaddr,
-#if 0
-   .pru_soreceive =soreceive_stream,
-#endif
.pru_sosetlabel =   in_pcbsosetlabel,
.pru_close =tcp_usr_close,
 };

svn commit: r197237 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci netinet nfsclient

2009-09-15 Thread Qing Li
Author: qingli
Date: Tue Sep 15 22:25:19 2009
New Revision: 197237
URL: http://svn.freebsd.org/changeset/base/197237

Log:
  MFC   r197210, 197212, 197235
  
  The bootp code installs an interface address and the nfs client
  module tries to install the same address again. This extra code
  is removed, which was discovered by the removal of a call to
  in_ifscrub() in r196714. This call to in_ifscrub is put back here
  because the SIOCAIFADDR command can be used to change the prefix
  length of an existing alias.
  
  r197235 reverts file nfs_vfsops.c
  
  Reviewed by:  kmacy
  Approved by:  re

Modified:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/sys/netinet/in.c
  stable/8/sys/nfsclient/nfs_vfsops.c

Modified: stable/8/sys/netinet/in.c
==
--- stable/8/sys/netinet/in.c   Tue Sep 15 22:23:45 2009(r197236)
+++ stable/8/sys/netinet/in.c   Tue Sep 15 22:25:19 2009(r197237)
@@ -536,6 +536,16 @@ in_control(struct socket *so, u_long cmd
hostIsNew = 0;
}
if (ifra-ifra_mask.sin_len) {
+   /* 
+* QL: XXX
+* Need to scrub the prefix here in case
+* the issued command is SIOCAIFADDR with
+* the same address, but with a different
+* prefix length. And if the prefix length
+* is the same as before, then the call is 
+* un-necessarily executed here.
+*/
+   in_ifscrub(ifp, ia);
ia-ia_sockmask = ifra-ifra_mask;
ia-ia_sockmask.sin_family = AF_INET;
ia-ia_subnetmask =
@@ -544,6 +554,7 @@ in_control(struct socket *so, u_long cmd
}
if ((ifp-if_flags  IFF_POINTOPOINT) 
(ifra-ifra_dstaddr.sin_family == AF_INET)) {
+   in_ifscrub(ifp, ia);
ia-ia_dstaddr = ifra-ifra_dstaddr;
maskIsNew  = 1; /* We lie; but the effect's the same */
}

Modified: stable/8/sys/nfsclient/nfs_vfsops.c
==
--- stable/8/sys/nfsclient/nfs_vfsops.c Tue Sep 15 22:23:45 2009
(r197236)
+++ stable/8/sys/nfsclient/nfs_vfsops.c Tue Sep 15 22:25:19 2009
(r197237)
@@ -463,9 +463,11 @@ nfs_mountroot(struct mount *mp)
break;
}
 #endif
+
error = ifioctl(so, SIOCAIFADDR, (caddr_t)nd-myif, td);
if (error)
panic(nfs_mountroot: SIOCAIFADDR: %d, error);
+
if ((cp = getenv(boot.netif.mtu)) != NULL) {
ir.ifr_mtu = strtol(cp, NULL, 10);
bcopy(nd-myif.ifra_name, ir.ifr_name, IFNAMSIZ);
___
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-unsubscr...@freebsd.org


svn commit: r197238 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci netinet

2009-09-15 Thread Qing Li
Author: qingli
Date: Tue Sep 15 22:37:17 2009
New Revision: 197238
URL: http://svn.freebsd.org/changeset/base/197238

Log:
  MFC   r197225
  
  This patch enables the node to respond to ARP requests for
  configured proxy ARP entries.
  
  Reviewed by:  bz
  Approved by:  re

Modified:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/sys/netinet/if_ether.c

Modified: stable/8/sys/netinet/if_ether.c
==
--- stable/8/sys/netinet/if_ether.c Tue Sep 15 22:25:19 2009
(r197237)
+++ stable/8/sys/netinet/if_ether.c Tue Sep 15 22:37:17 2009
(r197238)
@@ -694,62 +694,70 @@ reply:
} else {
struct llentry *lle = NULL;
 
-   if (!V_arp_proxyall)
-   goto drop;
-
sin.sin_addr = itaddr;
-   /* XXX MRT use table 0 for arp reply  */
-   rt = in_rtalloc1((struct sockaddr *)sin, 0, 0UL, 0);
-   if (!rt)
-   goto drop;
-
-   /*
-* Don't send proxies for nodes on the same interface
-* as this one came out of, or we'll get into a fight
-* over who claims what Ether address.
-*/
-   if (!rt-rt_ifp || rt-rt_ifp == ifp) {
-   RTFREE_LOCKED(rt);
-   goto drop;
-   }
-   IF_AFDATA_LOCK(rt-rt_ifp); 
-   lle = lla_lookup(LLTABLE(rt-rt_ifp), 0, (struct sockaddr 
*)sin);
-   IF_AFDATA_UNLOCK(rt-rt_ifp);
-   RTFREE_LOCKED(rt);
+   IF_AFDATA_LOCK(ifp); 
+   lle = lla_lookup(LLTABLE(ifp), 0, (struct sockaddr *)sin);
+   IF_AFDATA_UNLOCK(ifp);
 
-   if (lle != NULL) {
+   if ((lle != NULL)  (lle-la_flags  LLE_PUB)) {
(void)memcpy(ar_tha(ah), ar_sha(ah), ah-ar_hln);
(void)memcpy(ar_sha(ah), lle-ll_addr, ah-ar_hln);
LLE_RUNLOCK(lle);
-   } else
-   goto drop;
+   } else {
 
-   /*
-* Also check that the node which sent the ARP packet
-* is on the the interface we expect it to be on. This
-* avoids ARP chaos if an interface is connected to the
-* wrong network.
-*/
-   sin.sin_addr = isaddr;
+   if (lle != NULL)
+   LLE_RUNLOCK(lle);
 
-   /* XXX MRT use table 0 for arp checks */
-   rt = in_rtalloc1((struct sockaddr *)sin, 0, 0UL, 0);
-   if (!rt)
-   goto drop;
-   if (rt-rt_ifp != ifp) {
-   log(LOG_INFO, arp_proxy: ignoring request
-from %s via %s, expecting %s\n,
-   inet_ntoa(isaddr), ifp-if_xname,
-   rt-rt_ifp-if_xname);
+   if (!V_arp_proxyall)
+   goto drop;
+   
+   sin.sin_addr = itaddr;
+   /* XXX MRT use table 0 for arp reply  */
+   rt = in_rtalloc1((struct sockaddr *)sin, 0, 0UL, 0);
+   if (!rt)
+   goto drop;
+
+   /*
+* Don't send proxies for nodes on the same interface
+* as this one came out of, or we'll get into a fight
+* over who claims what Ether address.
+*/
+   if (!rt-rt_ifp || rt-rt_ifp == ifp) {
+   RTFREE_LOCKED(rt);
+   goto drop;
+   }
+   RTFREE_LOCKED(rt);
+
+   (void)memcpy(ar_tha(ah), ar_sha(ah), ah-ar_hln);
+   (void)memcpy(ar_sha(ah), enaddr, ah-ar_hln);
+
+   /*
+* Also check that the node which sent the ARP packet
+* is on the the interface we expect it to be on. This
+* avoids ARP chaos if an interface is connected to the
+* wrong network.
+*/
+   sin.sin_addr = isaddr;
+   
+   /* XXX MRT use table 0 for arp checks */
+   rt = in_rtalloc1((struct sockaddr *)sin, 0, 0UL, 0);
+   if (!rt)
+   goto drop;
+   if (rt-rt_ifp != ifp) {
+   

svn commit: r197239 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci net netinet netinet6

2009-09-15 Thread Qing Li
Author: qingli
Date: Tue Sep 15 22:46:06 2009
New Revision: 197239
URL: http://svn.freebsd.org/changeset/base/197239

Log:
  MFC   r197227
  
  Self pointing routes are installed for configured interface addresses
  and address aliases. After an interface is brought down and brought
  back up again, those self pointing routes disappeared. This patch
  ensures after an interface is brought back up, the loopback routes
  are reinstalled properly.
  
  Reviewed by:  bz
  Approved by:  re

Modified:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/sys/net/if.c
  stable/8/sys/net/if_var.h
  stable/8/sys/netinet/in.c
  stable/8/sys/netinet/raw_ip.c
  stable/8/sys/netinet6/in6.c

Modified: stable/8/sys/net/if.c
==
--- stable/8/sys/net/if.c   Tue Sep 15 22:37:17 2009(r197238)
+++ stable/8/sys/net/if.c   Tue Sep 15 22:46:06 2009(r197239)
@@ -1414,6 +1414,59 @@ ifa_free(struct ifaddr *ifa)
}
 }
 
+int
+ifa_add_loopback_route(struct ifaddr *ifa, struct sockaddr *ia)
+{
+   int error = 0;
+   struct rtentry *rt = NULL;
+   struct rt_addrinfo info;
+   static struct sockaddr_dl null_sdl = {sizeof(null_sdl), AF_LINK};
+
+   bzero(info, sizeof(info));
+   info.rti_ifp = V_loif;
+   info.rti_flags = ifa-ifa_flags | RTF_HOST | RTF_STATIC;
+   info.rti_info[RTAX_DST] = ia;
+   info.rti_info[RTAX_GATEWAY] = (struct sockaddr *)null_sdl;
+   error = rtrequest1_fib(RTM_ADD, info, rt, 0);
+
+   if (error == 0  rt != NULL) {
+   RT_LOCK(rt);
+   ((struct sockaddr_dl *)rt-rt_gateway)-sdl_type  =
+   rt-rt_ifp-if_type;
+   ((struct sockaddr_dl *)rt-rt_gateway)-sdl_index =
+   rt-rt_ifp-if_index;
+   RT_REMREF(rt);
+   RT_UNLOCK(rt);
+   } else if (error != 0)
+   log(LOG_INFO, ifa_add_loopback_route: insertion failed\n);
+
+   return (error);
+}
+
+int
+ifa_del_loopback_route(struct ifaddr *ifa, struct sockaddr *ia)
+{
+   int error = 0;
+   struct rt_addrinfo info;
+   struct sockaddr_dl null_sdl;
+
+   bzero(null_sdl, sizeof(null_sdl));
+   null_sdl.sdl_len = sizeof(null_sdl);
+   null_sdl.sdl_family = AF_LINK;
+   null_sdl.sdl_type = ifa-ifa_ifp-if_type;
+   null_sdl.sdl_index = ifa-ifa_ifp-if_index;
+   bzero(info, sizeof(info));
+   info.rti_flags = ifa-ifa_flags | RTF_HOST | RTF_STATIC;
+   info.rti_info[RTAX_DST] = ia;
+   info.rti_info[RTAX_GATEWAY] = (struct sockaddr *)null_sdl;
+   error = rtrequest1_fib(RTM_DELETE, info, NULL, 0);
+
+   if (error != 0)
+   log(LOG_INFO, ifa_del_loopback_route: deletion failed\n);
+
+   return (error);
+}
+
 /*
  * XXX: Because sockaddr_dl has deeper structure than the sockaddr
  * structs used to represent other address families, it is necessary

Modified: stable/8/sys/net/if_var.h
==
--- stable/8/sys/net/if_var.h   Tue Sep 15 22:37:17 2009(r197238)
+++ stable/8/sys/net/if_var.h   Tue Sep 15 22:46:06 2009(r197239)
@@ -854,6 +854,9 @@ struct  ifnet *ifunit_ref(const char *);
 void   ifq_init(struct ifaltq *, struct ifnet *ifp);
 void   ifq_delete(struct ifaltq *);
 
+intifa_add_loopback_route(struct ifaddr *, struct sockaddr *);
+intifa_del_loopback_route(struct ifaddr *, struct sockaddr *);
+
 struct ifaddr *ifa_ifwithaddr(struct sockaddr *);
 intifa_ifwithaddr_check(struct sockaddr *);
 struct ifaddr *ifa_ifwithbroadaddr(struct sockaddr *);

Modified: stable/8/sys/netinet/in.c
==
--- stable/8/sys/netinet/in.c   Tue Sep 15 22:37:17 2009(r197238)
+++ stable/8/sys/netinet/in.c   Tue Sep 15 22:46:06 2009(r197239)
@@ -827,9 +827,6 @@ in_ifinit(struct ifnet *ifp, struct in_i
 {
register u_long i = ntohl(sin-sin_addr.s_addr);
struct sockaddr_in oldaddr;
-   struct rtentry *rt = NULL;
-   struct rt_addrinfo info;
-   static struct sockaddr_dl null_sdl = {sizeof(null_sdl), AF_LINK};
int s = splimp(), flags = RTF_UP, error = 0;
 
oldaddr = ia-ia_addr;
@@ -927,25 +924,9 @@ in_ifinit(struct ifnet *ifp, struct in_i
/*
 * add a loopback route to self
 */
-   if (V_useloopback  !(ifp-if_flags  IFF_LOOPBACK)) {
-   bzero(info, sizeof(info));
-   info.rti_ifp = V_loif;
-   info.rti_flags = ia-ia_flags | RTF_HOST | RTF_STATIC;
-   info.rti_info[RTAX_DST] = (struct sockaddr *)ia-ia_addr;
-

Re: svn commit: r197236 - in head/sys: conf kern netinet

2009-09-15 Thread Andre Oppermann

Andre Oppermann wrote:

Author: andre
Date: Tue Sep 15 22:23:45 2009
New Revision: 197236
URL: http://svn.freebsd.org/changeset/base/197236

Log:
  -Put the optimized soreceive_stream() under a compile time option called
  TCP_SORECEIVE_STREAM for the time being.
  
  Requested by:	brooks
  
  Once compiled in make it easily switchable for testers by using a tuneable

   net.inet.tcp.soreceive_stream
  and a corresponding read-only sysctl to report the current state.
  
  Suggested by:	rwatson
  
  MFC after:	2 days

  -This line, and those below, will be ignored--


This is funny... :-)  Missed the dash.


   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.
  
  Msys/conf/options

  Msys/kern/uipc_socket.c
  Msys/netinet/tcp_subr.c
  Msys/netinet/tcp_usrreq.c

Modified:
  head/sys/conf/options
  head/sys/kern/uipc_socket.c
  head/sys/netinet/tcp_subr.c
  head/sys/netinet/tcp_usrreq.c

Modified: head/sys/conf/options
==
--- head/sys/conf/options   Tue Sep 15 22:09:42 2009(r197235)
+++ head/sys/conf/options   Tue Sep 15 22:23:45 2009(r197236)
@@ -416,6 +416,7 @@ SLIP_IFF_OPTS   opt_slip.h
 TCPDEBUG
 TCP_OFFLOAD_DISABLEopt_inet.h #Disable code to dispatch tcp offloading
 TCP_SIGNATURE  opt_inet.h
+TCP_SORECEIVE_STREAM   opt_inet.h
 VLAN_ARRAY opt_vlan.h
 XBONEHACK
 FLOWTABLE  opt_route.h

Modified: head/sys/kern/uipc_socket.c
==
--- head/sys/kern/uipc_socket.c Tue Sep 15 22:09:42 2009(r197235)
+++ head/sys/kern/uipc_socket.c Tue Sep 15 22:23:45 2009(r197236)
@@ -1870,6 +1870,7 @@ release:
 /*
  * Optimized version of soreceive() for stream (TCP) sockets.
  */
+#ifdef TCP_SORECEIVE_STREAM
 int
 soreceive_stream(struct socket *so, struct sockaddr **psa, struct uio *uio,
 struct mbuf **mp0, struct mbuf **controlp, int *flagsp)
@@ -2062,6 +2063,7 @@ out:
sbunlock(sb);
return (error);
 }
+#endif /* TCP_SORECEIVE_STREAM */
 
 /*

  * Optimized version of soreceive() for simple datagram cases from userspace.

Modified: head/sys/netinet/tcp_subr.c
==
--- head/sys/netinet/tcp_subr.c Tue Sep 15 22:09:42 2009(r197235)
+++ head/sys/netinet/tcp_subr.c Tue Sep 15 22:23:45 2009(r197236)
@@ -259,6 +259,12 @@ SYSCTL_VNET_INT(_net_inet_tcp_inflight, 
 VNET_NAME(tcp_inflight_stab), 0,

 Inflight Algorithm Stabilization 20 = 2 packets);
 
+#ifdef TCP_SORECEIVE_STREAM

+static int tcp_soreceive_stream = 0;
+SYSCTL_INT(_net_inet_tcp, OID_AUTO, soreceive_stream, CTLFLAG_RDTUN,
+tcp_soreceive_stream, 0, Using soreceive_stream for TCP sockets);
+#endif
+
 VNET_DEFINE(uma_zone_t, sack_hole_zone);
 #defineV_sack_hole_zoneVNET(sack_hole_zone)
 
@@ -420,6 +426,14 @@ tcp_init(void)

tcp_finwait2_timeout = TCPTV_FINWAIT2_TIMEOUT;
tcp_tcbhashsize = hashsize;
 
+#ifdef TCP_SORECEIVE_STREAM

+   TUNABLE_INT_FETCH(net.inet.tcp.soreceive_stream, 
tcp_soreceive_stream);
+   if (tcp_soreceive_stream) {
+   tcp_usrreqs.pru_soreceive = soreceive_stream;
+   tcp6_usrreqs.pru_soreceive = soreceive_stream;
+   }
+#endif
+
 #ifdef INET6
 #define TCP_MINPROTOHDR (sizeof(struct ip6_hdr) + sizeof(struct tcphdr))
 #else /* INET6 */

Modified: head/sys/netinet/tcp_usrreq.c
==
--- head/sys/netinet/tcp_usrreq.c   Tue Sep 15 22:09:42 2009
(r197235)
+++ head/sys/netinet/tcp_usrreq.c   Tue Sep 15 22:23:45 2009
(r197236)
@@ -1015,9 +1015,6 @@ struct pr_usrreqs tcp_usrreqs = {
.pru_send = tcp_usr_send,
.pru_shutdown = tcp_usr_shutdown,
.pru_sockaddr = in_getsockaddr,
-#if 0
-   .pru_soreceive =soreceive_stream,
-#endif
.pru_sosetlabel =   in_pcbsosetlabel,
.pru_close =tcp_usr_close,
 };
@@ -1039,9 +1036,6 @@ struct pr_usrreqs tcp6_usrreqs = {
.pru_send = tcp_usr_send,
.pru_shutdown = tcp_usr_shutdown,
.pru_sockaddr = in6_mapped_sockaddr,
-#if 0
-   .pru_soreceive =soreceive_stream,
-#endif
.pru_sosetlabel =   in_pcbsosetlabel,

Re: svn commit: r197210 - in head/sys: netinet nfsclient

2009-09-15 Thread Qing Li
The users who were reporting the NFS mount problems confirm the patch fixes
their issues. At the moment I don't know why the patch would break NFS ROOT.
I just backed out the change so RC1 can be made but I will continue the
investigation.

--Qing

On Tue, Sep 15, 2009 at 3:55 PM, Rick Macklem rmack...@uoguelph.ca wrote:


 On Tue, 15 Sep 2009, Bjoern A. Zeeb wrote:

 On Tue, 15 Sep 2009, Qing Li wrote:

 Author: qingli
 Date: Tue Sep 15 01:01:03 2009
 New Revision: 197210
 URL: http://svn.freebsd.org/changeset/base/197210

 Log:
  The bootp code installs an interface address and the nfs client
  module tries to install the same address again. This extra code
  is removed, which was discovered by the removal of a call to
  in_ifscrub() in r196714. This call to in_ifscrub is put back here
  because the SIOCAIFADDR command can be used to change the prefix
  length of an existing alias.

  Reviewed by:    kmacy

 This broke NFS Root for me in the netperf clsuter setup.
 The NFS Root mount hang for ages (I reset the box after 1 hour).

 Backing out r197212 and this and it boots just fine again.

 I don't know diddly about diskless booting and have no setup to test,
 but if I understood the problem, might something like the following
 work?

 rick
 --- nfsclient/nfs_vfsops.c.sav  2009-09-15 18:39:32.0 -0400
 +++ nfsclient/nfs_vfsops.c      2009-09-15 18:41:52.0 -0400
 @@ -416,13 +416,14 @@
        struct socket *so;
        struct vnode *vp;
        struct ifreq ir;
 -       int error;
 +       int error, doioctl = 1;
        u_long l;
        char buf[128];
        char *cp;

  #if defined(BOOTP_NFSROOT)  defined(BOOTP)
        bootpc_init();          /* use bootp to get nfs_diskless filled in */
 +       doioctl = 0;
  #elif defined(NFS_ROOT)
        nfs_setup_diskless();
  #endif
 @@ -463,9 +464,11 @@
                        break;
        }
  #endif
 -       error = ifioctl(so, SIOCAIFADDR, (caddr_t)nd-myif, td);
 -       if (error)
 -               panic(nfs_mountroot: SIOCAIFADDR: %d, error);
 +       if (doioctl) {
 +               error = ifioctl(so, SIOCAIFADDR, (caddr_t)nd-myif, td);
 +               if (error)
 +                       panic(nfs_mountroot: SIOCAIFADDR: %d, error);
 +       }
        if ((cp = getenv(boot.netif.mtu)) != NULL) {
                ir.ifr_mtu = strtol(cp, NULL, 10);
                bcopy(nd-myif.ifra_name, ir.ifr_name, IFNAMSIZ);

___
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-unsubscr...@freebsd.org


svn commit: r197240 - in head/sys: kern sys

2009-09-15 Thread Stacey Son
Author: sson
Date: Wed Sep 16 03:15:57 2009
New Revision: 197240
URL: http://svn.freebsd.org/changeset/base/197240

Log:
  Add optional touch event filter hooks to kevents.
  
  The touch event filter is called when a kernel event data is possibly
  updated.  There are two hook points.  First, during a kevent() system
  call.  Second, when an event has been triggered.
  
  Approved by:  rwatson (co-mentor)

Modified:
  head/sys/kern/kern_event.c
  head/sys/sys/event.h

Modified: head/sys/kern/kern_event.c
==
--- head/sys/kern/kern_event.c  Tue Sep 15 22:46:06 2009(r197239)
+++ head/sys/kern/kern_event.c  Wed Sep 16 03:15:57 2009(r197240)
@@ -1,6 +1,7 @@
 /*-
  * Copyright (c) 1999,2000,2001 Jonathan Lemon jle...@freebsd.org
  * Copyright 2004 John-Mark Gurney j...@freebsd.org
+ * Copyright (c) 2009 Apple, Inc.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -934,17 +935,11 @@ findkn:
goto findkn;
}
 
-   if (kn == NULL  ((kev-flags  EV_ADD) == 0)) {
-   KQ_UNLOCK(kq);
-   error = ENOENT;
-   goto done;
-   }
-
/*
 * kn now contains the matching knote, or NULL if no match
 */
-   if (kev-flags  EV_ADD) {
-   if (kn == NULL) {
+   if (kn == NULL) {
+   if (kev-flags  EV_ADD) {
kn = tkn;
tkn = NULL;
if (kn == NULL) {
@@ -983,34 +978,16 @@ findkn:
goto done;
}
KN_LIST_LOCK(kn);
+   goto done_ev_add;
} else {
-   /*
-* The user may change some filter values after the
-* initial EV_ADD, but doing so will not reset any
-* filter which has already been triggered.
-*/
-   kn-kn_status |= KN_INFLUX;
+   /* No matching knote and the EV_ADD flag is not set. */
KQ_UNLOCK(kq);
-   KN_LIST_LOCK(kn);
-   kn-kn_sfflags = kev-fflags;
-   kn-kn_sdata = kev-data;
-   kn-kn_kevent.udata = kev-udata;
+   error = ENOENT;
+   goto done;
}
-
-   /*
-* We can get here with kn-kn_knlist == NULL.
-* This can happen when the initial attach event decides that
-* the event is completed already.  i.e. filt_procattach
-* is called on a zombie process.  It will call filt_proc
-* which will remove it from the list, and NULL kn_knlist.
-*/
-   event = kn-kn_fop-f_event(kn, 0);
-   KQ_LOCK(kq);
-   if (event)
-   KNOTE_ACTIVATE(kn, 1);
-   kn-kn_status = ~KN_INFLUX;
-   KN_LIST_UNLOCK(kn);
-   } else if (kev-flags  EV_DELETE) {
+   }
+   
+   if (kev-flags  EV_DELETE) {
kn-kn_status |= KN_INFLUX;
KQ_UNLOCK(kq);
if (!(kn-kn_status  KN_DETACHED))
@@ -1019,6 +996,37 @@ findkn:
goto done;
}
 
+   /*
+* The user may change some filter values after the initial EV_ADD,
+* but doing so will not reset any filter which has already been
+* triggered.
+*/
+   kn-kn_status |= KN_INFLUX;
+   KQ_UNLOCK(kq);
+   KN_LIST_LOCK(kn);
+   kn-kn_kevent.udata = kev-udata;
+   if (!fops-f_isfd  fops-f_touch != NULL) {
+   fops-f_touch(kn, kev, EVENT_REGISTER);
+   } else {
+   kn-kn_sfflags = kev-fflags;
+   kn-kn_sdata = kev-data;
+   }
+
+   /*
+* We can get here with kn-kn_knlist == NULL.  This can happen when
+* the initial attach event decides that the event is completed 
+* already.  i.e. filt_procattach is called on a zombie process.  It
+* will call filt_proc which will remove it from the list, and NULL
+* kn_knlist.
+*/
+done_ev_add:
+   event = kn-kn_fop-f_event(kn, 0);
+   KQ_LOCK(kq);
+   if (event)
+   KNOTE_ACTIVATE(kn, 1);
+   kn-kn_status = ~KN_INFLUX;
+   KN_LIST_UNLOCK(kn);
+
if ((kev-flags  EV_DISABLE) 
((kn-kn_status  KN_DISABLED) == 0)) {
kn-kn_status |= KN_DISABLED;
@@ -1198,7 +1206,7 @@ kqueue_scan(struct kqueue *kq, int maxev
struct timeval atv, rtv, ttv;
struct knote *kn, *marker;
int count, timeout, nkev, error, influx;
-   int haskqglobal;
+   int haskqglobal, touch;
 
count = maxevents;
nkev = 0;
@@ -1330,12 +1338,23 @@ start:
  

svn commit: r197241 - in head: lib/libc/sys sys/kern sys/sys

2009-09-15 Thread Stacey Son
Author: sson
Date: Wed Sep 16 03:30:12 2009
New Revision: 197241
URL: http://svn.freebsd.org/changeset/base/197241

Log:
  Add EVFILT_USER to kevents.
  
  Add user events support to kernel events which are not associated with any
  kernel mechanism but are triggered by user level code.  This is useful for
  adding user level events to an event handler that may also be monitoring
  kernel events.
  
  Approved by:  rwatson (co-mentor)

Modified:
  head/lib/libc/sys/kqueue.2
  head/sys/kern/kern_event.c
  head/sys/sys/event.h

Modified: head/lib/libc/sys/kqueue.2
==
--- head/lib/libc/sys/kqueue.2  Wed Sep 16 03:15:57 2009(r197240)
+++ head/lib/libc/sys/kqueue.2  Wed Sep 16 03:30:12 2009(r197241)
@@ -24,7 +24,7 @@
 .\
 .\ $FreeBSD$
 .\
-.Dd September 6, 2007
+.Dd September 15, 2009
 .Dt KQUEUE 2
 .Os
 .Sh NAME
@@ -441,6 +441,44 @@ The link state is invalid.
 On return,
 .Va fflags
 contains the events which triggered the filter.
+.It Dv EVFILT_USER
+Establishes a user event identified by
+.Va ident
+which is not assosicated with any kernel mechanism but is triggered by
+user level code.
+The lower 24 bits of the 
+.Va fflags
+may be used for user defined flags and manipulated using the following:
+.Bl -tag -width XXNOTE_FFLAGSMASK 
+.It Dv NOTE_FFNOP
+Ignore the input
+.Va fflags .
+.It Dv NOTE_FFAND
+Bitwise AND
+.Va fflags .
+.It Dv NOTE_FFOR
+Bitwise OR
+.Va fflags .
+.It Dv NOTE_COPY
+Copy
+.Va fflags .
+.It Dv NOTE_FFCTRLMASK
+Control mask for
+.Va fflags .
+.It Dv NOTE_FFLAGSMASK
+User defined flag mask for
+.Va fflags .
+.El
+.Pp
+A user event is triggered for output with the following:
+.Bl -tag -width XXNOTE_FFLAGSMASK
+.It Dv NOTE_TRIGGER
+Cause the event to be triggered.
+.El
+.Pp
+On return,
+.Va fflags
+contains the users defined flags in the lower 24 bits.
 .El
 .Sh RETURN VALUES
 The

Modified: head/sys/kern/kern_event.c
==
--- head/sys/kern/kern_event.c  Wed Sep 16 03:15:57 2009(r197240)
+++ head/sys/kern/kern_event.c  Wed Sep 16 03:30:12 2009(r197241)
@@ -142,6 +142,10 @@ static voidfilt_timerexpire(void *knx);
 static int filt_timerattach(struct knote *kn);
 static voidfilt_timerdetach(struct knote *kn);
 static int filt_timer(struct knote *kn, long hint);
+static int filt_userattach(struct knote *kn);
+static voidfilt_userdetach(struct knote *kn);
+static int filt_user(struct knote *kn, long hint);
+static voidfilt_usertouch(struct knote *kn, struct kevent *kev, long type);
 
 static struct filterops file_filtops = {
.f_isfd = 1,
@@ -165,6 +169,12 @@ static struct filterops timer_filtops = 
.f_detach = filt_timerdetach,
.f_event = filt_timer,
 };
+static struct filterops user_filtops = {
+   .f_attach = filt_userattach,
+   .f_detach = filt_userdetach,
+   .f_event = filt_user,
+   .f_touch = filt_usertouch,
+};
 
 static uma_zone_t  knote_zone;
 static int kq_ncallouts = 0;
@@ -271,6 +281,7 @@ static struct {
{ file_filtops },  /* EVFILT_NETDEV */
{ fs_filtops },/* EVFILT_FS */
{ null_filtops },  /* EVFILT_LIO */
+   { user_filtops },  /* EVFILT_USER */
 };
 
 /*
@@ -573,6 +584,94 @@ filt_timer(struct knote *kn, long hint)
return (kn-kn_data != 0);
 }
 
+static int
+filt_userattach(struct knote *kn)
+{
+
+   /* 
+* EVFILT_USER knotes are not attached to anything in the kernel.
+*/ 
+   kn-kn_hook = NULL;
+   if (kn-kn_fflags  NOTE_TRIGGER)
+   kn-kn_hookid = 1;
+   else
+   kn-kn_hookid = 0;
+   return (0);
+}
+
+static void
+filt_userdetach(__unused struct knote *kn)
+{
+
+   /*
+* EVFILT_USER knotes are not attached to anything in the kernel.
+*/
+}
+
+static int
+filt_user(struct knote *kn, __unused long hint)
+{
+
+   return (kn-kn_hookid);
+}
+
+static void
+filt_usertouch(struct knote *kn, struct kevent *kev, long type)
+{
+   int ffctrl;
+
+   switch (type) {
+   case EVENT_REGISTER:
+   if (kev-fflags  NOTE_TRIGGER)
+   kn-kn_hookid = 1;
+
+   ffctrl = kev-fflags  NOTE_FFCTRLMASK;
+   kev-fflags = NOTE_FFLAGSMASK;
+   switch (ffctrl) {
+   case NOTE_FFNOP:
+   break;
+
+   case NOTE_FFAND:
+   kn-kn_sfflags = kev-fflags;
+   break;
+
+   case NOTE_FFOR:
+   kn-kn_sfflags |= kev-fflags;
+   break;
+
+   case NOTE_FFCOPY:
+   kn-kn_sfflags = kev-fflags;
+   break;
+
+   default:
+   /* XXX Return error? */
+  

svn commit: r197242 - in head: lib/libc/sys sys/kern sys/sys

2009-09-15 Thread Stacey Son
Author: sson
Date: Wed Sep 16 03:37:39 2009
New Revision: 197242
URL: http://svn.freebsd.org/changeset/base/197242

Log:
  Add the EV_DISPATCH flag to kevents.
  
  When the EV_DISPATCH flag is used the event source will be disabled
  immediately after the delivery of an event.   This is similar to the
  EV_ONESHOT flag but it doesn't delete the event.
  
  Approved by:  rwatson (co-mentor)

Modified:
  head/lib/libc/sys/kqueue.2
  head/sys/kern/kern_event.c
  head/sys/sys/event.h

Modified: head/lib/libc/sys/kqueue.2
==
--- head/lib/libc/sys/kqueue.2  Wed Sep 16 03:30:12 2009(r197241)
+++ head/lib/libc/sys/kqueue.2  Wed Sep 16 03:37:39 2009(r197242)
@@ -201,6 +201,11 @@ Disable the event so
 .Fn kevent
 will not return it.
 The filter itself is not disabled.
+.It EV_DISPATCH
+Disable the event source immediately after delivery of an event.
+See 
+.Dv EV_DISABLE
+above.
 .It EV_DELETE
 Removes the event from the kqueue.
 Events which are attached to

Modified: head/sys/kern/kern_event.c
==
--- head/sys/kern/kern_event.c  Wed Sep 16 03:30:12 2009(r197241)
+++ head/sys/kern/kern_event.c  Wed Sep 16 03:37:39 2009(r197242)
@@ -1445,15 +1445,17 @@ start:
*kevp = kn-kn_kevent;
KQ_LOCK(kq);
KQ_GLOBAL_UNLOCK(kq_global, haskqglobal);
-   if (kn-kn_flags  EV_CLEAR) {
+   if (kn-kn_flags  (EV_CLEAR |  EV_DISPATCH)) {
/* 
 * Manually clear knotes who weren't 
 * 'touch'ed.
 */
-   if (touch == 0) {
+   if (touch == 0  kn-kn_flags  EV_CLEAR) {
kn-kn_data = 0;
kn-kn_fflags = 0;
}
+   if (kn-kn_flags  EV_DISPATCH)
+   kn-kn_status |= KN_DISABLED;
kn-kn_status = ~(KN_QUEUED | KN_ACTIVE);
kq-kq_count--;
} else

Modified: head/sys/sys/event.h
==
--- head/sys/sys/event.hWed Sep 16 03:30:12 2009(r197241)
+++ head/sys/sys/event.hWed Sep 16 03:37:39 2009(r197242)
@@ -72,6 +72,8 @@ struct kevent {
 /* flags */
 #define EV_ONESHOT 0x0010  /* only report one occurrence */
 #define EV_CLEAR   0x0020  /* clear event state after reporting */
+   /* 0x0040 reserved for EV_RECEIPT */
+#define EV_DISPATCH0x0080  /* disable event after reporting */
 
 #define EV_SYSFLAGS0xF000  /* reserved by system */
 #define EV_FLAG1   0x2000  /* filter-specific flag */
___
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-unsubscr...@freebsd.org


svn commit: r197243 - in head: lib/libc/sys sys/kern sys/sys

2009-09-15 Thread Stacey Son
Author: sson
Date: Wed Sep 16 03:49:54 2009
New Revision: 197243
URL: http://svn.freebsd.org/changeset/base/197243

Log:
  Add EV_RECEIPT to kevents.
  
  EV_RECEIPT is useful to disambiguating error conditions when multiple
  events structures are passed to kevent(2).  The error code is returned
  in the data field and EV_ERROR is set.
  
  Approved by:  rwatson (co-mentor)

Modified:
  head/lib/libc/sys/kqueue.2
  head/sys/kern/kern_event.c
  head/sys/sys/event.h

Modified: head/lib/libc/sys/kqueue.2
==
--- head/lib/libc/sys/kqueue.2  Wed Sep 16 03:37:39 2009(r197242)
+++ head/lib/libc/sys/kqueue.2  Wed Sep 16 03:49:54 2009(r197243)
@@ -211,6 +211,15 @@ Removes the event from the kqueue.
 Events which are attached to
 file descriptors are automatically deleted on the last close of
 the descriptor.
+.It EV_RECEIPT
+This flag is useful for making bulk changes to a kqueue without draining
+any pending events.
+When passed as input, it forces
+.Dv EV_ERROR
+to always be returned.
+When a filter is successfully added the 
+.Va data
+field will be zero.
 .It EV_ONESHOT
 Causes the event to return only the first occurrence of the filter
 being triggered.

Modified: head/sys/kern/kern_event.c
==
--- head/sys/kern/kern_event.c  Wed Sep 16 03:37:39 2009(r197242)
+++ head/sys/kern/kern_event.c  Wed Sep 16 03:49:54 2009(r197243)
@@ -832,7 +832,7 @@ kern_kevent(struct thread *td, int fd, i
continue;
kevp-flags = ~EV_SYSFLAGS;
error = kqueue_register(kq, kevp, td, 1);
-   if (error) {
+   if (error || (kevp-flags  EV_RECEIPT)) {
if (nevents != 0) {
kevp-flags = EV_ERROR;
kevp-data = error;

Modified: head/sys/sys/event.h
==
--- head/sys/sys/event.hWed Sep 16 03:37:39 2009(r197242)
+++ head/sys/sys/event.hWed Sep 16 03:49:54 2009(r197243)
@@ -72,7 +72,7 @@ struct kevent {
 /* flags */
 #define EV_ONESHOT 0x0010  /* only report one occurrence */
 #define EV_CLEAR   0x0020  /* clear event state after reporting */
-   /* 0x0040 reserved for EV_RECEIPT */
+#define EV_RECEIPT 0x0040  /* force EV_ERROR on success, data=0 */
 #define EV_DISPATCH0x0080  /* disable event after reporting */
 
 #define EV_SYSFLAGS0xF000  /* reserved by system */
___
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-unsubscr...@freebsd.org


svn commit: r197244 - in head: sys/netinet usr.bin/netstat

2009-09-15 Thread Mike Silbersack
Author: silby
Date: Wed Sep 16 05:33:15 2009
New Revision: 197244
URL: http://svn.freebsd.org/changeset/base/197244

Log:
  Add the ability to see TCP timers via netstat -x.  This can be a useful
  feature when you have a seemingly stuck socket and want to figure
  out why it has not been closed yet.
  
  No plans to MFC this, as it changes the netstat sysctl ABI.
  
  Reviewed by:  andre, rwatson, Eric Van Gyzen

Modified:
  head/sys/netinet/tcp_subr.c
  head/sys/netinet/tcp_timer.c
  head/sys/netinet/tcp_timer.h
  head/sys/netinet/tcp_var.h
  head/usr.bin/netstat/inet.c
  head/usr.bin/netstat/netstat.1

Modified: head/sys/netinet/tcp_subr.c
==
--- head/sys/netinet/tcp_subr.c Wed Sep 16 03:49:54 2009(r197243)
+++ head/sys/netinet/tcp_subr.c Wed Sep 16 05:33:15 2009(r197244)
@@ -1151,8 +1151,11 @@ tcp_pcblist(SYSCTL_HANDLER_ARGS)
else if (inp-inp_flags  INP_TIMEWAIT) {
bzero((char *) xt.xt_tp, sizeof xt.xt_tp);
xt.xt_tp.t_state = TCPS_TIME_WAIT;
-   } else
+   } else {
bcopy(inp_ppcb, xt.xt_tp, sizeof xt.xt_tp);
+   if (xt.xt_tp.t_timers)
+   tcp_timer_to_xtimer(xt.xt_tp, 
xt.xt_tp.t_timers, xt.xt_timer);
+   }
if (inp-inp_socket != NULL)
sotoxsocket(inp-inp_socket, xt.xt_socket);
else {

Modified: head/sys/netinet/tcp_timer.c
==
--- head/sys/netinet/tcp_timer.cWed Sep 16 03:49:54 2009
(r197243)
+++ head/sys/netinet/tcp_timer.cWed Sep 16 05:33:15 2009
(r197244)
@@ -659,3 +659,24 @@ tcp_timer_active(struct tcpcb *tp, int t
}
return callout_active(t_callout);
 }
+
+#defineticks_to_msecs(t)   (1000*(t) / hz)
+
+void
+tcp_timer_to_xtimer(struct tcpcb *tp, struct tcp_timer *timer, struct 
xtcp_timer *xtimer)
+{
+   bzero(xtimer, sizeof(struct xtcp_timer));
+   if (timer == NULL)
+   return;
+   if (callout_active(timer-tt_delack))
+   xtimer-tt_delack = ticks_to_msecs(timer-tt_delack.c_time - 
ticks);
+   if (callout_active(timer-tt_rexmt))
+   xtimer-tt_rexmt = ticks_to_msecs(timer-tt_rexmt.c_time - 
ticks);
+   if (callout_active(timer-tt_persist))
+   xtimer-tt_persist = ticks_to_msecs(timer-tt_persist.c_time - 
ticks);
+   if (callout_active(timer-tt_keep))
+   xtimer-tt_keep = ticks_to_msecs(timer-tt_keep.c_time - ticks);
+   if (callout_active(timer-tt_2msl))
+   xtimer-tt_2msl = ticks_to_msecs(timer-tt_2msl.c_time - ticks);
+   xtimer-t_rcvtime = ticks_to_msecs(ticks - tp-t_rcvtime);
+}

Modified: head/sys/netinet/tcp_timer.h
==
--- head/sys/netinet/tcp_timer.hWed Sep 16 03:49:54 2009
(r197243)
+++ head/sys/netinet/tcp_timer.hWed Sep 16 05:33:15 2009
(r197244)
@@ -141,6 +141,8 @@ static const char *tcptimers[] =
 
 #ifdef _KERNEL
 
+struct xtcp_timer;
+
 struct tcp_timer {
struct  callout tt_rexmt;   /* retransmit timer */
struct  callout tt_persist; /* retransmit persistence */
@@ -177,6 +179,8 @@ voidtcp_timer_keep(void *xtp);
 void   tcp_timer_persist(void *xtp);
 void   tcp_timer_rexmt(void *xtp);
 void   tcp_timer_delack(void *xtp);
+void   tcp_timer_to_xtimer(struct tcpcb *tp, struct tcp_timer *timer,
+   struct xtcp_timer *xtimer);
 
 #endif /* _KERNEL */
 

Modified: head/sys/netinet/tcp_var.h
==
--- head/sys/netinet/tcp_var.h  Wed Sep 16 03:49:54 2009(r197243)
+++ head/sys/netinet/tcp_var.h  Wed Sep 16 05:33:15 2009(r197244)
@@ -495,11 +495,20 @@ void  kmod_tcpstat_inc(int statnum);
  * included.  Not all of our clients do.
  */
 #if defined(_NETINET_IN_PCB_H_)  defined(_SYS_SOCKETVAR_H_)
+struct xtcp_timer {
+   int tt_rexmt;   /* retransmit timer */
+   int tt_persist; /* retransmit persistence */
+   int tt_keep;/* keepalive */
+   int tt_2msl;/* 2*msl TIME_WAIT timer */
+   int tt_delack;  /* delayed ACK timer */
+   int t_rcvtime;  /* Time since last packet received */
+};
 struct xtcpcb {
size_t  xt_len;
struct  inpcb   xt_inp;
struct  tcpcb   xt_tp;
struct  xsocket xt_socket;
+   struct  xtcp_timer xt_timer;
u_quad_txt_alignment_hack;
 };
 #endif

Modified: head/usr.bin/netstat/inet.c
==
--- head/usr.bin/netstat/inet.c Wed Sep 16 03:49:54 2009