PERFORCE change 124795 for review

Xin LI delphij at FreeBSD.org
Mon Aug 6 19:43:37 PDT 2007


http://perforce.freebsd.org/chv.cgi?CH=124795

Change 124795 by delphij at delphij_odin on 2007/08/07 02:42:54

	IFC

Affected files ...

.. //depot/projects/delphij_fork/contrib/less/main.c#2 integrate
.. //depot/projects/delphij_fork/lib/libdisk/open_disk.c#2 integrate
.. //depot/projects/delphij_fork/lib/libutil/flopen.3#2 integrate
.. //depot/projects/delphij_fork/lib/libutil/flopen.c#2 integrate
.. //depot/projects/delphij_fork/lib/libutil/pidfile.c#2 integrate
.. //depot/projects/delphij_fork/sbin/ipfw/ipfw.8#2 integrate
.. //depot/projects/delphij_fork/share/man/man4/ipsec.4#3 integrate
.. //depot/projects/delphij_fork/share/man/man4/vpo.4#2 integrate
.. //depot/projects/delphij_fork/share/man/man9/rtentry.9#2 integrate
.. //depot/projects/delphij_fork/sys/compat/linux/linux_socket.c#2 integrate
.. //depot/projects/delphij_fork/sys/conf/NOTES#8 integrate
.. //depot/projects/delphij_fork/sys/conf/options#6 integrate
.. //depot/projects/delphij_fork/sys/dev/adlink/adlink.c#2 integrate
.. //depot/projects/delphij_fork/sys/dev/ath/if_ath.c#2 integrate
.. //depot/projects/delphij_fork/sys/dev/dc/if_dc.c#2 integrate
.. //depot/projects/delphij_fork/sys/dev/dc/if_dcreg.h#2 integrate
.. //depot/projects/delphij_fork/sys/dev/em/if_em.c#3 integrate
.. //depot/projects/delphij_fork/sys/dev/re/if_re.c#5 integrate
.. //depot/projects/delphij_fork/sys/dev/streams/streams.c#2 integrate
.. //depot/projects/delphij_fork/sys/fs/msdosfs/msdosfs_conv.c#2 integrate
.. //depot/projects/delphij_fork/sys/fs/msdosfs/msdosfs_denode.c#2 integrate
.. //depot/projects/delphij_fork/sys/fs/msdosfs/msdosfs_fat.c#5 integrate
.. //depot/projects/delphij_fork/sys/fs/msdosfs/msdosfs_fileno.c#2 integrate
.. //depot/projects/delphij_fork/sys/fs/msdosfs/msdosfs_iconv.c#2 integrate
.. //depot/projects/delphij_fork/sys/fs/msdosfs/msdosfs_lookup.c#2 integrate
.. //depot/projects/delphij_fork/sys/fs/msdosfs/msdosfs_vfsops.c#4 integrate
.. //depot/projects/delphij_fork/sys/fs/msdosfs/msdosfs_vnops.c#3 integrate
.. //depot/projects/delphij_fork/sys/ia64/ia64/clock.c#3 integrate
.. //depot/projects/delphij_fork/sys/ia64/ia64/exception.S#3 integrate
.. //depot/projects/delphij_fork/sys/ia64/ia64/interrupt.c#3 integrate
.. //depot/projects/delphij_fork/sys/ia64/ia64/machdep.c#3 integrate
.. //depot/projects/delphij_fork/sys/ia64/ia64/mp_machdep.c#3 integrate
.. //depot/projects/delphij_fork/sys/ia64/ia64/pmap.c#3 integrate
.. //depot/projects/delphij_fork/sys/ia64/include/ia64_cpu.h#2 integrate
.. //depot/projects/delphij_fork/sys/ia64/include/md_var.h#3 integrate
.. //depot/projects/delphij_fork/sys/kern/kern_descrip.c#2 integrate
.. //depot/projects/delphij_fork/sys/kern/kern_poll.c#2 integrate
.. //depot/projects/delphij_fork/sys/kern/kern_switch.c#3 integrate
.. //depot/projects/delphij_fork/sys/kern/sched_ule.c#4 integrate
.. //depot/projects/delphij_fork/sys/kern/sys_socket.c#2 integrate
.. //depot/projects/delphij_fork/sys/kern/uipc_domain.c#3 integrate
.. //depot/projects/delphij_fork/sys/kern/uipc_syscalls.c#2 integrate
.. //depot/projects/delphij_fork/sys/net/bpf.c#3 integrate
.. //depot/projects/delphij_fork/sys/net/bpfdesc.h#2 integrate
.. //depot/projects/delphij_fork/sys/net/bridgestp.c#2 integrate
.. //depot/projects/delphij_fork/sys/net/bridgestp.h#2 integrate
.. //depot/projects/delphij_fork/sys/net/netisr.c#3 integrate
.. //depot/projects/delphij_fork/sys/netgraph/netflow/netflow.c#2 integrate
.. //depot/projects/delphij_fork/sys/netinet/in_mcast.c#3 integrate
.. //depot/projects/delphij_fork/sys/netinet/in_pcb.h#2 integrate
.. //depot/projects/delphij_fork/sys/netinet/ip_divert.c#2 integrate
.. //depot/projects/delphij_fork/sys/netinet/ip_dummynet.c#3 integrate
.. //depot/projects/delphij_fork/sys/netinet/ip_fw2.c#3 integrate
.. //depot/projects/delphij_fork/sys/netinet/ip_input.c#2 integrate
.. //depot/projects/delphij_fork/sys/netinet/ip_ipsec.c#2 integrate
.. //depot/projects/delphij_fork/sys/netinet/ip_ipsec.h#2 integrate
.. //depot/projects/delphij_fork/sys/netinet/ip_mroute.c#3 integrate
.. //depot/projects/delphij_fork/sys/netinet/sctp_constants.h#4 integrate
.. //depot/projects/delphij_fork/sys/netinet/sctp_input.c#6 integrate
.. //depot/projects/delphij_fork/sys/netinet/sctp_uio.h#2 integrate
.. //depot/projects/delphij_fork/sys/netinet/sctp_usrreq.c#6 integrate
.. //depot/projects/delphij_fork/sys/netinet/sctputil.c#5 integrate
.. //depot/projects/delphij_fork/sys/netinet/tcp_syncache.c#3 integrate
.. //depot/projects/delphij_fork/sys/netinet6/ip6_ipsec.c#3 integrate
.. //depot/projects/delphij_fork/sys/netinet6/ip6_ipsec.h#2 integrate
.. //depot/projects/delphij_fork/sys/netipsec/xform_ah.c#2 integrate
.. //depot/projects/delphij_fork/sys/netipsec/xform_esp.c#2 integrate
.. //depot/projects/delphij_fork/sys/netipsec/xform_ipcomp.c#2 integrate
.. //depot/projects/delphij_fork/sys/nfsclient/bootp_subr.c#2 integrate
.. //depot/projects/delphij_fork/sys/nfsclient/krpc_subr.c#2 integrate
.. //depot/projects/delphij_fork/sys/nfsclient/nfs_socket.c#2 integrate
.. //depot/projects/delphij_fork/sys/nfsclient/nfs_vfsops.c#2 integrate
.. //depot/projects/delphij_fork/sys/nfsserver/nfs_srvsock.c#2 integrate
.. //depot/projects/delphij_fork/sys/nfsserver/nfs_srvsubs.c#3 integrate
.. //depot/projects/delphij_fork/sys/nfsserver/nfs_syscalls.c#3 integrate
.. //depot/projects/delphij_fork/sys/pci/if_xl.c#2 integrate
.. //depot/projects/delphij_fork/sys/rpc/rpcclnt.c#2 integrate
.. //depot/projects/delphij_fork/sys/security/mac/mac_syscalls.c#2 integrate
.. //depot/projects/delphij_fork/sys/sparc64/include/iommureg.h#2 integrate
.. //depot/projects/delphij_fork/sys/sparc64/include/iommuvar.h#2 integrate
.. //depot/projects/delphij_fork/sys/sparc64/pci/psycho.c#2 integrate
.. //depot/projects/delphij_fork/sys/sparc64/pci/psychoreg.h#2 integrate
.. //depot/projects/delphij_fork/sys/sparc64/sbus/sbus.c#2 integrate
.. //depot/projects/delphij_fork/sys/sparc64/sbus/sbusreg.h#2 integrate
.. //depot/projects/delphij_fork/sys/sparc64/sparc64/iommu.c#2 integrate
.. //depot/projects/delphij_fork/sys/sys/mutex.h#4 integrate
.. //depot/projects/delphij_fork/sys/vm/device_pager.c#2 integrate
.. //depot/projects/delphij_fork/sys/vm/phys_pager.c#2 integrate
.. //depot/projects/delphij_fork/sys/vm/swap_pager.c#2 integrate
.. //depot/projects/delphij_fork/sys/vm/vm_pager.c#2 integrate
.. //depot/projects/delphij_fork/tools/regression/lib/libutil/Makefile#2 integrate
.. //depot/projects/delphij_fork/tools/regression/lib/libutil/test-flopen.c#1 branch
.. //depot/projects/delphij_fork/tools/regression/lib/libutil/test-flopen.t#1 branch
.. //depot/projects/delphij_fork/usr.sbin/iostat/iostat.c#2 integrate
.. //depot/projects/delphij_fork/usr.sbin/rpc.statd/statd.c#2 integrate

Differences ...

==== //depot/projects/delphij_fork/contrib/less/main.c#2 (text+ko) ====

@@ -1,4 +1,4 @@
-/* $FreeBSD: src/contrib/less/main.c,v 1.9 2007/06/23 15:28:00 delphij Exp $ */
+/* $FreeBSD: src/contrib/less/main.c,v 1.10 2007/08/04 13:16:09 deischen Exp $ */
 /*
  * Copyright (C) 1984-2007  Mark Nudelman
  *
@@ -165,7 +165,7 @@
 		quit(QUIT_OK);
 	}
 
-	if (less_is_more && get_quit_at_eof())
+	if (less_is_more || get_quit_at_eof())
 		no_init = quit_if_one_screen = TRUE;
 
 #if EDITOR

==== //depot/projects/delphij_fork/lib/libdisk/open_disk.c#2 (text+ko) ====

@@ -8,7 +8,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libdisk/open_disk.c,v 1.10 2005/03/08 21:46:18 stefanf Exp $");
+__FBSDID("$FreeBSD: src/lib/libdisk/open_disk.c,v 1.11 2007/08/05 16:55:40 rink Exp $");
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -43,19 +43,24 @@
 Int_Open_Disk(const char *name, char *conftxt)
 {
 	struct disk *d;
-	int i;
+	int i, line = 1;
 	char *p, *q, *r, *a, *b, *n, *t, *sn;
 	daddr_t o, len, off;
 	u_int l, s, ty, sc, hd, alt;
 	daddr_t lo[10];
 
-	for (p = conftxt; p != NULL && *p; p = strchr(p, '\n')) {
+	/*
+	 * Locate the disk (by name) in our sysctl output
+	 */
+	for (p = conftxt; p != NULL && *p; p = strchr(p, '\n'), line++) {
 		if (*p == '\n')
 			p++;
 		a = strsep(&p, " ");
+		/* Skip anything not with index 0 */
 		if (strcmp(a, "0"))
 			continue;
 
+		/* Skip anything not a disk */
 		a = strsep(&p, " ");
 		if (strcmp(a, "DISK"))
 			continue;
@@ -79,15 +84,17 @@
 	a = strsep(&p, " ");	/* length in bytes */
 	len = strtoimax(a, &r, 0);
 	if (*r) {
-		printf("BARF %d <%d>\n", __LINE__, *r);
-		exit (0);
+		printf("libdisk: Int_Open_Disk(%s): can't parse length in line %d (r='%s')\n",
+			name, line, r);
+		return NULL;
 	}
 
 	a = strsep(&p, " ");	/* sectorsize */
 	s = strtoul(a, &r, 0);
 	if (*r) {
-		printf("BARF %d <%d>\n", __LINE__, *r);
-		exit (0);
+		printf("libdisk: Int_Open_Disk(%s): can't parse sector size in line %d (r='%s')\n",
+			name, line, r);
+		return NULL;
 	}
 
 	if (s == 0)
@@ -99,6 +106,7 @@
 		DPRINT(("Failed to add 'whole' chunk"));
 	}
 
+	/* Try to parse any fields after the sector size in the DISK entry line */
 	for (;;) {
 		a = strsep(&p, " ");
 		if (a == NULL)
@@ -106,15 +114,17 @@
 		b = strsep(&p, " ");
 		o = strtoimax(b, &r, 0);
 		if (*r) {
-			printf("BARF %d <%d>\n", __LINE__, *r);
-			exit (0);
+			printf("libdisk: Int_Open_Disk(%s): can't parse parameter '%s' in line %d (r='%s')\n",
+				name, a, line, r);
+			return NULL;
 		}
 		if (!strcmp(a, "hd"))
 			d->bios_hd = o;
 		else if (!strcmp(a, "sc"))
 			d->bios_sect = o;
 		else
-			printf("HUH ? <%s> <%s>\n", a, b);
+			printf("libdisk: Int_Open_Disk(%s): unknown parameter '%s' with value '%s' in line %d, ignored\n",
+				name, a, b, line);
 	}
 
 	/*
@@ -124,35 +134,43 @@
 	o = d->bios_hd * d->bios_sect;
 	d->bios_cyl = (o != 0) ? len / o : 0;
 
-	p = q;
+	p = q; line++; /* p is now the start of the line _after_ the DISK entry */
 	lo[0] = 0;
 
-	for (; p != NULL && *p; p = q) {
+	for (; p != NULL && *p; p = q, line++) {
 		sn = NULL;
 		q = strchr(p, '\n');
 		if (q != NULL)
 			*q++ = '\0';
 		a = strsep(&p, " ");	/* Index */
+		/*
+		 * If we find index 0 again, this means we've encountered another disk, so it's safe to assume this disk
+		 * has been processed.
+		 */
 		if (!strcmp(a, "0"))
 			break;
 		l = strtoimax(a, &r, 0);
 		if (*r) {
-			printf("BARF %d <%d>\n", __LINE__, *r);
-			exit (0);
+			printf("libdisk: Int_Open_Disk(%s): can't parse depth '%s' in line %d (r='%s')\n",
+				name, a, line, r);
+			return NULL;
+
 		}
 		t = strsep(&p, " ");	/* Type {SUN, BSD, MBR, PC98, GPT} */
 		n = strsep(&p, " ");	/* name */
 		a = strsep(&p, " ");	/* len */
 		len = strtoimax(a, &r, 0);
 		if (*r) {
-			printf("BARF %d <%d>\n", __LINE__, *r);
-			exit (0);
+			printf("libdisk: Int_Open_Disk(%s): can't parse length '%s' in line %d (r='%s')\n",
+				name, a, line, r);
+			continue;
 		}
 		a = strsep(&p, " ");	/* secsize */
 		s = strtoimax(a, &r, 0);
 		if (*r) {
-			printf("BARF %d <%d>\n", __LINE__, *r);
-			exit (0);
+			printf("libdisk: Int_Open_Disk(%s): can't parse sector size '%s' in line %d (r='%s')\n",
+				name, a, line, r);
+			continue;
 		}
 		for (;;) {
 			a = strsep(&p, " ");
@@ -167,8 +185,9 @@
 			o = strtoimax(b, &r, 0);
 			/* APPLE have ty as a string */
 			if ((*r) && (strcmp(t, "APPLE") && strcmp(t, "GPT"))) {
-				printf("BARF %d <%d>\n", __LINE__, *r);
-				exit (0);
+				printf("libdisk: Int_Open_Disk(%s): can't parse parameter '%s' in line %d (r='%s')\n",
+					name, a, line, r);
+				break;
 			}
 			if (!strcmp(a, "o"))
 				off = o;

==== //depot/projects/delphij_fork/lib/libutil/flopen.3#2 (text+ko) ====

@@ -23,7 +23,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.\" $FreeBSD: src/lib/libutil/flopen.3,v 1.3 2007/05/10 18:15:30 des Exp $
+.\" $FreeBSD: src/lib/libutil/flopen.3,v 1.5 2007/08/03 09:20:28 des Exp $
 .\"
 .Dd May 10, 2007
 .Dt FLOPEN 3

==== //depot/projects/delphij_fork/lib/libutil/flopen.c#2 (text+ko) ====

@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libutil/flopen.c,v 1.7 2007/05/23 12:09:33 des Exp $");
+__FBSDID("$FreeBSD: src/lib/libutil/flopen.c,v 1.9 2007/08/03 09:20:28 des Exp $");
 
 #include <sys/file.h>
 #include <sys/stat.h>

==== //depot/projects/delphij_fork/lib/libutil/pidfile.c#2 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libutil/pidfile.c,v 1.5 2007/05/11 11:10:05 des Exp $");
+__FBSDID("$FreeBSD: src/lib/libutil/pidfile.c,v 1.7 2007/08/03 09:20:28 des Exp $");
 
 #include <sys/param.h>
 #include <sys/file.h>

==== //depot/projects/delphij_fork/sbin/ipfw/ipfw.8#2 (text+ko) ====

@@ -1,7 +1,7 @@
 .\"
-.\" $FreeBSD: src/sbin/ipfw/ipfw.8,v 1.201 2007/06/18 17:52:37 maxim Exp $
+.\" $FreeBSD: src/sbin/ipfw/ipfw.8,v 1.203 2007/08/05 16:16:14 bz Exp $
 .\"
-.Dd June 16, 2007
+.Dd August 5, 2007
 .Dt IPFW 8
 .Os
 .Sh NAME
@@ -1156,14 +1156,10 @@
 A
 .Ar group
 may be specified by name or number.
-This option should be used only if debug.mpsafenet=0 to avoid possible
-deadlocks due to layering violations in its implementation.
 .It Cm jail Ar prisonID
 Matches all TCP or UDP packets sent by or received for the
 jail whos prison ID is
 .Ar prisonID .
-This option should be used only if debug.mpsafenet=0 to avoid possible
-deadlocks due to layering violations in its implementation.
 .It Cm icmptypes Ar types
 Matches ICMP packets whose ICMP type is in the list
 .Ar types .
@@ -1255,7 +1251,7 @@
 .It Cm ipsec
 Matches packets that have IPSEC history associated with them
 (i.e., the packet comes encapsulated in IPSEC, the kernel
-has IPSEC support and IPSEC_FILTERGIF option, and can correctly
+has IPSEC support and IPSEC_FILTERTUNNEL option, and can correctly
 decapsulate it).
 .Pp
 Note that specifying
@@ -1508,8 +1504,6 @@
 A
 .Ar user
 may be matched by name or identification number.
-This option should be used only if debug.mpsafenet=0 to avoid possible
-deadlocks due to layering violations in its implementation.
 .It Cm verrevpath
 For incoming packets,
 a routing table lookup is done on the packet's source address.
@@ -1973,8 +1967,7 @@
 .El
 .Pp
 When used with IPv6 data, dummynet currently has several limitations.
-First, debug.mpsafenet=0 must be set.
-Second, the information necessicary to route link-local packets to an
+Information necessary to route link-local packets to an
 interface is not avalable after processing by dummynet so those packets
 are dropped in the output path.
 Care should be taken to insure that link-local packets are not passed to
@@ -2610,8 +2603,6 @@
 .Xr dummynet 4
 traffic shaper supported by Akamba Corp.
 .Sh BUGS
-Use of dummynet with IPv6 requires that debug.mpsafenet be set to 0.
-.Pp
 The syntax has grown over the years and sometimes it might be confusing.
 Unfortunately, backward compatibility prevents cleaning up mistakes
 made in the definition of the syntax.
@@ -2655,10 +2646,6 @@
 .Xr setuid 2
 or similar system calls.
 .Pp
-Rules which use uid, gid or jail based matching should be used only
-if debug.mpsafenet=0 to avoid possible deadlocks due to layering
-violations in its implementation.
-.Pp
 Rule syntax is subject to the command line environment and some patterns
 may need to be escaped with the backslash character
 or quoted appropriately.

==== //depot/projects/delphij_fork/share/man/man4/ipsec.4#3 (text+ko) ====

@@ -27,9 +27,9 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.\" $FreeBSD: src/share/man/man4/ipsec.4,v 1.21 2007/08/02 08:04:48 bz Exp $
+.\" $FreeBSD: src/share/man/man4/ipsec.4,v 1.22 2007/08/05 16:16:14 bz Exp $
 .\"
-.Dd August 1, 2007
+.Dd August 5, 2007
 .Dt IPSEC 4
 .Os
 .Sh NAME
@@ -37,7 +37,7 @@
 .Nd Internet Protocol Security protocol
 .Sh SYNOPSIS
 .Cd "options IPSEC"
-.Cd "options IPSEC_FILTERGIF"
+.Cd "options IPSEC_FILTERTUNNEL"
 .Cd "device crypto"
 .Pp
 .In sys/types.h
@@ -89,7 +89,7 @@
 To properly filter on the inner packets of an
 .Nm
 tunnel with firewalls, add
-.Cd "options IPSEC_FILTERGIF"
+.Cd "options IPSEC_FILTERTUNNEL"
 to the kernel configuration file.
 .\"
 .Ss Kernel interface

==== //depot/projects/delphij_fork/share/man/man4/vpo.4#2 (text+ko) ====

@@ -22,7 +22,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.\" $FreeBSD: src/share/man/man4/vpo.4,v 1.22 2005/01/21 08:36:37 ru Exp $
+.\" $FreeBSD: src/share/man/man4/vpo.4,v 1.23 2007/08/05 07:39:30 maxim Exp $
 .\"
 .Dd December 14, 2004
 .Dt VPO 4
@@ -38,7 +38,7 @@
 .Sh DESCRIPTION
 The
 .Nm
-driver provide access to parallel port Iomage Zip and Jaz drives.
+driver provide access to parallel port Iomega Zip and Jaz drives.
 .Sh HARDWARE
 The
 .Nm

==== //depot/projects/delphij_fork/share/man/man9/rtentry.9#2 (text+ko) ====

@@ -26,7 +26,7 @@
 .\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.\" $FreeBSD: src/share/man/man9/rtentry.9,v 1.24 2005/01/21 08:36:40 ru Exp $
+.\" $FreeBSD: src/share/man/man9/rtentry.9,v 1.25 2007/08/05 07:38:09 maxim Exp $
 .\"
 .Dd October 7, 2004
 .Os
@@ -263,7 +263,7 @@
 .Dv RMX_RTTUNIT
 per second.
 .It Vt "u_long rmx_rttvar" ;
-The average deviation of the round-type time to this destination, in
+The average deviation of the round-trip time to this destination, in
 units of
 .Dv RMX_RTTUNIT
 per second.

==== //depot/projects/delphij_fork/sys/compat/linux/linux_socket.c#2 (text+ko) ====

@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/compat/linux/linux_socket.c,v 1.73 2007/04/14 10:35:09 rwatson Exp $");
+__FBSDID("$FreeBSD: src/sys/compat/linux/linux_socket.c,v 1.74 2007/08/06 14:25:59 rwatson Exp $");
 
 /* XXX we use functions that might not exist. */
 #include "opt_compat.h"
@@ -670,7 +670,6 @@
 	 * socket and use the file descriptor reference instead of
 	 * creating a new one.
 	 */
-	NET_LOCK_GIANT();
 	error = fgetsock(td, linux_args.s, &so, &fflag);
 	if (error == 0) {
 		error = EISCONN;
@@ -683,7 +682,6 @@
 		}
 		fputsock(so);
 	}
-	NET_UNLOCK_GIANT();
 	return (error);
 }
 

==== //depot/projects/delphij_fork/sys/conf/NOTES#8 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/NOTES,v 1.1447 2007/07/24 15:35:01 scottl Exp $
+# $FreeBSD: src/sys/conf/NOTES,v 1.1448 2007/08/05 16:16:15 bz Exp $
 #
 # NOTES -- Lines that can be cut/pasted into kernel and hints configs.
 #
@@ -501,15 +501,15 @@
 options 	IPSEC			#IP security (requires device crypto)
 #options 	IPSEC_DEBUG		#debug for IP security
 #
-# Set IPSEC_FILTERGIF to force packets coming through a gif tunnel
-# to be processed by any configured packet filtering (ipfw, ipf).
-# The default is that packets coming from a tunnel are _not_ processed;
+# Set IPSEC_FILTERTUNNEL to force packets coming through a tunnel
+# to be processed by any configured packet filtering twice.
+# The default is that packets coming out of a tunnel are _not_ processed;
 # they are assumed trusted.
 #
 # IPSEC history is preserved for such packets, and can be filtered
 # using ipfw(8)'s 'ipsec' keyword, when this option is enabled.
 #
-#options 	IPSEC_FILTERGIF		#filter ipsec packets from a tunnel
+#options 	IPSEC_FILTERTUNNEL	#filter ipsec packets from a tunnel
 
 options 	IPX			#IPX/SPX communications protocols
 

==== //depot/projects/delphij_fork/sys/conf/options#6 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/options,v 1.603 2007/07/24 15:35:01 scottl Exp $
+# $FreeBSD: src/sys/conf/options,v 1.605 2007/08/06 14:25:59 rwatson Exp $
 #
 #        On the handling of kernel options
 #
@@ -362,7 +362,7 @@
 INET6			opt_inet6.h
 IPSEC			opt_ipsec.h
 IPSEC_DEBUG		opt_ipsec.h
-IPSEC_FILTERGIF		opt_ipsec.h
+IPSEC_FILTERTUNNEL	opt_ipsec.h
 IPDIVERT
 DUMMYNET		opt_ipdn.h
 IPFILTER		opt_ipfilter.h
@@ -383,7 +383,6 @@
 MBUF_STRESS_TEST
 NCP
 NETATALK		opt_atalk.h
-NET_WITH_GIANT		opt_net.h
 PPP_BSDCOMP		opt_ppp.h
 PPP_DEFLATE		opt_ppp.h
 PPP_FILTER		opt_ppp.h

==== //depot/projects/delphij_fork/sys/dev/adlink/adlink.c#2 (text+ko) ====

@@ -43,7 +43,7 @@
 
 #ifdef _KERNEL
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/adlink/adlink.c,v 1.16 2007/02/23 12:18:29 piso Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/adlink/adlink.c,v 1.17 2007/08/04 17:43:11 kib Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -119,6 +119,7 @@
 
 static struct cdevsw adlink_cdevsw = {
 	.d_version =	D_VERSION,
+	.d_flags =	D_NEEDGIANT,
 	.d_ioctl =	adlink_ioctl,
 	.d_mmap =	adlink_mmap,
 	.d_name =	"adlink",

==== //depot/projects/delphij_fork/sys/dev/ath/if_ath.c#2 (text+ko) ====

@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ath/if_ath.c,v 1.172 2007/06/24 01:57:20 sam Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ath/if_ath.c,v 1.173 2007/08/06 14:25:59 rwatson Exp $");
 
 /*
  * Driver for the Atheros Wireless LAN controller.
@@ -888,11 +888,9 @@
 		 * truly a bmiss we'll get another interrupt soon and that'll
 		 * be dispatched up for processing.
 		 */
-		if (tsf - lastrx > bmisstimeout) {
-			NET_LOCK_GIANT();
+		if (tsf - lastrx > bmisstimeout)
 			ieee80211_beacon_miss(ic);
-			NET_UNLOCK_GIANT();
-		} else
+		else
 			sc->sc_stats.ast_bmiss_phantom++;
 	}
 }
@@ -3447,7 +3445,6 @@
 	int16_t nf;
 	u_int64_t tsf;
 
-	NET_LOCK_GIANT();		/* XXX */
 
 	DPRINTF(sc, ATH_DEBUG_RX_PROC, "%s: pending %u\n", __func__, npending);
 	ngood = 0;
@@ -3715,7 +3712,6 @@
 	    !IFQ_IS_EMPTY(&ifp->if_snd))
 		ath_start(ifp);
 
-	NET_UNLOCK_GIANT();		/* XXX */
 #undef PA2DESC
 }
 

==== //depot/projects/delphij_fork/sys/dev/dc/if_dc.c#2 (text+ko) ====

@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/dc/if_dc.c,v 1.191 2007/02/23 12:18:37 piso Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/dc/if_dc.c,v 1.192 2007/08/05 11:28:19 marius Exp $");
 
 /*
  * DEC "tulip" clone ethernet driver. Supports the DEC/Intel 21143
@@ -294,7 +294,6 @@
 static void dc_apply_fixup(struct dc_softc *, int);
 
 static void dc_dma_map_txbuf(void *, bus_dma_segment_t *, int, bus_size_t, int);
-static void dc_dma_map_rxbuf(void *, bus_dma_segment_t *, int, bus_size_t, int);
 
 #ifdef DC_USEIOSPACE
 #define DC_RES			SYS_RES_IOPORT
@@ -2424,29 +2423,6 @@
 	return (0);
 }
 
-static void
-dc_dma_map_rxbuf(arg, segs, nseg, mapsize, error)
-	void *arg;
-	bus_dma_segment_t *segs;
-	int nseg;
-	bus_size_t mapsize;
-	int error;
-{
-	struct dc_softc *sc;
-	struct dc_desc *c;
-
-	sc = arg;
-	c = &sc->dc_ldata->dc_rx_list[sc->dc_cdata.dc_rx_cur];
-	if (error) {
-		sc->dc_cdata.dc_rx_err = error;
-		return;
-	}
-
-	KASSERT(nseg == 1, ("wrong number of segments, should be 1"));
-	sc->dc_cdata.dc_rx_err = 0;
-	c->dc_data = htole32(segs->ds_addr);
-}
-
 /*
  * Initialize an RX descriptor and attach an MBUF cluster.
  */
@@ -2455,7 +2431,8 @@
 {
 	struct mbuf *m_new;
 	bus_dmamap_t tmp;
-	int error;
+	bus_dma_segment_t segs[1];
+	int error, nseg;
 
 	if (alloc) {
 		m_new = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
@@ -2478,17 +2455,14 @@
 
 	/* No need to remap the mbuf if we're reusing it. */
 	if (alloc) {
-		sc->dc_cdata.dc_rx_cur = i;
-		error = bus_dmamap_load_mbuf(sc->dc_mtag, sc->dc_sparemap,
-		    m_new, dc_dma_map_rxbuf, sc, 0);
+		error = bus_dmamap_load_mbuf_sg(sc->dc_mtag, sc->dc_sparemap,
+		    m_new, segs, &nseg, 0);
+		KASSERT(nseg == 1, ("wrong number of segments, should be 1"));
 		if (error) {
 			m_freem(m_new);
 			return (error);
 		}
-		if (sc->dc_cdata.dc_rx_err != 0) {
-			m_freem(m_new);
-			return (sc->dc_cdata.dc_rx_err);
-		}
+		sc->dc_ldata->dc_rx_list[i].dc_data = htole32(segs->ds_addr);
 		bus_dmamap_unload(sc->dc_mtag, sc->dc_cdata.dc_rx_map[i]);
 		tmp = sc->dc_cdata.dc_rx_map[i];
 		sc->dc_cdata.dc_rx_map[i] = sc->dc_sparemap;
@@ -2865,12 +2839,11 @@
 		sc->dc_cdata.dc_tx_cnt--;
 		DC_INC(idx, DC_TX_LIST_CNT);
 	}
+	sc->dc_cdata.dc_tx_cons = idx;
 
-	if (idx != sc->dc_cdata.dc_tx_cons) {
-	    	/* Some buffers have been freed. */
-		sc->dc_cdata.dc_tx_cons = idx;
+	if (DC_TX_LIST_CNT - sc->dc_cdata.dc_tx_cnt > DC_TX_LIST_RSVD)
 		ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
-	}
+
 	if (sc->dc_cdata.dc_tx_cnt == 0)
 		sc->dc_wdog_timer = 0;
 }
@@ -3161,10 +3134,8 @@
 	int cur, first, frag, i;
 
 	sc = arg;
-	if (error) {
-		sc->dc_cdata.dc_tx_err = error;
+	if (error)
 		return;
-	}
 
 	first = cur = frag = sc->dc_cdata.dc_tx_prod;
 	for (i = 0; i < nseg; i++) {
@@ -3217,7 +3188,7 @@
 	/*
 	 * If there's no way we can send any packets, return now.
 	 */
-	if (DC_TX_LIST_CNT - sc->dc_cdata.dc_tx_cnt < 6)
+	if (DC_TX_LIST_CNT - sc->dc_cdata.dc_tx_cnt <= DC_TX_LIST_RSVD)
 		return (ENOBUFS);
 
 	/*
@@ -3229,27 +3200,30 @@
 	for (m = *m_head; m != NULL; m = m->m_next)
 		chainlen++;
 
-	if ((chainlen > DC_TX_LIST_CNT / 4) ||
-	    ((DC_TX_LIST_CNT - (chainlen + sc->dc_cdata.dc_tx_cnt)) < 6)) {
+	m = NULL;
+	if ((sc->dc_flags & DC_TX_COALESCE && ((*m_head)->m_next != NULL ||
+	    sc->dc_flags & DC_TX_ALIGN)) || (chainlen > DC_TX_LIST_CNT / 4) ||
+	    (DC_TX_LIST_CNT - (chainlen + sc->dc_cdata.dc_tx_cnt) <=
+	    DC_TX_LIST_RSVD)) {
 		m = m_defrag(*m_head, M_DONTWAIT);
-		if (m == NULL)
+		if (m == NULL) {
+			m_freem(*m_head);
+			*m_head = NULL;
 			return (ENOBUFS);
+		}
 		*m_head = m;
 	}
-
-	/*
-	 * Start packing the mbufs in this chain into
-	 * the fragment pointers. Stop when we run out
-	 * of fragments or hit the end of the mbuf chain.
-	 */
 	idx = sc->dc_cdata.dc_tx_prod;
 	sc->dc_cdata.dc_tx_mapping = *m_head;
 	error = bus_dmamap_load_mbuf(sc->dc_mtag, sc->dc_cdata.dc_tx_map[idx],
 	    *m_head, dc_dma_map_txbuf, sc, 0);
-	if (error)
-		return (error);
-	if (sc->dc_cdata.dc_tx_err != 0)
-		return (sc->dc_cdata.dc_tx_err);
+	if (error != 0 || sc->dc_cdata.dc_tx_err != 0) {
+		if (m != NULL) {
+			m_freem(m);
+			*m_head = NULL;
+		}
+		return (error != 0 ? error : sc->dc_cdata.dc_tx_err);
+	}
 	bus_dmamap_sync(sc->dc_mtag, sc->dc_cdata.dc_tx_map[idx],
 	    BUS_DMASYNC_PREWRITE);
 	bus_dmamap_sync(sc->dc_ltag, sc->dc_lmap,
@@ -3279,7 +3253,7 @@
 dc_start_locked(struct ifnet *ifp)
 {
 	struct dc_softc *sc;
-	struct mbuf *m_head = NULL, *m;
+	struct mbuf *m_head = NULL;
 	unsigned int queued = 0;
 	int idx;
 
@@ -3300,20 +3274,9 @@
 		if (m_head == NULL)
 			break;
 
-		if (sc->dc_flags & DC_TX_COALESCE &&
-		    (m_head->m_next != NULL ||
-		     sc->dc_flags & DC_TX_ALIGN)) {
-			m = m_defrag(m_head, M_DONTWAIT);
-			if (m == NULL) {
-				IFQ_DRV_PREPEND(&ifp->if_snd, m_head);
-				ifp->if_drv_flags |= IFF_DRV_OACTIVE;
+		if (dc_encap(sc, &m_head)) {
+			if (m_head == NULL)
 				break;
-			} else {
-				m_head = m;
-			}
-		}
-
-		if (dc_encap(sc, &m_head)) {
 			IFQ_DRV_PREPEND(&ifp->if_snd, m_head);
 			ifp->if_drv_flags |= IFF_DRV_OACTIVE;
 			break;

==== //depot/projects/delphij_fork/sys/dev/dc/if_dcreg.h#2 (text+ko) ====

@@ -29,7 +29,7 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
  * THE POSSIBILITY OF SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/dev/dc/if_dcreg.h,v 1.53 2006/12/06 01:56:38 marius Exp $
+ * $FreeBSD: src/sys/dev/dc/if_dcreg.h,v 1.54 2007/08/05 11:28:19 marius Exp $
  */
 
 /*
@@ -461,6 +461,7 @@
 #define DC_RX_LIST_CNT		64
 #endif
 #define DC_TX_LIST_CNT		256
+#define DC_TX_LIST_RSVD		5
 #define DC_MIN_FRAMELEN		60
 #define DC_RXLEN		1536
 
@@ -496,8 +497,6 @@
 	int			dc_tx_prod;
 	int			dc_tx_cons;
 	int			dc_tx_cnt;
-	int			dc_rx_err;
-	int			dc_rx_cur;
 	int			dc_rx_prod;
 };
 

==== //depot/projects/delphij_fork/sys/dev/em/if_em.c#3 (text+ko) ====

@@ -31,7 +31,7 @@
 
 ***************************************************************************/
 
-/*$FreeBSD: src/sys/dev/em/if_em.c,v 1.182 2007/07/27 14:48:05 cognet Exp $*/
+/*$FreeBSD: src/sys/dev/em/if_em.c,v 1.183 2007/08/06 14:25:59 rwatson Exp $*/
 
 #ifdef HAVE_KERNEL_OPTION_HEADERS
 #include "opt_device_polling.h"
@@ -1474,7 +1474,6 @@
 	struct adapter	*adapter = context;
 	struct ifnet	*ifp;
 
-	NET_LOCK_GIANT();
 	ifp = adapter->ifp;
 
 	/*
@@ -1493,7 +1492,6 @@
 	}
 
 	em_enable_intr(adapter);
-	NET_UNLOCK_GIANT();
 }
 
 /*********************************************************************

==== //depot/projects/delphij_fork/sys/dev/re/if_re.c#5 (text+ko) ====

@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/re/if_re.c,v 1.93 2007/07/27 00:43:12 yongari Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/re/if_re.c,v 1.94 2007/08/05 11:20:33 marius Exp $");
 
 /*
  * RealTek 8139C+/8169/8169S/8110S/8168/8111/8101E PCI NIC driver
@@ -1005,6 +1005,7 @@
 		}
 		cmdstat = segs[i].ds_len;
 		totlen += segs[i].ds_len;
+		d->rl_vlanctl = 0;
 		d->rl_bufaddr_lo = htole32(RL_ADDR_LO(segs[i].ds_addr));
 		d->rl_bufaddr_hi = htole32(RL_ADDR_HI(segs[i].ds_addr));
 		if (i == 0)

==== //depot/projects/delphij_fork/sys/dev/streams/streams.c#2 (text+ko) ====

@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/streams/streams.c,v 1.55 2007/04/04 09:11:31 rwatson Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/streams/streams.c,v 1.56 2007/08/06 14:26:00 rwatson Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -244,9 +244,7 @@
 	  return error;
 	/* An extra reference on `fp' has been held for us by falloc(). */
 
-	NET_LOCK_GIANT();
 	error = socreate(family, &so, type, protocol, td->td_ucred, td);
-	NET_UNLOCK_GIANT();
 	if (error) {
 	   fdclose(fdp, fp, fd, td);
 	   fdrop(fp, td);

==== //depot/projects/delphij_fork/sys/fs/msdosfs/msdosfs_conv.c#2 (text+ko) ====

@@ -1,4 +1,4 @@
-/* $FreeBSD: src/sys/fs/msdosfs/msdosfs_conv.c,v 1.50 2006/11/26 18:49:44 maxim Exp $ */
+/* $FreeBSD: src/sys/fs/msdosfs/msdosfs_conv.c,v 1.52 2007/08/07 02:11:16 bde Exp $ */
 /*	$NetBSD: msdosfs_conv.c,v 1.25 1997/11/17 15:36:40 ws Exp $	*/
 
 /*-
@@ -48,26 +48,18 @@
  * October 1992
  */
 
-/*
- * System include files.
- */
 #include <sys/param.h>
-#include <sys/clock.h>
-#include <sys/kernel.h>		/* defines tz */
 #include <sys/systm.h>
 #include <sys/dirent.h>
 #include <sys/iconv.h>
+#include <sys/malloc.h>
 #include <sys/mount.h>
-#include <sys/malloc.h>
 
-extern struct iconv_functions *msdosfs_iconv;
-
-/*
- * MSDOSFS include files.
- */
 #include <fs/msdosfs/bpb.h>
+#include <fs/msdosfs/direntry.h>
 #include <fs/msdosfs/msdosfsmount.h>
-#include <fs/msdosfs/direntry.h>
+
+extern struct iconv_functions *msdosfs_iconv;
 
 static int mbsadjpos(const char **, size_t, size_t, int, int, void *handle);
 static u_int16_t dos2unixchr(const u_char **, size_t *, int, struct msdosfsmount *);

==== //depot/projects/delphij_fork/sys/fs/msdosfs/msdosfs_denode.c#2 (text+ko) ====

@@ -1,4 +1,4 @@
-/* $FreeBSD: src/sys/fs/msdosfs/msdosfs_denode.c,v 1.93 2007/03/13 01:50:23 tegge Exp $ */
+/* $FreeBSD: src/sys/fs/msdosfs/msdosfs_denode.c,v 1.96 2007/08/07 02:25:55 bde Exp $ */
 /*	$NetBSD: msdosfs_denode.c,v 1.28 1998/02/10 14:10:00 mrg Exp $	*/
 
 /*-
@@ -50,23 +50,21 @@
 
 #include <sys/param.h>
 #include <sys/systm.h>
+#include <sys/buf.h>
+#include <sys/clock.h>
 #include <sys/kernel.h>
+#include <sys/malloc.h>
 #include <sys/mount.h>
-#include <sys/malloc.h>
-#include <sys/bio.h>
-#include <sys/buf.h>
-#include <sys/clock.h>
 #include <sys/vnode.h>
-#include <sys/mutex.h>
 
 #include <vm/vm.h>
 #include <vm/vm_extern.h>
 
 #include <fs/msdosfs/bpb.h>
-#include <fs/msdosfs/msdosfsmount.h>
 #include <fs/msdosfs/direntry.h>
 #include <fs/msdosfs/denode.h>
 #include <fs/msdosfs/fat.h>
+#include <fs/msdosfs/msdosfsmount.h>
 
 static MALLOC_DEFINE(M_MSDOSFSNODE, "msdosfs_node", "MSDOSFS vnode private part");
 

==== //depot/projects/delphij_fork/sys/fs/msdosfs/msdosfs_fat.c#5 (text+ko) ====

@@ -1,4 +1,4 @@
-/* $FreeBSD: src/sys/fs/msdosfs/msdosfs_fat.c,v 1.42 2007/07/20 16:21:47 bde Exp $ */
+/* $FreeBSD: src/sys/fs/msdosfs/msdosfs_fat.c,v 1.46 2007/08/07 02:25:55 bde Exp $ */
 /*	$NetBSD: msdosfs_fat.c,v 1.28 1997/11/17 15:36:49 ws Exp $	*/
 
 /*-
@@ -48,24 +48,17 @@
  * October 1992
  */
 
-/*
- * kernel include files.
- */
 #include <sys/param.h>
 #include <sys/systm.h>
-#include <sys/bio.h>
 #include <sys/buf.h>
-#include <sys/mount.h>		/* to define statfs structure */
-#include <sys/vnode.h>		/* to define vattr structure */

>>> TRUNCATED FOR MAIL (1000 lines) <<<


More information about the p4-projects mailing list