From owner-svn-src-user@FreeBSD.ORG  Sun Jun  5 02:20:12 2011
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 334221065675;
	Sun,  5 Jun 2011 02:20:12 +0000 (UTC) (envelope-from hrs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 0AC438FC0C;
	Sun,  5 Jun 2011 02:20:12 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p552KBJ0035829;
	Sun, 5 Jun 2011 02:20:11 GMT (envelope-from hrs@svn.freebsd.org)
Received: (from hrs@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p552KBkR035825;
	Sun, 5 Jun 2011 02:20:11 GMT (envelope-from hrs@svn.freebsd.org)
Message-Id: <201106050220.p552KBkR035825@svn.freebsd.org>
From: Hiroki Sato <hrs@FreeBSD.org>
Date: Sun, 5 Jun 2011 02:20:11 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r222704 - user/hrs/ipv6/usr.sbin/rtadvd
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 05 Jun 2011 02:20:12 -0000

Author: hrs
Date: Sun Jun  5 02:20:11 2011
New Revision: 222704
URL: http://svn.freebsd.org/changeset/base/222704

Log:
  Rename: s/noonlinkprefix/noifprefix/.

Modified:
  user/hrs/ipv6/usr.sbin/rtadvd/config.c
  user/hrs/ipv6/usr.sbin/rtadvd/rtadvd.conf.5
  user/hrs/ipv6/usr.sbin/rtadvd/rtadvd.h

Modified: user/hrs/ipv6/usr.sbin/rtadvd/config.c
==============================================================================
--- user/hrs/ipv6/usr.sbin/rtadvd/config.c	Sat Jun  4 23:36:19 2011	(r222703)
+++ user/hrs/ipv6/usr.sbin/rtadvd/config.c	Sun Jun  5 02:20:11 2011	(r222704)
@@ -185,11 +185,11 @@ getconfig(char *intface)
 		if ((forwarding = getinet6sysctl(IPV6CTL_FORWARDING)) < 0)
 			exit(1);
 
-	/* gather on-link prefixes from the kernel or not. */
-	if (agetflag("noonlinkprefix"))
-		rai->rai_advonlinkprefix = 0;
+	/* gather on-link prefixes from the network interfaces. */
+	if (agetflag("noifprefix"))
+		rai->rai_advifprefix = 0;
 	else
-		rai->rai_advonlinkprefix = 1;
+		rai->rai_advifprefix = 1;
 
 	/* get interface information */
 	if (agetflag("nolladdr"))
@@ -439,7 +439,7 @@ getconfig(char *intface)
 			    now.tv_sec + pfx->pfx_preflifetime;
 		}
 	}
-	if (rai->rai_advonlinkprefix && rai->rai_pfxs == 0)
+	if (rai->rai_advifprefix && rai->rai_pfxs == 0)
 		get_prefix(rai);
 
 	MAYHAVE(val, "mtu", 0);

Modified: user/hrs/ipv6/usr.sbin/rtadvd/rtadvd.conf.5
==============================================================================
--- user/hrs/ipv6/usr.sbin/rtadvd/rtadvd.conf.5	Sat Jun  4 23:36:19 2011	(r222703)
+++ user/hrs/ipv6/usr.sbin/rtadvd/rtadvd.conf.5	Sun Jun  5 02:20:11 2011	(r222704)
@@ -180,19 +180,19 @@ and advertise the prefixes with the defa
 Keywords other than
 .Cm clockskew
 and
-.Cm noonlinkprefix
+.Cm noifprefix
 can be augmented with a number, like
 .Dq Li prefix2 ,
 to specify multiple prefixes.
 .Bl -tag -width indent
-.It Cm \&noonlinkprefix
+.It Cm \&noifprefix
 (bool) Specifies no prefix on the network interfaces will be advertised.
 By default
 .Nm rtadvd
 automatically gathers on-link prefixes from all of the network interfaces
 and advertise them.
 The
-.Cm noonlinkprefix
+.Cm noifprefix
 disables that behavior.
 If this is specified and no
 .Cm addr

Modified: user/hrs/ipv6/usr.sbin/rtadvd/rtadvd.h
==============================================================================
--- user/hrs/ipv6/usr.sbin/rtadvd/rtadvd.h	Sat Jun  4 23:36:19 2011	(r222703)
+++ user/hrs/ipv6/usr.sbin/rtadvd/rtadvd.h	Sun Jun  5 02:20:11 2011	(r222704)
@@ -185,7 +185,7 @@ struct	rainfo {
 	/* interface information */
 	int	rai_ifindex;
 	int	rai_advlinkopt;	/* bool: whether include link-layer addr opt */
-	int	rai_advonlinkprefix;	/* bool: gather on-link prefixes? */
+	int	rai_advifprefix;	/* bool: gather IF prefixes? */
 	struct sockaddr_dl *rai_sdl;
 	char	rai_ifname[IFNAMSIZ];
 	u_int32_t	rai_phymtu;	/* mtu of the physical interface */

From owner-svn-src-user@FreeBSD.ORG  Sun Jun  5 02:31:57 2011
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 9244F106566C;
	Sun,  5 Jun 2011 02:31:57 +0000 (UTC) (envelope-from hrs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 833088FC0A;
	Sun,  5 Jun 2011 02:31:57 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p552Vvk1036191;
	Sun, 5 Jun 2011 02:31:57 GMT (envelope-from hrs@svn.freebsd.org)
Received: (from hrs@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p552VvhH036188;
	Sun, 5 Jun 2011 02:31:57 GMT (envelope-from hrs@svn.freebsd.org)
Message-Id: <201106050231.p552VvhH036188@svn.freebsd.org>
From: Hiroki Sato <hrs@FreeBSD.org>
Date: Sun, 5 Jun 2011 02:31:57 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r222705 - user/hrs/ipv6/usr.sbin/rtadvd
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 05 Jun 2011 02:31:57 -0000

Author: hrs
Date: Sun Jun  5 02:31:57 2011
New Revision: 222705
URL: http://svn.freebsd.org/changeset/base/222705

Log:
  Document -M flag and fix a bug in handling of it.

Modified:
  user/hrs/ipv6/usr.sbin/rtadvd/rtadvd.8
  user/hrs/ipv6/usr.sbin/rtadvd/rtadvd.c

Modified: user/hrs/ipv6/usr.sbin/rtadvd/rtadvd.8
==============================================================================
--- user/hrs/ipv6/usr.sbin/rtadvd/rtadvd.8	Sun Jun  5 02:20:11 2011	(r222704)
+++ user/hrs/ipv6/usr.sbin/rtadvd/rtadvd.8	Sun Jun  5 02:31:57 2011	(r222705)
@@ -37,9 +37,10 @@
 .Nd router advertisement daemon
 .Sh SYNOPSIS
 .Nm
-.Op Fl dDfMRs
+.Op Fl dDfRs
 .Op Fl c Ar configfile
 .Op Fl F Ar dumpfile
+.Op Fl M Ar ifname
 .Op Fl p Ar pidfile
 .Ar interface ...
 .Sh DESCRIPTION

Modified: user/hrs/ipv6/usr.sbin/rtadvd/rtadvd.c
==============================================================================
--- user/hrs/ipv6/usr.sbin/rtadvd/rtadvd.c	Sun Jun  5 02:20:11 2011	(r222704)
+++ user/hrs/ipv6/usr.sbin/rtadvd/rtadvd.c	Sun Jun  5 02:31:57 2011	(r222705)
@@ -188,7 +188,7 @@ main(int argc, char *argv[])
 	pid_t pid, otherpid;
 
 	/* get command line options and arguments */
-	while ((ch = getopt(argc, argv, "c:dDF:fMp:Rs")) != -1) {
+	while ((ch = getopt(argc, argv, "c:dDfF:M:p:Rs")) != -1) {
 		switch (ch) {
 		case 'c':
 			conffile = optarg;
@@ -226,8 +226,9 @@ main(int argc, char *argv[])
 	argv += optind;
 	if (argc == 0) {
 		fprintf(stderr,
-		    "usage: rtadvd [-dDfMRs] [-c conffile] "
-		    "[-F dumpfile] [-p pidfile] interfaces...\n");
+		    "usage: rtadvd [-dDfRs] [-c conffile] "
+		    "[-F dumpfile] [-M ifname] "
+		    "[-p pidfile] interfaces...\n");
 		exit(1);
 	}
 

From owner-svn-src-user@FreeBSD.ORG  Sun Jun  5 02:44:04 2011
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E44E31065677;
	Sun,  5 Jun 2011 02:44:04 +0000 (UTC) (envelope-from hrs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id CAA428FC13;
	Sun,  5 Jun 2011 02:44:04 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p552i4xC036573;
	Sun, 5 Jun 2011 02:44:04 GMT (envelope-from hrs@svn.freebsd.org)
Received: (from hrs@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p552i4J9036571;
	Sun, 5 Jun 2011 02:44:04 GMT (envelope-from hrs@svn.freebsd.org)
Message-Id: <201106050244.p552i4J9036571@svn.freebsd.org>
From: Hiroki Sato <hrs@FreeBSD.org>
Date: Sun, 5 Jun 2011 02:44:04 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r222706 - user/hrs/ipv6/usr.sbin/rtadvd
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 05 Jun 2011 02:44:05 -0000

Author: hrs
Date: Sun Jun  5 02:44:04 2011
New Revision: 222706
URL: http://svn.freebsd.org/changeset/base/222706

Log:
  Simplify -D for LOG_DEBUG and -d for LOG_INFO.

Modified:
  user/hrs/ipv6/usr.sbin/rtadvd/rtadvd.c

Modified: user/hrs/ipv6/usr.sbin/rtadvd/rtadvd.c
==============================================================================
--- user/hrs/ipv6/usr.sbin/rtadvd/rtadvd.c	Sun Jun  5 02:31:57 2011	(r222705)
+++ user/hrs/ipv6/usr.sbin/rtadvd/rtadvd.c	Sun Jun  5 02:44:04 2011	(r222706)
@@ -194,10 +194,10 @@ main(int argc, char *argv[])
 			conffile = optarg;
 			break;
 		case 'd':
-			dflag = 1;
+			dflag++;
 			break;
 		case 'D':
-			dflag = 2;
+			dflag += 2;
 			break;
 		case 'f':
 			fflag = 1;
@@ -238,10 +238,12 @@ main(int argc, char *argv[])
 	openlog("rtadvd", logopt, LOG_DAEMON);
 
 	/* set log level */
-	if (dflag == 0)
-		(void)setlogmask(LOG_UPTO(LOG_ERR));
-	if (dflag == 1)
+	if (dflag > 1)
+		(void)setlogmask(LOG_UPTO(LOG_DEBUG));
+	else if (dflag > 0)
 		(void)setlogmask(LOG_UPTO(LOG_INFO));
+	else
+		(void)setlogmask(LOG_UPTO(LOG_ERR));
 
 	/* timer initialization */
 	rtadvd_timer_init();
@@ -397,9 +399,8 @@ die(void)
 	int i;
 	const int retrans = MAX_FINAL_RTR_ADVERTISEMENTS;
 
-	if (dflag > 1)
-		syslog(LOG_DEBUG, "<%s> cease to be an advertising router\n",
-		    __func__);
+	syslog(LOG_DEBUG, "<%s> cease to be an advertising router\n",
+	    __func__);
 
 	TAILQ_FOREACH(rai, &railist, rai_next) {
 		rai->rai_lifetime = 0;
@@ -433,21 +434,19 @@ rtmsg_input(void)
 	int prefixchange = 0;
 
 	n = read(rtsock, msg, sizeof(msg));
-	if (dflag > 1)
-		syslog(LOG_DEBUG, "<%s> received a routing message "
-		    "(type = %d, len = %d)", __func__, rtmsg_type(msg), n);
+	syslog(LOG_DEBUG, "<%s> received a routing message "
+	    "(type = %d, len = %d)", __func__, rtmsg_type(msg), n);
 
 	if (n > rtmsg_len(msg)) {
 		/*
 		 * This usually won't happen for messages received on
 		 * a routing socket.
 		 */
-		if (dflag > 1)
-			syslog(LOG_DEBUG,
-			    "<%s> received data length is larger than "
-			    "1st routing message len. multiple messages? "
-			    "read %d bytes, but 1st msg len = %d",
-			    __func__, n, rtmsg_len(msg));
+		syslog(LOG_DEBUG,
+		    "<%s> received data length is larger than "
+		    "1st routing message len. multiple messages? "
+		    "read %d bytes, but 1st msg len = %d",
+		    __func__, n, rtmsg_len(msg));
 #if 0
 		/* adjust length */
 		n = rtmsg_len(msg);
@@ -481,22 +480,19 @@ rtmsg_input(void)
 			break;
 		default:
 			/* should not reach here */
-			if (dflag > 1)
-				syslog(LOG_DEBUG,
-				       "<%s:%d> unknown rtmsg %d on %s",
-				       __func__, __LINE__, type,
-				       if_indextoname(ifindex, ifname));
+			syslog(LOG_DEBUG,
+			       "<%s:%d> unknown rtmsg %d on %s",
+			       __func__, __LINE__, type,
+			       if_indextoname(ifindex, ifname));
 			continue;
 		}
 
 		if ((rai = if_indextorainfo(ifindex)) == NULL) {
-			if (dflag > 1) {
-				syslog(LOG_DEBUG,
-				       "<%s> route changed on "
-				       "non advertising interface(%s)",
-				       __func__,
-				       if_indextoname(ifindex, ifname));
-			}
+			syslog(LOG_DEBUG,
+			       "<%s> route changed on "
+			       "non advertising interface(%s)",
+			       __func__,
+			       if_indextoname(ifindex, ifname));
 			continue;
 		}
 		oldifflags = iflist[ifindex]->ifm_flags;
@@ -529,7 +525,7 @@ rtmsg_input(void)
 					 */
 					update_prefix(pfx);
 					prefixchange = 1;
-				} else if (dflag > 1)
+				} else
 					syslog(LOG_DEBUG,
 					    "<%s> new prefix(%s/%d) "
 					    "added on %s, "
@@ -565,16 +561,12 @@ rtmsg_input(void)
 			}
 			pfx = find_prefix(rai, addr, plen);
 			if (pfx == NULL) {
-				if (dflag > 1)
-					syslog(LOG_DEBUG,
-					    "<%s> prefix(%s/%d) was "
-					    "deleted on %s, "
-					    "but it was not in list",
-					    __func__,
-					    inet_ntop(AF_INET6, addr,
-						(char *)addrbuf,
-						sizeof(addrbuf)),
-					    plen, rai->rai_ifname);
+				syslog(LOG_DEBUG,
+				    "<%s> prefix(%s/%d) was deleted on %s, "
+				    "but it was not in list",
+				    __func__, inet_ntop(AF_INET6, addr,
+					(char *)addrbuf, sizeof(addrbuf)),
+					plen, rai->rai_ifname);
 				break;
 			}
 			invalidate_prefix(pfx);
@@ -591,12 +583,10 @@ rtmsg_input(void)
 			break;
 		default:
 			/* should not reach here */
-			if (dflag > 1) {
-				syslog(LOG_DEBUG,
-				    "<%s:%d> unknown rtmsg %d on %s",
-				    __func__, __LINE__, type,
-				    if_indextoname(ifindex, ifname));
-			}
+			syslog(LOG_DEBUG,
+			    "<%s:%d> unknown rtmsg %d on %s",
+			    __func__, __LINE__, type,
+			    if_indextoname(ifindex, ifname));
 			return;
 		}
 

From owner-svn-src-user@FreeBSD.ORG  Sun Jun  5 07:55:52 2011
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 127D11065670;
	Sun,  5 Jun 2011 07:55:52 +0000 (UTC) (envelope-from hrs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 025718FC08;
	Sun,  5 Jun 2011 07:55:52 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p557tpZw046069;
	Sun, 5 Jun 2011 07:55:51 GMT (envelope-from hrs@svn.freebsd.org)
Received: (from hrs@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p557tpnH046063;
	Sun, 5 Jun 2011 07:55:51 GMT (envelope-from hrs@svn.freebsd.org)
Message-Id: <201106050755.p557tpnH046063@svn.freebsd.org>
From: Hiroki Sato <hrs@FreeBSD.org>
Date: Sun, 5 Jun 2011 07:55:51 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r222708 - user/hrs/ipv6/usr.sbin/rtadvd
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 05 Jun 2011 07:55:52 -0000

Author: hrs
Date: Sun Jun  5 07:55:51 2011
New Revision: 222708
URL: http://svn.freebsd.org/changeset/base/222708

Log:
  Support dynamically-added/removed interfaces.  The rtadvd(8) daemon detects an
  interface addition/removal via RTM_IFANNOUNCE message and update the internal
  structure.
  
  TO BE FIXED:
   The advertising interface list still depends on the command line argument.
   The configuration file cannot be reloaded.

Modified:
  user/hrs/ipv6/usr.sbin/rtadvd/config.c
  user/hrs/ipv6/usr.sbin/rtadvd/config.h
  user/hrs/ipv6/usr.sbin/rtadvd/if.c
  user/hrs/ipv6/usr.sbin/rtadvd/rtadvd.c
  user/hrs/ipv6/usr.sbin/rtadvd/timer.c

Modified: user/hrs/ipv6/usr.sbin/rtadvd/config.c
==============================================================================
--- user/hrs/ipv6/usr.sbin/rtadvd/config.c	Sun Jun  5 03:33:46 2011	(r222707)
+++ user/hrs/ipv6/usr.sbin/rtadvd/config.c	Sun Jun  5 07:55:51 2011	(r222708)
@@ -143,8 +143,68 @@ dname_labelenc(char *dst, const char *sr
 		memset(p, 0, sizeof(*p));				\
 	} while(0)
 
-void
-getconfig(char *intface)
+int
+rmconfig(int idx)
+{
+	struct rainfo *rai;
+	struct prefix *pfx;
+	struct soliciter *sol;
+	struct rdnss *rdn;
+	struct rdnss_addr *rdna;
+	struct dnssl *dns;
+	struct rtinfo *rti;
+
+	rai = if_indextorainfo(idx);
+	if (rai == NULL) {
+		syslog(LOG_ERR, "<%s>: rainfo not found (idx=%d)",
+		    __func__, idx);
+		return (-1);
+	}
+
+	TAILQ_REMOVE(&railist, rai, rai_next);
+	syslog(LOG_DEBUG, "<%s>: rainfo (idx=%d) removed.",
+	    __func__, idx);
+
+	/* Free all of allocated memories for this entry. */
+	rtadvd_remove_timer(rai->rai_timer);
+
+	if (rai->rai_ra_data != NULL)
+		free(rai->rai_ra_data);
+
+	if (rai->rai_sdl != NULL)
+		free(rai->rai_sdl);
+
+	while ((pfx = TAILQ_FIRST(&rai->rai_prefix)) != NULL) {
+		TAILQ_REMOVE(&rai->rai_prefix, pfx, pfx_next);
+		free(pfx);
+	}
+	while ((sol = TAILQ_FIRST(&rai->rai_soliciter)) != NULL) {
+		TAILQ_REMOVE(&rai->rai_soliciter, sol, sol_next);
+		free(sol);
+	}
+	while ((rdn = TAILQ_FIRST(&rai->rai_rdnss)) != NULL) {
+		TAILQ_REMOVE(&rai->rai_rdnss, rdn, rd_next);
+		while ((rdna = TAILQ_FIRST(&rdn->rd_list)) != NULL) {
+			TAILQ_REMOVE(&rdn->rd_list, rdna, ra_next);
+			free(rdna);
+		}
+		free(rdn);
+	}
+	while ((dns = TAILQ_FIRST(&rai->rai_dnssl)) != NULL) {
+		TAILQ_REMOVE(&rai->rai_dnssl, dns, dn_next);
+		free(dns);
+	}
+	while ((rti = TAILQ_FIRST(&rai->rai_route)) != NULL) {
+		TAILQ_REMOVE(&rai->rai_route, rti, rti_next);
+		free(rti);
+	}
+	free(rai);
+	
+	return (0);
+}
+
+int
+getconfig(int idx)
 {
 	int stat, i;
 	char tbuf[BUFSIZ];
@@ -154,8 +214,15 @@ getconfig(char *intface)
 	char buf[BUFSIZ];
 	char *bp = buf;
 	char *addr, *flagstr;
+	char intface[IFNAMSIZ];
 	static int forwarding = -1;
 
+	if (if_indextoname(idx, intface) == NULL) {
+		syslog(LOG_ERR, "<%s> invalid index number (%d)",
+		    __func__, idx);
+		return (-1);
+	}
+
 	if ((stat = agetent(tbuf, intface)) <= 0) {
 		memset(tbuf, 0, sizeof(tbuf));
 		syslog(LOG_INFO,
@@ -201,7 +268,7 @@ getconfig(char *intface)
 			syslog(LOG_ERR,
 			    "<%s> can't get information of %s",
 			    __func__, intface);
-			exit(1);
+			return (-1);
 		}
 		rai->rai_ifindex = rai->rai_sdl->sdl_index;
 	} else
@@ -227,7 +294,7 @@ getconfig(char *intface)
 		    "<%s> maxinterval (%ld) on %s is invalid "
 		    "(must be between %u and %u)", __func__, val,
 		    intface, MIN_MAXINTERVAL, MAX_MAXINTERVAL);
-		exit(1);
+		return (-1);
 	}
 	rai->rai_maxinterval = (u_int)val;
 
@@ -239,7 +306,7 @@ getconfig(char *intface)
 		    "(must be between %d and %d)",
 		    __func__, val, intface, MIN_MININTERVAL,
 		    (rai->rai_maxinterval * 3) / 4);
-		exit(1);
+		return (-1);
 	}
 	rai->rai_mininterval = (u_int)val;
 
@@ -258,7 +325,7 @@ getconfig(char *intface)
 			if ((val & ND_RA_FLAG_RTPREF_HIGH)) {
 				syslog(LOG_ERR, "<%s> the \'h\' and \'l\'"
 				    " router flags are exclusive", __func__);
-				exit(1);
+				return (-1);
 			}
 			val |= ND_RA_FLAG_RTPREF_LOW;
 		}
@@ -275,7 +342,7 @@ getconfig(char *intface)
 	if (rai->rai_rtpref == ND_RA_FLAG_RTPREF_RSV) {
 		syslog(LOG_ERR, "<%s> invalid router preference (%02x) on %s",
 		    __func__, rai->rai_rtpref, intface);
-		exit(1);
+		return (-1);
 	}
 
 	MAYHAVE(val, "rltime", rai->rai_maxinterval * 3);
@@ -286,7 +353,7 @@ getconfig(char *intface)
 		    "(must be 0 or between %d and %d)",
 		    __func__, val, intface, rai->rai_maxinterval,
 		    MAXROUTERLIFETIME);
-		exit(1);
+		return (-1);
 	}
 	/*
 	 * Basically, hosts MUST NOT send Router Advertisement messages at any
@@ -302,7 +369,7 @@ getconfig(char *intface)
 		    "which must not be allowed for hosts.  you must "
 		    "change router lifetime or enable IPv6 forwarding.",
 		    __func__, intface);
-		exit(1);
+		return (-1);
 	}
 	rai->rai_lifetime = val & 0xffff;
 
@@ -312,7 +379,7 @@ getconfig(char *intface)
 		    "<%s> reachable time (%ld) on %s is invalid "
 		    "(must be no greater than %d)",
 		    __func__, val, intface, MAXREACHABLETIME);
-		exit(1);
+		return (-1);
 	}
 	rai->rai_reachabletime = (u_int32_t)val;
 
@@ -320,7 +387,7 @@ getconfig(char *intface)
 	if (val64 < 0 || val64 > 0xffffffff) {
 		syslog(LOG_ERR, "<%s> retrans time (%lld) on %s out of range",
 		    __func__, (long long)val64, intface);
-		exit(1);
+		return (-1);
 	}
 	rai->rai_retranstimer = (u_int32_t)val64;
 
@@ -328,7 +395,7 @@ getconfig(char *intface)
 		syslog(LOG_ERR,
 		    "<%s> mobile-ip6 configuration not supported",
 		    __func__);
-		exit(1);
+		return (-1);
 	}
 	/* prefix information */
 
@@ -361,14 +428,14 @@ getconfig(char *intface)
 			syslog(LOG_ERR,
 			    "<%s> inet_pton failed for %s",
 			    __func__, addr);
-			exit(1);
+			return (-1);
 		}
 		if (IN6_IS_ADDR_MULTICAST(&pfx->pfx_prefix)) {
 			syslog(LOG_ERR,
 			    "<%s> multicast prefix (%s) must "
 			    "not be advertised on %s",
 			    __func__, addr, intface);
-			exit(1);
+			return (-1);
 		}
 		if (IN6_IS_ADDR_LINKLOCAL(&pfx->pfx_prefix))
 			syslog(LOG_NOTICE,
@@ -382,7 +449,7 @@ getconfig(char *intface)
 			syslog(LOG_ERR, "<%s> prefixlen (%ld) for %s "
 			    "on %s out of range",
 			    __func__, val, addr, intface);
-			exit(1);
+			return (-1);
 		}
 		pfx->pfx_prefixlen = (int)val;
 
@@ -407,7 +474,7 @@ getconfig(char *intface)
 			    "%s/%d on %s is out of range",
 			    __func__, (long long)val64,
 			    addr, pfx->pfx_prefixlen, intface);
-			exit(1);
+			return (-1);
 		}
 		pfx->pfx_validlifetime = (u_int32_t)val64;
 
@@ -427,7 +494,7 @@ getconfig(char *intface)
 			    "is out of range",
 			    __func__, (long long)val64,
 			    addr, pfx->pfx_prefixlen, intface);
-			exit(1);
+			return (-1);
 		}
 		pfx->pfx_preflifetime = (u_int32_t)val64;
 
@@ -447,7 +514,7 @@ getconfig(char *intface)
 		syslog(LOG_ERR,
 		    "<%s> mtu (%ld) on %s out of range",
 		    __func__, val, intface);
-		exit(1);
+		return (-1);
 	}
 	rai->rai_linkmtu = (u_int32_t)val;
 	if (rai->rai_linkmtu == 0) {
@@ -464,7 +531,7 @@ getconfig(char *intface)
 		    "be between least MTU (%d) and physical link MTU (%d)",
 		    __func__, (unsigned long)rai->rai_linkmtu, intface,
 		    IPV6_MMTU, rai->rai_phymtu);
-		exit(1);
+		return (-1);
 	}
 
 #ifdef SIOCSIFINFO_IN6
@@ -523,7 +590,7 @@ getconfig(char *intface)
 		if (inet_pton(AF_INET6, addr, &rti->rti_prefix) != 1) {
 			syslog(LOG_ERR, "<%s> inet_pton failed for %s",
 			    __func__, addr);
-			exit(1);
+			return (-1);
 		}
 #if 0
 		/*
@@ -538,14 +605,14 @@ getconfig(char *intface)
 			    "<%s> multicast route (%s) must "
 			    "not be advertised on %s",
 			    __func__, addr, intface);
-			exit(1);
+			return (-1);
 		}
 		if (IN6_IS_ADDR_LINKLOCAL(&rti->prefix)) {
 			syslog(LOG_NOTICE,
 			    "<%s> link-local route (%s) will "
 			    "be advertised on %s",
 			    __func__, addr, intface);
-			exit(1);
+			return (-1);
 		}
 #endif
 
@@ -565,7 +632,7 @@ getconfig(char *intface)
 			syslog(LOG_ERR, "<%s> prefixlen (%ld) for %s on %s "
 			    "out of range",
 			    __func__, val, addr, intface);
-			exit(1);
+			return (-1);
 		}
 		rti->rti_prefixlen = (int)val;
 
@@ -601,7 +668,7 @@ getconfig(char *intface)
 			    "for %s/%d on %s",
 			    __func__, rti->rti_rtpref, addr,
 			    rti->rti_prefixlen, intface);
-			exit(1);
+			return (-1);
 		}
 
 		/*
@@ -628,7 +695,7 @@ getconfig(char *intface)
 			syslog(LOG_ERR, "<%s> route lifetime (%lld) for "
 			    "%s/%d on %s out of range", __func__,
 			    (long long)val64, addr, rti->rti_prefixlen, intface);
-			exit(1);
+			return (-1);
 		}
 		rti->rti_ltime = (u_int32_t)val64;
 	}
@@ -656,7 +723,8 @@ getconfig(char *intface)
 			if (inet_pton(AF_INET6, abuf, &rdna->ra_dns) != 1) {
 				syslog(LOG_ERR, "<%s> inet_pton failed for %s",
 				    __func__, abuf);
-				exit(1);
+				free(rdna);
+				return (-1);
 			}
 			TAILQ_INSERT_TAIL(&rdn->rd_list, rdna, ra_next);
 		}
@@ -669,7 +737,7 @@ getconfig(char *intface)
 			    "(must be between %d and %d)",
 			    entbuf, val, intface, rai->rai_maxinterval,
 			    rai->rai_maxinterval * 2);
-			exit(1);
+			return (-1);
 		}
 		rdn->rd_ltime = val;
 
@@ -711,7 +779,7 @@ getconfig(char *intface)
 			    "(must be between %d and %d)",
 			    entbuf, val, intface, rai->rai_maxinterval,
 			    rai->rai_maxinterval * 2);
-			exit(1);
+			return (-1);
 		}
 		dns->dn_ltime = val;
 
@@ -727,6 +795,8 @@ getconfig(char *intface)
 				      rai, rai);
 	ra_timer_update((void *)rai, &rai->rai_timer->rat_tm);
 	rtadvd_set_timer(&rai->rai_timer->rat_tm, rai->rai_timer);
+
+	return (0);
 }
 
 void

Modified: user/hrs/ipv6/usr.sbin/rtadvd/config.h
==============================================================================
--- user/hrs/ipv6/usr.sbin/rtadvd/config.h	Sun Jun  5 03:33:46 2011	(r222707)
+++ user/hrs/ipv6/usr.sbin/rtadvd/config.h	Sun Jun  5 07:55:51 2011	(r222708)
@@ -30,7 +30,8 @@
  * SUCH DAMAGE.
  */
 
-extern void getconfig(char *);
+extern int getconfig(int);
+extern int rmconfig(int);
 extern void delete_prefix(struct prefix *);
 extern void invalidate_prefix(struct prefix *);
 extern void update_prefix(struct prefix *);

Modified: user/hrs/ipv6/usr.sbin/rtadvd/if.c
==============================================================================
--- user/hrs/ipv6/usr.sbin/rtadvd/if.c	Sun Jun  5 03:33:46 2011	(r222707)
+++ user/hrs/ipv6/usr.sbin/rtadvd/if.c	Sun Jun  5 07:55:51 2011	(r222708)
@@ -271,10 +271,17 @@ get_next_msg(char *buf, char *lim, int i
 			    buf, lim, rtm);
 			break;
 		}
-		if (FILTER_MATCH(rtm->rtm_type, filter) == 0) {
+		if (((struct rt_msghdr *)buf)->rtm_version != RTM_VERSION) {
+			syslog(LOG_WARNING,
+			    "<%s> routing message version mismatch "
+			    "(buf=%p lim=%p rtm=%p)", __func__,
+			    buf, lim, rtm);
 			continue;
 		}
 
+		if (FILTER_MATCH(rtm->rtm_type, filter) == 0)
+			continue;
+
 		switch (rtm->rtm_type) {
 		case RTM_GET:
 		case RTM_ADD:
@@ -328,6 +335,7 @@ get_next_msg(char *buf, char *lim, int i
 			return (char *)rtm;
 			/* NOTREACHED */
 		case RTM_IFINFO:
+		case RTM_IFANNOUNCE:
 			/* found */
 			*lenp = rtm->rtm_msglen;
 			return (char *)rtm;
@@ -566,6 +574,9 @@ parse_iflist(struct if_msghdr ***ifmlist
 void
 init_iflist(void)
 {
+	syslog(LOG_DEBUG,
+	    "<%s> generate iflist.", __func__);
+
 	if (ifblock) {
 		free(ifblock);
 		ifblock_size = 0;

Modified: user/hrs/ipv6/usr.sbin/rtadvd/rtadvd.c
==============================================================================
--- user/hrs/ipv6/usr.sbin/rtadvd/rtadvd.c	Sun Jun  5 03:33:46 2011	(r222707)
+++ user/hrs/ipv6/usr.sbin/rtadvd/rtadvd.c	Sun Jun  5 07:55:51 2011	(r222708)
@@ -90,6 +90,8 @@ int sock;
 int rtsock = -1;
 int accept_rr = 0;
 int dflag = 0, sflag = 0;
+static int ifl_len;
+static char **ifl_names;
 
 struct railist_head_t railist =
     TAILQ_HEAD_INITIALIZER(railist);
@@ -171,6 +173,7 @@ static void	ra_output(struct rainfo *);
 static void	rtmsg_input(void);
 static void	rtadvd_set_dump_file(int);
 static void	set_short_delay(struct rainfo *);
+static int	ifl_lookup(char *, char **, int);
 
 int
 main(int argc, char *argv[])
@@ -186,6 +189,7 @@ main(int argc, char *argv[])
 	int i, ch;
 	int fflag = 0, logopt;
 	pid_t pid, otherpid;
+	int error;
 
 	/* get command line options and arguments */
 	while ((ch = getopt(argc, argv, "c:dDfF:M:p:Rs")) != -1) {
@@ -258,9 +262,25 @@ main(int argc, char *argv[])
 #endif
 	/* get iflist block from kernel */
 	init_iflist();
+	ifl_names = argv;
+	ifl_len = argc;
+
+	for (i = 0; i < ifl_len; i++) {
+		int idx;
 
-	while (argc--)
-		getconfig(*argv++);
+		idx = if_nametoindex(ifl_names[i]);
+		if (idx == 0) {
+			syslog(LOG_INFO,
+			    "<%s> interface %s not found."
+			    "Ignored at this moment.", __func__, ifl_names[i]);
+			continue;
+		}
+		error = getconfig(idx);
+		if (error)
+			syslog(LOG_INFO,
+			    "<%s> invalid configuration for %s."
+			    "Ignored at this moment.", __func__, ifl_names[i]);
+	}
 
 	pfh = pidfile_open(pidfilename, 0600, &otherpid);
 	if (pfh == NULL) {
@@ -376,6 +396,15 @@ main(int argc, char *argv[])
 	exit(0);		/* NOTREACHED */
 }
 
+static int
+ifl_lookup(char *ifn, char **names, int len)
+{
+	while (len--)
+		if (strncmp(names[len], ifn, IFNAMSIZ) == 0)
+			return (0);
+	return (-1);
+}
+
 static void
 rtadvd_set_dump_file(int sig __unused)
 {
@@ -426,12 +455,14 @@ rtmsg_input(void)
 	int n, type, ifindex = 0, plen;
 	size_t len;
 	char msg[2048], *next, *lim;
-	u_char ifname[IF_NAMESIZE];
+	u_char ifname[IFNAMSIZ];
+	struct if_announcemsghdr *ifan;
 	struct prefix *pfx;
 	struct rainfo *rai;
 	struct in6_addr *addr;
 	char addrbuf[INET6_ADDRSTRLEN];
 	int prefixchange = 0;
+	int error;
 
 	n = read(rtsock, msg, sizeof(msg));
 	syslog(LOG_DEBUG, "<%s> received a routing message "
@@ -462,7 +493,8 @@ rtmsg_input(void)
 		    RTADV_TYPE2BITMASK(RTM_DELETE) |
 		    RTADV_TYPE2BITMASK(RTM_NEWADDR) |
 		    RTADV_TYPE2BITMASK(RTM_DELADDR) |
-		    RTADV_TYPE2BITMASK(RTM_IFINFO));
+		    RTADV_TYPE2BITMASK(RTM_IFINFO) |
+		    RTADV_TYPE2BITMASK(RTM_IFANNOUNCE));
 		if (len == 0)
 			break;
 		type = rtmsg_type(next);
@@ -478,6 +510,50 @@ rtmsg_input(void)
 		case RTM_IFINFO:
 			ifindex = get_ifm_ifindex(next);
 			break;
+		case RTM_IFANNOUNCE:
+			ifan = (struct if_announcemsghdr *)next;
+			switch (ifan->ifan_what) {
+			case IFAN_ARRIVAL:
+			case IFAN_DEPARTURE:
+				break;
+			default:
+				syslog(LOG_DEBUG,
+				    "<%s:%d> unknown ifan msg (ifan_what=%d)",
+				   __func__, __LINE__, ifan->ifan_what);
+				continue;
+			}
+
+			syslog(LOG_INFO, "<%s>: if_announcemsg (idx=%d:%d)",
+			       __func__, ifan->ifan_index, ifan->ifan_what);
+			init_iflist();
+			error = ifl_lookup(ifan->ifan_name,
+			    ifl_names, ifl_len);
+			if (error) {
+				syslog(LOG_INFO, "<%s>: not a target "
+				    "interface (idx=%d)", __func__,
+				    ifan->ifan_index);
+				continue;
+			}
+
+			switch (ifan->ifan_what) {
+			case IFAN_ARRIVAL:
+				error = getconfig(ifan->ifan_index);
+				if (error)
+					syslog(LOG_ERR,
+					    "<%s>: getconfig failed (idx=%d)"
+					    "  Ignored.", __func__,
+					    ifan->ifan_index);
+				break;
+			case IFAN_DEPARTURE:
+				error = rmconfig(ifan->ifan_index);
+				if (error)
+					syslog(LOG_ERR,
+					    "<%s>: rmconfig failed (idx=%d)"
+					    "  Ignored.", __func__,
+					    ifan->ifan_index);
+				break;
+			}
+			continue;
 		default:
 			/* should not reach here */
 			syslog(LOG_DEBUG,

Modified: user/hrs/ipv6/usr.sbin/rtadvd/timer.c
==============================================================================
--- user/hrs/ipv6/usr.sbin/rtadvd/timer.c	Sun Jun  5 03:33:46 2011	(r222707)
+++ user/hrs/ipv6/usr.sbin/rtadvd/timer.c	Sun Jun  5 07:55:51 2011	(r222708)
@@ -92,6 +92,9 @@ void
 rtadvd_remove_timer(struct rtadvd_timer *rat)
 {
 
+	if (rat == NULL)
+		return;
+
 	TAILQ_REMOVE(&ra_timer, rat, rat_next);
 	free(rat);
 }

From owner-svn-src-user@FreeBSD.ORG  Sun Jun  5 11:20:19 2011
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C9BA11065674;
	Sun,  5 Jun 2011 11:20:19 +0000 (UTC) (envelope-from hrs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id B8E428FC17;
	Sun,  5 Jun 2011 11:20:19 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p55BKJUC053569;
	Sun, 5 Jun 2011 11:20:19 GMT (envelope-from hrs@svn.freebsd.org)
Received: (from hrs@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p55BKJ62053566;
	Sun, 5 Jun 2011 11:20:19 GMT (envelope-from hrs@svn.freebsd.org)
Message-Id: <201106051120.p55BKJ62053566@svn.freebsd.org>
From: Hiroki Sato <hrs@FreeBSD.org>
Date: Sun, 5 Jun 2011 11:20:19 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r222710 - user/hrs/ipv6/usr.sbin/rtadvd
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 05 Jun 2011 11:20:19 -0000

Author: hrs
Date: Sun Jun  5 11:20:19 2011
New Revision: 222710
URL: http://svn.freebsd.org/changeset/base/222710

Log:
  Specify requirements for RA sending/receiving based on lifetime,
  IFF_ND6_ACCEPT_RTADV, and net.inet6.ip6.forwarding.
  
   ra_output:
    (lifetime == 0) = output
    (lifetime != 0 && (ACCEPT_RTADV || !ip6.forwarding) = no output
  
   ra_input:
    ACCEPT_RTADV = input
    !ACCEPT_RTADV = no input
  
  Note that the current implementation sends RAs with zero-lifetime even if
  ip6.forwarding == 0.  This behavior is derived from KAME and different from
  RFC 4861.

Modified:
  user/hrs/ipv6/usr.sbin/rtadvd/config.c
  user/hrs/ipv6/usr.sbin/rtadvd/rtadvd.c

Modified: user/hrs/ipv6/usr.sbin/rtadvd/config.c
==============================================================================
--- user/hrs/ipv6/usr.sbin/rtadvd/config.c	Sun Jun  5 10:07:12 2011	(r222709)
+++ user/hrs/ipv6/usr.sbin/rtadvd/config.c	Sun Jun  5 11:20:19 2011	(r222710)
@@ -34,7 +34,6 @@
 #include <sys/ioctl.h>
 #include <sys/socket.h>
 #include <sys/time.h>
-#include <sys/sysctl.h>
 
 #include <net/if.h>
 #include <net/if_var.h>
@@ -76,7 +75,6 @@ static time_t prefix_timo = (60 * 120);	
 
 static struct rtadvd_timer *prefix_timeout(void *);
 static void makeentry(char *, size_t, int, const char *);
-static int getinet6sysctl(int);
 static size_t dname_labelenc(char *, const char *);
 
 /* Encode domain name label encoding in RFC 1035 Section 3.1 */
@@ -215,7 +213,6 @@ getconfig(int idx)
 	char *bp = buf;
 	char *addr, *flagstr;
 	char intface[IFNAMSIZ];
-	static int forwarding = -1;
 
 	if (if_indextoname(idx, intface) == NULL) {
 		syslog(LOG_ERR, "<%s> invalid index number (%d)",
@@ -247,11 +244,6 @@ getconfig(int idx)
 	TAILQ_INIT(&rai->rai_dnssl);
 	TAILQ_INIT(&rai->rai_soliciter);
 
-	/* check if we are allowed to forward packets (if not determined) */
-	if (forwarding < 0)
-		if ((forwarding = getinet6sysctl(IPV6CTL_FORWARDING)) < 0)
-			exit(1);
-
 	/* gather on-link prefixes from the network interfaces. */
 	if (agetflag("noifprefix"))
 		rai->rai_advifprefix = 0;
@@ -355,22 +347,6 @@ getconfig(int idx)
 		    MAXROUTERLIFETIME);
 		return (-1);
 	}
-	/*
-	 * Basically, hosts MUST NOT send Router Advertisement messages at any
-	 * time (RFC 4861, Section 6.2.3). However, it would sometimes be
-	 * useful to allow hosts to advertise some parameters such as prefix
-	 * information and link MTU. Thus, we allow hosts to invoke rtadvd
-	 * only when router lifetime (on every advertising interface) is
-	 * explicitly set zero. (see also the above section)
-	 */
-	if (val && forwarding == 0) {
-		syslog(LOG_ERR,
-		    "<%s> non zero router lifetime is specified for %s, "
-		    "which must not be allowed for hosts.  you must "
-		    "change router lifetime or enable IPv6 forwarding.",
-		    __func__, intface);
-		return (-1);
-	}
 	rai->rai_lifetime = val & 0xffff;
 
 	MAYHAVE(val, "rtime", DEF_ADVREACHABLETIME);
@@ -1312,23 +1288,3 @@ make_packet(struct rainfo *rai)
 	}
 	return;
 }
-
-static int
-getinet6sysctl(int code)
-{
-	int mib[] = { CTL_NET, PF_INET6, IPPROTO_IPV6, 0 };
-	int value;
-	size_t size;
-
-	mib[3] = code;
-	size = sizeof(value);
-	if (sysctl(mib, sizeof(mib)/sizeof(mib[0]), &value, &size, NULL, 0)
-	    < 0) {
-		syslog(LOG_ERR, "<%s>: failed to get ip6 sysctl(%d): %s",
-		    __func__, code,
-		    strerror(errno));
-		return (-1);
-	}
-	else
-		return (value);
-}

Modified: user/hrs/ipv6/usr.sbin/rtadvd/rtadvd.c
==============================================================================
--- user/hrs/ipv6/usr.sbin/rtadvd/rtadvd.c	Sun Jun  5 10:07:12 2011	(r222709)
+++ user/hrs/ipv6/usr.sbin/rtadvd/rtadvd.c	Sun Jun  5 11:20:19 2011	(r222710)
@@ -31,10 +31,12 @@
  */
 
 #include <sys/param.h>
+#include <sys/ioctl.h>
 #include <sys/socket.h>
 #include <sys/uio.h>
 #include <sys/time.h>
 #include <sys/queue.h>
+#include <sys/sysctl.h>
 
 #include <net/if.h>
 #include <net/if_media.h>
@@ -47,6 +49,10 @@
 
 #include <arpa/inet.h>
 
+#include <net/if_var.h>
+#include <netinet/in_var.h>
+#include <netinet6/nd6.h>
+
 #include <time.h>
 #include <unistd.h>
 #include <stdio.h>
@@ -174,6 +180,8 @@ static void	rtmsg_input(void);
 static void	rtadvd_set_dump_file(int);
 static void	set_short_delay(struct rainfo *);
 static int	ifl_lookup(char *, char **, int);
+static int	check_accept_rtadv(int);
+static int	getinet6sysctl(int);
 
 int
 main(int argc, char *argv[])
@@ -1030,6 +1038,61 @@ set_short_delay(struct rainfo *rai)
 	rtadvd_set_timer(&interval, rai->rai_timer);
 }
 
+static int
+check_accept_rtadv(int idx)
+{
+	struct in6_ndireq nd;
+	u_char ifname[IFNAMSIZ];
+	int s6;
+	int error;
+
+	if ((s6 = socket(AF_INET6, SOCK_DGRAM, 0)) < 0) {
+		syslog(LOG_ERR,
+		    "<%s> open socket failed for idx=%d.",
+		    __func__, idx);
+		return (0);
+	}
+	if ((if_indextoname(idx, ifname)) == NULL) {
+		syslog(LOG_ERR,
+		    "<%s> ifindex->ifname failed (idx=%d).",
+		    __func__, idx);
+		close(s6);
+		return (0);
+	}
+	memset(&nd, 0, sizeof(nd));
+	strncpy(nd.ifname, ifname, sizeof(nd.ifname));
+	error = ioctl(s6, SIOCGIFINFO_IN6, &nd);
+	if (error) {
+		syslog(LOG_ERR,
+		    "<%s> ioctl(SIOCGIFINFO_IN6) failed for idx=%d.",
+		    __func__, idx);
+		nd.ndi.flags = 0;
+	}
+	close(s6);
+
+	return (nd.ndi.flags & ND6_IFF_ACCEPT_RTADV);
+}
+
+static int
+getinet6sysctl(int code)
+{
+	int mib[] = { CTL_NET, PF_INET6, IPPROTO_IPV6, 0 };
+	int value;
+	size_t size;
+
+	mib[3] = code;
+	size = sizeof(value);
+	if (sysctl(mib, sizeof(mib)/sizeof(mib[0]), &value, &size, NULL, 0)
+	    < 0) {
+		syslog(LOG_ERR, "<%s>: failed to get ip6 sysctl(%d): %s",
+		    __func__, code,
+		    strerror(errno));
+		return (-1);
+	}
+	else
+		return (value);
+}
+
 static void
 ra_input(int len, struct nd_router_advert *nra,
 	 struct in6_pktinfo *pi, struct sockaddr_in6 *from)
@@ -1047,6 +1110,16 @@ ra_input(int len, struct nd_router_adver
 	    inet_ntop(AF_INET6, &from->sin6_addr, ntopbuf, sizeof(ntopbuf)),
 	    if_indextoname(pi->ipi6_ifindex, ifnamebuf));
 
+	if (!check_accept_rtadv(pi->ipi6_ifindex)) {
+		syslog(LOG_INFO,
+		    "<%s> An RA from %s on %s ignored (no ACCEPT_RTADV flag).",
+		    __func__,
+		    inet_ntop(AF_INET6, &from->sin6_addr, ntopbuf,
+			sizeof(ntopbuf)), if_indextoname(pi->ipi6_ifindex,
+			ifnamebuf));
+		return;
+	}
+
 	/* ND option check */
 	memset(&ndopts, 0, sizeof(ndopts));
 	error = nd6_options((struct nd_opt_hdr *)(nra + 1),
@@ -1639,6 +1712,41 @@ ra_output(struct rainfo *rai)
 		return;
 	}
 
+	/*
+	 * Check lifetime, ACCEPT_RTADV flag, and ip6.forwarding.
+	 *
+	 * (lifetime == 0) = output
+	 * (lifetime != 0 && (ACCEPT_RTADV || !ip6.forwarding) = no output
+	 *
+	 * Basically, hosts MUST NOT send Router Advertisement
+	 * messages at any time (RFC 4861, Section 6.2.3). However, it
+	 * would sometimes be useful to allow hosts to advertise some
+	 * parameters such as prefix information and link MTU. Thus,
+	 * we allow hosts to invoke rtadvd only when router lifetime
+	 * (on every advertising interface) is explicitly set
+	 * zero. (see also the above section)
+	 */
+	syslog(LOG_DEBUG,
+	    "<%s> check lifetime=%d, ACCEPT_RTADV=%d, ip6.forwarding=%d on %s",
+	    __func__, rai->rai_lifetime, check_accept_rtadv(rai->rai_ifindex),
+	    getinet6sysctl(IPV6CTL_FORWARDING), rai->rai_ifname);
+	if (rai->rai_lifetime != 0) {
+		if (check_accept_rtadv(rai->rai_ifindex)) {
+			syslog(LOG_INFO,
+			    "<%s> non-zero lifetime RA "
+			    "on RA receiving interface %s."
+			    "  Ignored.", __func__, rai->rai_ifname);
+			return;
+		}
+		if (getinet6sysctl(IPV6CTL_FORWARDING) == 0) {
+			syslog(LOG_INFO,
+			    "<%s> non-zero lifetime RA "
+			    "but net.inet6.ip6.forwarding=0.  "
+			    "Ignored.", __func__);
+			return;
+		}
+	}
+
 	make_packet(rai);	/* XXX: inefficient */
 
 	sndmhdr.msg_name = (caddr_t)&sin6_linklocal_allnodes;

From owner-svn-src-user@FreeBSD.ORG  Sun Jun  5 12:07:05 2011
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 160CD1065677;
	Sun,  5 Jun 2011 12:07:05 +0000 (UTC) (envelope-from hrs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 0643A8FC0C;
	Sun,  5 Jun 2011 12:07:05 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p55C74wa056002;
	Sun, 5 Jun 2011 12:07:04 GMT (envelope-from hrs@svn.freebsd.org)
Received: (from hrs@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p55C74sk056000;
	Sun, 5 Jun 2011 12:07:04 GMT (envelope-from hrs@svn.freebsd.org)
Message-Id: <201106051207.p55C74sk056000@svn.freebsd.org>
From: Hiroki Sato <hrs@FreeBSD.org>
Date: Sun, 5 Jun 2011 12:07:04 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r222713 - user/hrs/ipv6/sbin/ifconfig
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 05 Jun 2011 12:07:05 -0000

Author: hrs
Date: Sun Jun  5 12:07:04 2011
New Revision: 222713
URL: http://svn.freebsd.org/changeset/base/222713

Log:
  Fix a missing condition mistakenly removed in the previous commit.

Modified:
  user/hrs/ipv6/sbin/ifconfig/af_nd6.c

Modified: user/hrs/ipv6/sbin/ifconfig/af_nd6.c
==============================================================================
--- user/hrs/ipv6/sbin/ifconfig/af_nd6.c	Sun Jun  5 11:40:30 2011	(r222712)
+++ user/hrs/ipv6/sbin/ifconfig/af_nd6.c	Sun Jun  5 12:07:04 2011	(r222713)
@@ -160,7 +160,7 @@ nd6_status(int s)
 	isdefif = isnd6defif(s6);
 	close(s6);
 
-	if (nd.ndi.flags == 0)
+	if (nd.ndi.flags == 0 && !isdefif)
 		return;
 	printb("\tnd6 options",
 	    (unsigned int)(nd.ndi.flags | (isdefif << 15)), ND6BITS);

From owner-svn-src-user@FreeBSD.ORG  Sun Jun  5 12:27:35 2011
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id EEBB8106564A;
	Sun,  5 Jun 2011 12:27:35 +0000 (UTC) (envelope-from hrs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id D99B98FC0C;
	Sun,  5 Jun 2011 12:27:35 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p55CRZgC056861;
	Sun, 5 Jun 2011 12:27:35 GMT (envelope-from hrs@svn.freebsd.org)
Received: (from hrs@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p55CRZaC056815;
	Sun, 5 Jun 2011 12:27:35 GMT (envelope-from hrs@svn.freebsd.org)
Message-Id: <201106051227.p55CRZaC056815@svn.freebsd.org>
From: Hiroki Sato <hrs@FreeBSD.org>
Date: Sun, 5 Jun 2011 12:27:35 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r222714 - in user/hrs/ipv6: bin/sh
	contrib/binutils/ld/emulparams contrib/compiler-rt
	contrib/compiler-rt/lib contrib/compiler-rt/lib/arm
	contrib/compiler-rt/lib/i386 contrib/compiler-r...
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 05 Jun 2011 12:27:36 -0000

Author: hrs
Date: Sun Jun  5 12:27:34 2011
New Revision: 222714
URL: http://svn.freebsd.org/changeset/base/222714

Log:
  Merge from HEAD@222712.

Added:
  user/hrs/ipv6/contrib/compiler-rt/lib/abi.h
     - copied unchanged from r222712, head/contrib/compiler-rt/lib/abi.h
  user/hrs/ipv6/contrib/compiler-rt/lib/arm/divmodsi4.S
     - copied unchanged from r222712, head/contrib/compiler-rt/lib/arm/divmodsi4.S
  user/hrs/ipv6/contrib/compiler-rt/lib/arm/divsi3.S
     - copied unchanged from r222712, head/contrib/compiler-rt/lib/arm/divsi3.S
  user/hrs/ipv6/contrib/compiler-rt/lib/arm/softfloat-alias.list
     - copied unchanged from r222712, head/contrib/compiler-rt/lib/arm/softfloat-alias.list
  user/hrs/ipv6/contrib/compiler-rt/lib/arm/udivmodsi4.S
     - copied unchanged from r222712, head/contrib/compiler-rt/lib/arm/udivmodsi4.S
  user/hrs/ipv6/contrib/compiler-rt/lib/arm/udivsi3.S
     - copied unchanged from r222712, head/contrib/compiler-rt/lib/arm/udivsi3.S
  user/hrs/ipv6/contrib/compiler-rt/lib/arm/umodsi3.S
     - copied unchanged from r222712, head/contrib/compiler-rt/lib/arm/umodsi3.S
  user/hrs/ipv6/contrib/compiler-rt/lib/divmoddi4.c
     - copied unchanged from r222712, head/contrib/compiler-rt/lib/divmoddi4.c
  user/hrs/ipv6/contrib/compiler-rt/lib/divmodsi4.c
     - copied unchanged from r222712, head/contrib/compiler-rt/lib/divmodsi4.c
  user/hrs/ipv6/contrib/compiler-rt/lib/subdf3.c
     - copied unchanged from r222712, head/contrib/compiler-rt/lib/subdf3.c
  user/hrs/ipv6/contrib/compiler-rt/lib/subsf3.c
     - copied unchanged from r222712, head/contrib/compiler-rt/lib/subsf3.c
  user/hrs/ipv6/contrib/compiler-rt/lib/udivmodsi4.c
     - copied unchanged from r222712, head/contrib/compiler-rt/lib/udivmodsi4.c
  user/hrs/ipv6/share/man/man4/ath_ahb.4
     - copied unchanged from r222712, head/share/man/man4/ath_ahb.4
  user/hrs/ipv6/share/man/man4/ath_pci.4
     - copied unchanged from r222712, head/share/man/man4/ath_pci.4
  user/hrs/ipv6/share/man/man4/umcs.4
     - copied unchanged from r222712, head/share/man/man4/umcs.4
  user/hrs/ipv6/sys/dev/ath/ath_dfs/
     - copied from r222712, head/sys/dev/ath/ath_dfs/
  user/hrs/ipv6/sys/dev/ath/if_athdfs.h
     - copied unchanged from r222712, head/sys/dev/ath/if_athdfs.h
  user/hrs/ipv6/sys/dev/cxgbe/common/jhash.h
     - copied unchanged from r222712, head/sys/dev/cxgbe/common/jhash.h
  user/hrs/ipv6/sys/dev/cxgbe/t4_l2t.c
     - copied unchanged from r222712, head/sys/dev/cxgbe/t4_l2t.c
  user/hrs/ipv6/sys/dev/cxgbe/t4_l2t.h
     - copied unchanged from r222712, head/sys/dev/cxgbe/t4_l2t.h
  user/hrs/ipv6/sys/dev/iicbus/ad7417.c
     - copied unchanged from r222712, head/sys/dev/iicbus/ad7417.c
  user/hrs/ipv6/sys/dev/usb/serial/umcs.c
     - copied unchanged from r222712, head/sys/dev/usb/serial/umcs.c
  user/hrs/ipv6/sys/dev/usb/serial/umcs.h
     - copied unchanged from r222712, head/sys/dev/usb/serial/umcs.h
  user/hrs/ipv6/sys/modules/usb/umcs/
     - copied from r222712, head/sys/modules/usb/umcs/
  user/hrs/ipv6/sys/powerpc/include/rtas.h
     - copied unchanged from r222712, head/sys/powerpc/include/rtas.h
  user/hrs/ipv6/sys/powerpc/ofw/ofwcall32.S
     - copied unchanged from r222712, head/sys/powerpc/ofw/ofwcall32.S
  user/hrs/ipv6/sys/powerpc/ofw/ofwcall64.S
     - copied unchanged from r222712, head/sys/powerpc/ofw/ofwcall64.S
  user/hrs/ipv6/sys/powerpc/ofw/ofwmagic.S
     - copied unchanged from r222712, head/sys/powerpc/ofw/ofwmagic.S
  user/hrs/ipv6/sys/powerpc/ofw/rtas.c
     - copied unchanged from r222712, head/sys/powerpc/ofw/rtas.c
  user/hrs/ipv6/sys/powerpc/powermac/windtunnel.c
     - copied unchanged from r222712, head/sys/powerpc/powermac/windtunnel.c
  user/hrs/ipv6/tools/regression/bin/sh/builtins/set1.0
     - copied unchanged from r222712, head/tools/regression/bin/sh/builtins/set1.0
  user/hrs/ipv6/tools/regression/bin/sh/execution/set-n1.0
     - copied unchanged from r222712, head/tools/regression/bin/sh/execution/set-n1.0
  user/hrs/ipv6/tools/regression/bin/sh/execution/set-n2.0
     - copied unchanged from r222712, head/tools/regression/bin/sh/execution/set-n2.0
  user/hrs/ipv6/tools/regression/bin/sh/execution/set-n3.0
     - copied unchanged from r222712, head/tools/regression/bin/sh/execution/set-n3.0
  user/hrs/ipv6/tools/regression/bin/sh/execution/set-n4.0
     - copied unchanged from r222712, head/tools/regression/bin/sh/execution/set-n4.0
  user/hrs/ipv6/tools/regression/bin/sh/parser/func2.0
     - copied unchanged from r222712, head/tools/regression/bin/sh/parser/func2.0
  user/hrs/ipv6/tools/regression/bin/sh/parser/func3.0
     - copied unchanged from r222712, head/tools/regression/bin/sh/parser/func3.0
  user/hrs/ipv6/tools/regression/netinet/ipdivert/
     - copied from r222712, head/tools/regression/netinet/ipdivert/
  user/hrs/ipv6/usr.sbin/bsdinstall/scripts/netconfig_ipv4
     - copied unchanged from r222712, head/usr.sbin/bsdinstall/scripts/netconfig_ipv4
  user/hrs/ipv6/usr.sbin/bsdinstall/scripts/netconfig_ipv6
     - copied unchanged from r222712, head/usr.sbin/bsdinstall/scripts/netconfig_ipv6
Deleted:
  user/hrs/ipv6/sys/powerpc/aim/ofwmagic.S
Modified:
  user/hrs/ipv6/bin/sh/alias.c
  user/hrs/ipv6/bin/sh/eval.c
  user/hrs/ipv6/bin/sh/input.c
  user/hrs/ipv6/bin/sh/jobs.c
  user/hrs/ipv6/bin/sh/main.c
  user/hrs/ipv6/bin/sh/options.c
  user/hrs/ipv6/contrib/binutils/ld/emulparams/elf64bmip-defs.sh
  user/hrs/ipv6/contrib/compiler-rt/CREDITS.TXT
  user/hrs/ipv6/contrib/compiler-rt/LICENSE.TXT
  user/hrs/ipv6/contrib/compiler-rt/README.txt
  user/hrs/ipv6/contrib/compiler-rt/lib/absvdi2.c
  user/hrs/ipv6/contrib/compiler-rt/lib/absvsi2.c
  user/hrs/ipv6/contrib/compiler-rt/lib/absvti2.c
  user/hrs/ipv6/contrib/compiler-rt/lib/adddf3.c
  user/hrs/ipv6/contrib/compiler-rt/lib/addsf3.c
  user/hrs/ipv6/contrib/compiler-rt/lib/addvdi3.c
  user/hrs/ipv6/contrib/compiler-rt/lib/addvsi3.c
  user/hrs/ipv6/contrib/compiler-rt/lib/addvti3.c
  user/hrs/ipv6/contrib/compiler-rt/lib/apple_versioning.c
  user/hrs/ipv6/contrib/compiler-rt/lib/arm/adddf3vfp.S
  user/hrs/ipv6/contrib/compiler-rt/lib/arm/addsf3vfp.S
  user/hrs/ipv6/contrib/compiler-rt/lib/arm/bswapdi2.S
  user/hrs/ipv6/contrib/compiler-rt/lib/arm/bswapsi2.S
  user/hrs/ipv6/contrib/compiler-rt/lib/arm/comparesf2.S
  user/hrs/ipv6/contrib/compiler-rt/lib/arm/divdf3vfp.S
  user/hrs/ipv6/contrib/compiler-rt/lib/arm/divsf3vfp.S
  user/hrs/ipv6/contrib/compiler-rt/lib/arm/eqdf2vfp.S
  user/hrs/ipv6/contrib/compiler-rt/lib/arm/eqsf2vfp.S
  user/hrs/ipv6/contrib/compiler-rt/lib/arm/extendsfdf2vfp.S
  user/hrs/ipv6/contrib/compiler-rt/lib/arm/fixdfsivfp.S
  user/hrs/ipv6/contrib/compiler-rt/lib/arm/fixsfsivfp.S
  user/hrs/ipv6/contrib/compiler-rt/lib/arm/fixunsdfsivfp.S
  user/hrs/ipv6/contrib/compiler-rt/lib/arm/fixunssfsivfp.S
  user/hrs/ipv6/contrib/compiler-rt/lib/arm/floatsidfvfp.S
  user/hrs/ipv6/contrib/compiler-rt/lib/arm/floatsisfvfp.S
  user/hrs/ipv6/contrib/compiler-rt/lib/arm/floatunssidfvfp.S
  user/hrs/ipv6/contrib/compiler-rt/lib/arm/floatunssisfvfp.S
  user/hrs/ipv6/contrib/compiler-rt/lib/arm/gedf2vfp.S
  user/hrs/ipv6/contrib/compiler-rt/lib/arm/gesf2vfp.S
  user/hrs/ipv6/contrib/compiler-rt/lib/arm/gtdf2vfp.S
  user/hrs/ipv6/contrib/compiler-rt/lib/arm/gtsf2vfp.S
  user/hrs/ipv6/contrib/compiler-rt/lib/arm/ledf2vfp.S
  user/hrs/ipv6/contrib/compiler-rt/lib/arm/lesf2vfp.S
  user/hrs/ipv6/contrib/compiler-rt/lib/arm/ltdf2vfp.S
  user/hrs/ipv6/contrib/compiler-rt/lib/arm/ltsf2vfp.S
  user/hrs/ipv6/contrib/compiler-rt/lib/arm/modsi3.S
  user/hrs/ipv6/contrib/compiler-rt/lib/arm/muldf3vfp.S
  user/hrs/ipv6/contrib/compiler-rt/lib/arm/mulsf3vfp.S
  user/hrs/ipv6/contrib/compiler-rt/lib/arm/nedf2vfp.S
  user/hrs/ipv6/contrib/compiler-rt/lib/arm/negdf2vfp.S
  user/hrs/ipv6/contrib/compiler-rt/lib/arm/negsf2vfp.S
  user/hrs/ipv6/contrib/compiler-rt/lib/arm/nesf2vfp.S
  user/hrs/ipv6/contrib/compiler-rt/lib/arm/restore_vfp_d8_d15_regs.S
  user/hrs/ipv6/contrib/compiler-rt/lib/arm/save_vfp_d8_d15_regs.S
  user/hrs/ipv6/contrib/compiler-rt/lib/arm/subdf3vfp.S
  user/hrs/ipv6/contrib/compiler-rt/lib/arm/subsf3vfp.S
  user/hrs/ipv6/contrib/compiler-rt/lib/arm/switch16.S
  user/hrs/ipv6/contrib/compiler-rt/lib/arm/switch32.S
  user/hrs/ipv6/contrib/compiler-rt/lib/arm/switch8.S
  user/hrs/ipv6/contrib/compiler-rt/lib/arm/switchu8.S
  user/hrs/ipv6/contrib/compiler-rt/lib/arm/sync_synchronize.S
  user/hrs/ipv6/contrib/compiler-rt/lib/arm/truncdfsf2vfp.S
  user/hrs/ipv6/contrib/compiler-rt/lib/arm/unorddf2vfp.S
  user/hrs/ipv6/contrib/compiler-rt/lib/arm/unordsf2vfp.S
  user/hrs/ipv6/contrib/compiler-rt/lib/ashldi3.c
  user/hrs/ipv6/contrib/compiler-rt/lib/ashlti3.c
  user/hrs/ipv6/contrib/compiler-rt/lib/ashrdi3.c
  user/hrs/ipv6/contrib/compiler-rt/lib/ashrti3.c
  user/hrs/ipv6/contrib/compiler-rt/lib/assembly.h
  user/hrs/ipv6/contrib/compiler-rt/lib/clear_cache.c
  user/hrs/ipv6/contrib/compiler-rt/lib/clzdi2.c
  user/hrs/ipv6/contrib/compiler-rt/lib/clzsi2.c
  user/hrs/ipv6/contrib/compiler-rt/lib/clzti2.c
  user/hrs/ipv6/contrib/compiler-rt/lib/cmpdi2.c
  user/hrs/ipv6/contrib/compiler-rt/lib/cmpti2.c
  user/hrs/ipv6/contrib/compiler-rt/lib/comparedf2.c
  user/hrs/ipv6/contrib/compiler-rt/lib/comparesf2.c
  user/hrs/ipv6/contrib/compiler-rt/lib/ctzdi2.c
  user/hrs/ipv6/contrib/compiler-rt/lib/ctzsi2.c
  user/hrs/ipv6/contrib/compiler-rt/lib/ctzti2.c
  user/hrs/ipv6/contrib/compiler-rt/lib/divdc3.c
  user/hrs/ipv6/contrib/compiler-rt/lib/divdf3.c
  user/hrs/ipv6/contrib/compiler-rt/lib/divdi3.c
  user/hrs/ipv6/contrib/compiler-rt/lib/divsc3.c
  user/hrs/ipv6/contrib/compiler-rt/lib/divsf3.c
  user/hrs/ipv6/contrib/compiler-rt/lib/divsi3.c
  user/hrs/ipv6/contrib/compiler-rt/lib/divti3.c
  user/hrs/ipv6/contrib/compiler-rt/lib/divxc3.c
  user/hrs/ipv6/contrib/compiler-rt/lib/enable_execute_stack.c
  user/hrs/ipv6/contrib/compiler-rt/lib/endianness.h
  user/hrs/ipv6/contrib/compiler-rt/lib/eprintf.c
  user/hrs/ipv6/contrib/compiler-rt/lib/extendsfdf2.c
  user/hrs/ipv6/contrib/compiler-rt/lib/ffsdi2.c
  user/hrs/ipv6/contrib/compiler-rt/lib/ffsti2.c
  user/hrs/ipv6/contrib/compiler-rt/lib/fixdfdi.c
  user/hrs/ipv6/contrib/compiler-rt/lib/fixdfsi.c
  user/hrs/ipv6/contrib/compiler-rt/lib/fixdfti.c
  user/hrs/ipv6/contrib/compiler-rt/lib/fixsfdi.c
  user/hrs/ipv6/contrib/compiler-rt/lib/fixsfsi.c
  user/hrs/ipv6/contrib/compiler-rt/lib/fixsfti.c
  user/hrs/ipv6/contrib/compiler-rt/lib/fixunsdfdi.c
  user/hrs/ipv6/contrib/compiler-rt/lib/fixunsdfsi.c
  user/hrs/ipv6/contrib/compiler-rt/lib/fixunsdfti.c
  user/hrs/ipv6/contrib/compiler-rt/lib/fixunssfdi.c
  user/hrs/ipv6/contrib/compiler-rt/lib/fixunssfsi.c
  user/hrs/ipv6/contrib/compiler-rt/lib/fixunssfti.c
  user/hrs/ipv6/contrib/compiler-rt/lib/fixunsxfdi.c
  user/hrs/ipv6/contrib/compiler-rt/lib/fixunsxfsi.c
  user/hrs/ipv6/contrib/compiler-rt/lib/fixunsxfti.c
  user/hrs/ipv6/contrib/compiler-rt/lib/fixxfdi.c
  user/hrs/ipv6/contrib/compiler-rt/lib/fixxfti.c
  user/hrs/ipv6/contrib/compiler-rt/lib/floatdidf.c
  user/hrs/ipv6/contrib/compiler-rt/lib/floatdisf.c
  user/hrs/ipv6/contrib/compiler-rt/lib/floatdixf.c
  user/hrs/ipv6/contrib/compiler-rt/lib/floatsidf.c
  user/hrs/ipv6/contrib/compiler-rt/lib/floatsisf.c
  user/hrs/ipv6/contrib/compiler-rt/lib/floattidf.c
  user/hrs/ipv6/contrib/compiler-rt/lib/floattisf.c
  user/hrs/ipv6/contrib/compiler-rt/lib/floattixf.c
  user/hrs/ipv6/contrib/compiler-rt/lib/floatundidf.c
  user/hrs/ipv6/contrib/compiler-rt/lib/floatundisf.c
  user/hrs/ipv6/contrib/compiler-rt/lib/floatundixf.c
  user/hrs/ipv6/contrib/compiler-rt/lib/floatunsidf.c
  user/hrs/ipv6/contrib/compiler-rt/lib/floatunsisf.c
  user/hrs/ipv6/contrib/compiler-rt/lib/floatuntidf.c
  user/hrs/ipv6/contrib/compiler-rt/lib/floatuntisf.c
  user/hrs/ipv6/contrib/compiler-rt/lib/floatuntixf.c
  user/hrs/ipv6/contrib/compiler-rt/lib/fp_lib.h
  user/hrs/ipv6/contrib/compiler-rt/lib/gcc_personality_v0.c
  user/hrs/ipv6/contrib/compiler-rt/lib/i386/ashldi3.S
  user/hrs/ipv6/contrib/compiler-rt/lib/i386/ashrdi3.S
  user/hrs/ipv6/contrib/compiler-rt/lib/i386/divdi3.S
  user/hrs/ipv6/contrib/compiler-rt/lib/i386/floatdidf.S
  user/hrs/ipv6/contrib/compiler-rt/lib/i386/floatdisf.S
  user/hrs/ipv6/contrib/compiler-rt/lib/i386/floatdixf.S
  user/hrs/ipv6/contrib/compiler-rt/lib/i386/floatundidf.S
  user/hrs/ipv6/contrib/compiler-rt/lib/i386/floatundisf.S
  user/hrs/ipv6/contrib/compiler-rt/lib/i386/floatundixf.S
  user/hrs/ipv6/contrib/compiler-rt/lib/i386/lshrdi3.S
  user/hrs/ipv6/contrib/compiler-rt/lib/i386/moddi3.S
  user/hrs/ipv6/contrib/compiler-rt/lib/i386/muldi3.S
  user/hrs/ipv6/contrib/compiler-rt/lib/i386/udivdi3.S
  user/hrs/ipv6/contrib/compiler-rt/lib/i386/umoddi3.S
  user/hrs/ipv6/contrib/compiler-rt/lib/int_lib.h
  user/hrs/ipv6/contrib/compiler-rt/lib/lshrdi3.c
  user/hrs/ipv6/contrib/compiler-rt/lib/lshrti3.c
  user/hrs/ipv6/contrib/compiler-rt/lib/moddi3.c
  user/hrs/ipv6/contrib/compiler-rt/lib/modsi3.c
  user/hrs/ipv6/contrib/compiler-rt/lib/modti3.c
  user/hrs/ipv6/contrib/compiler-rt/lib/muldc3.c
  user/hrs/ipv6/contrib/compiler-rt/lib/muldf3.c
  user/hrs/ipv6/contrib/compiler-rt/lib/muldi3.c
  user/hrs/ipv6/contrib/compiler-rt/lib/mulsc3.c
  user/hrs/ipv6/contrib/compiler-rt/lib/mulsf3.c
  user/hrs/ipv6/contrib/compiler-rt/lib/multi3.c
  user/hrs/ipv6/contrib/compiler-rt/lib/mulvdi3.c
  user/hrs/ipv6/contrib/compiler-rt/lib/mulvsi3.c
  user/hrs/ipv6/contrib/compiler-rt/lib/mulvti3.c
  user/hrs/ipv6/contrib/compiler-rt/lib/mulxc3.c
  user/hrs/ipv6/contrib/compiler-rt/lib/negdf2.c
  user/hrs/ipv6/contrib/compiler-rt/lib/negdi2.c
  user/hrs/ipv6/contrib/compiler-rt/lib/negsf2.c
  user/hrs/ipv6/contrib/compiler-rt/lib/negti2.c
  user/hrs/ipv6/contrib/compiler-rt/lib/negvdi2.c
  user/hrs/ipv6/contrib/compiler-rt/lib/negvsi2.c
  user/hrs/ipv6/contrib/compiler-rt/lib/negvti2.c
  user/hrs/ipv6/contrib/compiler-rt/lib/paritydi2.c
  user/hrs/ipv6/contrib/compiler-rt/lib/paritysi2.c
  user/hrs/ipv6/contrib/compiler-rt/lib/parityti2.c
  user/hrs/ipv6/contrib/compiler-rt/lib/popcountdi2.c
  user/hrs/ipv6/contrib/compiler-rt/lib/popcountsi2.c
  user/hrs/ipv6/contrib/compiler-rt/lib/popcountti2.c
  user/hrs/ipv6/contrib/compiler-rt/lib/powidf2.c
  user/hrs/ipv6/contrib/compiler-rt/lib/powisf2.c
  user/hrs/ipv6/contrib/compiler-rt/lib/powitf2.c
  user/hrs/ipv6/contrib/compiler-rt/lib/powixf2.c
  user/hrs/ipv6/contrib/compiler-rt/lib/ppc/restFP.S
  user/hrs/ipv6/contrib/compiler-rt/lib/ppc/saveFP.S
  user/hrs/ipv6/contrib/compiler-rt/lib/subvdi3.c
  user/hrs/ipv6/contrib/compiler-rt/lib/subvsi3.c
  user/hrs/ipv6/contrib/compiler-rt/lib/subvti3.c
  user/hrs/ipv6/contrib/compiler-rt/lib/trampoline_setup.c
  user/hrs/ipv6/contrib/compiler-rt/lib/truncdfsf2.c
  user/hrs/ipv6/contrib/compiler-rt/lib/ucmpdi2.c
  user/hrs/ipv6/contrib/compiler-rt/lib/ucmpti2.c
  user/hrs/ipv6/contrib/compiler-rt/lib/udivdi3.c
  user/hrs/ipv6/contrib/compiler-rt/lib/udivmoddi4.c
  user/hrs/ipv6/contrib/compiler-rt/lib/udivmodti4.c
  user/hrs/ipv6/contrib/compiler-rt/lib/udivsi3.c
  user/hrs/ipv6/contrib/compiler-rt/lib/udivti3.c
  user/hrs/ipv6/contrib/compiler-rt/lib/umoddi3.c
  user/hrs/ipv6/contrib/compiler-rt/lib/umodsi3.c
  user/hrs/ipv6/contrib/compiler-rt/lib/umodti3.c
  user/hrs/ipv6/contrib/compiler-rt/lib/x86_64/floatundidf.S
  user/hrs/ipv6/contrib/compiler-rt/lib/x86_64/floatundisf.S
  user/hrs/ipv6/contrib/compiler-rt/lib/x86_64/floatundixf.S
  user/hrs/ipv6/contrib/groff/tmac/troffrc
  user/hrs/ipv6/contrib/libpcap/pcap-bpf.c
  user/hrs/ipv6/contrib/ntp/ntpd/ntp_io.c
  user/hrs/ipv6/contrib/top/commands.c
  user/hrs/ipv6/contrib/top/machine.h
  user/hrs/ipv6/contrib/top/top.X
  user/hrs/ipv6/contrib/top/top.c
  user/hrs/ipv6/etc/defaults/rc.conf
  user/hrs/ipv6/etc/network.subr
  user/hrs/ipv6/lib/libc/gen/posix_spawn.c
  user/hrs/ipv6/lib/libc/iconv/iconvctl.3
  user/hrs/ipv6/lib/libcompiler_rt/Makefile
  user/hrs/ipv6/lib/msun/ld128/e_rem_pio2l.h
  user/hrs/ipv6/lib/msun/ld80/e_rem_pio2l.h
  user/hrs/ipv6/lib/msun/src/s_cosl.c
  user/hrs/ipv6/lib/msun/src/s_sinl.c
  user/hrs/ipv6/lib/msun/src/s_tanl.c
  user/hrs/ipv6/sbin/geom/class/part/geom_part.c
  user/hrs/ipv6/sbin/geom/class/part/gpart.8
  user/hrs/ipv6/sbin/hastd/primary.c
  user/hrs/ipv6/sbin/hastd/proto_common.c
  user/hrs/ipv6/sbin/ifconfig/Makefile
  user/hrs/ipv6/sbin/ifconfig/af_inet.c
  user/hrs/ipv6/sbin/ifconfig/af_inet6.c
  user/hrs/ipv6/sbin/ifconfig/ifconfig.8
  user/hrs/ipv6/sbin/ifconfig/ifconfig.c
  user/hrs/ipv6/sbin/ipfw/ipfw.8
  user/hrs/ipv6/sbin/ipfw/ipfw2.c
  user/hrs/ipv6/sbin/setkey/setkey.8
  user/hrs/ipv6/sbin/umount/umount.8
  user/hrs/ipv6/sbin/umount/umount.c
  user/hrs/ipv6/share/man/man4/Makefile
  user/hrs/ipv6/share/man/man4/ath.4
  user/hrs/ipv6/share/man/man4/ath_hal.4
  user/hrs/ipv6/share/man/man4/bwn.4
  user/hrs/ipv6/share/man/man4/em.4
  user/hrs/ipv6/share/man/man4/igb.4
  user/hrs/ipv6/share/man/man4/mps.4
  user/hrs/ipv6/share/man/man4/stf.4
  user/hrs/ipv6/share/man/man4/ucom.4
  user/hrs/ipv6/share/man/man4/uep.4
  user/hrs/ipv6/share/man/man4/vge.4
  user/hrs/ipv6/share/man/man7/c99.7
  user/hrs/ipv6/share/man/man7/ports.7
  user/hrs/ipv6/share/man/man7/release.7
  user/hrs/ipv6/share/man/man9/bus_adjust_resource.9
  user/hrs/ipv6/share/misc/mdoc.template
  user/hrs/ipv6/share/mk/bsd.doc.mk
  user/hrs/ipv6/sys/boot/forth/check-password.4th.8
  user/hrs/ipv6/sys/boot/ia64/common/Makefile
  user/hrs/ipv6/sys/boot/powerpc/ofw/Makefile
  user/hrs/ipv6/sys/boot/powerpc/ps3/Makefile
  user/hrs/ipv6/sys/boot/sparc64/loader/Makefile
  user/hrs/ipv6/sys/cam/ata/ata_da.c
  user/hrs/ipv6/sys/cddl/compat/opensolaris/kern/opensolaris.c
  user/hrs/ipv6/sys/cddl/compat/opensolaris/kern/opensolaris_vfs.c
  user/hrs/ipv6/sys/cddl/compat/opensolaris/sys/time.h
  user/hrs/ipv6/sys/conf/files
  user/hrs/ipv6/sys/conf/files.powerpc
  user/hrs/ipv6/sys/contrib/dev/acpica/changes.txt
  user/hrs/ipv6/sys/contrib/dev/acpica/debugger/dbexec.c
  user/hrs/ipv6/sys/contrib/dev/acpica/debugger/dbinput.c
  user/hrs/ipv6/sys/contrib/dev/acpica/debugger/dbutils.c
  user/hrs/ipv6/sys/contrib/dev/acpica/debugger/dbxface.c
  user/hrs/ipv6/sys/contrib/dev/acpica/include/acconfig.h
  user/hrs/ipv6/sys/contrib/dev/acpica/include/acdebug.h
  user/hrs/ipv6/sys/contrib/dev/acpica/include/acglobal.h
  user/hrs/ipv6/sys/contrib/dev/acpica/include/aclocal.h
  user/hrs/ipv6/sys/contrib/dev/acpica/include/acpiosxf.h
  user/hrs/ipv6/sys/contrib/dev/acpica/include/acpixf.h
  user/hrs/ipv6/sys/contrib/dev/acpica/include/acpredef.h
  user/hrs/ipv6/sys/contrib/dev/acpica/osunixxf.c
  user/hrs/ipv6/sys/contrib/dev/acpica/tables/tbinstal.c
  user/hrs/ipv6/sys/contrib/pf/net/pf.c
  user/hrs/ipv6/sys/contrib/pf/net/pf_ioctl.c
  user/hrs/ipv6/sys/contrib/pf/net/pf_norm.c
  user/hrs/ipv6/sys/dev/acpica/Osd/OsdDebug.c
  user/hrs/ipv6/sys/dev/ath/ath_hal/ah.c
  user/hrs/ipv6/sys/dev/ath/ath_hal/ah.h
  user/hrs/ipv6/sys/dev/ath/ath_hal/ah_desc.h
  user/hrs/ipv6/sys/dev/ath/ath_hal/ah_internal.h
  user/hrs/ipv6/sys/dev/ath/ath_hal/ar5212/ar5212.h
  user/hrs/ipv6/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c
  user/hrs/ipv6/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c
  user/hrs/ipv6/sys/dev/ath/ath_hal/ar5212/ar5212reg.h
  user/hrs/ipv6/sys/dev/ath/ath_hal/ar5416/ar5416.h
  user/hrs/ipv6/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c
  user/hrs/ipv6/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c
  user/hrs/ipv6/sys/dev/ath/ath_hal/ar5416/ar5416phy.h
  user/hrs/ipv6/sys/dev/ath/ath_hal/ar9001/ar9130_attach.c
  user/hrs/ipv6/sys/dev/ath/ath_hal/ar9001/ar9160_attach.c
  user/hrs/ipv6/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c
  user/hrs/ipv6/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c
  user/hrs/ipv6/sys/dev/ath/ath_hal/ar9002/ar9287_attach.c
  user/hrs/ipv6/sys/dev/ath/if_ath.c
  user/hrs/ipv6/sys/dev/ath/if_ath_tx_ht.c
  user/hrs/ipv6/sys/dev/ath/if_athvar.h
  user/hrs/ipv6/sys/dev/cxgbe/adapter.h
  user/hrs/ipv6/sys/dev/cxgbe/common/common.h
  user/hrs/ipv6/sys/dev/cxgbe/common/t4fw_interface.h
  user/hrs/ipv6/sys/dev/cxgbe/offload.h
  user/hrs/ipv6/sys/dev/cxgbe/osdep.h
  user/hrs/ipv6/sys/dev/cxgbe/t4_ioctl.h
  user/hrs/ipv6/sys/dev/cxgbe/t4_main.c
  user/hrs/ipv6/sys/dev/cxgbe/t4_sge.c
  user/hrs/ipv6/sys/dev/iicbus/ds1775.c
  user/hrs/ipv6/sys/dev/iicbus/max6690.c
  user/hrs/ipv6/sys/dev/ipw/if_ipw.c
  user/hrs/ipv6/sys/dev/iwi/if_iwi.c
  user/hrs/ipv6/sys/dev/iwn/if_iwn.c
  user/hrs/ipv6/sys/dev/ixgbe/LICENSE
  user/hrs/ipv6/sys/dev/ixgbe/README
  user/hrs/ipv6/sys/dev/ixgbe/ixgbe.c
  user/hrs/ipv6/sys/dev/ixgbe/ixv.c
  user/hrs/ipv6/sys/dev/mfi/mfi.c
  user/hrs/ipv6/sys/dev/mfi/mfireg.h
  user/hrs/ipv6/sys/dev/mmc/mmc.c
  user/hrs/ipv6/sys/dev/mmc/mmcvar.h
  user/hrs/ipv6/sys/dev/msk/if_msk.c
  user/hrs/ipv6/sys/dev/nfe/if_nfe.c
  user/hrs/ipv6/sys/dev/puc/pucdata.c
  user/hrs/ipv6/sys/dev/sdhci/sdhci.c
  user/hrs/ipv6/sys/dev/usb/net/if_axe.c
  user/hrs/ipv6/sys/dev/usb/usb_process.c
  user/hrs/ipv6/sys/dev/usb/usbdevs
  user/hrs/ipv6/sys/dev/wpi/if_wpi.c
  user/hrs/ipv6/sys/fs/nfsclient/nfs_clbio.c
  user/hrs/ipv6/sys/fs/nfsclient/nfs_clvnops.c
  user/hrs/ipv6/sys/fs/nfsserver/nfs_nfsdport.c
  user/hrs/ipv6/sys/fs/nwfs/nwfs_io.c
  user/hrs/ipv6/sys/fs/smbfs/smbfs_io.c
  user/hrs/ipv6/sys/geom/geom_disk.c
  user/hrs/ipv6/sys/geom/geom_dump.c
  user/hrs/ipv6/sys/geom/part/g_part.c
  user/hrs/ipv6/sys/i386/pci/pci_cfgreg.c
  user/hrs/ipv6/sys/ia64/ia64/machdep.c
  user/hrs/ipv6/sys/ia64/ia64/mp_machdep.c
  user/hrs/ipv6/sys/ia64/ia64/pmap.c
  user/hrs/ipv6/sys/kern/kern_idle.c
  user/hrs/ipv6/sys/kern/sched_4bsd.c
  user/hrs/ipv6/sys/kern/subr_kdb.c
  user/hrs/ipv6/sys/kern/subr_msgbuf.c
  user/hrs/ipv6/sys/kern/subr_pcpu.c
  user/hrs/ipv6/sys/kern/subr_prf.c
  user/hrs/ipv6/sys/kern/uipc_socket.c
  user/hrs/ipv6/sys/mips/cavium/octeon_ebt3000_cf.c
  user/hrs/ipv6/sys/mips/mips/mp_machdep.c
  user/hrs/ipv6/sys/modules/ath/Makefile
  user/hrs/ipv6/sys/modules/cxgbe/if_cxgbe/Makefile
  user/hrs/ipv6/sys/modules/usb/Makefile
  user/hrs/ipv6/sys/net/if_ethersubr.c
  user/hrs/ipv6/sys/net/if_stf.c
  user/hrs/ipv6/sys/net/if_tun.c
  user/hrs/ipv6/sys/net/netisr.c
  user/hrs/ipv6/sys/net80211/ieee80211_ht.c
  user/hrs/ipv6/sys/net80211/ieee80211_output.c
  user/hrs/ipv6/sys/netinet/in_pcb.c
  user/hrs/ipv6/sys/netinet/in_pcb.h
  user/hrs/ipv6/sys/netinet/ip_divert.c
  user/hrs/ipv6/sys/netinet/ipfw/ip_dummynet.c
  user/hrs/ipv6/sys/netinet/ipfw/ip_fw2.c
  user/hrs/ipv6/sys/netinet/ipfw/ip_fw_dynamic.c
  user/hrs/ipv6/sys/netinet/ipfw/ip_fw_sockopt.c
  user/hrs/ipv6/sys/netinet/raw_ip.c
  user/hrs/ipv6/sys/netinet/sctp_indata.c
  user/hrs/ipv6/sys/netinet/sctp_indata.h
  user/hrs/ipv6/sys/netinet/sctputil.c
  user/hrs/ipv6/sys/netinet/sctputil.h
  user/hrs/ipv6/sys/netinet/siftr.c
  user/hrs/ipv6/sys/netinet/tcp_input.c
  user/hrs/ipv6/sys/netinet/tcp_subr.c
  user/hrs/ipv6/sys/netinet/tcp_syncache.c
  user/hrs/ipv6/sys/netinet/tcp_timer.c
  user/hrs/ipv6/sys/netinet/tcp_usrreq.c
  user/hrs/ipv6/sys/netinet/udp_usrreq.c
  user/hrs/ipv6/sys/netinet6/in6_pcb.c
  user/hrs/ipv6/sys/netinet6/in6_pcb.h
  user/hrs/ipv6/sys/netinet6/in6_src.c
  user/hrs/ipv6/sys/netinet6/udp6_usrreq.c
  user/hrs/ipv6/sys/nfsclient/nfs_bio.c
  user/hrs/ipv6/sys/nfsclient/nfs_vfsops.c
  user/hrs/ipv6/sys/powerpc/aim/interrupt.c
  user/hrs/ipv6/sys/powerpc/aim/locore32.S
  user/hrs/ipv6/sys/powerpc/aim/locore64.S
  user/hrs/ipv6/sys/powerpc/aim/machdep.c
  user/hrs/ipv6/sys/powerpc/aim/mmu_oea.c
  user/hrs/ipv6/sys/powerpc/aim/mmu_oea64.c
  user/hrs/ipv6/sys/powerpc/aim/moea64_native.c
  user/hrs/ipv6/sys/powerpc/aim/mp_cpudep.c
  user/hrs/ipv6/sys/powerpc/aim/slb.c
  user/hrs/ipv6/sys/powerpc/aim/trap_subr64.S
  user/hrs/ipv6/sys/powerpc/booke/pmap.c
  user/hrs/ipv6/sys/powerpc/conf/GENERIC
  user/hrs/ipv6/sys/powerpc/conf/GENERIC64
  user/hrs/ipv6/sys/powerpc/conf/NOTES
  user/hrs/ipv6/sys/powerpc/include/slb.h
  user/hrs/ipv6/sys/powerpc/ofw/ofw_machdep.c
  user/hrs/ipv6/sys/powerpc/ofw/ofw_real.c
  user/hrs/ipv6/sys/powerpc/powermac/fcu.c
  user/hrs/ipv6/sys/powerpc/powermac/powermac_thermal.c
  user/hrs/ipv6/sys/powerpc/powermac/powermac_thermal.h
  user/hrs/ipv6/sys/powerpc/powermac/smu.c
  user/hrs/ipv6/sys/powerpc/powermac/smusat.c
  user/hrs/ipv6/sys/powerpc/powerpc/mp_machdep.c
  user/hrs/ipv6/sys/sparc64/sparc64/mp_machdep.c
  user/hrs/ipv6/sys/sparc64/sparc64/pmap.c
  user/hrs/ipv6/sys/sys/mbuf.h
  user/hrs/ipv6/sys/sys/msgbuf.h
  user/hrs/ipv6/sys/sys/pcpu.h
  user/hrs/ipv6/sys/teken/libteken/teken.3
  user/hrs/ipv6/sys/vm/vm_object.c
  user/hrs/ipv6/sys/vm/vnode_pager.c
  user/hrs/ipv6/sys/vm/vnode_pager.h
  user/hrs/ipv6/tools/regression/bin/sh/builtins/alias.1.stderr
  user/hrs/ipv6/tools/regression/netinet/tcpconnect/tcpconnect.c
  user/hrs/ipv6/tools/regression/netinet/tcpdrop/tcpdrop.c
  user/hrs/ipv6/tools/regression/netinet/tcpfullwindowrst/tcpfullwindowrsttest.c
  user/hrs/ipv6/tools/regression/netinet/tcpsocktimewait/tcpsocktimewait.c
  user/hrs/ipv6/tools/regression/netinet/udpconnectjail/udpconnectjail.c
  user/hrs/ipv6/tools/tools/nanobsd/nanobsd.sh
  user/hrs/ipv6/usr.bin/find/main.c
  user/hrs/ipv6/usr.bin/fstat/fuser.1
  user/hrs/ipv6/usr.bin/man/man.1
  user/hrs/ipv6/usr.bin/man/man.conf.5
  user/hrs/ipv6/usr.bin/man/man.sh
  user/hrs/ipv6/usr.bin/rctl/rctl.8
  user/hrs/ipv6/usr.bin/tftp/main.c
  user/hrs/ipv6/usr.bin/top/machine.c
  user/hrs/ipv6/usr.bin/top/top.local.1
  user/hrs/ipv6/usr.sbin/bsdinstall/scripts/Makefile
  user/hrs/ipv6/usr.sbin/bsdinstall/scripts/auto
  user/hrs/ipv6/usr.sbin/bsdinstall/scripts/netconfig
  user/hrs/ipv6/usr.sbin/jail/Makefile
  user/hrs/ipv6/usr.sbin/jail/jail.c
  user/hrs/ipv6/usr.sbin/jls/Makefile
  user/hrs/ipv6/usr.sbin/jls/jls.c
  user/hrs/ipv6/usr.sbin/kbdmap/kbdmap.c
  user/hrs/ipv6/usr.sbin/mfiutil/mfi_evt.c
  user/hrs/ipv6/usr.sbin/mountd/mountd.c
  user/hrs/ipv6/usr.sbin/pc-sysinstall/backend-query/enable-net.sh
  user/hrs/ipv6/usr.sbin/pc-sysinstall/backend-query/test-netup.sh
  user/hrs/ipv6/usr.sbin/pc-sysinstall/backend/functions-networking.sh
  user/hrs/ipv6/usr.sbin/rpc.lockd/lockd.c
  user/hrs/ipv6/usr.sbin/rpc.statd/statd.c
  user/hrs/ipv6/usr.sbin/rtsold/rtsol.c
  user/hrs/ipv6/usr.sbin/usbdump/usbdump.8
Directory Properties:
  user/hrs/ipv6/   (props changed)
  user/hrs/ipv6/cddl/contrib/opensolaris/   (props changed)
  user/hrs/ipv6/contrib/bind9/   (props changed)
  user/hrs/ipv6/contrib/binutils/   (props changed)
  user/hrs/ipv6/contrib/bzip2/   (props changed)
  user/hrs/ipv6/contrib/compiler-rt/   (props changed)
  user/hrs/ipv6/contrib/dialog/   (props changed)
  user/hrs/ipv6/contrib/ee/   (props changed)
  user/hrs/ipv6/contrib/expat/   (props changed)
  user/hrs/ipv6/contrib/file/   (props changed)
  user/hrs/ipv6/contrib/gcc/   (props changed)
  user/hrs/ipv6/contrib/gdb/   (props changed)
  user/hrs/ipv6/contrib/gdtoa/   (props changed)
  user/hrs/ipv6/contrib/gnu-sort/   (props changed)
  user/hrs/ipv6/contrib/groff/   (props changed)
  user/hrs/ipv6/contrib/less/   (props changed)
  user/hrs/ipv6/contrib/libpcap/   (props changed)
  user/hrs/ipv6/contrib/libstdc++/   (props changed)
  user/hrs/ipv6/contrib/llvm/   (props changed)
  user/hrs/ipv6/contrib/llvm/tools/clang/   (props changed)
  user/hrs/ipv6/contrib/ncurses/   (props changed)
  user/hrs/ipv6/contrib/netcat/   (props changed)
  user/hrs/ipv6/contrib/ntp/   (props changed)
  user/hrs/ipv6/contrib/one-true-awk/   (props changed)
  user/hrs/ipv6/contrib/openbsm/   (props changed)
  user/hrs/ipv6/contrib/openpam/   (props changed)
  user/hrs/ipv6/contrib/pf/   (props changed)
  user/hrs/ipv6/contrib/sendmail/   (props changed)
  user/hrs/ipv6/contrib/tcpdump/   (props changed)
  user/hrs/ipv6/contrib/tcsh/   (props changed)
  user/hrs/ipv6/contrib/top/   (props changed)
  user/hrs/ipv6/contrib/top/install-sh   (props changed)
  user/hrs/ipv6/contrib/tzcode/stdtime/   (props changed)
  user/hrs/ipv6/contrib/tzcode/zic/   (props changed)
  user/hrs/ipv6/contrib/tzdata/   (props changed)
  user/hrs/ipv6/contrib/wpa/   (props changed)
  user/hrs/ipv6/contrib/xz/   (props changed)
  user/hrs/ipv6/crypto/openssh/   (props changed)
  user/hrs/ipv6/crypto/openssl/   (props changed)
  user/hrs/ipv6/gnu/lib/   (props changed)
  user/hrs/ipv6/gnu/usr.bin/binutils/   (props changed)
  user/hrs/ipv6/gnu/usr.bin/cc/cc_tools/   (props changed)
  user/hrs/ipv6/gnu/usr.bin/gdb/   (props changed)
  user/hrs/ipv6/lib/libc/   (props changed)
  user/hrs/ipv6/lib/libc/stdtime/   (props changed)
  user/hrs/ipv6/lib/libutil/   (props changed)
  user/hrs/ipv6/lib/libz/   (props changed)
  user/hrs/ipv6/sbin/   (props changed)
  user/hrs/ipv6/sbin/ipfw/   (props changed)
  user/hrs/ipv6/share/mk/bsd.arch.inc.mk   (props changed)
  user/hrs/ipv6/share/zoneinfo/   (props changed)
  user/hrs/ipv6/sys/   (props changed)
  user/hrs/ipv6/sys/amd64/include/xen/   (props changed)
  user/hrs/ipv6/sys/boot/   (props changed)
  user/hrs/ipv6/sys/boot/i386/efi/   (props changed)
  user/hrs/ipv6/sys/boot/ia64/efi/   (props changed)
  user/hrs/ipv6/sys/boot/ia64/ski/   (props changed)
  user/hrs/ipv6/sys/boot/powerpc/boot1.chrp/   (props changed)
  user/hrs/ipv6/sys/boot/powerpc/ofw/   (props changed)
  user/hrs/ipv6/sys/cddl/contrib/opensolaris/   (props changed)
  user/hrs/ipv6/sys/conf/   (props changed)
  user/hrs/ipv6/sys/contrib/dev/acpica/   (props changed)
  user/hrs/ipv6/sys/contrib/octeon-sdk/   (props changed)
  user/hrs/ipv6/sys/contrib/pf/   (props changed)
  user/hrs/ipv6/sys/contrib/x86emu/   (props changed)
  user/hrs/ipv6/usr.bin/calendar/   (props changed)
  user/hrs/ipv6/usr.bin/csup/   (props changed)
  user/hrs/ipv6/usr.bin/procstat/   (props changed)
  user/hrs/ipv6/usr.sbin/ndiscvt/   (props changed)
  user/hrs/ipv6/usr.sbin/zic/   (props changed)

Modified: user/hrs/ipv6/bin/sh/alias.c
==============================================================================
--- user/hrs/ipv6/bin/sh/alias.c	Sun Jun  5 12:07:04 2011	(r222713)
+++ user/hrs/ipv6/bin/sh/alias.c	Sun Jun  5 12:27:34 2011	(r222714)
@@ -238,7 +238,7 @@ aliascmd(int argc, char **argv)
 	while ((n = *++argv) != NULL) {
 		if ((v = strchr(n+1, '=')) == NULL) /* n+1: funny ksh stuff */
 			if ((ap = lookupalias(n, 0)) == NULL) {
-				warning("%s not found", n);
+				warning("%s: not found", n);
 				ret = 1;
 			} else
 				printalias(ap);

Modified: user/hrs/ipv6/bin/sh/eval.c
==============================================================================
--- user/hrs/ipv6/bin/sh/eval.c	Sun Jun  5 12:07:04 2011	(r222713)
+++ user/hrs/ipv6/bin/sh/eval.c	Sun Jun  5 12:27:34 2011	(r222714)
@@ -165,7 +165,7 @@ evalstring(char *s, int flags)
 	setstackmark(&smark);
 	setinputstring(s, 1);
 	while ((n = parsecmd(0)) != NEOF) {
-		if (n != NULL) {
+		if (n != NULL && !nflag) {
 			if (flags_exit && preadateof())
 				evaltree(n, flags | EV_EXIT);
 			else

Modified: user/hrs/ipv6/bin/sh/input.c
==============================================================================
--- user/hrs/ipv6/bin/sh/input.c	Sun Jun  5 12:07:04 2011	(r222713)
+++ user/hrs/ipv6/bin/sh/input.c	Sun Jun  5 12:27:34 2011	(r222714)
@@ -403,7 +403,7 @@ setinputfile(const char *fname, int push
 
 	INTOFF;
 	if ((fd = open(fname, O_RDONLY)) < 0)
-		error("Can't open %s: %s", fname, strerror(errno));
+		error("cannot open %s: %s", fname, strerror(errno));
 	if (fd < 10) {
 		fd2 = fcntl(fd, F_DUPFD, 10);
 		close(fd);

Modified: user/hrs/ipv6/bin/sh/jobs.c
==============================================================================
--- user/hrs/ipv6/bin/sh/jobs.c	Sun Jun  5 12:07:04 2011	(r222713)
+++ user/hrs/ipv6/bin/sh/jobs.c	Sun Jun  5 12:27:34 2011	(r222714)
@@ -820,7 +820,7 @@ forkshell(struct job *jp, union node *n,
 			    ! fd0_redirected_p ()) {
 				close(0);
 				if (open(_PATH_DEVNULL, O_RDONLY) != 0)
-					error("Can't open %s: %s",
+					error("cannot open %s: %s",
 					    _PATH_DEVNULL, strerror(errno));
 			}
 		}
@@ -832,7 +832,7 @@ forkshell(struct job *jp, union node *n,
 			    ! fd0_redirected_p ()) {
 				close(0);
 				if (open(_PATH_DEVNULL, O_RDONLY) != 0)
-					error("Can't open %s: %s",
+					error("cannot open %s: %s",
 					    _PATH_DEVNULL, strerror(errno));
 			}
 		}

Modified: user/hrs/ipv6/bin/sh/main.c
==============================================================================
--- user/hrs/ipv6/bin/sh/main.c	Sun Jun  5 12:07:04 2011	(r222713)
+++ user/hrs/ipv6/bin/sh/main.c	Sun Jun  5 12:27:34 2011	(r222714)
@@ -264,7 +264,7 @@ readcmdfile(const char *name)
 	if ((fd = open(name, O_RDONLY)) >= 0)
 		setinputfd(fd, 1);
 	else
-		error("Can't open %s: %s", name, strerror(errno));
+		error("cannot open %s: %s", name, strerror(errno));
 	INTON;
 	cmdloop(0);
 	popfile();

Modified: user/hrs/ipv6/bin/sh/options.c
==============================================================================
--- user/hrs/ipv6/bin/sh/options.c	Sun Jun  5 12:07:04 2011	(r222713)
+++ user/hrs/ipv6/bin/sh/options.c	Sun Jun  5 12:27:34 2011	(r222714)
@@ -83,6 +83,7 @@ void
 procargs(int argc, char **argv)
 {
 	int i;
+	char *scriptname;
 
 	argptr = argv;
 	if (argc > 0)
@@ -105,8 +106,9 @@ procargs(int argc, char **argv)
 			optlist[i].val = 0;
 	arg0 = argv[0];
 	if (sflag == 0 && minusc == NULL) {
-		commandname = arg0 = *argptr++;
-		setinputfile(commandname, 0);
+		scriptname = *argptr++;
+		setinputfile(scriptname, 0);
+		commandname = arg0 = scriptname;
 	}
 	/* POSIX 1003.2: first arg after -c cmd is $0, remainder $1... */
 	if (argptr && minusc && *argptr)

Modified: user/hrs/ipv6/contrib/binutils/ld/emulparams/elf64bmip-defs.sh
==============================================================================
--- user/hrs/ipv6/contrib/binutils/ld/emulparams/elf64bmip-defs.sh	Sun Jun  5 12:07:04 2011	(r222713)
+++ user/hrs/ipv6/contrib/binutils/ld/emulparams/elf64bmip-defs.sh	Sun Jun  5 12:27:34 2011	(r222714)
@@ -1,3 +1,11 @@
 . ${srcdir}/emulparams/elf32bmipn32-defs.sh
 COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
-INITIAL_READONLY_SECTIONS=".MIPS.options : { *(.MIPS.options) }"
+
+# elf32bmipn32-defs.sh use .reginfo, n64 ABI should use .MIPS.options,
+# override INITIAL_READONLY_SECTIONS to do this.
+INITIAL_READONLY_SECTIONS=
+if test -z "${CREATE_SHLIB}"; then
+  INITIAL_READONLY_SECTIONS=".interp       ${RELOCATING-0} : { *(.interp) }"
+fi
+INITIAL_READONLY_SECTIONS="${INITIAL_READONLY_SECTIONS}
+  .MIPS.options      ${RELOCATING-0} : { *(.MIPS.options) }"

Modified: user/hrs/ipv6/contrib/compiler-rt/CREDITS.TXT
==============================================================================
--- user/hrs/ipv6/contrib/compiler-rt/CREDITS.TXT	Sun Jun  5 12:07:04 2011	(r222713)
+++ user/hrs/ipv6/contrib/compiler-rt/CREDITS.TXT	Sun Jun  5 12:27:34 2011	(r222714)
@@ -19,3 +19,6 @@ W: http://www.auroraux.org
 D: CMake'ify Compiler-RT build system
 D: Maintain Solaris & AuroraUX ports of Compiler-RT
 
+N: Howard Hinnant
+E: hhinnant@apple.com
+D: Architect and primary author of compiler-rt

Modified: user/hrs/ipv6/contrib/compiler-rt/LICENSE.TXT
==============================================================================
--- user/hrs/ipv6/contrib/compiler-rt/LICENSE.TXT	Sun Jun  5 12:07:04 2011	(r222713)
+++ user/hrs/ipv6/contrib/compiler-rt/LICENSE.TXT	Sun Jun  5 12:27:34 2011	(r222714)
@@ -1,10 +1,21 @@
 ==============================================================================
-LLVM Release License
+compiler_rt License
 ==============================================================================
+
+The compiler_rt library is dual licensed under both the University of Illinois
+"BSD-Like" license and the MIT license.  As a user of this code you may choose
+to use it under either license.  As a contributor, you agree to allow your code
+to be used under both.
+
+Full text of the relevant licenses is included below.
+
+==============================================================================
+
 University of Illinois/NCSA
 Open Source License
 
-Copyright (c) 2003-2009 University of Illinois at Urbana-Champaign.
+Copyright (c) 2009-2010 by the contributors listed in CREDITS.TXT
+
 All rights reserved.
 
 Developed by:
@@ -43,21 +54,23 @@ OUT OF OR IN CONNECTION WITH THE SOFTWAR
 SOFTWARE.
 
 ==============================================================================
-Copyrights and Licenses for Third Party Software Distributed with LLVM:
-==============================================================================
-The LLVM software contains code written by third parties.  Such software will
-have its own individual LICENSE.TXT file in the directory in which it appears.
-This file will describe the copyrights, license, and restrictions which apply
-to that code.
-
-The disclaimer of warranty in the University of Illinois Open Source License
-applies to all code in the LLVM Distribution, and nothing in any of the
-other licenses gives permission to use the names of the LLVM Team or the
-University of Illinois to endorse or promote products derived from this
-Software.
 
-The following pieces of software have additional or alternate copyrights,
-licenses, and/or restrictions:
+Copyright (c) 2009-2010 by the contributors listed in CREDITS.TXT
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
 
-Program             Directory
--------             ---------
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.

Modified: user/hrs/ipv6/contrib/compiler-rt/README.txt
==============================================================================
--- user/hrs/ipv6/contrib/compiler-rt/README.txt	Sun Jun  5 12:07:04 2011	(r222713)
+++ user/hrs/ipv6/contrib/compiler-rt/README.txt	Sun Jun  5 12:27:34 2011	(r222714)
@@ -77,8 +77,12 @@ ti_int __modti3    (ti_int a, ti_int b);
 su_int __umodsi3   (su_int a, su_int b);               // a % b   unsigned
 du_int __umoddi3   (du_int a, du_int b);               // a % b   unsigned
 tu_int __umodti3   (tu_int a, tu_int b);               // a % b   unsigned
-du_int __udivmoddi4(du_int a, du_int b, du_int* rem);  // a / b, *rem = a % b
-tu_int __udivmodti4(tu_int a, tu_int b, tu_int* rem);  // a / b, *rem = a % b
+du_int __udivmoddi4(du_int a, du_int b, du_int* rem);  // a / b, *rem = a % b  unsigned
+tu_int __udivmodti4(tu_int a, tu_int b, tu_int* rem);  // a / b, *rem = a % b  unsigned
+su_int __udivmodsi4(su_int a, su_int b, su_int* rem);  // a / b, *rem = a % b  unsigned
+si_int __divmodsi4(si_int a, si_int b, si_int* rem);   // a / b, *rem = a % b  signed
+
+
 
 //  Integral arithmetic with trapping overflow
 

Copied: user/hrs/ipv6/contrib/compiler-rt/lib/abi.h (from r222712, head/contrib/compiler-rt/lib/abi.h)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ user/hrs/ipv6/contrib/compiler-rt/lib/abi.h	Sun Jun  5 12:27:34 2011	(r222714, copy of r222712, head/contrib/compiler-rt/lib/abi.h)
@@ -0,0 +1,23 @@
+/* ===------ abi.h - configuration header for compiler-rt  -----------------===
+ *
+ *                     The LLVM Compiler Infrastructure
+ *
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
+ *
+ * ===----------------------------------------------------------------------===
+ *
+ * This file is a configuration header for compiler-rt.
+ * This file is not part of the interface of this library.
+ *
+ * ===----------------------------------------------------------------------===
+ */
+
+#if __ARM_EABI__
+# define ARM_EABI_FNALIAS(aeabi_name, name)         \
+  void __aeabi_##aeabi_name() __attribute__((alias("__" #name)));
+# define COMPILER_RT_ABI __attribute__((pcs("aapcs")))
+#else
+# define ARM_EABI_FNALIAS(aeabi_name, name)
+# define COMPILER_RT_ABI
+#endif

Modified: user/hrs/ipv6/contrib/compiler-rt/lib/absvdi2.c
==============================================================================
--- user/hrs/ipv6/contrib/compiler-rt/lib/absvdi2.c	Sun Jun  5 12:07:04 2011	(r222713)
+++ user/hrs/ipv6/contrib/compiler-rt/lib/absvdi2.c	Sun Jun  5 12:27:34 2011	(r222714)
@@ -2,8 +2,8 @@
  *
  *                     The LLVM Compiler Infrastructure
  *
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
  *
  *===----------------------------------------------------------------------===
  *
@@ -11,6 +11,7 @@
  *
  *===----------------------------------------------------------------------===
  */
+#include "abi.h"
 
 #include "int_lib.h"
 #include <stdlib.h>
@@ -19,7 +20,7 @@
 
 /* Effects: aborts if abs(x) < 0 */
 
-di_int
+COMPILER_RT_ABI di_int
 __absvdi2(di_int a)
 {
     const int N = (int)(sizeof(di_int) * CHAR_BIT);

Modified: user/hrs/ipv6/contrib/compiler-rt/lib/absvsi2.c
==============================================================================
--- user/hrs/ipv6/contrib/compiler-rt/lib/absvsi2.c	Sun Jun  5 12:07:04 2011	(r222713)
+++ user/hrs/ipv6/contrib/compiler-rt/lib/absvsi2.c	Sun Jun  5 12:27:34 2011	(r222714)
@@ -2,15 +2,16 @@
  *
  *                     The LLVM Compiler Infrastructure
  *
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
  *
  * ===----------------------------------------------------------------------===
  *
  * This file implements __absvsi2 for the compiler_rt library.
  *
  * ===----------------------------------------------------------------------===
- */ 
+ */
+#include "abi.h"
 
 #include "int_lib.h"
 #include <stdlib.h>
@@ -19,7 +20,7 @@
 
 /* Effects: aborts if abs(x) < 0 */
 
-si_int
+COMPILER_RT_ABI si_int
 __absvsi2(si_int a)
 {
     const int N = (int)(sizeof(si_int) * CHAR_BIT);

Modified: user/hrs/ipv6/contrib/compiler-rt/lib/absvti2.c
==============================================================================
--- user/hrs/ipv6/contrib/compiler-rt/lib/absvti2.c	Sun Jun  5 12:07:04 2011	(r222713)
+++ user/hrs/ipv6/contrib/compiler-rt/lib/absvti2.c	Sun Jun  5 12:27:34 2011	(r222714)
@@ -2,8 +2,8 @@
  *
  *                     The LLVM Compiler Infrastructure
  *
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
  *
  * ===----------------------------------------------------------------------===
  *

Modified: user/hrs/ipv6/contrib/compiler-rt/lib/adddf3.c
==============================================================================
--- user/hrs/ipv6/contrib/compiler-rt/lib/adddf3.c	Sun Jun  5 12:07:04 2011	(r222713)
+++ user/hrs/ipv6/contrib/compiler-rt/lib/adddf3.c	Sun Jun  5 12:27:34 2011	(r222714)
@@ -1,21 +1,26 @@
-//===-- lib/adddf3.c - Double-precision addition and subtraction --*- C -*-===//
+//===-- lib/adddf3.c - Double-precision addition ------------------*- C -*-===//
 //
 //                     The LLVM Compiler Infrastructure
 //
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
 //
 //===----------------------------------------------------------------------===//
 //
-// This file implements double-precision soft-float addition and subtraction
-// with the IEEE-754 default rounding (to nearest, ties to even).
+// This file implements double-precision soft-float addition with the IEEE-754
+// default rounding (to nearest, ties to even).
 //
 //===----------------------------------------------------------------------===//
 
+#include "abi.h"
+
 #define DOUBLE_PRECISION
 #include "fp_lib.h"
 
-fp_t __adddf3(fp_t a, fp_t b) {
+ARM_EABI_FNALIAS(dadd, adddf3);
+
+COMPILER_RT_ABI fp_t
+__adddf3(fp_t a, fp_t b) {
     
     rep_t aRep = toRep(a);
     rep_t bRep = toRep(b);
@@ -147,8 +152,3 @@ fp_t __adddf3(fp_t a, fp_t b) {
     if (roundGuardSticky == 0x4) result += result & 1;
     return fromRep(result);
 }
-
-// Subtraction; flip the sign bit of b and add.
-fp_t __subdf3(fp_t a, fp_t b) {
-    return __adddf3(a, fromRep(toRep(b) ^ signBit));
-}

Modified: user/hrs/ipv6/contrib/compiler-rt/lib/addsf3.c
==============================================================================
--- user/hrs/ipv6/contrib/compiler-rt/lib/addsf3.c	Sun Jun  5 12:07:04 2011	(r222713)
+++ user/hrs/ipv6/contrib/compiler-rt/lib/addsf3.c	Sun Jun  5 12:27:34 2011	(r222714)
@@ -1,20 +1,24 @@
-//===-- lib/addsf3.c - Single-precision addition and subtraction --*- C -*-===//
+//===-- lib/addsf3.c - Single-precision addition ------------------*- C -*-===//
 //
 //                     The LLVM Compiler Infrastructure
 //
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
 //
 //===----------------------------------------------------------------------===//
 //
-// This file implements single-precision soft-float addition and subtraction
-// with the IEEE-754 default rounding (to nearest, ties to even).
+// This file implements single-precision soft-float addition with the IEEE-754
+// default rounding (to nearest, ties to even).
 //
 //===----------------------------------------------------------------------===//
 
+#include "abi.h"
+
 #define SINGLE_PRECISION
 #include "fp_lib.h"
 
+ARM_EABI_FNALIAS(fadd, addsf3);
+
 fp_t __addsf3(fp_t a, fp_t b) {
 
     rep_t aRep = toRep(a);
@@ -147,18 +151,3 @@ fp_t __addsf3(fp_t a, fp_t b) {
     if (roundGuardSticky == 0x4) result += result & 1;
     return fromRep(result);
 }
-
-// Subtraction; flip the sign bit of b and add.
-fp_t __subsf3(fp_t a, fp_t b) {
-    return __addsf3(a, fromRep(toRep(b) ^ signBit));
-}
-
-
-
-
-
-
-
-
-
-

Modified: user/hrs/ipv6/contrib/compiler-rt/lib/addvdi3.c
==============================================================================
--- user/hrs/ipv6/contrib/compiler-rt/lib/addvdi3.c	Sun Jun  5 12:07:04 2011	(r222713)
+++ user/hrs/ipv6/contrib/compiler-rt/lib/addvdi3.c	Sun Jun  5 12:27:34 2011	(r222714)
@@ -2,8 +2,8 @@
  *
  *                     The LLVM Compiler Infrastructure
  *
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
  *
  * ===----------------------------------------------------------------------===
  *
@@ -11,6 +11,7 @@
  *
  * ===----------------------------------------------------------------------===
  */
+#include "abi.h"
 
 #include "int_lib.h"
 #include <stdlib.h>
@@ -19,7 +20,7 @@
 
 /* Effects: aborts if a + b overflows */
 
-di_int
+COMPILER_RT_ABI di_int
 __addvdi3(di_int a, di_int b)
 {
     di_int s = a + b;

Modified: user/hrs/ipv6/contrib/compiler-rt/lib/addvsi3.c
==============================================================================
--- user/hrs/ipv6/contrib/compiler-rt/lib/addvsi3.c	Sun Jun  5 12:07:04 2011	(r222713)
+++ user/hrs/ipv6/contrib/compiler-rt/lib/addvsi3.c	Sun Jun  5 12:27:34 2011	(r222714)
@@ -2,8 +2,8 @@
  *
  *                    The LLVM Compiler Infrastructure
  *
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
  *
  * ===----------------------------------------------------------------------===
  *
@@ -11,6 +11,7 @@
  *
  * ===----------------------------------------------------------------------===
  */
+#include "abi.h"
 
 #include "int_lib.h"
 #include <stdlib.h>
@@ -19,7 +20,7 @@
 
 /* Effects: aborts if a + b overflows */
 
-si_int
+COMPILER_RT_ABI si_int
 __addvsi3(si_int a, si_int b)
 {
     si_int s = a + b;

Modified: user/hrs/ipv6/contrib/compiler-rt/lib/addvti3.c
==============================================================================
--- user/hrs/ipv6/contrib/compiler-rt/lib/addvti3.c	Sun Jun  5 12:07:04 2011	(r222713)
+++ user/hrs/ipv6/contrib/compiler-rt/lib/addvti3.c	Sun Jun  5 12:27:34 2011	(r222714)
@@ -2,8 +2,8 @@
  *
  *                     The LLVM Compiler Infrastructure
  *
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
  *
  * ===----------------------------------------------------------------------===
  *

Modified: user/hrs/ipv6/contrib/compiler-rt/lib/apple_versioning.c
==============================================================================
--- user/hrs/ipv6/contrib/compiler-rt/lib/apple_versioning.c	Sun Jun  5 12:07:04 2011	(r222713)
+++ user/hrs/ipv6/contrib/compiler-rt/lib/apple_versioning.c	Sun Jun  5 12:27:34 2011	(r222714)
@@ -2,8 +2,8 @@
  *
  *                     The LLVM Compiler Infrastructure
  *
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
  *
  * ===----------------------------------------------------------------------===
  */
@@ -143,6 +143,147 @@ NOT_HERE_BEFORE_10_6(__gcc_qsub)
 NOT_HERE_BEFORE_10_6(__trampoline_setup)
 #endif /* __ppc__ */
 
+#if __arm__ && __DYNAMIC__
+   #define NOT_HERE_UNTIL_AFTER_4_3(sym) \
+        extern const char sym##_tmp1 __asm("$ld$hide$os3.0$_" #sym ); \
+            __attribute__((visibility("default"))) const char sym##_tmp1 = 0; \
+        extern const char sym##_tmp2 __asm("$ld$hide$os3.1$_" #sym ); \
+            __attribute__((visibility("default"))) const char sym##_tmp2 = 0; \
+        extern const char sym##_tmp3 __asm("$ld$hide$os3.2$_" #sym ); \
+            __attribute__((visibility("default"))) const char sym##_tmp3 = 0; \
+        extern const char sym##_tmp4 __asm("$ld$hide$os4.0$_" #sym ); \
+            __attribute__((visibility("default"))) const char sym##_tmp4 = 0; \
+        extern const char sym##_tmp5 __asm("$ld$hide$os4.1$_" #sym ); \
+            __attribute__((visibility("default"))) const char sym##_tmp5 = 0; \
+        extern const char sym##_tmp6 __asm("$ld$hide$os4.2$_" #sym ); \
+            __attribute__((visibility("default"))) const char sym##_tmp6 = 0; \
+        extern const char sym##_tmp7 __asm("$ld$hide$os4.3$_" #sym ); \
+            __attribute__((visibility("default"))) const char sym##_tmp7 = 0; 
+            
+NOT_HERE_UNTIL_AFTER_4_3(__absvdi2)
+NOT_HERE_UNTIL_AFTER_4_3(__absvsi2)
+NOT_HERE_UNTIL_AFTER_4_3(__adddf3)
+NOT_HERE_UNTIL_AFTER_4_3(__adddf3vfp)
+NOT_HERE_UNTIL_AFTER_4_3(__addsf3)
+NOT_HERE_UNTIL_AFTER_4_3(__addsf3vfp)
+NOT_HERE_UNTIL_AFTER_4_3(__addvdi3)
+NOT_HERE_UNTIL_AFTER_4_3(__addvsi3)
+NOT_HERE_UNTIL_AFTER_4_3(__ashldi3)
+NOT_HERE_UNTIL_AFTER_4_3(__ashrdi3)
+NOT_HERE_UNTIL_AFTER_4_3(__bswapdi2)
+NOT_HERE_UNTIL_AFTER_4_3(__bswapsi2)
+NOT_HERE_UNTIL_AFTER_4_3(__clzdi2)
+NOT_HERE_UNTIL_AFTER_4_3(__clzsi2)
+NOT_HERE_UNTIL_AFTER_4_3(__cmpdi2)
+NOT_HERE_UNTIL_AFTER_4_3(__ctzdi2)
+NOT_HERE_UNTIL_AFTER_4_3(__ctzsi2)
+NOT_HERE_UNTIL_AFTER_4_3(__divdc3)
+NOT_HERE_UNTIL_AFTER_4_3(__divdf3)
+NOT_HERE_UNTIL_AFTER_4_3(__divdf3vfp)
+NOT_HERE_UNTIL_AFTER_4_3(__divdi3)
+NOT_HERE_UNTIL_AFTER_4_3(__divsc3)
+NOT_HERE_UNTIL_AFTER_4_3(__divsf3)
+NOT_HERE_UNTIL_AFTER_4_3(__divsf3vfp)
+NOT_HERE_UNTIL_AFTER_4_3(__divsi3)
+NOT_HERE_UNTIL_AFTER_4_3(__eqdf2)
+NOT_HERE_UNTIL_AFTER_4_3(__eqdf2vfp)
+NOT_HERE_UNTIL_AFTER_4_3(__eqsf2)
+NOT_HERE_UNTIL_AFTER_4_3(__eqsf2vfp)
+NOT_HERE_UNTIL_AFTER_4_3(__extendsfdf2)
+NOT_HERE_UNTIL_AFTER_4_3(__extendsfdf2vfp)
+NOT_HERE_UNTIL_AFTER_4_3(__ffsdi2)
+NOT_HERE_UNTIL_AFTER_4_3(__fixdfdi)
+NOT_HERE_UNTIL_AFTER_4_3(__fixdfsi)
+NOT_HERE_UNTIL_AFTER_4_3(__fixdfsivfp)
+NOT_HERE_UNTIL_AFTER_4_3(__fixsfdi)
+NOT_HERE_UNTIL_AFTER_4_3(__fixsfsi)
+NOT_HERE_UNTIL_AFTER_4_3(__fixsfsivfp)
+NOT_HERE_UNTIL_AFTER_4_3(__fixunsdfdi)
+NOT_HERE_UNTIL_AFTER_4_3(__fixunsdfsi)
+NOT_HERE_UNTIL_AFTER_4_3(__fixunsdfsivfp)
+NOT_HERE_UNTIL_AFTER_4_3(__fixunssfdi)
+NOT_HERE_UNTIL_AFTER_4_3(__fixunssfsi)
+NOT_HERE_UNTIL_AFTER_4_3(__fixunssfsivfp)
+NOT_HERE_UNTIL_AFTER_4_3(__floatdidf)
+NOT_HERE_UNTIL_AFTER_4_3(__floatdisf)
+NOT_HERE_UNTIL_AFTER_4_3(__floatsidf)
+NOT_HERE_UNTIL_AFTER_4_3(__floatsidfvfp)
+NOT_HERE_UNTIL_AFTER_4_3(__floatsisf)
+NOT_HERE_UNTIL_AFTER_4_3(__floatsisfvfp)
+NOT_HERE_UNTIL_AFTER_4_3(__floatundidf)
+NOT_HERE_UNTIL_AFTER_4_3(__floatundisf)
+NOT_HERE_UNTIL_AFTER_4_3(__floatunsidf)
+NOT_HERE_UNTIL_AFTER_4_3(__floatunsisf)
+NOT_HERE_UNTIL_AFTER_4_3(__floatunssidfvfp)
+NOT_HERE_UNTIL_AFTER_4_3(__floatunssisfvfp)
+NOT_HERE_UNTIL_AFTER_4_3(__gedf2)
+NOT_HERE_UNTIL_AFTER_4_3(__gedf2vfp)
+NOT_HERE_UNTIL_AFTER_4_3(__gesf2)
+NOT_HERE_UNTIL_AFTER_4_3(__gesf2vfp)
+NOT_HERE_UNTIL_AFTER_4_3(__gtdf2)
+NOT_HERE_UNTIL_AFTER_4_3(__gtdf2vfp)
+NOT_HERE_UNTIL_AFTER_4_3(__gtsf2)
+NOT_HERE_UNTIL_AFTER_4_3(__gtsf2vfp)
+NOT_HERE_UNTIL_AFTER_4_3(__ledf2)
+NOT_HERE_UNTIL_AFTER_4_3(__ledf2vfp)
+NOT_HERE_UNTIL_AFTER_4_3(__lesf2)
+NOT_HERE_UNTIL_AFTER_4_3(__lesf2vfp)
+NOT_HERE_UNTIL_AFTER_4_3(__lshrdi3)
+NOT_HERE_UNTIL_AFTER_4_3(__ltdf2)
+NOT_HERE_UNTIL_AFTER_4_3(__ltdf2vfp)
+NOT_HERE_UNTIL_AFTER_4_3(__ltsf2)
+NOT_HERE_UNTIL_AFTER_4_3(__ltsf2vfp)
+NOT_HERE_UNTIL_AFTER_4_3(__moddi3)
+NOT_HERE_UNTIL_AFTER_4_3(__modsi3)
+NOT_HERE_UNTIL_AFTER_4_3(__muldc3)
+NOT_HERE_UNTIL_AFTER_4_3(__muldf3)
+NOT_HERE_UNTIL_AFTER_4_3(__muldf3vfp)
+NOT_HERE_UNTIL_AFTER_4_3(__muldi3)
+NOT_HERE_UNTIL_AFTER_4_3(__mulsc3)
+NOT_HERE_UNTIL_AFTER_4_3(__mulsf3)
+NOT_HERE_UNTIL_AFTER_4_3(__mulsf3vfp)
+NOT_HERE_UNTIL_AFTER_4_3(__mulvdi3)
+NOT_HERE_UNTIL_AFTER_4_3(__mulvsi3)
+NOT_HERE_UNTIL_AFTER_4_3(__nedf2)
+NOT_HERE_UNTIL_AFTER_4_3(__nedf2vfp)
+NOT_HERE_UNTIL_AFTER_4_3(__negdi2)
+NOT_HERE_UNTIL_AFTER_4_3(__negvdi2)
+NOT_HERE_UNTIL_AFTER_4_3(__negvsi2)
+NOT_HERE_UNTIL_AFTER_4_3(__nesf2)
+NOT_HERE_UNTIL_AFTER_4_3(__nesf2vfp)
+NOT_HERE_UNTIL_AFTER_4_3(__paritydi2)
+NOT_HERE_UNTIL_AFTER_4_3(__paritysi2)
+NOT_HERE_UNTIL_AFTER_4_3(__popcountdi2)
+NOT_HERE_UNTIL_AFTER_4_3(__popcountsi2)
+NOT_HERE_UNTIL_AFTER_4_3(__powidf2)
+NOT_HERE_UNTIL_AFTER_4_3(__powisf2)
+NOT_HERE_UNTIL_AFTER_4_3(__subdf3)
+NOT_HERE_UNTIL_AFTER_4_3(__subdf3vfp)
+NOT_HERE_UNTIL_AFTER_4_3(__subsf3)
+NOT_HERE_UNTIL_AFTER_4_3(__subsf3vfp)
+NOT_HERE_UNTIL_AFTER_4_3(__subvdi3)
+NOT_HERE_UNTIL_AFTER_4_3(__subvsi3)
+NOT_HERE_UNTIL_AFTER_4_3(__truncdfsf2)
+NOT_HERE_UNTIL_AFTER_4_3(__truncdfsf2vfp)
+NOT_HERE_UNTIL_AFTER_4_3(__ucmpdi2)
+NOT_HERE_UNTIL_AFTER_4_3(__udivdi3)
+NOT_HERE_UNTIL_AFTER_4_3(__udivmoddi4)
+NOT_HERE_UNTIL_AFTER_4_3(__udivsi3)
+NOT_HERE_UNTIL_AFTER_4_3(__umoddi3)
+NOT_HERE_UNTIL_AFTER_4_3(__umodsi3)
+NOT_HERE_UNTIL_AFTER_4_3(__unorddf2)
+NOT_HERE_UNTIL_AFTER_4_3(__unorddf2vfp)
+NOT_HERE_UNTIL_AFTER_4_3(__unordsf2)
+NOT_HERE_UNTIL_AFTER_4_3(__unordsf2vfp)
+
+NOT_HERE_UNTIL_AFTER_4_3(__divmodsi4)
+NOT_HERE_UNTIL_AFTER_4_3(__udivmodsi4)
+#endif // __arm__ && __DYNAMIC__
+
+       
+       
+
+
 #else /* !__APPLE__ */
 
 extern int avoid_empty_file;

Modified: user/hrs/ipv6/contrib/compiler-rt/lib/arm/adddf3vfp.S
==============================================================================
--- user/hrs/ipv6/contrib/compiler-rt/lib/arm/adddf3vfp.S	Sun Jun  5 12:07:04 2011	(r222713)
+++ user/hrs/ipv6/contrib/compiler-rt/lib/arm/adddf3vfp.S	Sun Jun  5 12:27:34 2011	(r222714)
@@ -2,8 +2,8 @@
 //
 //                     The LLVM Compiler Infrastructure
 //
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
 //
 //===----------------------------------------------------------------------===//
 

Modified: user/hrs/ipv6/contrib/compiler-rt/lib/arm/addsf3vfp.S
==============================================================================
--- user/hrs/ipv6/contrib/compiler-rt/lib/arm/addsf3vfp.S	Sun Jun  5 12:07:04 2011	(r222713)
+++ user/hrs/ipv6/contrib/compiler-rt/lib/arm/addsf3vfp.S	Sun Jun  5 12:27:34 2011	(r222714)
@@ -2,8 +2,8 @@
 //
 //                     The LLVM Compiler Infrastructure
 //
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
 //
 //===----------------------------------------------------------------------===//
 

Modified: user/hrs/ipv6/contrib/compiler-rt/lib/arm/bswapdi2.S
==============================================================================
--- user/hrs/ipv6/contrib/compiler-rt/lib/arm/bswapdi2.S	Sun Jun  5 12:07:04 2011	(r222713)
+++ user/hrs/ipv6/contrib/compiler-rt/lib/arm/bswapdi2.S	Sun Jun  5 12:27:34 2011	(r222714)
@@ -2,8 +2,8 @@
 //
 //                     The LLVM Compiler Infrastructure
 //
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
 //
 //===----------------------------------------------------------------------===//
 

Modified: user/hrs/ipv6/contrib/compiler-rt/lib/arm/bswapsi2.S
==============================================================================
--- user/hrs/ipv6/contrib/compiler-rt/lib/arm/bswapsi2.S	Sun Jun  5 12:07:04 2011	(r222713)
+++ user/hrs/ipv6/contrib/compiler-rt/lib/arm/bswapsi2.S	Sun Jun  5 12:27:34 2011	(r222714)
@@ -2,8 +2,8 @@
 //
 //                     The LLVM Compiler Infrastructure
 //
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
 //
 //===----------------------------------------------------------------------===//
 

Modified: user/hrs/ipv6/contrib/compiler-rt/lib/arm/comparesf2.S
==============================================================================
--- user/hrs/ipv6/contrib/compiler-rt/lib/arm/comparesf2.S	Sun Jun  5 12:07:04 2011	(r222713)
+++ user/hrs/ipv6/contrib/compiler-rt/lib/arm/comparesf2.S	Sun Jun  5 12:27:34 2011	(r222714)
@@ -2,8 +2,8 @@
 //
 //                     The LLVM Compiler Infrastructure
 //
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
 //
 //===----------------------------------------------------------------------===//
 //

Modified: user/hrs/ipv6/contrib/compiler-rt/lib/arm/divdf3vfp.S
==============================================================================
--- user/hrs/ipv6/contrib/compiler-rt/lib/arm/divdf3vfp.S	Sun Jun  5 12:07:04 2011	(r222713)
+++ user/hrs/ipv6/contrib/compiler-rt/lib/arm/divdf3vfp.S	Sun Jun  5 12:27:34 2011	(r222714)
@@ -2,8 +2,8 @@
 //
 //                     The LLVM Compiler Infrastructure
 //
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
 //
 //===----------------------------------------------------------------------===//
 

Copied: user/hrs/ipv6/contrib/compiler-rt/lib/arm/divmodsi4.S (from r222712, head/contrib/compiler-rt/lib/arm/divmodsi4.S)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ user/hrs/ipv6/contrib/compiler-rt/lib/arm/divmodsi4.S	Sun Jun  5 12:27:34 2011	(r222714, copy of r222712, head/contrib/compiler-rt/lib/arm/divmodsi4.S)
@@ -0,0 +1,47 @@
+/*===-- divmodsi4.S - 32-bit signed integer divide and modulus ------------===//
+ *
+ *                     The LLVM Compiler Infrastructure
+ *
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
+ *
+ *===----------------------------------------------------------------------===//
+ *
+ * This file implements the __divmodsi4 (32-bit signed integer divide and
+ * modulus) function for the ARM architecture.  A naive digit-by-digit
+ * computation is employed for simplicity.
+ *
+ *===----------------------------------------------------------------------===*/
+
+#include "../assembly.h"
+
+#define ESTABLISH_FRAME    \
+    push   {r4-r7, lr}   ;\
+    add     r7,     sp, #12
+#define CLEAR_FRAME_AND_RETURN \
+    pop    {r4-r7, pc}
+
+.syntax unified
+.align 3
+DEFINE_COMPILERRT_FUNCTION(__divmodsi4)
+    ESTABLISH_FRAME
+//  Set aside the sign of the quotient and modulus, and the address for the
+//  modulus.
+    eor     r4,     r0, r1
+    mov     r5,     r0
+    mov     r6,     r2
+//  Take the absolute value of a and b via abs(x) = (x^(x >> 31)) - (x >> 31).
+    eor     ip,     r0, r0, asr #31
+    eor     lr,     r1, r1, asr #31
+    sub     r0,     ip, r0, asr #31
+    sub     r1,     lr, r1, asr #31
+//  Unsigned divmod:
+    bl      SYMBOL_NAME(__udivmodsi4)
+//  Apply the sign of quotient and modulus
+    ldr     r1,    [r6]
+    eor     r0,     r0, r4, asr #31
+    eor     r1,     r1, r5, asr #31
+    sub     r0,     r0, r4, asr #31
+    sub     r1,     r1, r5, asr #31
+    str     r1,    [r6]
+    CLEAR_FRAME_AND_RETURN

Modified: user/hrs/ipv6/contrib/compiler-rt/lib/arm/divsf3vfp.S
==============================================================================
--- user/hrs/ipv6/contrib/compiler-rt/lib/arm/divsf3vfp.S	Sun Jun  5 12:07:04 2011	(r222713)
+++ user/hrs/ipv6/contrib/compiler-rt/lib/arm/divsf3vfp.S	Sun Jun  5 12:27:34 2011	(r222714)
@@ -2,8 +2,8 @@
 //
 //                     The LLVM Compiler Infrastructure
 //
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
 //
 //===----------------------------------------------------------------------===//
 

Copied: user/hrs/ipv6/contrib/compiler-rt/lib/arm/divsi3.S (from r222712, head/contrib/compiler-rt/lib/arm/divsi3.S)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ user/hrs/ipv6/contrib/compiler-rt/lib/arm/divsi3.S	Sun Jun  5 12:27:34 2011	(r222714, copy of r222712, head/contrib/compiler-rt/lib/arm/divsi3.S)
@@ -0,0 +1,41 @@
+/*===-- divsi3.S - 32-bit signed integer divide ---------------------------===//
+ *
+ *                     The LLVM Compiler Infrastructure
+ *
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
+ *
+ *===----------------------------------------------------------------------===//
+ *
+ * This file implements the __divsi3 (32-bit signed integer divide) function
+ * for the ARM architecture as a wrapper around the unsigned routine.
+ *
+ *===----------------------------------------------------------------------===*/
+
+#include "../assembly.h"
+
+#define ESTABLISH_FRAME \
+    push   {r4, r7, lr}    ;\
+    add     r7,     sp, #4
+#define CLEAR_FRAME_AND_RETURN \
+    pop    {r4, r7, pc}
+
+.syntax unified
+.align 3
+// Ok, APCS and AAPCS agree on 32 bit args, so it's safe to use the same routine.
+DEFINE_AEABI_FUNCTION_ALIAS(__aeabi_idiv, __divsi3)
+DEFINE_COMPILERRT_FUNCTION(__divsi3)
+    ESTABLISH_FRAME
+//  Set aside the sign of the quotient.
+    eor     r4,     r0, r1
+//  Take absolute value of a and b via abs(x) = (x^(x >> 31)) - (x >> 31).
+    eor     r2,     r0, r0, asr #31
+    eor     r3,     r1, r1, asr #31
+    sub     r0,     r2, r0, asr #31
+    sub     r1,     r3, r1, asr #31
+//  abs(a) / abs(b)
+    bl      SYMBOL_NAME(__udivsi3)
+//  Apply sign of quotient to result and return.
+    eor     r0,     r0, r4, asr #31
+    sub     r0,     r0, r4, asr #31
+    CLEAR_FRAME_AND_RETURN

Modified: user/hrs/ipv6/contrib/compiler-rt/lib/arm/eqdf2vfp.S
==============================================================================
--- user/hrs/ipv6/contrib/compiler-rt/lib/arm/eqdf2vfp.S	Sun Jun  5 12:07:04 2011	(r222713)
+++ user/hrs/ipv6/contrib/compiler-rt/lib/arm/eqdf2vfp.S	Sun Jun  5 12:27:34 2011	(r222714)
@@ -2,8 +2,8 @@
 //
 //                     The LLVM Compiler Infrastructure
 //
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
 //
 //===----------------------------------------------------------------------===//
 

Modified: user/hrs/ipv6/contrib/compiler-rt/lib/arm/eqsf2vfp.S
==============================================================================
--- user/hrs/ipv6/contrib/compiler-rt/lib/arm/eqsf2vfp.S	Sun Jun  5 12:07:04 2011	(r222713)
+++ user/hrs/ipv6/contrib/compiler-rt/lib/arm/eqsf2vfp.S	Sun Jun  5 12:27:34 2011	(r222714)
@@ -2,8 +2,8 @@
 //
 //                     The LLVM Compiler Infrastructure
 //
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
 //
 //===----------------------------------------------------------------------===//
 

Modified: user/hrs/ipv6/contrib/compiler-rt/lib/arm/extendsfdf2vfp.S
==============================================================================
--- user/hrs/ipv6/contrib/compiler-rt/lib/arm/extendsfdf2vfp.S	Sun Jun  5 12:07:04 2011	(r222713)
+++ user/hrs/ipv6/contrib/compiler-rt/lib/arm/extendsfdf2vfp.S	Sun Jun  5 12:27:34 2011	(r222714)
@@ -2,8 +2,8 @@
 //
 //                     The LLVM Compiler Infrastructure
 //
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
 //
 //===----------------------------------------------------------------------===//
 

Modified: user/hrs/ipv6/contrib/compiler-rt/lib/arm/fixdfsivfp.S
==============================================================================
--- user/hrs/ipv6/contrib/compiler-rt/lib/arm/fixdfsivfp.S	Sun Jun  5 12:07:04 2011	(r222713)
+++ user/hrs/ipv6/contrib/compiler-rt/lib/arm/fixdfsivfp.S	Sun Jun  5 12:27:34 2011	(r222714)
@@ -2,8 +2,8 @@
 //
 //                     The LLVM Compiler Infrastructure
 //
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
 //
 //===----------------------------------------------------------------------===//
 

Modified: user/hrs/ipv6/contrib/compiler-rt/lib/arm/fixsfsivfp.S
==============================================================================
--- user/hrs/ipv6/contrib/compiler-rt/lib/arm/fixsfsivfp.S	Sun Jun  5 12:07:04 2011	(r222713)
+++ user/hrs/ipv6/contrib/compiler-rt/lib/arm/fixsfsivfp.S	Sun Jun  5 12:27:34 2011	(r222714)
@@ -2,8 +2,8 @@
 //
 //                     The LLVM Compiler Infrastructure
 //
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
 //
 //===----------------------------------------------------------------------===//
 

Modified: user/hrs/ipv6/contrib/compiler-rt/lib/arm/fixunsdfsivfp.S
==============================================================================
--- user/hrs/ipv6/contrib/compiler-rt/lib/arm/fixunsdfsivfp.S	Sun Jun  5 12:07:04 2011	(r222713)
+++ user/hrs/ipv6/contrib/compiler-rt/lib/arm/fixunsdfsivfp.S	Sun Jun  5 12:27:34 2011	(r222714)
@@ -2,8 +2,8 @@
 //
 //                     The LLVM Compiler Infrastructure
 //
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
 //
 //===----------------------------------------------------------------------===//
 

Modified: user/hrs/ipv6/contrib/compiler-rt/lib/arm/fixunssfsivfp.S
==============================================================================
--- user/hrs/ipv6/contrib/compiler-rt/lib/arm/fixunssfsivfp.S	Sun Jun  5 12:07:04 2011	(r222713)
+++ user/hrs/ipv6/contrib/compiler-rt/lib/arm/fixunssfsivfp.S	Sun Jun  5 12:27:34 2011	(r222714)
@@ -2,8 +2,8 @@
 //
 //                     The LLVM Compiler Infrastructure
 //
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
 //
 //===----------------------------------------------------------------------===//
 

Modified: user/hrs/ipv6/contrib/compiler-rt/lib/arm/floatsidfvfp.S
==============================================================================
--- user/hrs/ipv6/contrib/compiler-rt/lib/arm/floatsidfvfp.S	Sun Jun  5 12:07:04 2011	(r222713)
+++ user/hrs/ipv6/contrib/compiler-rt/lib/arm/floatsidfvfp.S	Sun Jun  5 12:27:34 2011	(r222714)
@@ -2,8 +2,8 @@
 //
 //                     The LLVM Compiler Infrastructure
 //
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
 //
 //===----------------------------------------------------------------------===//
 

Modified: user/hrs/ipv6/contrib/compiler-rt/lib/arm/floatsisfvfp.S
==============================================================================
--- user/hrs/ipv6/contrib/compiler-rt/lib/arm/floatsisfvfp.S	Sun Jun  5 12:07:04 2011	(r222713)
+++ user/hrs/ipv6/contrib/compiler-rt/lib/arm/floatsisfvfp.S	Sun Jun  5 12:27:34 2011	(r222714)
@@ -2,8 +2,8 @@
 //
 //                     The LLVM Compiler Infrastructure
 //
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
 //
 //===----------------------------------------------------------------------===//
 

Modified: user/hrs/ipv6/contrib/compiler-rt/lib/arm/floatunssidfvfp.S
==============================================================================
--- user/hrs/ipv6/contrib/compiler-rt/lib/arm/floatunssidfvfp.S	Sun Jun  5 12:07:04 2011	(r222713)
+++ user/hrs/ipv6/contrib/compiler-rt/lib/arm/floatunssidfvfp.S	Sun Jun  5 12:27:34 2011	(r222714)
@@ -2,8 +2,8 @@
 //
 //                     The LLVM Compiler Infrastructure
 //
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
 //
 //===----------------------------------------------------------------------===//
 

Modified: user/hrs/ipv6/contrib/compiler-rt/lib/arm/floatunssisfvfp.S
==============================================================================
--- user/hrs/ipv6/contrib/compiler-rt/lib/arm/floatunssisfvfp.S	Sun Jun  5 12:07:04 2011	(r222713)
+++ user/hrs/ipv6/contrib/compiler-rt/lib/arm/floatunssisfvfp.S	Sun Jun  5 12:27:34 2011	(r222714)
@@ -2,8 +2,8 @@
 //
 //                     The LLVM Compiler Infrastructure
 //
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
 //
 //===----------------------------------------------------------------------===//
 

Modified: user/hrs/ipv6/contrib/compiler-rt/lib/arm/gedf2vfp.S
==============================================================================
--- user/hrs/ipv6/contrib/compiler-rt/lib/arm/gedf2vfp.S	Sun Jun  5 12:07:04 2011	(r222713)
+++ user/hrs/ipv6/contrib/compiler-rt/lib/arm/gedf2vfp.S	Sun Jun  5 12:27:34 2011	(r222714)
@@ -2,8 +2,8 @@
 //
 //                     The LLVM Compiler Infrastructure
 //
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
 //
 //===----------------------------------------------------------------------===//
 

Modified: user/hrs/ipv6/contrib/compiler-rt/lib/arm/gesf2vfp.S
==============================================================================
--- user/hrs/ipv6/contrib/compiler-rt/lib/arm/gesf2vfp.S	Sun Jun  5 12:07:04 2011	(r222713)
+++ user/hrs/ipv6/contrib/compiler-rt/lib/arm/gesf2vfp.S	Sun Jun  5 12:27:34 2011	(r222714)
@@ -2,8 +2,8 @@
 //
 //                     The LLVM Compiler Infrastructure
 //
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
 //
 //===----------------------------------------------------------------------===//
 

Modified: user/hrs/ipv6/contrib/compiler-rt/lib/arm/gtdf2vfp.S
==============================================================================
--- user/hrs/ipv6/contrib/compiler-rt/lib/arm/gtdf2vfp.S	Sun Jun  5 12:07:04 2011	(r222713)
+++ user/hrs/ipv6/contrib/compiler-rt/lib/arm/gtdf2vfp.S	Sun Jun  5 12:27:34 2011	(r222714)
@@ -2,8 +2,8 @@
 //
 //                     The LLVM Compiler Infrastructure
 //
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
 //
 //===----------------------------------------------------------------------===//
 

Modified: user/hrs/ipv6/contrib/compiler-rt/lib/arm/gtsf2vfp.S
==============================================================================
--- user/hrs/ipv6/contrib/compiler-rt/lib/arm/gtsf2vfp.S	Sun Jun  5 12:07:04 2011	(r222713)
+++ user/hrs/ipv6/contrib/compiler-rt/lib/arm/gtsf2vfp.S	Sun Jun  5 12:27:34 2011	(r222714)
@@ -2,8 +2,8 @@
 //
 //                     The LLVM Compiler Infrastructure
 //
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
 //

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-user@FreeBSD.ORG  Sun Jun  5 14:46:42 2011
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C7D51106564A;
	Sun,  5 Jun 2011 14:46:42 +0000 (UTC)
	(envelope-from adrian@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id B72758FC0C;
	Sun,  5 Jun 2011 14:46:42 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p55EkgwE085769;
	Sun, 5 Jun 2011 14:46:42 GMT (envelope-from adrian@svn.freebsd.org)
Received: (from adrian@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p55EkgRd085764;
	Sun, 5 Jun 2011 14:46:42 GMT (envelope-from adrian@svn.freebsd.org)
Message-Id: <201106051446.p55EkgRd085764@svn.freebsd.org>
From: Adrian Chadd <adrian@FreeBSD.org>
Date: Sun, 5 Jun 2011 14:46:42 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r222717 - user/adrian/if_ath_tx/sys/dev/ath
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 05 Jun 2011 14:46:42 -0000

Author: adrian
Date: Sun Jun  5 14:46:42 2011
New Revision: 222717
URL: http://svn.freebsd.org/changeset/base/222717

Log:
  More software TX queue preparation changes
  
  * move the TX queue out from the hardware txq and to the softc for now
  * begin fleshing out the very basic software tx queue functions

Modified:
  user/adrian/if_ath_tx/sys/dev/ath/if_ath.c
  user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c
  user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.h
  user/adrian/if_ath_tx/sys/dev/ath/if_athvar.h

Modified: user/adrian/if_ath_tx/sys/dev/ath/if_ath.c
==============================================================================
--- user/adrian/if_ath_tx/sys/dev/ath/if_ath.c	Sun Jun  5 14:13:15 2011	(r222716)
+++ user/adrian/if_ath_tx/sys/dev/ath/if_ath.c	Sun Jun  5 14:46:42 2011	(r222717)
@@ -739,6 +739,9 @@ ath_attach(u_int16_t devid, struct ath_s
 	ath_sysctlattach(sc);
 	ath_sysctl_stats_attach(sc);
 
+	/* Setup software TX queue related bits */
+	STAILQ_INIT(&sc->sc_txnodeq);
+
 	if (bootverbose)
 		ieee80211_announce(ic);
 	ath_announce(sc);
@@ -3736,7 +3739,6 @@ ath_txq_init(struct ath_softc *sc, struc
 	txq->axq_intrcnt = 0;
 	txq->axq_link = NULL;
 	STAILQ_INIT(&txq->axq_q);
-	STAILQ_INIT(&txq->axq_nodeq);
 	ATH_TXQ_LOCK_INIT(sc, txq);
 }
 

Modified: user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c
==============================================================================
--- user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c	Sun Jun  5 14:13:15 2011	(r222716)
+++ user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c	Sun Jun  5 14:46:42 2011	(r222717)
@@ -1122,3 +1122,64 @@ bad:
 	ieee80211_free_node(ni);
 	return error;
 }
+
+
+/* Per-node software queue operations */
+
+/*
+ * Mark the current node/TID as ready to TX.
+ *
+ * This is done to make it easy for the software scheduler to 
+ * find which nodes/TIDs have data to send.
+ */
+static void
+ath_tx_node_sched(struct ath_softc *sc, struct ath_node *an, int tid)
+{
+	/*
+	 * For now, the node is marked as ready;
+	 * later code will also maintain a per-TID list.
+	 */
+	if (an->sched)
+		return;		/* already scheduled */
+
+	STAILQ_INSERT_TAIL(&sc->sc_txnodeq, an, an_list);
+}
+
+/*
+ * Queue the given packet on the relevant software queue.
+ *
+ * This however doesn't queue the packet to the hardware!
+ */
+void
+ath_tx_swq(struct ath_softc *sc, struct ieee80211_node *ni, struct ath_buf *bf,
+    struct mbuf *m0)
+{
+	struct ath_node *an = ATH_NODE(ni);
+	struct ieee80211_frame *wh;
+	struct ath_tid *atid;
+	int tid;
+
+	/* Fetch the TID - non-QoS frames get assigned to TID 16 */
+	wh = mtod(m0, struct ieee80211_frame *);
+	tid = ieee80211_gettid(wh);
+	atid = &an->an_tid[tid];
+
+	/* Queue frame to the tail of the software queue */
+	ATH_TXQ_INSERT_TAIL(atid, bf, bf_list);
+
+	/* Mark the given node/tid as having packets to dequeue */
+	ath_tx_node_sched(sc, an, tid);
+}
+
+/*
+ * Do the basic frame setup stuff that's required before the frame
+ * is added to a software queue.
+ *
+ * All frames get mostly the same treatment and it's done once.
+ * Retransmits fiddle with things like the rate control setup,
+ * setting the retransmit bit in the packet; doing relevant DMA/bus
+ * syncing and relinking it (back) into the hardware TX queue.
+ *
+ * Note that this may cause the mbuf to be reallocated, so
+ * m0 may not be valid.
+ */

Modified: user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.h
==============================================================================
--- user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.h	Sun Jun  5 14:13:15 2011	(r222716)
+++ user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.h	Sun Jun  5 14:46:42 2011	(r222717)
@@ -41,4 +41,8 @@ extern int ath_tx_start(struct ath_softc
 extern int ath_raw_xmit(struct ieee80211_node *ni, struct mbuf *m,
     const struct ieee80211_bpf_params *params);
 
+/* software queue stuff */
+extern void ath_tx_swq(struct ath_softc *sc, struct ieee80211_node *ni,
+    struct ath_buf *bf, struct mbuf *m0);
+
 #endif

Modified: user/adrian/if_ath_tx/sys/dev/ath/if_athvar.h
==============================================================================
--- user/adrian/if_ath_tx/sys/dev/ath/if_athvar.h	Sun Jun  5 14:13:15 2011	(r222716)
+++ user/adrian/if_ath_tx/sys/dev/ath/if_athvar.h	Sun Jun  5 14:46:42 2011	(r222717)
@@ -91,7 +91,8 @@ struct ath_buf;
  * Note that TID 16 (WME_NUM_TID+1) is for handling non-QoS frames.
  */
 struct ath_tid {
-	STAILQ_HEAD(ath_tid_bq,ath_buf) buf_q;		/* pending buffers        */
+	STAILQ_HEAD(,ath_buf) axq_q;		/* pending buffers        */
+	u_int			axq_depth;	/* queue depth (stat only) */
 	struct ath_buf *tx_buf[ATH_TID_MAX_BUFS];	/* active tx buffers, beginning at current BAW */
 };
 
@@ -194,7 +195,6 @@ struct ath_txq {
 	u_int			axq_intrcnt;	/* interrupt count */
 	u_int32_t		*axq_link;	/* link ptr in last TX desc */
 	STAILQ_HEAD(, ath_buf)	axq_q;		/* transmit queue */
-	STAILQ_HEAD(, ath_node)	axq_nodeq;	/* Nodes which have traffic to send */
 	struct mtx		axq_lock;	/* lock on q and link */
 	char			axq_name[12];	/* e.g. "ath0_txq4" */
 };
@@ -396,6 +396,9 @@ struct ath_softc {
 	/* DFS related state */
 	void			*sc_dfs;	/* Used by an optional DFS module */
 	struct task		sc_dfstask;	/* DFS processing task */
+
+	/* Software TX queue related state */
+	STAILQ_HEAD(, ath_node)	sc_txnodeq;	/* Nodes which have traffic to send */
 };
 
 #define	ATH_LOCK_INIT(_sc) \

From owner-svn-src-user@FreeBSD.ORG  Mon Jun  6 01:18:54 2011
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4F248106564A;
	Mon,  6 Jun 2011 01:18:54 +0000 (UTC) (envelope-from hrs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 424A18FC0C;
	Mon,  6 Jun 2011 01:18:54 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p561Is5d005329;
	Mon, 6 Jun 2011 01:18:54 GMT (envelope-from hrs@svn.freebsd.org)
Received: (from hrs@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p561Is1j005327;
	Mon, 6 Jun 2011 01:18:54 GMT (envelope-from hrs@svn.freebsd.org)
Message-Id: <201106060118.p561Is1j005327@svn.freebsd.org>
From: Hiroki Sato <hrs@FreeBSD.org>
Date: Mon, 6 Jun 2011 01:18:54 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r222725 - user/hrs/ipv6/sys/netinet6
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 06 Jun 2011 01:18:54 -0000

Author: hrs
Date: Mon Jun  6 01:18:53 2011
New Revision: 222725
URL: http://svn.freebsd.org/changeset/base/222725

Log:
  Fix a missing {.

Modified:
  user/hrs/ipv6/sys/netinet6/nd6.c

Modified: user/hrs/ipv6/sys/netinet6/nd6.c
==============================================================================
--- user/hrs/ipv6/sys/netinet6/nd6.c	Sun Jun  5 22:36:30 2011	(r222724)
+++ user/hrs/ipv6/sys/netinet6/nd6.c	Mon Jun  6 01:18:53 2011	(r222725)
@@ -1349,7 +1349,7 @@ nd6_ioctl(u_long cmd, caddr_t data, stru
 					continue;
 				ia = (struct in6_ifaddr *)ifa;
 				if ((ia->ia6_flags & IN6_IFF_DUPLICATED) &&
-				    IN6_IS_ADDR_LINKLOCAL(IA6_IN6(ia)))
+				    IN6_IS_ADDR_LINKLOCAL(IA6_IN6(ia))) {
 					duplicated_linklocal = 1;
 					break;
 				}

From owner-svn-src-user@FreeBSD.ORG  Mon Jun  6 01:53:31 2011
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B803B106564A;
	Mon,  6 Jun 2011 01:53:31 +0000 (UTC)
	(envelope-from adrian@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id AA1098FC0A;
	Mon,  6 Jun 2011 01:53:31 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p561rVsT006403;
	Mon, 6 Jun 2011 01:53:31 GMT (envelope-from adrian@svn.freebsd.org)
Received: (from adrian@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p561rVrw006401;
	Mon, 6 Jun 2011 01:53:31 GMT (envelope-from adrian@svn.freebsd.org)
Message-Id: <201106060153.p561rVrw006401@svn.freebsd.org>
From: Adrian Chadd <adrian@FreeBSD.org>
Date: Mon, 6 Jun 2011 01:53:31 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r222727 - user/adrian/if_ath_tx/sys/dev/ath
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 06 Jun 2011 01:53:31 -0000

Author: adrian
Date: Mon Jun  6 01:53:31 2011
New Revision: 222727
URL: http://svn.freebsd.org/changeset/base/222727

Log:
  Begin separating out the "setup descriptor", "setup descriptor list"
  and "handoff" from the actual TX path.
  
  Packets going onto a software TX queue will need to be setup as per
  normal but won't be added to the hardware TX queue until later.
  
  Details:
  
  * ath_tx_start() is now ath_tx_normal_setup() - it sets up the packet,
    configures the first descriptor but doesn't add it to the TX queue
    via ath_tx_handoff();
  * ath_tx_handoff() now doesn't call ath_tx_chaindesclist() to chain
    together descriptors as required by the MAC;
  
  * a new ath_tx_start() now:
  
    + determines the destination TX queue;
    + calls ath_tx_normal_setup() to do the packet and descriptor setup;
    + calls ath_tx_chaindesclist() to chain the descriptors together
      for the MAC;
    + calls ath_tx_handoff() to dispatch to the hardware.
  
  The packets going onto the mcast software TXQ (which is implemented
  just like a hardware TXQ, but with no hardware dispatch :) already do
  this but the decision not to dispatch them directly is done in
  ath_tx_handoff() which is something that needs to be uncoupled a bit better.
  
  Whilst I'm here (and having to do development on an 80x50 VGA console,
  due to needing to interpret kernel panics) undo some of my brain damaged
  non-style(9) commits.

Modified:
  user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c

Modified: user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c
==============================================================================
--- user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c	Mon Jun  6 01:52:15 2011	(r222726)
+++ user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c	Mon Jun  6 01:53:31 2011	(r222727)
@@ -226,7 +226,8 @@ ath_tx_dmasetup(struct ath_softc *sc, st
 }
 
 static void
-ath_tx_chaindesclist(struct ath_softc *sc, struct ath_txq *txq, struct ath_buf *bf)
+ath_tx_chaindesclist(struct ath_softc *sc, struct ath_txq *txq,
+   struct ath_buf *bf)
 {
 	struct ath_hal *ah = sc->sc_ah;
 	struct ath_desc *ds, *ds0;
@@ -261,9 +262,6 @@ ath_tx_handoff(struct ath_softc *sc, str
 {
 	struct ath_hal *ah = sc->sc_ah;
 
-	/* Fill in the details in the descriptor list */
-	ath_tx_chaindesclist(sc, txq, bf);
-
 	/*
 	 * Insert the frame on the outbound list and pass it on
 	 * to the hardware.  Multicast frames buffered for power
@@ -488,9 +486,9 @@ ath_tx_calc_ctsduration(struct ath_hal *
 	return ctsduration;
 }
 
-int
-ath_tx_start(struct ath_softc *sc, struct ieee80211_node *ni, struct ath_buf *bf,
-    struct mbuf *m0)
+static int
+ath_tx_normal_setup(struct ath_softc *sc, struct ieee80211_node *ni,
+    struct ath_buf *bf, struct mbuf *m0)
 {
 	struct ieee80211vap *vap = ni->ni_vap;
 	struct ath_vap *avp = ATH_VAP(vap);
@@ -528,7 +526,8 @@ ath_tx_start(struct ath_softc *sc, struc
 	pktlen = m0->m_pkthdr.len - (hdrlen & 3);
 
 	/* Handle encryption twiddling if needed */
-	if (! ath_tx_tag_crypto(sc, ni, m0, iswep, isfrag, &hdrlen, &pktlen, &keyix)) {
+	if (! ath_tx_tag_crypto(sc, ni, m0, iswep, isfrag, &hdrlen,
+	    &pktlen, &keyix)) {
 		ath_freetx(m0);
 		return EIO;
 	}
@@ -774,6 +773,32 @@ ath_tx_start(struct ath_softc *sc, struc
 	} else
 		ctsrate = 0;
 
+
+	/*
+	 * Determine if a tx interrupt should be generated for
+	 * this descriptor.  We take a tx interrupt to reap
+	 * descriptors when the h/w hits an EOL condition or
+	 * when the descriptor is specifically marked to generate
+	 * an interrupt.  We periodically mark descriptors in this
+	 * way to insure timely replenishing of the supply needed
+	 * for sending frames.  Defering interrupts reduces system
+	 * load and potentially allows more concurrent work to be
+	 * done but if done to aggressively can cause senders to
+	 * backup.
+	 *
+	 * NB: use >= to deal with sc_txintrperiod changing
+	 *     dynamically through sysctl.
+	 */
+	if (flags & HAL_TXDESC_INTREQ) {
+		txq->axq_intrcnt = 0;
+	} else if (++txq->axq_intrcnt >= sc->sc_txintrperiod) {
+		flags |= HAL_TXDESC_INTREQ;
+		txq->axq_intrcnt = 0;
+	}
+
+	/* This point forward is actual TX bits */
+
+
 	/*
 	 * At this point we are committed to sending the frame
 	 * and we don't need to look at m_nextpkt; clear it in
@@ -801,27 +826,6 @@ ath_tx_start(struct ath_softc *sc, struc
 		ieee80211_radiotap_tx(vap, m0);
 	}
 
-	/*
-	 * Determine if a tx interrupt should be generated for
-	 * this descriptor.  We take a tx interrupt to reap
-	 * descriptors when the h/w hits an EOL condition or
-	 * when the descriptor is specifically marked to generate
-	 * an interrupt.  We periodically mark descriptors in this
-	 * way to insure timely replenishing of the supply needed
-	 * for sending frames.  Defering interrupts reduces system
-	 * load and potentially allows more concurrent work to be
-	 * done but if done to aggressively can cause senders to
-	 * backup.
-	 *
-	 * NB: use >= to deal with sc_txintrperiod changing
-	 *     dynamically through sysctl.
-	 */
-	if (flags & HAL_TXDESC_INTREQ) {
-		txq->axq_intrcnt = 0;
-	} else if (++txq->axq_intrcnt >= sc->sc_txintrperiod) {
-		flags |= HAL_TXDESC_INTREQ;
-		txq->axq_intrcnt = 0;
-	}
 
 	if (ath_tx_is_11n(sc)) {
 		rate[0] = rix;
@@ -862,10 +866,57 @@ ath_tx_start(struct ath_softc *sc, struc
         }
 
         if (ath_tx_is_11n(sc)) {
-                ath_buf_set_rate(sc, ni, bf, pktlen, flags, ctsrate, (atype == HAL_PKT_TYPE_PSPOLL), rate, try);
+                ath_buf_set_rate(sc, ni, bf, pktlen, flags, ctsrate,
+		    (atype == HAL_PKT_TYPE_PSPOLL), rate, try);
         }
 
+	return 0;
+}
+
+/*
+ * Direct-dispatch the current frame to the hardware.
+ */
+int
+ath_tx_start(struct ath_softc *sc, struct ieee80211_node *ni,
+    struct ath_buf *bf, struct mbuf *m0)
+{
+	struct ieee80211vap *vap = ni->ni_vap;
+	struct ath_vap *avp = ATH_VAP(vap);
+	int r;
+	u_int pri;
+	struct ath_txq *txq;
+	int ismcast;
+	const struct ieee80211_frame *wh;
+
+	/* Determine the target hardware queue! */
+	pri = M_WME_GETAC(m0);			/* honor classification */
+	txq = sc->sc_ac2q[pri];
+	wh = mtod(m0, struct ieee80211_frame *);
+	ismcast = IEEE80211_IS_MULTICAST(wh->i_addr1);
+
+	/* Multicast frames go onto the software multicat queue */
+	if (ismcast && (vap->iv_ps_sta || avp->av_mcastq.axq_depth))
+		txq = &avp->av_mcastq;
+
+	/* Do the generic frame setup */
+	/* This also sets up the DMA map */
+	r = ath_tx_normal_setup(sc, ni, bf, m0);
+
+	if (r != 0)
+		return r;
+
+	/* At this point m0 could have changed! */
+	//m0 = bf->bf_m;
+
+	/* Fill in the details in the descriptor list */
+	ath_tx_chaindesclist(sc, txq, bf);
+
+	/*
+	 * For now, since there's no software queue,
+	 * direct-dispatch to the hardware.
+	 */
 	ath_tx_handoff(sc, txq, bf);
+
 	return 0;
 }
 
@@ -1051,10 +1102,14 @@ ath_tx_raw_start(struct ath_softc *sc, s
 		 * notice that rix doesn't include any of the "magic" flags txrate
 		 * does for communicating "other stuff" to the HAL.
 		 */
-		ath_buf_set_rate(sc, ni, bf, pktlen, flags, ctsrate, (atype == HAL_PKT_TYPE_PSPOLL), rate, try);
+		ath_buf_set_rate(sc, ni, bf, pktlen, flags, ctsrate,
+		    (atype == HAL_PKT_TYPE_PSPOLL), rate, try);
 	}
 
 	/* NB: no buffered multicast in power save support */
+
+	/* Fill in the details in the descriptor list */
+	ath_tx_chaindesclist(sc, sc->sc_ac2q[pri], bf);
 	ath_tx_handoff(sc, sc->sc_ac2q[pri], bf);
 	return 0;
 }

From owner-svn-src-user@FreeBSD.ORG  Mon Jun  6 02:25:53 2011
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 6AA72106564A;
	Mon,  6 Jun 2011 02:25:53 +0000 (UTC)
	(envelope-from adrian@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 5D6398FC16;
	Mon,  6 Jun 2011 02:25:53 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p562PrA7007407;
	Mon, 6 Jun 2011 02:25:53 GMT (envelope-from adrian@svn.freebsd.org)
Received: (from adrian@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p562PruI007405;
	Mon, 6 Jun 2011 02:25:53 GMT (envelope-from adrian@svn.freebsd.org)
Message-Id: <201106060225.p562PruI007405@svn.freebsd.org>
From: Adrian Chadd <adrian@FreeBSD.org>
Date: Mon, 6 Jun 2011 02:25:53 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r222729 - user/adrian/if_ath_tx/sys/dev/ath
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 06 Jun 2011 02:25:53 -0000

Author: adrian
Date: Mon Jun  6 02:25:53 2011
New Revision: 222729
URL: http://svn.freebsd.org/changeset/base/222729

Log:
  Add missing flag set.

Modified:
  user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c

Modified: user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c
==============================================================================
--- user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c	Mon Jun  6 02:14:23 2011	(r222728)
+++ user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c	Mon Jun  6 02:25:53 2011	(r222729)
@@ -1197,6 +1197,8 @@ ath_tx_node_sched(struct ath_softc *sc, 
 	if (an->sched)
 		return;		/* already scheduled */
 
+	an->sched = 1;
+
 	STAILQ_INSERT_TAIL(&sc->sc_txnodeq, an, an_list);
 }
 

From owner-svn-src-user@FreeBSD.ORG  Mon Jun  6 02:46:22 2011
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C166A106566B;
	Mon,  6 Jun 2011 02:46:22 +0000 (UTC) (envelope-from hrs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id B35CB8FC0C;
	Mon,  6 Jun 2011 02:46:22 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p562kMkr008128;
	Mon, 6 Jun 2011 02:46:22 GMT (envelope-from hrs@svn.freebsd.org)
Received: (from hrs@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p562kM82008119;
	Mon, 6 Jun 2011 02:46:22 GMT (envelope-from hrs@svn.freebsd.org)
Message-Id: <201106060246.p562kM82008119@svn.freebsd.org>
From: Hiroki Sato <hrs@FreeBSD.org>
Date: Mon, 6 Jun 2011 02:46:22 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r222731 - user/hrs/ipv6/sys/netinet6
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 06 Jun 2011 02:46:22 -0000

Author: hrs
Date: Mon Jun  6 02:46:22 2011
New Revision: 222731
URL: http://svn.freebsd.org/changeset/base/222731

Log:
  Merge from HEAD@222728,222730.

Modified:
  user/hrs/ipv6/sys/netinet6/in6.c
  user/hrs/ipv6/sys/netinet6/in6.h
  user/hrs/ipv6/sys/netinet6/in6_proto.c
  user/hrs/ipv6/sys/netinet6/ip6_var.h
  user/hrs/ipv6/sys/netinet6/nd6.c
  user/hrs/ipv6/sys/netinet6/nd6.h
  user/hrs/ipv6/sys/netinet6/nd6_nbr.c
  user/hrs/ipv6/sys/netinet6/nd6_rtr.c

Modified: user/hrs/ipv6/sys/netinet6/in6.c
==============================================================================
--- user/hrs/ipv6/sys/netinet6/in6.c	Mon Jun  6 02:37:38 2011	(r222730)
+++ user/hrs/ipv6/sys/netinet6/in6.c	Mon Jun  6 02:46:22 2011	(r222731)
@@ -673,7 +673,7 @@ in6_control(struct socket *so, u_long cm
 				/*
 				 * Ignore failure of clearing the flag
 				 * intentionally.  The failure means
-				 * address duplication wes detected.
+				 * address duplication was detected.
 				 */
 			}
 			EVENTHANDLER_INVOKE(ifaddr_event, ifp);

Modified: user/hrs/ipv6/sys/netinet6/in6.h
==============================================================================
--- user/hrs/ipv6/sys/netinet6/in6.h	Mon Jun  6 02:37:38 2011	(r222730)
+++ user/hrs/ipv6/sys/netinet6/in6.h	Mon Jun  6 02:46:22 2011	(r222731)
@@ -611,10 +611,10 @@ struct ip6_mtuinfo {
 #define IPV6CTL_STEALTH		45
 
 #define	ICMPV6CTL_ND6_ONLINKNSRFC4861	47
-#define	IPV6CTL_DEFROUTE_RTADV	48	/* Add a route in RA to defroute list.*/
-#define	IPV6CTL_DISABLE_ISROUTER_RTADVIF 49	/* Disable R-bit in NA on RA
-						 * receiving IF. */
-#define IPV6CTL_MAXID		50
+#define	IPV6CTL_NO_RADR		48	/* No defroute from RA */
+#define	IPV6CTL_NORBIT_RAIF	49	/* Disable R-bit in NA on RA
+					 * receiving IF. */
+#define	IPV6CTL_MAXID		50
 #endif /* __BSD_VISIBLE */
 
 /*

Modified: user/hrs/ipv6/sys/netinet6/in6_proto.c
==============================================================================
--- user/hrs/ipv6/sys/netinet6/in6_proto.c	Mon Jun  6 02:37:38 2011	(r222730)
+++ user/hrs/ipv6/sys/netinet6/in6_proto.c	Mon Jun  6 02:46:22 2011	(r222731)
@@ -409,8 +409,8 @@ VNET_DEFINE(int, ip6_sendredirects) = IP
 VNET_DEFINE(int, ip6_defhlim) = IPV6_DEFHLIM;
 VNET_DEFINE(int, ip6_defmcasthlim) = IPV6_DEFAULT_MULTICAST_HOPS;
 VNET_DEFINE(int, ip6_accept_rtadv) = 0;
-VNET_DEFINE(int, ip6_defroute_rtadv) = 1;
-VNET_DEFINE(int, ip6_disable_isrouter_rtadvif) = 0;
+VNET_DEFINE(int, ip6_no_radr) = 0;
+VNET_DEFINE(int, ip6_norbit_raif) = 0;
 VNET_DEFINE(int, ip6_maxfragpackets);	/* initialized in frag6.c:frag6_init() */
 VNET_DEFINE(int, ip6_maxfrags);		/* initialized in frag6.c:frag6_init() */
 VNET_DEFINE(int, ip6_log_interval) = 5;
@@ -539,14 +539,13 @@ SYSCTL_VNET_INT(_net_inet6_ip6, IPV6CTL_
 	CTLFLAG_RW, &VNET_NAME(ip6_accept_rtadv), 0,
 	"Default value of per-interface flag for accepting ICMPv6 Router"
 	"Advertisement messages");
-SYSCTL_VNET_INT(_net_inet6_ip6, IPV6CTL_DEFROUTE_RTADV, defroute_rtadv,
-	CTLFLAG_RW, &VNET_NAME(ip6_defroute_rtadv), 0,
+SYSCTL_VNET_INT(_net_inet6_ip6, IPV6CTL_NO_RADR, no_radr,
+	CTLFLAG_RW, &VNET_NAME(ip6_no_radr), 0,
 	"Default value of per-interface flag to control whether routers "
 	"sending ICMPv6 RA messages on that interface are added into the "
 	"default router list.");
-SYSCTL_VNET_INT(_net_inet6_ip6, IPV6CTL_DISABLE_ISROUTER_RTADVIF,
-	disable_isrouter_rtadvif, CTLFLAG_RW,
-	&VNET_NAME(ip6_disable_isrouter_rtadvif), 0,
+SYSCTL_VNET_INT(_net_inet6_ip6, IPV6CTL_NORBIT_RAIF, norbit_raif, CTLFLAG_RW,
+	&VNET_NAME(ip6_norbit_raif), 0,
 	"Always set 0 to R flag in ICMPv6 NA messages when accepting RA"
 	" on the interface.");
 SYSCTL_VNET_INT(_net_inet6_ip6, IPV6CTL_KEEPFAITH, keepfaith, CTLFLAG_RW,

Modified: user/hrs/ipv6/sys/netinet6/ip6_var.h
==============================================================================
--- user/hrs/ipv6/sys/netinet6/ip6_var.h	Mon Jun  6 02:37:38 2011	(r222730)
+++ user/hrs/ipv6/sys/netinet6/ip6_var.h	Mon Jun  6 02:46:22 2011	(r222731)
@@ -316,9 +316,9 @@ VNET_DECLARE(int, ip6_maxfragpackets);	/
 VNET_DECLARE(int, ip6_maxfrags);	/* Maximum fragments in reassembly
 					 * queue */
 VNET_DECLARE(int, ip6_accept_rtadv);	/* Acts as a host not a router */
-VNET_DECLARE(int, ip6_defroute_rtadv);	/* Add a route in RA to defroute list.*/
-VNET_DECLARE(int, ip6_disable_isrouter_rtadvif); /* Disable R-bit in NA on RA
-						  * receiving IF. */
+VNET_DECLARE(int, ip6_no_radr);		/* No defroute from RA */
+VNET_DECLARE(int, ip6_norbit_raif);	/* Disable R-bit in NA on RA
+					 * receiving IF. */
 VNET_DECLARE(int, ip6_keepfaith);	/* Firewall Aided Internet Translator */
 VNET_DECLARE(int, ip6_log_interval);
 VNET_DECLARE(time_t, ip6_log_time);
@@ -330,8 +330,8 @@ VNET_DECLARE(int, ip6_dad_count);	/* Dup
 #define	V_ip6_maxfragpackets		VNET(ip6_maxfragpackets)
 #define	V_ip6_maxfrags			VNET(ip6_maxfrags)
 #define	V_ip6_accept_rtadv		VNET(ip6_accept_rtadv)
-#define	V_ip6_defroute_rtadv		VNET(ip6_defroute_rtadv)
-#define	V_ip6_disable_isrouter_rtadvif	VNET(ip6_disable_isrouter_rtadvif)
+#define	V_ip6_no_radr			VNET(ip6_no_radr)
+#define	V_ip6_norbit_raif		VNET(ip6_norbit_raif)
 #define	V_ip6_keepfaith			VNET(ip6_keepfaith)
 #define	V_ip6_log_interval		VNET(ip6_log_interval)
 #define	V_ip6_log_time			VNET(ip6_log_time)

Modified: user/hrs/ipv6/sys/netinet6/nd6.c
==============================================================================
--- user/hrs/ipv6/sys/netinet6/nd6.c	Mon Jun  6 02:37:38 2011	(r222730)
+++ user/hrs/ipv6/sys/netinet6/nd6.c	Mon Jun  6 02:46:22 2011	(r222731)
@@ -193,8 +193,8 @@ nd6_ifattach(struct ifnet *ifp)
 	/* A loopback interface does not need to accept RTADV. */
 	if (V_ip6_accept_rtadv && !(ifp->if_flags & IFF_LOOPBACK))
 		nd->flags |= ND6_IFF_ACCEPT_RTADV;
-	if (V_ip6_defroute_rtadv && !(ifp->if_flags & IFF_LOOPBACK))
-		nd->flags |= ND6_IFF_DEFROUTE_RTADV;
+	if (V_ip6_no_radr && !(ifp->if_flags & IFF_LOOPBACK))
+		nd->flags |= ND6_IFF_NO_RADR;
 
 	/* XXX: we cannot call nd6_setmtu since ifp is not fully initialized */
 	nd6_setmtu0(ifp, nd);
@@ -1328,7 +1328,7 @@ nd6_ioctl(u_long cmd, caddr_t data, stru
 		 */
 		if ((ND_IFINFO(ifp)->flags & ND6_IFF_IFDISABLED) &&
 		    (ND.flags & (ND6_IFF_ACCEPT_RTADV |
-			    ND6_IFF_AUTO_LINKLOCAL)))
+		    ND6_IFF_AUTO_LINKLOCAL)))
 			ND.flags &= ~ND6_IFF_IFDISABLED;
 
 		if ((ND_IFINFO(ifp)->flags & ND6_IFF_IFDISABLED) &&

Modified: user/hrs/ipv6/sys/netinet6/nd6.h
==============================================================================
--- user/hrs/ipv6/sys/netinet6/nd6.h	Mon Jun  6 02:37:38 2011	(r222730)
+++ user/hrs/ipv6/sys/netinet6/nd6.h	Mon Jun  6 02:46:22 2011	(r222731)
@@ -85,7 +85,7 @@ struct nd_ifinfo {
 				     */
 #define ND6_IFF_DONT_SET_IFROUTE	0x10
 #define ND6_IFF_AUTO_LINKLOCAL	0x20
-#define ND6_IFF_DEFROUTE_RTADV	0x40
+#define	ND6_IFF_NO_RADR		0x40
 
 #define	ND6_CREATE		LLE_CREATE
 #define	ND6_EXCLUSIVE		LLE_EXCLUSIVE

Modified: user/hrs/ipv6/sys/netinet6/nd6_nbr.c
==============================================================================
--- user/hrs/ipv6/sys/netinet6/nd6_nbr.c	Mon Jun  6 02:37:38 2011	(r222730)
+++ user/hrs/ipv6/sys/netinet6/nd6_nbr.c	Mon Jun  6 02:46:22 2011	(r222731)
@@ -118,8 +118,7 @@ nd6_ns_input(struct mbuf *m, int off, in
 	char ip6bufs[INET6_ADDRSTRLEN], ip6bufd[INET6_ADDRSTRLEN];
 
 	rflag = (V_ip6_forwarding) ? ND_NA_FLAG_ROUTER : 0;
-	if (ND_IFINFO(ifp)->flags & ND6_IFF_ACCEPT_RTADV &&
-	    V_ip6_disable_isrouter_rtadvif)
+	if (ND_IFINFO(ifp)->flags & ND6_IFF_ACCEPT_RTADV && V_ip6_norbit_raif)
 		rflag = 0;
 #ifndef PULLDOWN_TEST
 	IP6_EXTHDR_CHECK(m, off, icmp6len,);

Modified: user/hrs/ipv6/sys/netinet6/nd6_rtr.c
==============================================================================
--- user/hrs/ipv6/sys/netinet6/nd6_rtr.c	Mon Jun  6 02:37:38 2011	(r222730)
+++ user/hrs/ipv6/sys/netinet6/nd6_rtr.c	Mon Jun  6 02:46:22 2011	(r222731)
@@ -270,12 +270,13 @@ nd6_ra_input(struct mbuf *m, int off, in
 	dr0.flags  = nd_ra->nd_ra_flags_reserved;
 	/*
 	 * Effectively-disable the route in the RA packet
-	 * when !ND6_IFF_DEFROUTE_RTADV on the receiving interface.
+	 * when ND6_IFF_NO_RADR on the receiving interface or
+	 * ip6.forwarding=1.
 	 */
-	if (ndi->flags & ND6_IFF_DEFROUTE_RTADV)
-		dr0.rtlifetime = ntohs(nd_ra->nd_ra_router_lifetime);
-	else
+	if (ndi->flags & ND6_IFF_NO_RADR || V_ip6_forwarding)
 		dr0.rtlifetime = 0;
+	else
+		dr0.rtlifetime = ntohs(nd_ra->nd_ra_router_lifetime);
 	dr0.expire = time_second + dr0.rtlifetime;
 	dr0.ifp = ifp;
 	/* unspecified or not? (RFC 2461 6.3.4) */

From owner-svn-src-user@FreeBSD.ORG  Tue Jun  7 06:45:51 2011
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C822A1065672;
	Tue,  7 Jun 2011 06:45:51 +0000 (UTC)
	(envelope-from adrian@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id B73448FC1A;
	Tue,  7 Jun 2011 06:45:51 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p576jp5T069498;
	Tue, 7 Jun 2011 06:45:51 GMT (envelope-from adrian@svn.freebsd.org)
Received: (from adrian@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p576jpG7069496;
	Tue, 7 Jun 2011 06:45:51 GMT (envelope-from adrian@svn.freebsd.org)
Message-Id: <201106070645.p576jpG7069496@svn.freebsd.org>
From: Adrian Chadd <adrian@FreeBSD.org>
Date: Tue, 7 Jun 2011 06:45:51 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r222807 - user/adrian/if_ath_tx/sys/dev/ath
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 07 Jun 2011 06:45:52 -0000

Author: adrian
Date: Tue Jun  7 06:45:51 2011
New Revision: 222807
URL: http://svn.freebsd.org/changeset/base/222807

Log:
  Break out ath_hx_handoff() into hardware and software varieties.
  The only software path at the moment is the mcastq which is then
  added to the CAB queue (HW) before the beacon is transmitted.

Modified:
  user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c

Modified: user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c
==============================================================================
--- user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c	Tue Jun  7 06:42:29 2011	(r222806)
+++ user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c	Tue Jun  7 06:45:51 2011	(r222807)
@@ -258,7 +258,36 @@ ath_tx_chaindesclist(struct ath_softc *s
 }
 
 static void
-ath_tx_handoff(struct ath_softc *sc, struct ath_txq *txq, struct ath_buf *bf)
+ath_tx_handoff_mcast(struct ath_softc *sc, struct ath_txq *txq, struct ath_buf *bf)
+{
+	ATH_TXQ_LOCK(txq);
+	KASSERT((bf->bf_flags & ATH_BUF_BUSY) == 0,
+	     ("busy status 0x%x", bf->bf_flags));
+	if (txq->axq_link != NULL) {
+		struct ath_buf *last = ATH_TXQ_LAST(txq);
+		struct ieee80211_frame *wh;
+
+		/* mark previous frame */
+		wh = mtod(last->bf_m, struct ieee80211_frame *);
+		wh->i_fc[1] |= IEEE80211_FC1_MORE_DATA;
+		bus_dmamap_sync(sc->sc_dmat, last->bf_dmamap,
+		    BUS_DMASYNC_PREWRITE);
+
+		/* link descriptor */
+		*txq->axq_link = bf->bf_daddr;
+	}
+	ATH_TXQ_INSERT_TAIL(txq, bf, bf_list);
+	txq->axq_link = &bf->bf_desc[bf->bf_nseg - 1].ds_link;
+	ATH_TXQ_UNLOCK(txq);
+}
+
+
+
+/*
+ * Hand-off packet to a hardware queue.
+ */
+static void
+ath_tx_handoff_hw(struct ath_softc *sc, struct ath_txq *txq, struct ath_buf *bf)
 {
 	struct ath_hal *ah = sc->sc_ah;
 
@@ -273,7 +302,11 @@ ath_tx_handoff(struct ath_softc *sc, str
 	ATH_TXQ_LOCK(txq);
 	KASSERT((bf->bf_flags & ATH_BUF_BUSY) == 0,
 	     ("busy status 0x%x", bf->bf_flags));
-	if (txq->axq_qnum != ATH_TXQ_SWQ) {
+	KASSERT(txq->axq_qnum != ATH_TXQ_SWQ,
+	     ("ath_tx_handoff_hw called for mcast queue"));
+
+	/* For now, so not to generate whitespace diffs */
+	if (1) {
 #ifdef IEEE80211_SUPPORT_TDMA
 		int qbusy;
 
@@ -347,26 +380,19 @@ ath_tx_handoff(struct ath_softc *sc, str
 #endif /* IEEE80211_SUPPORT_TDMA */
 		txq->axq_link = &bf->bf_desc[bf->bf_nseg - 1].ds_link;
 		ath_hal_txstart(ah, txq->axq_qnum);
-	} else {
-		if (txq->axq_link != NULL) {
-			struct ath_buf *last = ATH_TXQ_LAST(txq);
-			struct ieee80211_frame *wh;
-
-			/* mark previous frame */
-			wh = mtod(last->bf_m, struct ieee80211_frame *);
-			wh->i_fc[1] |= IEEE80211_FC1_MORE_DATA;
-			bus_dmamap_sync(sc->sc_dmat, last->bf_dmamap,
-			    BUS_DMASYNC_PREWRITE);
-
-			/* link descriptor */
-			*txq->axq_link = bf->bf_daddr;
-		}
-		ATH_TXQ_INSERT_TAIL(txq, bf, bf_list);
-		txq->axq_link = &bf->bf_desc[bf->bf_nseg - 1].ds_link;
 	}
 	ATH_TXQ_UNLOCK(txq);
 }
 
+static void
+ath_tx_handoff(struct ath_softc *sc, struct ath_txq *txq, struct ath_buf *bf)
+{
+	if (txq->axq_qnum == ATH_TXQ_SWQ)
+		ath_tx_handoff_mcast(sc, txq, bf);
+	else
+		ath_tx_handoff_hw(sc, txq, bf);
+}
+
 static int
 ath_tx_tag_crypto(struct ath_softc *sc, struct ieee80211_node *ni,
     struct mbuf *m0, int iswep, int isfrag, int *hdrlen, int *pktlen, int *keyix)
@@ -915,7 +941,10 @@ ath_tx_start(struct ath_softc *sc, struc
 	 * For now, since there's no software queue,
 	 * direct-dispatch to the hardware.
 	 */
-	ath_tx_handoff(sc, txq, bf);
+	if (ismcast)
+		ath_tx_handoff_mcast(sc, txq, bf);
+	else
+		ath_tx_handoff_hw(sc, txq, bf);
 
 	return 0;
 }

From owner-svn-src-user@FreeBSD.ORG  Wed Jun  8 12:03:35 2011
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 777DC1065670;
	Wed,  8 Jun 2011 12:03:35 +0000 (UTC) (envelope-from hrs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 633328FC0A;
	Wed,  8 Jun 2011 12:03:35 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p58C3ZjF030103;
	Wed, 8 Jun 2011 12:03:35 GMT (envelope-from hrs@svn.freebsd.org)
Received: (from hrs@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p58C3Yjf030076;
	Wed, 8 Jun 2011 12:03:34 GMT (envelope-from hrs@svn.freebsd.org)
Message-Id: <201106081203.p58C3Yjf030076@svn.freebsd.org>
From: Hiroki Sato <hrs@FreeBSD.org>
Date: Wed, 8 Jun 2011 12:03:34 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r222858 - in user/hrs/ipv6: . bin/sh contrib/groff/tmac
	contrib/top etc gnu/usr.bin/gdb/kgdb gnu/usr.bin/groff/tmac
	lib/libiconv lib/libkvm lib/libmemstat libexec/comsat
	release/ia64 sb...
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 08 Jun 2011 12:03:35 -0000

Author: hrs
Date: Wed Jun  8 12:03:34 2011
New Revision: 222858
URL: http://svn.freebsd.org/changeset/base/222858

Log:
  Merge from HEAD@222848.

Added:
  user/hrs/ipv6/sys/boot/ia64/common/icache.c
     - copied unchanged from r222855, head/sys/boot/ia64/common/icache.c
  user/hrs/ipv6/sys/netinet/in_pcbgroup.c
     - copied unchanged from r222855, head/sys/netinet/in_pcbgroup.c
  user/hrs/ipv6/sys/netinet6/in6_pcbgroup.c
     - copied unchanged from r222855, head/sys/netinet6/in6_pcbgroup.c
  user/hrs/ipv6/sys/sys/_cpuset.h
     - copied unchanged from r222855, head/sys/sys/_cpuset.h
  user/hrs/ipv6/tools/regression/bin/sh/expansion/heredoc1.0
     - copied unchanged from r222731, head/tools/regression/bin/sh/expansion/heredoc1.0
  user/hrs/ipv6/tools/regression/bin/sh/expansion/heredoc2.0
     - copied unchanged from r222731, head/tools/regression/bin/sh/expansion/heredoc2.0
Replaced:
  user/hrs/ipv6/share/man/man4/geom_map.4
     - copied unchanged from r222855, head/share/man/man4/geom_map.4
  user/hrs/ipv6/sys/dev/iicbus/ad7417.c
     - copied unchanged from r222855, head/sys/dev/iicbus/ad7417.c
  user/hrs/ipv6/sys/nfs/nfs_kdtrace.h
     - copied unchanged from r222855, head/sys/nfs/nfs_kdtrace.h
  user/hrs/ipv6/sys/sys/_stdint.h
     - copied unchanged from r222855, head/sys/sys/_stdint.h
  user/hrs/ipv6/tools/build/options/WITHOUT_GPIO
     - copied unchanged from r222855, head/tools/build/options/WITHOUT_GPIO
  user/hrs/ipv6/tools/build/options/WITH_OFED
     - copied unchanged from r222855, head/tools/build/options/WITH_OFED
  user/hrs/ipv6/tools/regression/bin/sh/builtins/set1.0
     - copied unchanged from r222855, head/tools/regression/bin/sh/builtins/set1.0
  user/hrs/ipv6/tools/regression/bin/sh/parser/dollar-quote1.0
     - copied unchanged from r222855, head/tools/regression/bin/sh/parser/dollar-quote1.0
  user/hrs/ipv6/tools/regression/bin/sh/parser/dollar-quote2.0
     - copied unchanged from r222855, head/tools/regression/bin/sh/parser/dollar-quote2.0
  user/hrs/ipv6/tools/regression/bin/sh/parser/dollar-quote3.0
     - copied unchanged from r222855, head/tools/regression/bin/sh/parser/dollar-quote3.0
  user/hrs/ipv6/tools/regression/bin/sh/parser/dollar-quote4.0
     - copied unchanged from r222855, head/tools/regression/bin/sh/parser/dollar-quote4.0
  user/hrs/ipv6/tools/regression/bin/sh/parser/dollar-quote5.0
     - copied unchanged from r222855, head/tools/regression/bin/sh/parser/dollar-quote5.0
  user/hrs/ipv6/tools/regression/bin/sh/parser/dollar-quote6.0
     - copied unchanged from r222855, head/tools/regression/bin/sh/parser/dollar-quote6.0
  user/hrs/ipv6/tools/regression/bin/sh/parser/dollar-quote7.0
     - copied unchanged from r222855, head/tools/regression/bin/sh/parser/dollar-quote7.0
  user/hrs/ipv6/tools/regression/bin/sh/parser/dollar-quote8.0
     - copied unchanged from r222855, head/tools/regression/bin/sh/parser/dollar-quote8.0
  user/hrs/ipv6/tools/regression/bin/sh/parser/dollar-quote9.0
     - copied unchanged from r222855, head/tools/regression/bin/sh/parser/dollar-quote9.0
Modified:
  user/hrs/ipv6/UPDATING
  user/hrs/ipv6/bin/sh/eval.c
  user/hrs/ipv6/contrib/groff/tmac/doc-common
  user/hrs/ipv6/contrib/groff/tmac/doc-syms
  user/hrs/ipv6/contrib/groff/tmac/doc.tmac
  user/hrs/ipv6/etc/network.subr
  user/hrs/ipv6/gnu/usr.bin/gdb/kgdb/kthr.c
  user/hrs/ipv6/gnu/usr.bin/groff/tmac/mdoc.local
  user/hrs/ipv6/lib/libiconv/Makefile
  user/hrs/ipv6/lib/libkvm/kvm_pcpu.c
  user/hrs/ipv6/lib/libmemstat/memstat_uma.c
  user/hrs/ipv6/libexec/comsat/comsat.c
  user/hrs/ipv6/release/ia64/mkisoimages.sh
  user/hrs/ipv6/sbin/geom/class/part/geom_part.c
  user/hrs/ipv6/sbin/geom/class/part/gpart.8
  user/hrs/ipv6/sbin/geom/class/sched/Makefile
  user/hrs/ipv6/sbin/ifconfig/af_inet6.c
  user/hrs/ipv6/sbin/ifconfig/af_nd6.c
  user/hrs/ipv6/sbin/ipfw/main.c
  user/hrs/ipv6/sbin/mount/mount.8
  user/hrs/ipv6/sbin/mount/mount.c
  user/hrs/ipv6/sbin/rcorder/rcorder.8
  user/hrs/ipv6/share/man/man4/amdsbwd.4
  user/hrs/ipv6/share/man/man4/atkbd.4
  user/hrs/ipv6/share/man/man5/fstab.5
  user/hrs/ipv6/share/misc/committers-ports.dot
  user/hrs/ipv6/sys/amd64/acpica/acpi_wakeup.c
  user/hrs/ipv6/sys/amd64/amd64/intr_machdep.c
  user/hrs/ipv6/sys/amd64/amd64/machdep.c
  user/hrs/ipv6/sys/amd64/amd64/mp_machdep.c
  user/hrs/ipv6/sys/amd64/amd64/pmap.c
  user/hrs/ipv6/sys/amd64/amd64/vm_machdep.c
  user/hrs/ipv6/sys/amd64/include/_types.h
  user/hrs/ipv6/sys/amd64/include/pmap.h
  user/hrs/ipv6/sys/amd64/include/smp.h
  user/hrs/ipv6/sys/arm/arm/pmap.c
  user/hrs/ipv6/sys/arm/include/_types.h
  user/hrs/ipv6/sys/arm/include/pmap.h
  user/hrs/ipv6/sys/boot/ia64/common/Makefile
  user/hrs/ipv6/sys/boot/ia64/common/exec.c
  user/hrs/ipv6/sys/boot/ia64/common/libia64.h
  user/hrs/ipv6/sys/boot/ia64/efi/efimd.c
  user/hrs/ipv6/sys/boot/ia64/efi/main.c
  user/hrs/ipv6/sys/boot/ia64/efi/version
  user/hrs/ipv6/sys/cddl/compat/opensolaris/sys/atomic.h
  user/hrs/ipv6/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_history.c
  user/hrs/ipv6/sys/cddl/dev/cyclic/i386/cyclic_machdep.c
  user/hrs/ipv6/sys/cddl/dev/dtrace/amd64/dtrace_subr.c
  user/hrs/ipv6/sys/cddl/dev/dtrace/i386/dtrace_subr.c
  user/hrs/ipv6/sys/conf/NOTES
  user/hrs/ipv6/sys/conf/files
  user/hrs/ipv6/sys/conf/options
  user/hrs/ipv6/sys/ddb/db_command.c
  user/hrs/ipv6/sys/dev/amdsbwd/amdsbwd.c
  user/hrs/ipv6/sys/dev/ath/ath_hal/ah.h
  user/hrs/ipv6/sys/dev/ath/ath_hal/ar5212/ar5212.h
  user/hrs/ipv6/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c
  user/hrs/ipv6/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c
  user/hrs/ipv6/sys/dev/ath/ath_hal/ar5416/ar5416.h
  user/hrs/ipv6/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c
  user/hrs/ipv6/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c
  user/hrs/ipv6/sys/dev/ath/if_athvar.h
  user/hrs/ipv6/sys/dev/atkbdc/atkbd.c
  user/hrs/ipv6/sys/dev/atkbdc/atkbdreg.h
  user/hrs/ipv6/sys/dev/cardbus/cardbus_cis.c
  user/hrs/ipv6/sys/dev/hwpmc/hwpmc_mod.c
  user/hrs/ipv6/sys/dev/pccard/pccard.c
  user/hrs/ipv6/sys/dev/pci/pci.c
  user/hrs/ipv6/sys/dev/puc/pucdata.c
  user/hrs/ipv6/sys/dev/sound/pcm/sound.c
  user/hrs/ipv6/sys/dev/usb/usb_device.h
  user/hrs/ipv6/sys/dev/usb/usb_freebsd.h
  user/hrs/ipv6/sys/dev/usb/usb_generic.c
  user/hrs/ipv6/sys/dev/usb/usb_hub.c
  user/hrs/ipv6/sys/dev/usb/usb_request.c
  user/hrs/ipv6/sys/dev/usb/usb_request.h
  user/hrs/ipv6/sys/dev/usb/usb_transfer.c
  user/hrs/ipv6/sys/dev/usb/usbdi.h
  user/hrs/ipv6/sys/dev/xen/control/control.c
  user/hrs/ipv6/sys/fs/nfs/nfs_var.h
  user/hrs/ipv6/sys/fs/nfsclient/nfs_clport.c
  user/hrs/ipv6/sys/fs/nfsclient/nfs_clrpcops.c
  user/hrs/ipv6/sys/fs/nfsclient/nfs_clstate.c
  user/hrs/ipv6/sys/fs/nfsclient/nfs_clvnops.c
  user/hrs/ipv6/sys/geom/eli/g_eli.c
  user/hrs/ipv6/sys/i386/i386/intr_machdep.c
  user/hrs/ipv6/sys/i386/i386/machdep.c
  user/hrs/ipv6/sys/i386/i386/mp_machdep.c
  user/hrs/ipv6/sys/i386/i386/pmap.c
  user/hrs/ipv6/sys/i386/i386/vm_machdep.c
  user/hrs/ipv6/sys/i386/include/_types.h
  user/hrs/ipv6/sys/i386/include/pmap.h
  user/hrs/ipv6/sys/i386/include/sf_buf.h
  user/hrs/ipv6/sys/i386/include/smp.h
  user/hrs/ipv6/sys/i386/xen/mp_machdep.c
  user/hrs/ipv6/sys/i386/xen/pmap.c
  user/hrs/ipv6/sys/ia64/acpica/acpi_machdep.c
  user/hrs/ipv6/sys/ia64/ia64/machdep.c
  user/hrs/ipv6/sys/ia64/ia64/mp_machdep.c
  user/hrs/ipv6/sys/ia64/ia64/pal.S
  user/hrs/ipv6/sys/ia64/include/_types.h
  user/hrs/ipv6/sys/ia64/include/smp.h
  user/hrs/ipv6/sys/kern/kern_cpuset.c
  user/hrs/ipv6/sys/kern/kern_ktr.c
  user/hrs/ipv6/sys/kern/kern_pmc.c
  user/hrs/ipv6/sys/kern/kern_rmlock.c
  user/hrs/ipv6/sys/kern/kern_shutdown.c
  user/hrs/ipv6/sys/kern/ksched.c
  user/hrs/ipv6/sys/kern/sched_4bsd.c
  user/hrs/ipv6/sys/kern/sched_ule.c
  user/hrs/ipv6/sys/kern/subr_kdb.c
  user/hrs/ipv6/sys/kern/subr_pcpu.c
  user/hrs/ipv6/sys/kern/subr_prf.c
  user/hrs/ipv6/sys/kern/subr_rman.c
  user/hrs/ipv6/sys/kern/subr_smp.c
  user/hrs/ipv6/sys/kern/uipc_syscalls.c
  user/hrs/ipv6/sys/mips/cavium/octeon_mp.c
  user/hrs/ipv6/sys/mips/include/_types.h
  user/hrs/ipv6/sys/mips/include/hwfunc.h
  user/hrs/ipv6/sys/mips/include/pmap.h
  user/hrs/ipv6/sys/mips/include/smp.h
  user/hrs/ipv6/sys/mips/mips/mp_machdep.c
  user/hrs/ipv6/sys/mips/mips/pmap.c
  user/hrs/ipv6/sys/mips/rmi/xlr_machdep.c
  user/hrs/ipv6/sys/mips/sibyte/sb_scd.c
  user/hrs/ipv6/sys/net/bridgestp.c
  user/hrs/ipv6/sys/net/bridgestp.h
  user/hrs/ipv6/sys/net/if_stf.c
  user/hrs/ipv6/sys/netgraph/ng_nat.c
  user/hrs/ipv6/sys/netinet/in_pcb.c
  user/hrs/ipv6/sys/netinet/in_pcb.h
  user/hrs/ipv6/sys/netinet/ip_divert.c
  user/hrs/ipv6/sys/netinet/ip_input.c
  user/hrs/ipv6/sys/netinet/ip_ipsec.c
  user/hrs/ipv6/sys/netinet/ipfw/ip_fw2.c
  user/hrs/ipv6/sys/netinet/ipfw/ip_fw_nat.c
  user/hrs/ipv6/sys/netinet/ipfw/ip_fw_sockopt.c
  user/hrs/ipv6/sys/netinet/libalias/alias_sctp.h
  user/hrs/ipv6/sys/netinet/raw_ip.c
  user/hrs/ipv6/sys/netinet/tcp_subr.c
  user/hrs/ipv6/sys/netinet/tcp_syncache.c
  user/hrs/ipv6/sys/netinet/udp_usrreq.c
  user/hrs/ipv6/sys/netinet6/in6_pcb.c
  user/hrs/ipv6/sys/netinet6/in6_pcb.h
  user/hrs/ipv6/sys/netinet6/ip6_ipsec.c
  user/hrs/ipv6/sys/ofed/include/linux/list.h
  user/hrs/ipv6/sys/pc98/pc98/machdep.c
  user/hrs/ipv6/sys/powerpc/aim/mmu_oea.c
  user/hrs/ipv6/sys/powerpc/aim/mmu_oea64.c
  user/hrs/ipv6/sys/powerpc/booke/platform_bare.c
  user/hrs/ipv6/sys/powerpc/booke/pmap.c
  user/hrs/ipv6/sys/powerpc/include/_types.h
  user/hrs/ipv6/sys/powerpc/include/openpicvar.h
  user/hrs/ipv6/sys/powerpc/include/pmap.h
  user/hrs/ipv6/sys/powerpc/include/smp.h
  user/hrs/ipv6/sys/powerpc/mpc85xx/openpic_fdt.c
  user/hrs/ipv6/sys/powerpc/powerpc/intr_machdep.c
  user/hrs/ipv6/sys/powerpc/powerpc/mp_machdep.c
  user/hrs/ipv6/sys/powerpc/powerpc/openpic.c
  user/hrs/ipv6/sys/powerpc/powerpc/pic_if.m
  user/hrs/ipv6/sys/sparc64/include/_types.h
  user/hrs/ipv6/sys/sparc64/include/ktr.h
  user/hrs/ipv6/sys/sparc64/include/pmap.h
  user/hrs/ipv6/sys/sparc64/include/smp.h
  user/hrs/ipv6/sys/sparc64/sparc64/exception.S
  user/hrs/ipv6/sys/sparc64/sparc64/genassym.c
  user/hrs/ipv6/sys/sparc64/sparc64/intr_machdep.c
  user/hrs/ipv6/sys/sparc64/sparc64/mp_exception.S
  user/hrs/ipv6/sys/sparc64/sparc64/mp_locore.S
  user/hrs/ipv6/sys/sparc64/sparc64/mp_machdep.c
  user/hrs/ipv6/sys/sparc64/sparc64/pmap.c
  user/hrs/ipv6/sys/sparc64/sparc64/swtch.S
  user/hrs/ipv6/sys/sparc64/sparc64/tlb.c
  user/hrs/ipv6/sys/sys/_rmlock.h
  user/hrs/ipv6/sys/sys/conf.h
  user/hrs/ipv6/sys/sys/cpuset.h
  user/hrs/ipv6/sys/sys/ktr.h
  user/hrs/ipv6/sys/sys/pcpu.h
  user/hrs/ipv6/sys/sys/pmckern.h
  user/hrs/ipv6/sys/sys/smp.h
  user/hrs/ipv6/sys/sys/soundcard.h
  user/hrs/ipv6/sys/sys/types.h
  user/hrs/ipv6/sys/ufs/ffs/ffs_alloc.c
  user/hrs/ipv6/sys/x86/x86/local_apic.c
  user/hrs/ipv6/usr.bin/calendar/calendars/calendar.freebsd
  user/hrs/ipv6/usr.bin/calendar/io.c
  user/hrs/ipv6/usr.bin/grep/Makefile
  user/hrs/ipv6/usr.bin/iconv/Makefile
  user/hrs/ipv6/usr.bin/kdump/mksubr
  user/hrs/ipv6/usr.bin/rctl/Makefile
  user/hrs/ipv6/usr.bin/su/su.1
  user/hrs/ipv6/usr.sbin/bluetooth/ath3kfw/Makefile
  user/hrs/ipv6/usr.sbin/bsdinstall/scripts/netconfig_ipv6
  user/hrs/ipv6/usr.sbin/bsnmpd/modules/snmp_wlan/Makefile
  user/hrs/ipv6/usr.sbin/lastlogin/lastlogin.8
  user/hrs/ipv6/usr.sbin/lastlogin/lastlogin.c
  user/hrs/ipv6/usr.sbin/pmccontrol/pmccontrol.c
  user/hrs/ipv6/usr.sbin/route6d/route6d.c
  user/hrs/ipv6/usr.sbin/rtadvd/advcap.c
  user/hrs/ipv6/usr.sbin/rtadvd/config.c
  user/hrs/ipv6/usr.sbin/rtadvd/dump.c
  user/hrs/ipv6/usr.sbin/rtadvd/rtadvd.c
  user/hrs/ipv6/usr.sbin/rtsold/rtsol.c
  user/hrs/ipv6/usr.sbin/rtsold/rtsold.c
  user/hrs/ipv6/usr.sbin/tcpdrop/tcpdrop.c
Directory Properties:
  user/hrs/ipv6/   (props changed)
  user/hrs/ipv6/cddl/contrib/opensolaris/   (props changed)
  user/hrs/ipv6/contrib/bind9/   (props changed)
  user/hrs/ipv6/contrib/binutils/   (props changed)
  user/hrs/ipv6/contrib/bzip2/   (props changed)
  user/hrs/ipv6/contrib/compiler-rt/   (props changed)
  user/hrs/ipv6/contrib/dialog/   (props changed)
  user/hrs/ipv6/contrib/ee/   (props changed)
  user/hrs/ipv6/contrib/expat/   (props changed)
  user/hrs/ipv6/contrib/file/   (props changed)
  user/hrs/ipv6/contrib/gcc/   (props changed)
  user/hrs/ipv6/contrib/gdb/   (props changed)
  user/hrs/ipv6/contrib/gdtoa/   (props changed)
  user/hrs/ipv6/contrib/gnu-sort/   (props changed)
  user/hrs/ipv6/contrib/groff/   (props changed)
  user/hrs/ipv6/contrib/less/   (props changed)
  user/hrs/ipv6/contrib/libpcap/   (props changed)
  user/hrs/ipv6/contrib/libstdc++/   (props changed)
  user/hrs/ipv6/contrib/llvm/   (props changed)
  user/hrs/ipv6/contrib/llvm/tools/clang/   (props changed)
  user/hrs/ipv6/contrib/ncurses/   (props changed)
  user/hrs/ipv6/contrib/netcat/   (props changed)
  user/hrs/ipv6/contrib/ntp/   (props changed)
  user/hrs/ipv6/contrib/one-true-awk/   (props changed)
  user/hrs/ipv6/contrib/openbsm/   (props changed)
  user/hrs/ipv6/contrib/openpam/   (props changed)
  user/hrs/ipv6/contrib/pf/   (props changed)
  user/hrs/ipv6/contrib/sendmail/   (props changed)
  user/hrs/ipv6/contrib/tcpdump/   (props changed)
  user/hrs/ipv6/contrib/tcsh/   (props changed)
  user/hrs/ipv6/contrib/top/   (props changed)
  user/hrs/ipv6/contrib/top/install-sh   (props changed)
  user/hrs/ipv6/contrib/tzcode/stdtime/   (props changed)
  user/hrs/ipv6/contrib/tzcode/zic/   (props changed)
  user/hrs/ipv6/contrib/tzdata/   (props changed)
  user/hrs/ipv6/contrib/wpa/   (props changed)
  user/hrs/ipv6/contrib/xz/   (props changed)
  user/hrs/ipv6/crypto/openssh/   (props changed)
  user/hrs/ipv6/crypto/openssl/   (props changed)
  user/hrs/ipv6/gnu/lib/   (props changed)
  user/hrs/ipv6/gnu/usr.bin/binutils/   (props changed)
  user/hrs/ipv6/gnu/usr.bin/cc/cc_tools/   (props changed)
  user/hrs/ipv6/gnu/usr.bin/gdb/   (props changed)
  user/hrs/ipv6/lib/libc/   (props changed)
  user/hrs/ipv6/lib/libc/stdtime/   (props changed)
  user/hrs/ipv6/lib/libutil/   (props changed)
  user/hrs/ipv6/lib/libz/   (props changed)
  user/hrs/ipv6/sbin/   (props changed)
  user/hrs/ipv6/sbin/ipfw/   (props changed)
  user/hrs/ipv6/share/mk/bsd.arch.inc.mk   (props changed)
  user/hrs/ipv6/share/zoneinfo/   (props changed)
  user/hrs/ipv6/sys/   (props changed)
  user/hrs/ipv6/sys/amd64/include/xen/   (props changed)
  user/hrs/ipv6/sys/boot/   (props changed)
  user/hrs/ipv6/sys/boot/i386/efi/   (props changed)
  user/hrs/ipv6/sys/boot/ia64/efi/   (props changed)
  user/hrs/ipv6/sys/boot/ia64/ski/   (props changed)
  user/hrs/ipv6/sys/boot/powerpc/boot1.chrp/   (props changed)
  user/hrs/ipv6/sys/boot/powerpc/ofw/   (props changed)
  user/hrs/ipv6/sys/cddl/contrib/opensolaris/   (props changed)
  user/hrs/ipv6/sys/conf/   (props changed)
  user/hrs/ipv6/sys/contrib/dev/acpica/   (props changed)
  user/hrs/ipv6/sys/contrib/octeon-sdk/   (props changed)
  user/hrs/ipv6/sys/contrib/pf/   (props changed)
  user/hrs/ipv6/sys/contrib/x86emu/   (props changed)
  user/hrs/ipv6/usr.bin/calendar/   (props changed)
  user/hrs/ipv6/usr.bin/csup/   (props changed)
  user/hrs/ipv6/usr.bin/procstat/   (props changed)
  user/hrs/ipv6/usr.sbin/ndiscvt/   (props changed)
  user/hrs/ipv6/usr.sbin/zic/   (props changed)

Modified: user/hrs/ipv6/UPDATING
==============================================================================
--- user/hrs/ipv6/UPDATING	Wed Jun  8 11:36:06 2011	(r222857)
+++ user/hrs/ipv6/UPDATING	Wed Jun  8 12:03:34 2011	(r222858)
@@ -22,6 +22,33 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9.
 	machines to maximize performance.  (To disable malloc debugging, run
 	ln -s aj /etc/malloc.conf.)
 
+20110608:
+	The following sysctls and tunables are retired on x86 platforms:
+		machdep.hlt_cpus
+		machdep.hlt_logical_cpus
+	The following sysctl is retired:
+		machdep.hyperthreading_allowed
+	The sysctls were supposed to provide a way to dynamically offline and
+	online selected CPUs on x86 platforms, but the implementation has not
+	been reliable especially with SCHED_ULE scheduler.
+	machdep.hyperthreading_allowed tunable is still available to ignore
+	hyperthreading CPUs at OS level.
+	Individual CPUs can be disabled using hint.lapic.X.disabled tunable,
+	where X is an APIC ID of a CPU.  Be advised, though, that disabling
+	CPUs in non-uniform fashion will result in non-uniform topology and
+	may lead to sub-optimal system performance with SCHED_ULE, which is
+	a default scheduler.
+
+20110607:
+	cpumask_t type is retired and cpuset_t is used in order to describe
+	a mask of CPUs.
+
+20110531:
+	Changes to ifconfig(8) for dynamic address family detection mandate
+	that you are running a kernel of 20110525 or later.  Make sure to
+	follow the update procedure to boot a new kernel before installing
+	world.
+
 20110513:
 	Support for sun4v architecture is officially dropped
 

Modified: user/hrs/ipv6/bin/sh/eval.c
==============================================================================
--- user/hrs/ipv6/bin/sh/eval.c	Wed Jun  8 11:36:06 2011	(r222857)
+++ user/hrs/ipv6/bin/sh/eval.c	Wed Jun  8 12:03:34 2011	(r222858)
@@ -409,6 +409,7 @@ evalsubshell(union node *n, int flags)
 	struct job *jp;
 	int backgnd = (n->type == NBACKGND);
 
+	oexitstatus = exitstatus;
 	expredir(n->nredir.redirect);
 	if ((!backgnd && flags & EV_EXIT && !have_traps()) ||
 			forkshell(jp = makejob(n, 1), n, backgnd) == 0) {
@@ -436,6 +437,7 @@ evalredir(union node *n, int flags)
 	struct jmploc *savehandler;
 	volatile int in_redirect = 1;
 
+	oexitstatus = exitstatus;
 	expredir(n->nredir.redirect);
 	savehandler = handler;
 	if (setjmp(jmploc.loc)) {
@@ -478,7 +480,6 @@ expredir(union node *n)
 	for (redir = n ; redir ; redir = redir->nfile.next) {
 		struct arglist fn;
 		fn.lastp = &fn.list;
-		oexitstatus = exitstatus;
 		switch (redir->type) {
 		case NFROM:
 		case NTO:

Modified: user/hrs/ipv6/contrib/groff/tmac/doc-common
==============================================================================
--- user/hrs/ipv6/contrib/groff/tmac/doc-common	Wed Jun  8 11:36:06 2011	(r222857)
+++ user/hrs/ipv6/contrib/groff/tmac/doc-common	Wed Jun  8 12:03:34 2011	(r222858)
@@ -543,6 +543,7 @@
 .ds doc-operating-system-FreeBSD-7.3     7.3
 .ds doc-operating-system-FreeBSD-8.0     8.0
 .ds doc-operating-system-FreeBSD-8.1     8.1
+.ds doc-operating-system-FreeBSD-8.2     8.2
 .
 .ds doc-operating-system-Darwin-8.0.0  8.0.0
 .ds doc-operating-system-Darwin-8.1.0  8.1.0
@@ -563,6 +564,17 @@
 .ds doc-operating-system-Darwin-9.4.0  9.4.0
 .ds doc-operating-system-Darwin-9.5.0  9.5.0
 .ds doc-operating-system-Darwin-9.6.0  9.6.0
+.ds doc-operating-system-Darwin-9.7.0  9.7.0
+.ds doc-operating-system-Darwin-9.8.0  9.8.0
+.ds doc-operating-system-Darwin-10.6.0 10.6.0
+.ds doc-operating-system-Darwin-10.1.0 10.1.0
+.ds doc-operating-system-Darwin-10.2.0 10.2.0
+.ds doc-operating-system-Darwin-10.3.0 10.3.0
+.ds doc-operating-system-Darwin-10.4.0 10.4.0
+.ds doc-operating-system-Darwin-10.5.0 10.5.0
+.ds doc-operating-system-Darwin-10.6.0 10.6.0
+.ds doc-operating-system-Darwin-10.7.0 10.7.0
+.ds doc-operating-system-Darwin-11.0.0 11.0.0
 .
 .ds doc-operating-system-DragonFly-1.0    1.0
 .ds doc-operating-system-DragonFly-1.1    1.1

Modified: user/hrs/ipv6/contrib/groff/tmac/doc-syms
==============================================================================
--- user/hrs/ipv6/contrib/groff/tmac/doc-syms	Wed Jun  8 11:36:06 2011	(r222857)
+++ user/hrs/ipv6/contrib/groff/tmac/doc-syms	Wed Jun  8 12:03:34 2011	(r222858)
@@ -617,6 +617,8 @@
 .\" POSIX Part 1: System API
 .ds doc-str-St--p1003.1        \*[doc-Tn-font-size]\%IEEE\*[doc-str-St] Std 1003.1
 .as doc-str-St--p1003.1        " (\*[Lq]\)\*[Px]\*[doc-str-St].1\*[Rq])
+.ds doc-str-St--p1003.1b       \*[doc-Tn-font-size]\%IEEE\*[doc-str-St] Std 1003.1b
+.as doc-str-St--p1003.1b       " (\*[Lq]\)\*[Px]\*[doc-str-St].1\*[Rq])
 .ds doc-str-St--p1003.1-88     \*[doc-Tn-font-size]\%IEEE\*[doc-str-St] Std 1003.1-1988
 .as doc-str-St--p1003.1-88     " (\*[Lq]\)\*[Px]\*[doc-str-St].1\*[Rq])
 .ds doc-str-St--p1003.1-90     \*[doc-Tn-font-size]ISO/IEC\*[doc-str-St] 9945-1:1990
@@ -754,6 +756,7 @@
 .
 .ds doc-str-Lb-libarm      ARM Architecture Library (libarm, \-larm)
 .ds doc-str-Lb-libarm32    ARM32 Architecture Library (libarm32, \-larm32)
+.ds doc-str-Lb-libbsm      Basic Security Module Library (libbsm, \-lbsm)
 .ds doc-str-Lb-libc        Standard C\~Library (libc, \-lc)
 .ds doc-str-Lb-libcdk      Curses Development Kit Library (libcdk, \-lcdk)
 .ds doc-str-Lb-libcompat   Compatibility Library (libcompat, \-lcompat)
@@ -779,6 +782,7 @@
 .ds doc-str-Lb-libpthread  \*[Px] \*[doc-str-Lb]Threads Library (libpthread, \-lpthread)
 .ds doc-str-Lb-libresolv   DNS Resolver Library (libresolv, \-lresolv)
 .ds doc-str-Lb-librt       \*[Px] \*[doc-str-Lb]Real-time Library (librt, \-lrt)
+.ds doc-str-Lb-libSystem   System Library (libSystem, \-lSystem)
 .ds doc-str-Lb-libtermcap  Termcap Access Library (libtermcap, \-ltermcap)
 .ds doc-str-Lb-libusbhid   USB Human Interface Devices Library (libusbhid, \-lusbhid)
 .ds doc-str-Lb-libutil     System Utilities Library (libutil, \-lutil)

Modified: user/hrs/ipv6/contrib/groff/tmac/doc.tmac
==============================================================================
--- user/hrs/ipv6/contrib/groff/tmac/doc.tmac	Wed Jun  8 11:36:06 2011	(r222857)
+++ user/hrs/ipv6/contrib/groff/tmac/doc.tmac	Wed Jun  8 12:03:34 2011	(r222858)
@@ -1197,8 +1197,14 @@
 .  if !\n[doc-arg-limit] \
 .    ds doc-macro-name Aq
 .
-.  ds doc-quote-left <
-.  ds doc-quote-right >
+.  ie "\*[doc-macro-name]"An" \{\
+.    ds doc-quote-left <
+.    ds doc-quote-right >
+.  \}
+.  el \{\
+.    ds doc-quote-left \[la]
+.    ds doc-quote-right \[ra]
+.  \}
 .
 .  doc-enclose-string \$@
 ..
@@ -1527,7 +1533,10 @@
 .  if !\n[doc-arg-limit] \
 .    ds doc-macro-name Ao
 .
-.  ds doc-quote-left \[la]
+.  ie "\*[doc-macro-name]"An" \
+.    ds doc-quote-left <
+.  el \
+.    ds doc-quote-left \[la]
 .
 .  doc-enclose-open \$@
 ..
@@ -1546,7 +1555,10 @@
 .  if !\n[doc-arg-limit] \
 .    ds doc-macro-name Ac
 .
-.  ds doc-quote-right \[ra]
+.  ie "\*[doc-macro-name]"An" \
+.    ds doc-quote-right >
+.  el \
+.    ds doc-quote-right \[ra]
 .
 .  doc-enclose-close \$@
 ..

Modified: user/hrs/ipv6/etc/network.subr
==============================================================================
--- user/hrs/ipv6/etc/network.subr	Wed Jun  8 11:36:06 2011	(r222857)
+++ user/hrs/ipv6/etc/network.subr	Wed Jun  8 12:03:34 2011	(r222858)
@@ -100,25 +100,19 @@ ifconfig_up()
 
 	# inet6 specific
 	if afexists inet6; then
-		if ipv6if $1; then
-			if checkyesno ipv6_gateway_enable; then
-				_ipv6_opts="-accept_rtadv"
-			fi
-		else
-			if checkyesno ipv6_activate_all_interfaces; then
-				_ipv6_opts="-ifdisabled"
-			else
-				_ipv6_opts="ifdisabled"
-			fi
-
-			# backward compatibility: $ipv6_enable
-			case $ipv6_enable in
-			[Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1)
-				_ipv6_opts="${_ipv6_opts} accept_rtadv"
-				;;
-			esac
+		if checkyesno ipv6_activate_all_interfaces; then
+			_ipv6_opts="-ifdisabled"
+		elif [ "$1" != "lo0" ]; then
+			_ipv6_opts="ifdisabled"
 		fi
 
+		# backward compatibility: $ipv6_enable
+		case $ipv6_enable in
+		[Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1)
+			_ipv6_opts="${_ipv6_opts} accept_rtadv"
+			;;
+		esac
+
 		if [ -n "${_ipv6_opts}" ]; then
 			ifconfig $1 inet6 ${_ipv6_opts}
 		fi

Modified: user/hrs/ipv6/gnu/usr.bin/gdb/kgdb/kthr.c
==============================================================================
--- user/hrs/ipv6/gnu/usr.bin/gdb/kgdb/kthr.c	Wed Jun  8 11:36:06 2011	(r222857)
+++ user/hrs/ipv6/gnu/usr.bin/gdb/kgdb/kthr.c	Wed Jun  8 12:03:34 2011	(r222858)
@@ -28,6 +28,7 @@
 __FBSDID("$FreeBSD$");
 
 #include <sys/param.h>
+#include <sys/cpuset.h>
 #include <sys/proc.h>
 #include <sys/types.h>
 #include <sys/signal.h>
@@ -37,6 +38,7 @@ __FBSDID("$FreeBSD$");
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <unistd.h>
 
 #include <defs.h>
 #include <frame-unwind.h>
@@ -48,7 +50,7 @@ static CORE_ADDR dumppcb;
 static int dumptid;
 
 static CORE_ADDR stoppcbs;
-static __cpumask_t stopped_cpus;
+static cpuset_t stopped_cpus;
 
 static struct kthr *first;
 struct kthr *curkthr;
@@ -76,6 +78,7 @@ kgdb_thr_init(void)
 {
 	struct proc p;
 	struct thread td;
+	long cpusetsize;
 	struct kthr *kt;
 	CORE_ADDR addr;
 	uintptr_t paddr;
@@ -102,10 +105,11 @@ kgdb_thr_init(void)
 		dumptid = -1;
 
 	addr = kgdb_lookup("stopped_cpus");
-	if (addr != 0)
-		kvm_read(kvm, addr, &stopped_cpus, sizeof(stopped_cpus));
-	else
-		stopped_cpus = 0;
+	CPU_ZERO(&stopped_cpus);
+	cpusetsize = sysconf(_SC_CPUSET_SIZE);
+	if (cpusetsize != -1 && (u_long)cpusetsize <= sizeof(cpuset_t) &&
+	    addr != 0)
+		kvm_read(kvm, addr, &stopped_cpus, cpusetsize);
 
 	stoppcbs = kgdb_lookup("stoppcbs");
 
@@ -126,8 +130,8 @@ kgdb_thr_init(void)
 			kt->kaddr = addr;
 			if (td.td_tid == dumptid)
 				kt->pcb = dumppcb;
-			else if (td.td_state == TDS_RUNNING && ((1 << td.td_oncpu) & stopped_cpus)
-				&& stoppcbs != 0)
+			else if (td.td_state == TDS_RUNNING && stoppcbs != 0 &&
+			    CPU_ISSET(td.td_oncpu, &stopped_cpus))
 				kt->pcb = (uintptr_t) stoppcbs + sizeof(struct pcb) * td.td_oncpu;
 			else
 				kt->pcb = (uintptr_t)td.td_pcb;

Modified: user/hrs/ipv6/gnu/usr.bin/groff/tmac/mdoc.local
==============================================================================
--- user/hrs/ipv6/gnu/usr.bin/groff/tmac/mdoc.local	Wed Jun  8 11:36:06 2011	(r222857)
+++ user/hrs/ipv6/gnu/usr.bin/groff/tmac/mdoc.local	Wed Jun  8 12:03:34 2011	(r222858)
@@ -34,7 +34,6 @@
 .\" FreeBSD .Lb values
 .ds doc-str-Lb-libarchive  Streaming Archive Library (libarchive, \-larchive)
 .ds doc-str-Lb-libbluetooth Bluetooth User Library (libbluetooth, \-lbluetooth)
-.ds doc-str-Lb-libbsm      Basic Security Module User Library (libbsm, \-lbsm)
 .ds doc-str-Lb-libc_r      Reentrant C\~Library (libc_r, \-lc_r)
 .ds doc-str-Lb-libcalendar Calendar Arithmetic Library (libcalendar, \-lcalendar)
 .ds doc-str-Lb-libcam      Common Access Method User Library (libcam, \-lcam)
@@ -75,7 +74,7 @@
 .
 .\" FreeBSD releases not found in doc-common
 .ds doc-operating-system-FreeBSD-7.4    7.4
-.ds doc-operating-system-FreeBSD-8.2    8.2
+.ds doc-operating-system-FreeBSD-8.3    8.3
 .ds doc-operating-system-FreeBSD-9.0    9.0
 .
 .\" Definitions not (yet) in doc-syms

Modified: user/hrs/ipv6/lib/libiconv/Makefile
==============================================================================
--- user/hrs/ipv6/lib/libiconv/Makefile	Wed Jun  8 11:36:06 2011	(r222857)
+++ user/hrs/ipv6/lib/libiconv/Makefile	Wed Jun  8 12:03:34 2011	(r222858)
@@ -19,7 +19,6 @@ SRCS=	citrus_bcs.c citrus_bcs_strtol.c c
 	citrus_module.c citrus_none.c citrus_pivot_factory.c \
 	citrus_prop.c citrus_stdenc.c iconv.c
 
-WARNS?=	6
 CFLAGS+= --param max-inline-insns-single=128 -I ${.CURDIR}/../../include -I${.CURDIR}/../libc/include
 
 .include <bsd.lib.mk>

Modified: user/hrs/ipv6/lib/libkvm/kvm_pcpu.c
==============================================================================
--- user/hrs/ipv6/lib/libkvm/kvm_pcpu.c	Wed Jun  8 11:36:06 2011	(r222857)
+++ user/hrs/ipv6/lib/libkvm/kvm_pcpu.c	Wed Jun  8 12:03:34 2011	(r222858)
@@ -39,11 +39,13 @@
 __FBSDID("$FreeBSD$");
 
 #include <sys/param.h>
+#include <sys/cpuset.h>
 #include <sys/pcpu.h>
 #include <sys/sysctl.h>
 #include <kvm.h>
 #include <limits.h>
 #include <stdlib.h>
+#include <unistd.h>
 
 #include "kvm_private.h"
 
@@ -118,6 +120,9 @@ _kvm_pcpu_clear(void)
 void *
 kvm_getpcpu(kvm_t *kd, int cpu)
 {
+	long kcpusetsize;
+	ssize_t nbytes;
+	uintptr_t readptr;
 	char *buf;
 
 	if (kd == NULL) {
@@ -125,6 +130,10 @@ kvm_getpcpu(kvm_t *kd, int cpu)
 		return (NULL);
 	}
 
+	kcpusetsize = sysconf(_SC_CPUSET_SIZE);
+	if (kcpusetsize == -1 || (u_long)kcpusetsize > sizeof(cpuset_t))
+		return ((void *)-1);
+
 	if (maxcpu == 0)
 		if (_kvm_pcpu_init(kd) < 0)
 			return ((void *)-1);
@@ -137,8 +146,26 @@ kvm_getpcpu(kvm_t *kd, int cpu)
 		_kvm_err(kd, kd->program, "out of memory");
 		return ((void *)-1);
 	}
-	if (kvm_read(kd, (uintptr_t)pcpu_data[cpu], buf, sizeof(struct pcpu)) !=
-	    sizeof(struct pcpu)) {
+	nbytes = sizeof(struct pcpu) - 2 * kcpusetsize;
+	readptr = (uintptr_t)pcpu_data[cpu];
+	if (kvm_read(kd, readptr, buf, nbytes) != nbytes) {
+		_kvm_err(kd, kd->program, "unable to read per-CPU data");
+		free(buf);
+		return ((void *)-1);
+	}
+
+	/* Fetch the valid cpuset_t objects. */
+	CPU_ZERO((cpuset_t *)(buf + nbytes));
+	CPU_ZERO((cpuset_t *)(buf + nbytes + sizeof(cpuset_t)));
+	readptr += nbytes;
+	if (kvm_read(kd, readptr, buf + nbytes, kcpusetsize) != kcpusetsize) {
+		_kvm_err(kd, kd->program, "unable to read per-CPU data");
+		free(buf);
+		return ((void *)-1);
+	}
+	readptr += kcpusetsize;
+	if (kvm_read(kd, readptr, buf + nbytes + sizeof(cpuset_t),
+	    kcpusetsize) != kcpusetsize) {
 		_kvm_err(kd, kd->program, "unable to read per-CPU data");
 		free(buf);
 		return ((void *)-1);

Modified: user/hrs/ipv6/lib/libmemstat/memstat_uma.c
==============================================================================
--- user/hrs/ipv6/lib/libmemstat/memstat_uma.c	Wed Jun  8 11:36:06 2011	(r222857)
+++ user/hrs/ipv6/lib/libmemstat/memstat_uma.c	Wed Jun  8 12:03:34 2011	(r222858)
@@ -27,6 +27,7 @@
  */
 
 #include <sys/param.h>
+#include <sys/cpuset.h>
 #include <sys/sysctl.h>
 
 #define	LIBMEMSTAT	/* Cause vm_page.h not to include opt_vmpage.h */
@@ -44,6 +45,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <unistd.h>
 
 #include "memstat.h"
 #include "memstat_internal.h"
@@ -313,7 +315,8 @@ memstat_kvm_uma(struct memory_type_list 
 	struct uma_keg *kzp, kz;
 	int hint_dontsearch, i, mp_maxid, ret;
 	char name[MEMTYPE_MAXNAME];
-	__cpumask_t all_cpus;
+	cpuset_t all_cpus;
+	long cpusetsize;
 	kvm_t *kvm;
 
 	kvm = (kvm_t *)kvm_handle;
@@ -337,7 +340,13 @@ memstat_kvm_uma(struct memory_type_list 
 		list->mtl_error = ret;
 		return (-1);
 	}
-	ret = kread_symbol(kvm, X_ALL_CPUS, &all_cpus, sizeof(all_cpus), 0);
+	cpusetsize = sysconf(_SC_CPUSET_SIZE);
+	if (cpusetsize == -1 || (u_long)cpusetsize > sizeof(cpuset_t)) {
+		list->mtl_error = MEMSTAT_ERROR_KVM_NOSYMBOL;
+		return (-1);
+	}
+	CPU_ZERO(&all_cpus);
+	ret = kread_symbol(kvm, X_ALL_CPUS, &all_cpus, cpusetsize, 0);
 	if (ret != 0) {
 		list->mtl_error = ret;
 		return (-1);
@@ -407,7 +416,7 @@ memstat_kvm_uma(struct memory_type_list 
 			if (kz.uk_flags & UMA_ZFLAG_INTERNAL)
 				goto skip_percpu;
 			for (i = 0; i < mp_maxid + 1; i++) {
-				if ((all_cpus & (1 << i)) == 0)
+				if (!CPU_ISSET(i, &all_cpus))
 					continue;
 				ucp = &ucp_array[i];
 				mtp->mt_numallocs += ucp->uc_allocs;

Modified: user/hrs/ipv6/libexec/comsat/comsat.c
==============================================================================
--- user/hrs/ipv6/libexec/comsat/comsat.c	Wed Jun  8 11:36:06 2011	(r222857)
+++ user/hrs/ipv6/libexec/comsat/comsat.c	Wed Jun  8 12:03:34 2011	(r222858)
@@ -180,7 +180,7 @@ notify(struct utmpx *utp, char file[], o
 		dsyslog(LOG_DEBUG, "%s: wrong mode on %s", utp->ut_user, tty);
 		return;
 	}
-	dsyslog(LOG_DEBUG, "notify %s on %s\n", utp->ut_user, tty);
+	dsyslog(LOG_DEBUG, "notify %s on %s", utp->ut_user, tty);
 	switch (fork()) {
 	case -1:
 		syslog(LOG_NOTICE, "fork failed (%m)");

Modified: user/hrs/ipv6/release/ia64/mkisoimages.sh
==============================================================================
--- user/hrs/ipv6/release/ia64/mkisoimages.sh	Wed Jun  8 11:36:06 2011	(r222857)
+++ user/hrs/ipv6/release/ia64/mkisoimages.sh	Wed Jun  8 12:03:34 2011	(r222858)
@@ -48,28 +48,32 @@ EFIPART=efipart.sys
 if [ $bootable = yes ]; then
     EFISZ=65536
     MNT=/mnt
-    dd if=/dev/zero of=$BASE/$EFIPART count=$EFISZ
-    md=`mdconfig -a -t vnode -f $BASE/$EFIPART`
+    dd if=/dev/zero of=$EFIPART count=$EFISZ
+    md=`mdconfig -a -t vnode -f $EFIPART`
     newfs_msdos -F 12 -S 512 -h 4 -o 0 -s $EFISZ -u 16 $md
     mount -t msdosfs /dev/$md $MNT
     mkdir -p $MNT/efi/boot $MNT/boot $MNT/boot/kernel
     cp -R $BASE/boot/defaults $MNT/boot
     cp $BASE/boot/kernel/kernel $MNT/boot/kernel
-    cp $BASE/boot/kernel/ispfw.ko $MNT/boot/kernel
+    if [ -s $BASE/boot/kernel/ispfw.ko ]; then
+	cp $BASE/boot/kernel/ispfw.ko $MNT/boot/kernel
+    fi
     cp $BASE/boot/device.hints $MNT/boot
     cp $BASE/boot/loader.* $MNT/boot
-    cp $BASE/boot/mfsroot.gz $MNT/boot
+    if [ -s $BASE/boot/mfsroot.gz ]; then
+	cp $BASE/boot/mfsroot.gz $MNT/boot
+    fi
     cp $BASE/boot/support.4th $MNT/boot
     mv $MNT/boot/loader.efi $MNT/efi/boot/bootia64.efi
     umount $MNT
     mdconfig -d -u $md
-    BOOTOPTS="-b bootimage=i386;$EFIPART -o no-emul-boot"
+    BOOTOPTS="-o bootimage=i386;$EFIPART -o no-emul-boot"
 else
     BOOTOPTS=""
 fi
 
-echo "/dev/iso9660/$LABEL / cd9660 ro 0 0" > $1/etc/fstab
+echo "/dev/iso9660/$LABEL / cd9660 ro 0 0" > $BASE/etc/fstab
 makefs -t cd9660 $BOOTOPTS -o rockridge -o label=$LABEL $NAME $BASE $*
-rm -f $BASE/$EFIPART
+rm -f $EFIPART
 rm $1/etc/fstab
 exit 0

Modified: user/hrs/ipv6/sbin/geom/class/part/geom_part.c
==============================================================================
--- user/hrs/ipv6/sbin/geom/class/part/geom_part.c	Wed Jun  8 11:36:06 2011	(r222857)
+++ user/hrs/ipv6/sbin/geom/class/part/geom_part.c	Wed Jun  8 12:03:34 2011	(r222858)
@@ -341,9 +341,10 @@ gpart_autofill_resize(struct gctl_req *r
 			errc(EXIT_FAILURE, error, "Invalid alignment param");
 		if (alignment == 0)
 			errx(EXIT_FAILURE, "Invalid alignment param");
+	} else {
 		lba = pp->lg_stripesize / pp->lg_sectorsize;
 		if (lba > 0)
-			alignment = g_lcm(lba, alignment);
+			alignment = lba;
 	}
 	error = gctl_delete_param(req, "alignment");
 	if (error)
@@ -491,13 +492,9 @@ gpart_autofill(struct gctl_req *req)
 	if (has_size && has_start && !has_alignment)
 		goto done;
 
-	/*
-	 * If stripesize is not zero, then recalculate alignment value.
-	 * Use LCM from stripesize and user specified alignment.
-	 */
 	len = pp->lg_stripesize / pp->lg_sectorsize;
-	if (len > 0 )
-		alignment = g_lcm(len, alignment);
+	if (len > 0 && !has_alignment)
+		alignment = len;
 
 	/* Adjust parameters to stripeoffset */
 	offset = pp->lg_stripeoffset / pp->lg_sectorsize;

Modified: user/hrs/ipv6/sbin/geom/class/part/gpart.8
==============================================================================
--- user/hrs/ipv6/sbin/geom/class/part/gpart.8	Wed Jun  8 11:36:06 2011	(r222857)
+++ user/hrs/ipv6/sbin/geom/class/part/gpart.8	Wed Jun  8 12:03:34 2011	(r222858)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd May 30, 2011
+.Dd June 6, 2011
 .Dt GPART 8
 .Os
 .Sh NAME
@@ -530,16 +530,17 @@ about its use.
 .El
 .\"
 .Sh PARTITION TYPES
+Partition types are identified on disk by particular strings or magic
+values.
 The
 .Nm
-utility uses symbolic names for common partition types to avoid that the
-user needs to know what the partitioning scheme in question is and what
-the actual number or identification needs to be used for a particular
-type.
+utility uses symbolic names for common partition types to avoid the
+user needing to know these values or other details of the partitioning
+scheme in question.
 The
 .Nm
 utility also allows the user to specify scheme-specific partition types
-for partition types that do not have symbol names.
+for partition types that do not have symbolic names.
 The symbolic names currently understood are:
 .Bl -tag -width ".Cm freebsd-vinum"
 .It Cm bios-boot
@@ -740,30 +741,30 @@ action or reverted with the
 .Cm undo
 action.
 .Sh RECOVERING
-The GEOM class PART supports recovering of partition tables only for GPT.
+The GEOM PART class supports recovering of partition tables only for GPT.
 The GUID partition table has a primary and secondary (backup) copy of
-metadata for redundance.
-They are stored in the begining and in the end of device respectively.
-Therefore it is acceptable to have some corruptions in the metadata that
-are not fatal to work with GPT.
-When kernel detects corrupt metadata it marks this table as corrupt and
-reports about corruption.
-Any changes in corrupt table are prohibited except
+metadata for redundance, these are stored at the begining and the end
+of the device respectively.
+As a result of having two copies, it is acceptable to have some corruption
+within the metadata that is not fatal to the working of GPT.
+When the kernel detects corrupt metadata it marks this table as corrupt and
+reports the corruption.
+Any operations on corrupt tables are prohibited except for
 .Cm destroy
 and
 .Cm recover .
 .Pp
-In case when only first sector is corrupt kernel can not detect GPT even
-if partition table is not corrupt.
-You can write protective MBR with
+If the first sector of a provider is corrupt, the kernel can not detect GPT
+even if partition table itself is not corrupt.
+You can rewrite the protective MBR using the
 .Xr dd 1
-command to restore ability of GPT detection.
-The copy of protective MBR is usually located in the
+command, to restore the ability to detect the GPT.
+The copy of the protective MBR is usually located in the
 .Pa /boot/pmbr
 file.
 .Pp
-In case when some of metadata is corrupt you will get to know about this
-from kernel's messages like these:
+If one GPT header appears to be corrupt but the other copy remains intact,
+the kernel will log the following:
 .Bd -literal -offset indent
 GEOM: provider: the primary GPT table is corrupt or invalid.
 GEOM: provider: using the secondary instead -- recovery strongly advised.
@@ -777,32 +778,31 @@ GEOM: provider: using the primary only -
 .Pp
 Also
 .Nm
-commands like
+commands such as
 .Cm show , status
 and
 .Cm list
-will report about corrupt table.
+will report about corrupt tables.
 .Pp
-In case when the size of device has changed (e.g.\& volume expansion) the
-secondary GPT header will become located not in the last sector.
+If the size of the device has changed (e.g.\& volume expansion) the
+secondary GPT header will no longer be located in the last sector.
 This is not a metadata corruption, but it is dangerous because any
-corruption of the primary GPT will lead to lost of partition table.
-Kernel reports about this problem with message:
+corruption of the primary GPT will lead to loss of partition table.
+This problem is reported by the kernel with the message:
 .Bd -literal -offset indent
 GEOM: provider: the secondary GPT header is not in the last LBA.
 .Ed
 .Pp
-A corrupt table can be recovered with
+This situation can be recovered with the
 .Cm recover
 command.
-This command does reconstruction of corrupt metadata using
-known valid metadata.
-Also it can relocate secondary GPT to the end of device.
+This command reconstructs the corrupt metadata using known valid
+metadata and relocates the secondary GPT to the end of the device.
 .Pp
 .Em NOTE :
-The GEOM class PART can detect the same partition table on different GEOM
-providers and some of them will be marked as corrupt.
-Be careful when choosing a provider for recovering.
+The GEOM PART class can detect the same partition table visible through
+different GEOM providers, and some of them will be marked as corrupt.
+Be careful when choosing a provider for recovery.
 If you choose incorrectly you can destroy the metadata of another GEOM class,
 e.g.\& GEOM MIRROR or GEOM LABEL.
 .Sh SYSCTL VARIABLES
@@ -815,11 +815,11 @@ The default value is shown next to each 
 .Bl -tag -width indent
 .It Va kern.geom.part.check_integrity : No 1
 This variable controls the behaviour of metadata integrity checks.
-When integrity checks are enabled
+When integrity checks are enabled, the
 .Nm PART
-GEOM class verifies all generic partition parameters that it gets from the
+GEOM class verifies all generic partition parameters obtained from the
 disk metadata.
-If some inconsistency is detected, partition table will be
+If some inconsistency is detected, the partition table will be
 rejected with a diagnostic message:
 .Sy "GEOM_PART: Integrity check failed (provider, scheme)" .
 .El

Modified: user/hrs/ipv6/sbin/geom/class/sched/Makefile
==============================================================================
--- user/hrs/ipv6/sbin/geom/class/sched/Makefile	Wed Jun  8 11:36:06 2011	(r222857)
+++ user/hrs/ipv6/sbin/geom/class/sched/Makefile	Wed Jun  8 12:03:34 2011	(r222858)
@@ -5,6 +5,4 @@
 
 GEOM_CLASS=	sched
 
-WARNS?=	6
-
 .include <bsd.lib.mk>

Modified: user/hrs/ipv6/sbin/ifconfig/af_inet6.c
==============================================================================
--- user/hrs/ipv6/sbin/ifconfig/af_inet6.c	Wed Jun  8 11:36:06 2011	(r222857)
+++ user/hrs/ipv6/sbin/ifconfig/af_inet6.c	Wed Jun  8 12:03:34 2011	(r222858)
@@ -499,8 +499,8 @@ static struct cmd inet6_cmds[] = {
 	DEF_CMD("-autoconf",	-IN6_IFF_AUTOCONF,	setip6flags),
 	DEF_CMD("accept_rtadv",	ND6_IFF_ACCEPT_RTADV,	setnd6flags),
 	DEF_CMD("-accept_rtadv",-ND6_IFF_ACCEPT_RTADV,	setnd6flags),
-	DEF_CMD("defroute_rtadv",ND6_IFF_DEFROUTE_RTADV,setnd6flags),
-	DEF_CMD("-defroute_rtadv",-ND6_IFF_DEFROUTE_RTADV,setnd6flags),
+	DEF_CMD("no_radr",	ND6_IFF_NO_RADR,	setnd6flags),
+	DEF_CMD("-no_radr",	-ND6_IFF_NO_RADR,	setnd6flags),
 	DEF_CMD("defaultif",	1,			setnd6defif),
 	DEF_CMD("-defaultif",	-1,			setnd6defif),
 	DEF_CMD("ifdisabled",	ND6_IFF_IFDISABLED,	setnd6flags),

Modified: user/hrs/ipv6/sbin/ifconfig/af_nd6.c
==============================================================================
--- user/hrs/ipv6/sbin/ifconfig/af_nd6.c	Wed Jun  8 11:36:06 2011	(r222857)
+++ user/hrs/ipv6/sbin/ifconfig/af_nd6.c	Wed Jun  8 12:03:34 2011	(r222858)
@@ -58,7 +58,7 @@ static const char rcsid[] =
 #define	MAX_SYSCTL_TRY	5
 #define	ND6BITS	"\020\001PERFORMNUD\002ACCEPT_RTADV\003PREFER_SOURCE" \
 		"\004IFDISABLED\005DONT_SET_IFROUTE\006AUTO_LINKLOCAL" \
-		"\007DEFROUTE_RTADV\020DEFAULTIF"
+		"\007NO_RADR\020DEFAULTIF"
 
 static int isnd6defif(int);
 void setnd6flags(const char *, int, int, const struct afswtch *);
@@ -159,7 +159,6 @@ nd6_status(int s)
 	}
 	isdefif = isnd6defif(s6);
 	close(s6);
-
 	if (nd.ndi.flags == 0 && !isdefif)
 		return;
 	printb("\tnd6 options",

Modified: user/hrs/ipv6/sbin/ipfw/main.c
==============================================================================
--- user/hrs/ipv6/sbin/ipfw/main.c	Wed Jun  8 11:36:06 2011	(r222857)
+++ user/hrs/ipv6/sbin/ipfw/main.c	Wed Jun  8 12:03:34 2011	(r222858)
@@ -356,6 +356,7 @@ ipfw_main(int oldac, char **oldav)
 	 */
 	co.do_nat = 0;
 	co.do_pipe = 0;
+	co.use_set = 0;
 	if (!strncmp(*av, "nat", strlen(*av)))
  		co.do_nat = 1;
  	else if (!strncmp(*av, "pipe", strlen(*av)))
@@ -444,7 +445,7 @@ static void
 ipfw_readfile(int ac, char *av[])
 {
 #define MAX_ARGS	32
-	char	buf[BUFSIZ];
+	char buf[4096];
 	char *progname = av[0];		/* original program name */
 	const char *cmd = NULL;		/* preprocessor name, if any */
 	const char *filename = av[ac-1]; /* file to read */
@@ -552,7 +553,7 @@ ipfw_readfile(int ac, char *av[])
 		}
 	}
 
-	while (fgets(buf, BUFSIZ, f)) {		/* read commands */
+	while (fgets(buf, sizeof(buf), f)) {		/* read commands */
 		char linename[20];
 		char *args[2];
 

Modified: user/hrs/ipv6/sbin/mount/mount.8
==============================================================================
--- user/hrs/ipv6/sbin/mount/mount.8	Wed Jun  8 11:36:06 2011	(r222857)
+++ user/hrs/ipv6/sbin/mount/mount.8	Wed Jun  8 12:03:34 2011	(r222858)
@@ -28,7 +28,7 @@
 .\"     @(#)mount.8	8.8 (Berkeley) 6/16/94
 .\" $FreeBSD$
 .\"
-.Dd April 28, 2011
+.Dd June 6, 2011
 .Dt MOUNT 8
 .Os
 .Sh NAME
@@ -348,7 +348,6 @@ option) may be passed as a comma separat
 distinguished by a leading
 .Dq \&-
 (dash).
-Options that take a value are specified using the syntax -option=value.
 For example, the
 .Nm
 command:
@@ -363,6 +362,16 @@ to execute the equivalent of:
 /sbin/mount_cd9660 -e /dev/cd0 /cdrom
 .Ed
 .Pp
+Options that take a value are specified using the -option=value syntax:
+.Bd -literal -offset indent
+mount -t msdosfs -o -u=fred,-g=wheel /dev/da0s1 /mnt
+.Ed
+.Pp
+is equivalent to
+.Bd -literal -offset indent
+/sbin/mount_msdosfs -u fred -g wheel /dev/da0s1 /mnt
+.Ed
+.Pp
 Additional options specific to file system types
 which are not internally known
 (see the description of the

Modified: user/hrs/ipv6/sbin/mount/mount.c
==============================================================================
--- user/hrs/ipv6/sbin/mount/mount.c	Wed Jun  8 11:36:06 2011	(r222857)
+++ user/hrs/ipv6/sbin/mount/mount.c	Wed Jun  8 12:03:34 2011	(r222858)
@@ -243,7 +243,7 @@ main(int argc, char *argv[])
 	const char *mntfromname, **vfslist, *vfstype;
 	struct fstab *fs;
 	struct statfs *mntbuf;
-	int all, ch, i, init_flags, late, mntsize, rval, have_fstab, ro;
+	int all, ch, i, init_flags, late, failok, mntsize, rval, have_fstab, ro;
 	char *cp, *ep, *options;
 
 	all = init_flags = late = 0;
@@ -328,6 +328,10 @@ main(int argc, char *argv[])
 					continue;
 				if (hasopt(fs->fs_mntops, "late") && !late)
 					continue;
+				if (hasopt(fs->fs_mntops, "failok"))
+					failok = 1;
+				else
+					failok = 0;
 				if (!(init_flags & MNT_UPDATE) &&
 				    ismounted(fs, mntbuf, mntsize))
 					continue;
@@ -335,7 +339,7 @@ main(int argc, char *argv[])
 				    mntbuf->f_flags);
 				if (mountfs(fs->fs_vfstype, fs->fs_spec,
 				    fs->fs_file, init_flags, options,
-				    fs->fs_mntops))
+				    fs->fs_mntops) && !failok)
 					rval = 1;
 			}
 		} else if (fstab_style) {
@@ -717,6 +721,14 @@ mangle(char *options, struct cpa *a)
 				 * before mountd starts.
 				 */
 				continue;
+			} else if (strcmp(p, "failok") == 0) {
+				/*
+				 * "failok" is used to prevent certain file
+				 * systems from being causing the system to
+				 * drop into single user mode in the boot
+				 * cycle, and is not a real mount option.
+				 */
+				continue;
 			} else if (strncmp(p, "mountprog", 9) == 0) {
 				/*
 				 * "mountprog" is used to force the use of

Modified: user/hrs/ipv6/sbin/rcorder/rcorder.8
==============================================================================
--- user/hrs/ipv6/sbin/rcorder/rcorder.8	Wed Jun  8 11:36:06 2011	(r222857)
+++ user/hrs/ipv6/sbin/rcorder/rcorder.8	Wed Jun  8 12:03:34 2011	(r222858)
@@ -31,7 +31,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd June 9, 2008
+.Dd June 6, 2011
 .Dt RCORDER 8
 .Os
 .Sh NAME
@@ -89,6 +89,12 @@ and
 lines may appear, but all such lines must appear in a sequence without
 any intervening lines, as once a line that does not follow the format
 is reached, parsing stops.
+Note that for historical reasons,
+.Dq Li REQUIRES ,
+.Dq Li PROVIDES ,
+and
+.Dq Li KEYWORDS
+are also accepted in addition to the above.
 .Pp
 The options are as follows:
 .Bl -tag -width indent

Modified: user/hrs/ipv6/share/man/man4/amdsbwd.4
==============================================================================
--- user/hrs/ipv6/share/man/man4/amdsbwd.4	Wed Jun  8 11:36:06 2011	(r222857)
+++ user/hrs/ipv6/share/man/man4/amdsbwd.4	Wed Jun  8 12:03:34 2011	(r222858)
@@ -25,12 +25,12 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd November 30, 2009
+.Dd June 7, 2011
 .Dt AMDSBWD 4
 .Os
 .Sh NAME
 .Nm amdsbwd
-.Nd device driver for the AMD SB600/SB700/SB710/SB750 watchdog timer
+.Nd device driver for the AMD SB600/SB7xx/SB8xx watchdog timers
 .Sh SYNOPSIS
 To compile this driver into the kernel,
 place the following line in your
@@ -51,7 +51,7 @@ The
 driver provides
 .Xr watchdog 4
 support for the watchdog timers present on
-AMD SB600 and SB7xx south bridge chips.
+AMD SB600, SB7xx and SB8xx southbridges.
 .Sh SEE ALSO
 .Xr watchdog 4 ,
 .Xr watchdog 8 ,
@@ -61,12 +61,14 @@ AMD SB600 and SB7xx south bridge chips.
 The
 .Nm
 driver first appeared in
-.Fx 9.0 .
+.Fx 7.3
+and
+.Fx 8.1 .
 .Sh AUTHORS
 .An -nosplit
 The
 .Nm
 driver was written by
-.An Andiry Gapon Aq avg@FreeBSD.org .
+.An Andriy Gapon Aq avg@FreeBSD.org .
 This manual page was written by
-.An Andiry Gapon Aq avg@FreeBSD.org .
+.An Andriy Gapon Aq avg@FreeBSD.org .

Modified: user/hrs/ipv6/share/man/man4/atkbd.4
==============================================================================
--- user/hrs/ipv6/share/man/man4/atkbd.4	Wed Jun  8 11:36:06 2011	(r222857)
+++ user/hrs/ipv6/share/man/man4/atkbd.4	Wed Jun  8 12:03:34 2011	(r222858)
@@ -26,7 +26,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd May 20, 2011
+.Dd January 29, 2008
 .Dt ATKBD 4
 .Os
 .Sh NAME
@@ -176,11 +176,6 @@ When this option is given, the
 .Nm
 driver will not test the keyboard port during the probe routine.
 Some machines hang during boot when this test is performed.
-.It bit 4 (PROBE_TYPEMATIC)
-When this option is given, the
-.Nm
-driver will try to probe the keyboard typematic rate on boot.
-Some machines hang during boot when this test is performed.
 .El
 .\".Sh FILES
 .Sh EXAMPLES

Copied: user/hrs/ipv6/share/man/man4/geom_map.4 (from r222855, head/share/man/man4/geom_map.4)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ user/hrs/ipv6/share/man/man4/geom_map.4	Wed Jun  8 12:03:34 2011	(r222858, copy of r222855, head/share/man/man4/geom_map.4)
@@ -0,0 +1,211 @@
+.\"
+.\" Copyright (c) 2011 Aleksandr Rybalko
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd May 17, 2011
+.Dt GEOM_MAP 4
+.Os
+.Sh NAME
+.Nm geom_map
+.Nd "GEOM module that maps defined items as separate partitions"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device geom_map"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+framework provides support for mapping defined parts of the media.
+Basically it is helpful for embedded devices where in the one continuous
+flash are loader, kernel and rootfs parts.
+.Nm
+allows making them available as separate parts and protects the loader from
+being overwritten.
+.Pp
+At boot time
+.Nm
+partitions are listed (only with bootverbose) as:
+.Bd -literal -offset indent
+MAP: 0x30000, data=0x30000 "/dev/map/bootloader"
+MAP: 30000x10000, data=0x10000 "/dev/map/factory"
+MAP: 40000x7a0000, data=0x7a0000 "/dev/map/upgrade"
+MAP: search key ".!/bin/sh" from 0x100000, step 0x10000
+MAP: 40000x110000, data=0x110000 "/dev/map/kernel"
+MAP: search key ".!/bin/sh" from 0x100000, step 0x10000
+MAP: 150000x690000, data=0x690000 "/dev/map/rootfs"
+MAP: 7e0000x20000, data=0x20000 "/dev/map/config"
+.Ed
+.Pp
+The current
+.Nm
+configuration can be accessed with the following
+.Xr sysctl 8
+nodes:
+.Va kern.geom.conftxt , kern.geom.confxml ,
+and
+.Va kern.geom.confdot
+or by using
+.Dq Li "geom map list" .
+.Bd -literal -offset indent
+# sysctl -n kern.geom.conftxt
+0 MD md0 10485760 512 u 0 s 512 f 0 fs 0 l 10485760 t malloc
+0 DISK cfid0 8388608 4 hd 0 sc 0
+1 MAP map/config 131072 4 i 5 o 8257536 entry 0 dsize 131072
+1 MAP map/rootfs 6881280 4 i 4 o 1376256 entry 0 dsize 6881280
+2 UNCOMPRESS map/rootfs.uncompress 18677760 512
+1 MAP map/kernel 1114112 4 i 3 o 262144 entry 0 dsize 1114112
+1 MAP map/upgrade 7995392 4 i 2 o 262144 entry 0 dsize 7995392
+1 MAP map/factory 65536 4 i 1 o 196608 entry 0 dsize 65536
+1 MAP map/bootloader 196608 4 i 0 o 0 entry 0 dsize 196608
+.Ed
+.Pp
+Driver configuration can be done in
+.Xr device.hints 5 .
+List of used parameters:
+.Bl -tag -width indent
+.It Va at
+select media to attach
+.It Va name
+name of partition (will create device
+.Pa /dev/map/ Ns Ar that_name )
+.It Va start
+offset from the beginning of the parent media to start of the mapped partition.
+This field can also have a special value
+.Qq Li search: Ns Ar searchstart Ns Li : Ns Ar searchstep Ns Li : Ns Ar searchkey ,
+where:
+.Bl -tag -width indent
+.It Ar searchstart
+offset from the beginning of the parent media where search will be started
+.It Ar searchstep
+value of the increment used while searching for the partition boundary markers
+.It Ar searchkey
+key which will be used to find partition boundary markers.
+The wildcard
+.Ql .\&
+can be used to match any character on that position
+.El
+.It Va end
+offset from the beginning of the parent media to the end of the mapped partition.
+This field can also have the special value
+.Qq Li search: Ns Ar searchstart Ns Li : Ns Ar searchstep Ns Li : Ns Ar searchkey ,
+as described above.
+.It Va offset
+offset where the data of the mapped partition begins
+.El
+.Pp
+Each record contains the start address (in bytes) from the media begin, size
+(in bytes), offset where the data of mapped partition begins, and the name of
+new device.

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-user@FreeBSD.ORG  Wed Jun  8 16:06:27 2011
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id BF528106564A;
	Wed,  8 Jun 2011 16:06:27 +0000 (UTC) (envelope-from hrs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id AED018FC0A;
	Wed,  8 Jun 2011 16:06:27 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p58G6RxQ037795;
	Wed, 8 Jun 2011 16:06:27 GMT (envelope-from hrs@svn.freebsd.org)
Received: (from hrs@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p58G6Ro4037790;
	Wed, 8 Jun 2011 16:06:27 GMT (envelope-from hrs@svn.freebsd.org)
Message-Id: <201106081606.p58G6Ro4037790@svn.freebsd.org>
From: Hiroki Sato <hrs@FreeBSD.org>
Date: Wed, 8 Jun 2011 16:06:27 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r222862 - user/hrs/ipv6/usr.sbin/rtsold
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 08 Jun 2011 16:06:27 -0000

Author: hrs
Date: Wed Jun  8 16:06:27 2011
New Revision: 222862
URL: http://svn.freebsd.org/changeset/base/222862

Log:
  Merge from HEAD@222861.

Modified:
  user/hrs/ipv6/usr.sbin/rtsold/dump.c
  user/hrs/ipv6/usr.sbin/rtsold/rtsol.c
  user/hrs/ipv6/usr.sbin/rtsold/rtsold.c
  user/hrs/ipv6/usr.sbin/rtsold/rtsold.h
Directory Properties:
  user/hrs/ipv6/usr.sbin/rtsold/   (props changed)

Modified: user/hrs/ipv6/usr.sbin/rtsold/dump.c
==============================================================================
--- user/hrs/ipv6/usr.sbin/rtsold/dump.c	Wed Jun  8 16:03:29 2011	(r222861)
+++ user/hrs/ipv6/usr.sbin/rtsold/dump.c	Wed Jun  8 16:06:27 2011	(r222862)
@@ -39,6 +39,7 @@
 #include <net/if.h>
 #include <netinet/in.h>
 #include <netinet/icmp6.h>
+#include <arpa/inet.h>
 
 #include <syslog.h>
 #include <time.h>
@@ -53,14 +54,16 @@ static FILE *fp;
 extern struct ifinfo *iflist;
 
 static void dump_interface_status(void);
-static const char *sec2str(time_t);
 static const char * const ifstatstr[] = {"IDLE", "DELAY", "PROBE", "DOWN", "TENTATIVE"};
 
 static void
 dump_interface_status(void)
 {
 	struct ifinfo *ifi;
+	struct rainfo *rai;
+	struct ra_opt *rao;
 	struct timeval now;
+	char ntopbuf[INET6_ADDRSTRLEN];
 
 	gettimeofday(&now, NULL);
 
@@ -91,9 +94,33 @@ dump_interface_status(void)
 			    (int)ifi->timer.tv_sec,
 			    (int)ifi->timer.tv_usec,
 			    (ifi->expire.tv_sec < now.tv_sec) ? "expired"
-			    : sec2str(ifi->expire.tv_sec - now.tv_sec));
+			    : sec2str(&ifi->expire));
 		}
 		fprintf(fp, "  number of valid RAs: %d\n", ifi->racnt);
+
+		TAILQ_FOREACH(rai, &ifi->ifi_rainfo, rai_next) {
+			fprintf(fp, "   RA from %s\n",
+			    inet_ntop(AF_INET6, &rai->rai_saddr.sin6_addr,
+				ntopbuf, sizeof(ntopbuf)));
+			TAILQ_FOREACH(rao, &rai->rai_ra_opt, rao_next) {
+				fprintf(fp, "    option: ");
+				switch (rao->rao_type) {
+				case ND_OPT_RDNSS:
+					fprintf(fp, "RDNSS: %s (expire: %s)\n",
+					    (char *)rao->rao_msg,
+					    sec2str(&rao->rao_expire));
+					break;
+				case ND_OPT_DNSSL:
+					fprintf(fp, "DNSSL: %s (expire: %s)\n",
+					    (char *)rao->rao_msg,
+					    sec2str(&rao->rao_expire));
+					break;
+				default:
+					break;
+				}
+			}
+			fprintf(fp, "\n");
+		}
 	}
 }
 
@@ -109,8 +136,8 @@ rtsold_dump_file(const char *dumpfile)
 	fclose(fp);
 }
 
-static const char *
-sec2str(time_t total)
+const char *
+sec2str(const struct timeval *total)
 {
 	static char result[256];
 	int days, hours, mins, secs;
@@ -118,11 +145,19 @@ sec2str(time_t total)
 	char *p = result;
 	char *ep = &result[sizeof(result)];
 	int n;
+	struct timeval now;
+	time_t tsec;
 
-	days = total / 3600 / 24;
-	hours = (total / 3600) % 24;
-	mins = (total / 60) % 60;
-	secs = total % 60;
+	gettimeofday(&now, NULL);
+	tsec  = total->tv_sec;
+	tsec += total->tv_usec / 1000000;
+	tsec -= now.tv_sec;
+	tsec -= now.tv_usec / 1000000;
+
+	days = tsec / 3600 / 24;
+	hours = (tsec / 3600) % 24;
+	mins = (tsec / 60) % 60;
+	secs = tsec % 60;
 
 	if (days) {
 		first = 0;

Modified: user/hrs/ipv6/usr.sbin/rtsold/rtsol.c
==============================================================================
--- user/hrs/ipv6/usr.sbin/rtsold/rtsol.c	Wed Jun  8 16:03:29 2011	(r222861)
+++ user/hrs/ipv6/usr.sbin/rtsold/rtsol.c	Wed Jun  8 16:06:27 2011	(r222862)
@@ -85,6 +85,7 @@ static const struct sockaddr_in6 sin6_al
 static void call_script(const int, const char *const *, void *);
 static size_t dname_labeldec(char *, size_t, const char *);
 static int safefile(const char *);
+static struct ra_opt *find_raopt(struct rainfo *, int, void *, size_t);
 
 #define	_ARGS_OTHER	otherconf_script, ifi->ifname
 #define	_ARGS_RESADD	resolvconf_script, "-a", ifi->ifname
@@ -240,6 +241,7 @@ rtsol_input(int s)
 	struct icmp6_hdr *icp;
 	struct nd_router_advert *nd_ra;
 	struct cmsghdr *cm;
+	struct rainfo *rai;
 	char *raoptp;
 	char *p;
 	struct in6_addr *addr;
@@ -251,6 +253,8 @@ rtsol_input(int s)
 	char dname[NI_MAXHOST];
 	struct timeval now;
 	struct timeval lifetime;
+	int newent_rai;
+	int newent_rao;
 
 	/* get message.  namelen and controllen must always be initialized. */
 	rcvmhdr.msg_namelen = sizeof(from);
@@ -367,22 +371,20 @@ rtsol_input(int s)
 		ifi->otherconfig = 1;
 		CALL_SCRIPT(OTHER, NULL);
 	}
-
-	/* Initialize ra_opt per-interface structure. */
 	gettimeofday(&now, NULL);
-	if (!TAILQ_EMPTY(&ifi->ifi_ra_opt))
-		while ((rao = TAILQ_FIRST(&ifi->ifi_ra_opt)) != NULL) {
-			if (rao->rao_msg != NULL)
-				free(rao->rao_msg);
-			TAILQ_REMOVE(&ifi->ifi_ra_opt, rao, rao_next);
-			free(rao);
-		}
-	else
-		TAILQ_INIT(&ifi->ifi_ra_opt);
+	newent_rai = 0;
+	rai = find_rainfo(ifi, &from);
+	if (rai == NULL) {
+		ELM_MALLOC(rai, exit(1));
+		rai->rai_ifinfo = ifi;
+		TAILQ_INIT(&rai->rai_ra_opt);
+		memcpy(&rai->rai_saddr.sin6_addr, &from.sin6_addr,
+		    sizeof(rai->rai_saddr.sin6_addr));
+		newent_rai = 1;
+	}
 
 #define	RA_OPT_NEXT_HDR(x)	(struct nd_opt_hdr *)((char *)x + \
 				(((struct nd_opt_hdr *)x)->nd_opt_len * 8))
-
 	/* Process RA options. */
 	warnmsg(LOG_DEBUG, __func__, "Processing RA");
 	raoptp = (char *)icp + sizeof(struct nd_router_advert);
@@ -439,25 +441,35 @@ rtsol_input(int s)
 				warnmsg(LOG_DEBUG, __func__, "nsbuf = %s",
 				    nsbuf);
 
-				ELM_MALLOC(rao, break);
-				rao->rao_type = ndo->nd_opt_type;
-				rao->rao_len = strlen(nsbuf);
-				rao->rao_msg = strdup(nsbuf);
-				if (rao->rao_msg == NULL) {
-					warnmsg(LOG_ERR, __func__,
-					    "strdup failed: %s",
-					    strerror(errno));
-					free(rao);
-					addr++;
-					continue;
+				newent_rao = 0;
+				rao = find_raopt(rai, ndo->nd_opt_type, nsbuf,
+				    strlen(nsbuf));
+				if (rao == NULL) {
+					ELM_MALLOC(rao, break);
+					rao->rao_type = ndo->nd_opt_type;
+					rao->rao_len = strlen(nsbuf);
+					rao->rao_msg = strdup(nsbuf);
+					if (rao->rao_msg == NULL) {
+						warnmsg(LOG_ERR, __func__,
+						    "strdup failed: %s",
+						    strerror(errno));
+						free(rao);
+						addr++;
+						continue;
+					}
+					newent_rao = 1;
 				}
 				/* Set expiration timer */
-				memset(&rao->rao_expire, 0, sizeof(rao->rao_expire));
+				memset(&rao->rao_expire, 0,
+				    sizeof(rao->rao_expire));
 				memset(&lifetime, 0, sizeof(lifetime));
-				lifetime.tv_sec = ntohl(rdnss->nd_opt_rdnss_lifetime);
+				lifetime.tv_sec =
+				    ntohl(rdnss->nd_opt_rdnss_lifetime);
 				timeradd(&now, &lifetime, &rao->rao_expire);
 
-				TAILQ_INSERT_TAIL(&ifi->ifi_ra_opt, rao, rao_next);
+				if (newent_rao)
+					TAILQ_INSERT_TAIL(&rai->rai_ra_opt,
+					    rao, rao_next);
 				addr++;
 			}
 			break;
@@ -488,24 +500,35 @@ rtsol_input(int s)
 				warnmsg(LOG_DEBUG, __func__, "dname = %s",
 				    dname);
 
-				ELM_MALLOC(rao, break);
-				rao->rao_type = ndo->nd_opt_type;
-				rao->rao_len = strlen(dname);
-				rao->rao_msg = strdup(dname);
-				if (rao->rao_msg == NULL) {
-					warnmsg(LOG_ERR, __func__,
-					    "strdup failed: %s",
-					    strerror(errno));
-					free(rao);
-					break;
+				newent_rao = 0;
+				rao = find_raopt(rai, ndo->nd_opt_type, dname,
+				    strlen(dname));
+				if (rao == NULL) {
+					ELM_MALLOC(rao, break);
+					rao->rao_type = ndo->nd_opt_type;
+					rao->rao_len = strlen(dname);
+					rao->rao_msg = strdup(dname);
+					if (rao->rao_msg == NULL) {
+						warnmsg(LOG_ERR, __func__,
+						    "strdup failed: %s",
+						    strerror(errno));
+						free(rao);
+						addr++;
+						continue;
+					}
+					newent_rao = 1;
 				}
 				/* Set expiration timer */
-				memset(&rao->rao_expire, 0, sizeof(rao->rao_expire));
+				memset(&rao->rao_expire, 0,
+				    sizeof(rao->rao_expire));
 				memset(&lifetime, 0, sizeof(lifetime));
-				lifetime.tv_sec = ntohl(dnssl->nd_opt_dnssl_lifetime);
+				lifetime.tv_sec =
+				    ntohl(dnssl->nd_opt_dnssl_lifetime);
 				timeradd(&now, &lifetime, &rao->rao_expire);
 
-				TAILQ_INSERT_TAIL(&ifi->ifi_ra_opt, rao, rao_next);
+				if (newent_rao)
+					TAILQ_INSERT_TAIL(&rai->rai_ra_opt,
+					    rao, rao_next);
 				p += len;
 			}
 			break;
@@ -515,6 +538,9 @@ rtsol_input(int s)
 		}
 		raoptp = (char *)RA_OPT_NEXT_HDR(raoptp);
 	}
+	if (newent_rai)
+		TAILQ_INSERT_TAIL(&ifi->ifi_rainfo, rai, rai_next);
+
 	ra_opt_handler(ifi);
 	ifi->racnt++;
 
@@ -539,6 +565,7 @@ int
 ra_opt_handler(struct ifinfo *ifi)
 {
 	struct ra_opt *rao;
+	struct rainfo *rai;
 	struct script_msg *smp1, *smp2, *smp3;
 	struct timeval now;
 	TAILQ_HEAD(, script_msg) sm_rdnss_head =
@@ -550,70 +577,87 @@ ra_opt_handler(struct ifinfo *ifi)
 	dcount = 0;
 	dlen = strlen(resstr_sh_prefix) + strlen(resstr_nl);
 	gettimeofday(&now, NULL);
-	TAILQ_FOREACH(rao, &ifi->ifi_ra_opt, rao_next) {
-		switch (rao->rao_type) {
-		case ND_OPT_RDNSS:
-			if (timercmp(&now, &rao->rao_expire, >)) {
-				warnmsg(LOG_INFO, __func__,
-					"expired rdnss entry: %s",
-					(char *)rao->rao_msg);
-				break;
-			}
-			ELM_MALLOC(smp1, continue);
-			ELM_MALLOC(smp2, goto free1);
-			ELM_MALLOC(smp3, goto free2);
-			smp1->sm_msg = resstr_ns_prefix;
-			TAILQ_INSERT_TAIL(&sm_rdnss_head, smp1, sm_next);
-			smp2->sm_msg = rao->rao_msg;
-			TAILQ_INSERT_TAIL(&sm_rdnss_head, smp2, sm_next);
-			smp3->sm_msg = resstr_nl;
-			TAILQ_INSERT_TAIL(&sm_rdnss_head, smp3, sm_next);
 
-			break;
-		case ND_OPT_DNSSL:
-			if (timercmp(&now, &rao->rao_expire, >)) {
-				warnmsg(LOG_INFO, __func__,
-					"expired dnssl entry: %s",
-					(char *)rao->rao_msg);
+	/*
+	 * All options from multiple RAs with the same or different
+	 * source addresses on a single interface will be gathered and
+	 * handled, not overridden.  [RFC 4861 6.3.4]
+	 */
+	TAILQ_FOREACH(rai, &ifi->ifi_rainfo, rai_next) {
+		TAILQ_FOREACH(rao, &rai->rai_ra_opt, rao_next) {
+			switch (rao->rao_type) {
+			case ND_OPT_RDNSS:
+				if (timercmp(&now, &rao->rao_expire, >)) {
+					warnmsg(LOG_INFO, __func__,
+					    "expired rdnss entry: %s",
+					    (char *)rao->rao_msg);
+					break;
+				}
+				ELM_MALLOC(smp1, continue);
+				ELM_MALLOC(smp2, goto free1);
+				ELM_MALLOC(smp3, goto free2);
+				smp1->sm_msg = resstr_ns_prefix;
+				TAILQ_INSERT_TAIL(&sm_rdnss_head, smp1,
+				    sm_next);
+				smp2->sm_msg = rao->rao_msg;
+				TAILQ_INSERT_TAIL(&sm_rdnss_head, smp2,
+				    sm_next);
+				smp3->sm_msg = resstr_nl;
+				TAILQ_INSERT_TAIL(&sm_rdnss_head, smp3,
+				    sm_next);
+				ifi->ifi_rdnss = IFI_DNSOPT_STATE_RECEIVED;
+
 				break;
-			}
-			dcount++;
-			/* Check resolv.conf(5) restrictions. */
-			if (dcount > 6) {
-				warnmsg(LOG_INFO, __func__,
-				    "dnssl entry exceeding maximum count (%d>6)"
-				    ": %s", dcount, (char *)rao->rao_msg);
+			case ND_OPT_DNSSL:
+				if (timercmp(&now, &rao->rao_expire, >)) {
+					warnmsg(LOG_INFO, __func__,
+					    "expired dnssl entry: %s",
+					    (char *)rao->rao_msg);
+					break;
+				}
+				dcount++;
+				/* Check resolv.conf(5) restrictions. */
+				if (dcount > 6) {
+					warnmsg(LOG_INFO, __func__,
+					    "dnssl entry exceeding maximum count (%d>6)"
+					    ": %s", dcount, (char *)rao->rao_msg);
+					break;
+				}
+				if (256 < dlen + strlen(rao->rao_msg) +
+				    strlen(resstr_sp)) {
+					warnmsg(LOG_INFO, __func__,
+					    "dnssl entry exceeding maximum length "
+					    "(>256): %s", (char *)rao->rao_msg);
+					break;
+				}
+				ELM_MALLOC(smp1, continue);
+				ELM_MALLOC(smp2, goto free1);
+				if (TAILQ_EMPTY(&sm_dnssl_head)) {
+					ELM_MALLOC(smp3, goto free2);
+					smp3->sm_msg = resstr_sh_prefix;
+					TAILQ_INSERT_TAIL(&sm_dnssl_head, smp3,
+					    sm_next);
+				}
+				smp1->sm_msg = rao->rao_msg;
+				TAILQ_INSERT_TAIL(&sm_dnssl_head, smp1,
+				    sm_next);
+				smp2->sm_msg = resstr_sp;
+				TAILQ_INSERT_TAIL(&sm_dnssl_head, smp2,
+				    sm_next);
+				dlen += strlen(rao->rao_msg) +
+				    strlen(resstr_sp);
 				break;
-			}
-			if (256 < dlen + strlen(rao->rao_msg) +
-			    strlen(resstr_sp)) {
-				warnmsg(LOG_INFO, __func__,
-				    "dnssl entry exceeding maximum length "
-				    "(>256): %s", (char *)rao->rao_msg);
+
+				ifi->ifi_dnssl = IFI_DNSOPT_STATE_RECEIVED;
+			default:
 				break;
 			}
-			ELM_MALLOC(smp1, continue);
-			ELM_MALLOC(smp2, goto free1);
-			if (TAILQ_EMPTY(&sm_dnssl_head)) {
-				ELM_MALLOC(smp3, goto free2);
-				smp3->sm_msg = resstr_sh_prefix;
-				TAILQ_INSERT_TAIL(&sm_dnssl_head, smp3,
-				    sm_next);
-			}
-			smp1->sm_msg = rao->rao_msg;
-			TAILQ_INSERT_TAIL(&sm_dnssl_head, smp1, sm_next);
-			smp2->sm_msg = resstr_sp;
-			TAILQ_INSERT_TAIL(&sm_dnssl_head, smp2, sm_next);
-			dlen += strlen(rao->rao_msg) + strlen(resstr_sp);
-			break;
-		default:
-			break;
-		}
-		continue;
+			continue;
 free2:
-		free(smp2);
+			free(smp2);
 free1:
-		free(smp1);
+			free(smp1);
+		}
 	}
 	/* Add \n for DNSSL list. */
 	if (!TAILQ_EMPTY(&sm_dnssl_head)) {
@@ -625,10 +669,12 @@ free1:
 
 	if (!TAILQ_EMPTY(&sm_rdnss_head))
 		CALL_SCRIPT(RESADD, &sm_rdnss_head);
-#if 0
-	else
+	else if (ifi->ifi_rdnss == IFI_DNSOPT_STATE_RECEIVED ||
+	    ifi->ifi_dnssl == IFI_DNSOPT_STATE_RECEIVED) {
 		CALL_SCRIPT(RESDEL, NULL);
-#endif
+		ifi->ifi_rdnss = IFI_DNSOPT_STATE_NOINFO;
+		ifi->ifi_dnssl = IFI_DNSOPT_STATE_NOINFO;
+	}
 
 ra_opt_handler_freeit:
 	/* Clear script message queue. */
@@ -638,9 +684,30 @@ ra_opt_handler_freeit:
 			free(smp1);
 		}
 	}
+	if (!TAILQ_EMPTY(&sm_dnssl_head)) {
+		while ((smp1 = TAILQ_FIRST(&sm_dnssl_head)) != NULL) {
+			TAILQ_REMOVE(&sm_dnssl_head, smp1, sm_next);
+			free(smp1);
+		}
+	}
 	return (0);
 }
 
+static struct ra_opt *
+find_raopt(struct rainfo *rai, int type, void *msg, size_t len)
+{
+	struct ra_opt *rao;
+
+	TAILQ_FOREACH(rao, &rai->rai_ra_opt, rao_next) {
+		if (rao->rao_type == type &&
+		    rao->rao_len == strlen(msg) &&
+		    memcmp(rao->rao_msg, msg, len) == 0)
+			break;
+	}
+
+	return (rao);
+}
+
 static void
 call_script(const int argc, const char *const argv[], void *head)
 {

Modified: user/hrs/ipv6/usr.sbin/rtsold/rtsold.c
==============================================================================
--- user/hrs/ipv6/usr.sbin/rtsold/rtsold.c	Wed Jun  8 16:03:29 2011	(r222861)
+++ user/hrs/ipv6/usr.sbin/rtsold/rtsold.c	Wed Jun  8 16:06:27 2011	(r222862)
@@ -44,6 +44,7 @@
 #include <netinet/in.h>
 #include <netinet/icmp6.h>
 #include <netinet/in_var.h>
+#include <arpa/inet.h>
 
 #include <netinet6/nd6.h>
 
@@ -408,7 +409,9 @@ ifconfig(char *ifname)
 	}
 	memset(ifi, 0, sizeof(*ifi));
 	ifi->sdl = sdl;
-
+	ifi->ifi_rdnss = IFI_DNSOPT_STATE_NOINFO;
+	ifi->ifi_dnssl = IFI_DNSOPT_STATE_NOINFO;
+	TAILQ_INIT(&ifi->ifi_rainfo);
 	strlcpy(ifi->ifname, ifname, sizeof(ifi->ifname));
 
 	/* construct a router solicitation message */
@@ -500,6 +503,19 @@ ifreconfig(char *ifname)
 }
 #endif
 
+struct rainfo *
+find_rainfo(struct ifinfo *ifi, struct sockaddr_in6 *sin6)
+{
+	struct rainfo *rai;
+
+	TAILQ_FOREACH(rai, &ifi->ifi_rainfo, rai_next)
+		if (memcmp(&rai->rai_saddr.sin6_addr, &sin6->sin6_addr,
+		    sizeof(rai->rai_saddr.sin6_addr)) == 0)
+			return (rai);
+
+	return (NULL);
+}
+
 struct ifinfo *
 find_ifinfo(int ifindex)
 {
@@ -556,6 +572,7 @@ rtsol_check_timer(void)
 	static struct timeval returnval;
 	struct timeval now, rtsol_timer;
 	struct ifinfo *ifi;
+	struct rainfo *rai;
 	struct ra_opt *rao;
 	int flags;
 
@@ -565,18 +582,21 @@ rtsol_check_timer(void)
 
 	TAILQ_FOREACH(ifi, &ifinfo_head, ifi_next) {
 		if (timercmp(&ifi->expire, &now, <=)) {
-			if (dflag > 1)
-				warnmsg(LOG_DEBUG, __func__,
-				    "timer expiration on %s, "
-				    "state = %d", ifi->ifname,
-				    ifi->state);
-
-			/* Remove all RA options. */
-			while ((rao = TAILQ_FIRST(&ifi->ifi_ra_opt)) != NULL) {
-				if (rao->rao_msg != NULL)
-					free(rao->rao_msg);
-				TAILQ_REMOVE(&ifi->ifi_ra_opt, rao, rao_next);
-				free(rao);
+			warnmsg(LOG_DEBUG, __func__, "timer expiration on %s, "
+			    "state = %d", ifi->ifname, ifi->state);
+
+			while((rai = TAILQ_FIRST(&ifi->ifi_rainfo)) != NULL) {
+				/* Remove all RA options. */
+				TAILQ_REMOVE(&ifi->ifi_rainfo, rai, rai_next);
+				while ((rao = TAILQ_FIRST(&rai->rai_ra_opt)) !=
+				    NULL) {
+					TAILQ_REMOVE(&rai->rai_ra_opt, rao,
+					    rao_next);
+					if (rao->rao_msg != NULL)
+						free(rao->rao_msg);
+					free(rao);
+				}
+				free(rai);
 			}
 			switch (ifi->state) {
 			case IFS_DOWN:
@@ -645,21 +665,27 @@ rtsol_check_timer(void)
 			rtsol_timer_update(ifi);
 		} else {
 			/* Expiration check for RA options. */
-			struct ra_opt *rao_tmp;
 			int expire = 0;
 
-			TAILQ_FOREACH_SAFE(rao, &ifi->ifi_ra_opt, rao_next, rao_tmp) {
-				warnmsg(LOG_DEBUG, __func__,
-					"RA expiration timer: "
-					"type=%d, msg=%s, timer=%ld:%08ld",
-					rao->rao_type, (char *)rao->rao_msg,
-					(long)rao->rao_expire.tv_sec,
-					(long)rao->rao_expire.tv_usec);
-				if (timercmp(&now, &rao->rao_expire, >=)) {
+			TAILQ_FOREACH(rai, &ifi->ifi_rainfo, rai_next) {
+				TAILQ_FOREACH(rao, &rai->rai_ra_opt, rao_next) {
 					warnmsg(LOG_DEBUG, __func__,
-						"RA expiration timer: expired.");
-					TAILQ_REMOVE(&ifi->ifi_ra_opt, rao, rao_next);
-					expire = 1;
+					    "RA expiration timer: "
+					    "type=%d, msg=%s, expire=%s",
+					    rao->rao_type, (char *)rao->rao_msg,
+						sec2str(&rao->rao_expire));
+					if (timercmp(&now, &rao->rao_expire,
+					    >=)) {
+						warnmsg(LOG_DEBUG, __func__,
+						    "RA expiration timer: "
+						    "expired.");
+						TAILQ_REMOVE(&rai->rai_ra_opt,
+						    rao, rao_next);
+						if (rao->rao_msg != NULL)
+							free(rao->rao_msg);
+						free(rao);
+						expire = 1;
+					}
 				}
 			}
 			if (expire)
@@ -678,9 +704,10 @@ rtsol_check_timer(void)
 	else
 		timersub(&rtsol_timer, &now, &returnval);
 
-	if (dflag > 1)
-		warnmsg(LOG_DEBUG, __func__, "New timer is %ld:%08ld",
-		    (long)returnval.tv_sec, (long)returnval.tv_usec);
+	now.tv_sec += returnval.tv_sec;
+	now.tv_usec += returnval.tv_usec;
+	warnmsg(LOG_DEBUG, __func__, "New timer is %s",
+	    sec2str(&now));
 
 	return (&returnval);
 }
@@ -751,11 +778,10 @@ rtsol_timer_update(struct ifinfo *ifi)
 		gettimeofday(&now, NULL);
 		timeradd(&now, &ifi->timer, &ifi->expire);
 
-		if (dflag > 1)
-			warnmsg(LOG_DEBUG, __func__,
-			    "set timer for %s to %d:%d", ifi->ifname,
-			    (int)ifi->timer.tv_sec,
-			    (int)ifi->timer.tv_usec);
+		now.tv_sec += ifi->timer.tv_sec;
+		now.tv_usec += ifi->timer.tv_usec;
+		warnmsg(LOG_DEBUG, __func__, "set timer for %s to %s",
+		    ifi->ifname, sec2str(&now));
 	}
 
 #undef MILLION

Modified: user/hrs/ipv6/usr.sbin/rtsold/rtsold.h
==============================================================================
--- user/hrs/ipv6/usr.sbin/rtsold/rtsold.h	Wed Jun  8 16:03:29 2011	(r222861)
+++ user/hrs/ipv6/usr.sbin/rtsold/rtsold.h	Wed Jun  8 16:06:27 2011	(r222862)
@@ -46,6 +46,16 @@ struct ra_opt {
 	void		*rao_msg;
 };
 
+TAILQ_HEAD(rainfo_head, ra_opt);
+
+struct rainfo {
+	TAILQ_ENTRY(rainfo)	rai_next;
+
+	struct ifinfo		*rai_ifinfo;
+	struct sockaddr_in6	rai_saddr;
+	TAILQ_HEAD(, ra_opt)	rai_ra_opt;
+};
+
 struct ifinfo {
 	TAILQ_ENTRY(ifinfo)	ifi_next;	/* pointer to the next interface */
 
@@ -64,13 +74,16 @@ struct ifinfo {
 	struct timeval timer;
 	struct timeval expire;
 	int errors;		/* # of errors we've got - detect wedge */
+#define IFI_DNSOPT_STATE_NOINFO		0
+#define IFI_DNSOPT_STATE_RECEIVED     	1
+	int ifi_rdnss;		/* RDNSS option state */
+	int ifi_dnssl;		/* DNSSL option state */
 
 	int racnt;		/* total # of valid RAs it have got */
+	TAILQ_HEAD(, rainfo)	ifi_rainfo;
 
 	size_t rs_datalen;
 	u_char *rs_data;
-
-	TAILQ_HEAD(, ra_opt)   ifi_ra_opt;
 };
 
 /* per interface status */
@@ -118,6 +131,7 @@ extern const char *resolvconf_script;
 extern int ifconfig(char *);
 extern void iflist_init(void);
 struct ifinfo *find_ifinfo(int);
+struct rainfo *find_rainfo(struct ifinfo *, struct sockaddr_in6 *);
 void rtsol_timer_update(struct ifinfo *);
 extern void warnmsg(int, const char *, const char *, ...)
      __attribute__((__format__(__printf__, 3, 4)));
@@ -145,6 +159,7 @@ extern void defrouter_probe(struct ifinf
 
 /* dump.c */
 extern void rtsold_dump_file(const char *);
+extern const char *sec2str(const struct timeval *);
 
 /* rtsock.c */
 extern int rtsock_open(void);

From owner-svn-src-user@FreeBSD.ORG  Wed Jun  8 16:07:44 2011
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8FB07106566B;
	Wed,  8 Jun 2011 16:07:44 +0000 (UTC) (envelope-from hrs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 808498FC12;
	Wed,  8 Jun 2011 16:07:44 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p58G7i6J037872;
	Wed, 8 Jun 2011 16:07:44 GMT (envelope-from hrs@svn.freebsd.org)
Received: (from hrs@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p58G7iS4037870;
	Wed, 8 Jun 2011 16:07:44 GMT (envelope-from hrs@svn.freebsd.org)
Message-Id: <201106081607.p58G7iS4037870@svn.freebsd.org>
From: Hiroki Sato <hrs@FreeBSD.org>
Date: Wed, 8 Jun 2011 16:07:44 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r222863 - user/hrs/ipv6/usr.sbin/route6d
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 08 Jun 2011 16:07:44 -0000

Author: hrs
Date: Wed Jun  8 16:07:44 2011
New Revision: 222863
URL: http://svn.freebsd.org/changeset/base/222863

Log:
  Revert bogus changes accidentally merged in the previous commit.

Modified:
  user/hrs/ipv6/usr.sbin/route6d/route6d.c

Modified: user/hrs/ipv6/usr.sbin/route6d/route6d.c
==============================================================================
--- user/hrs/ipv6/usr.sbin/route6d/route6d.c	Wed Jun  8 16:06:27 2011	(r222862)
+++ user/hrs/ipv6/usr.sbin/route6d/route6d.c	Wed Jun  8 16:07:44 2011	(r222863)
@@ -106,7 +106,7 @@ static const char _rcsid[] = "$KAME: rou
 
 struct	ifc {			/* Configuration of an interface */
 	char	ifc_name[IFNAMSIZ];		/* if name */
-	TAILQ_ENTRY(ifc) ifc_next;
+	struct	ifc *ifc_next;
 	int	ifc_index;			/* if index */
 	int	ifc_mtu;			/* if mtu */
 	int	ifc_metric;			/* if metric */
@@ -120,7 +120,7 @@ struct	ifc {			/* Configuration of an in
 
 struct	ifac {			/* Adddress associated to an interface */ 
 	struct	ifc *ifa_conf;		/* back pointer */
-	TAILQ_ENTRY(ifac) ifa_next;
+	struct	ifac *ifa_next;
 	struct	in6_addr ifa_addr;	/* address */
 	struct	in6_addr ifa_raddr;	/* remote address, valid in p2p */
 	int	ifa_plen;		/* prefix length */
@@ -134,10 +134,8 @@ struct	iff {
 	struct	iff *iff_next;
 };
 
-TAILQ_HEAD(, ifc) ifc = 
-    TAILQ_HEAD_INITIALIZER(ifc);
-TAILQ_HEAD(, iff) iff_head =
-    TAILQ_HEAD_INITIALIZER(iff_head);
+struct	ifc *ifc;
+struct  iff *iff_head;
 int	nifc;		/* number of valid ifc's */
 struct	ifc **index2ifc;
 unsigned int	nindex2ifc;
@@ -168,7 +166,7 @@ struct	rip6 *ripbuf;	/* packet buffer fo
  */
 
 struct	riprt {
-	TAILQ_ENTRY(riprt) rrt_next;	/* next destination */
+	struct	riprt *rrt_next;	/* next destination */
 	struct	riprt *rrt_same;	/* same destination - future use */
 	struct	netinfo6 rrt_info;	/* network info */
 	struct	in6_addr rrt_gw;	/* gateway */

From owner-svn-src-user@FreeBSD.ORG  Sat Jun 11 06:56:29 2011
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8FB7E106566C;
	Sat, 11 Jun 2011 06:56:29 +0000 (UTC) (envelope-from hrs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 7CFFD8FC0C;
	Sat, 11 Jun 2011 06:56:29 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p5B6uTwX062664;
	Sat, 11 Jun 2011 06:56:29 GMT (envelope-from hrs@svn.freebsd.org)
Received: (from hrs@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p5B6uRHU062625;
	Sat, 11 Jun 2011 06:56:27 GMT (envelope-from hrs@svn.freebsd.org)
Message-Id: <201106110656.p5B6uRHU062625@svn.freebsd.org>
From: Hiroki Sato <hrs@FreeBSD.org>
Date: Sat, 11 Jun 2011 06:56:27 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r222977 - in user/hrs/ipv6: bin/sh
	cddl/compat/opensolaris/include contrib/less contrib/top
	games/fortune/datfiles gnu/usr.bin lib/libstand sbin/fsck_ffs
	sbin/rtsol share/mk share/skel ...
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sat, 11 Jun 2011 06:56:29 -0000

Author: hrs
Date: Sat Jun 11 06:56:26 2011
New Revision: 222977
URL: http://svn.freebsd.org/changeset/base/222977

Log:
  Merge from HEAD@222975.

Added:
  user/hrs/ipv6/tools/regression/bin/sh/execution/set-x1.0
     - copied unchanged from r222976, head/tools/regression/bin/sh/execution/set-x1.0
  user/hrs/ipv6/tools/regression/bin/sh/execution/set-x2.0
     - copied unchanged from r222976, head/tools/regression/bin/sh/execution/set-x2.0
  user/hrs/ipv6/tools/regression/bin/sh/execution/set-x3.0
     - copied unchanged from r222976, head/tools/regression/bin/sh/execution/set-x3.0
  user/hrs/ipv6/tools/regression/bin/sh/parameters/env1.0
     - copied unchanged from r222976, head/tools/regression/bin/sh/parameters/env1.0
  user/hrs/ipv6/tools/tools/cxgbetool/
     - copied from r222976, head/tools/tools/cxgbetool/
Modified:
  user/hrs/ipv6/bin/sh/eval.c
  user/hrs/ipv6/bin/sh/expand.c
  user/hrs/ipv6/bin/sh/main.c
  user/hrs/ipv6/bin/sh/parser.c
  user/hrs/ipv6/bin/sh/parser.h
  user/hrs/ipv6/bin/sh/sh.1
  user/hrs/ipv6/cddl/compat/opensolaris/include/assert.h
  user/hrs/ipv6/contrib/less/NEWS
  user/hrs/ipv6/contrib/less/README
  user/hrs/ipv6/contrib/less/command.c
  user/hrs/ipv6/contrib/less/funcs.h
  user/hrs/ipv6/contrib/less/less.man
  user/hrs/ipv6/contrib/less/less.nro
  user/hrs/ipv6/contrib/less/lessecho.man
  user/hrs/ipv6/contrib/less/lessecho.nro
  user/hrs/ipv6/contrib/less/lesskey.man
  user/hrs/ipv6/contrib/less/lesskey.nro
  user/hrs/ipv6/contrib/less/optfunc.c
  user/hrs/ipv6/contrib/less/opttbl.c
  user/hrs/ipv6/contrib/less/version.c
  user/hrs/ipv6/games/fortune/datfiles/fortunes
  user/hrs/ipv6/gnu/usr.bin/Makefile
  user/hrs/ipv6/lib/libstand/bswap.c
  user/hrs/ipv6/sbin/fsck_ffs/suj.c
  user/hrs/ipv6/sbin/rtsol/Makefile
  user/hrs/ipv6/share/skel/dot.shrc
  user/hrs/ipv6/sys/Makefile
  user/hrs/ipv6/sys/amd64/amd64/legacy.c
  user/hrs/ipv6/sys/cddl/compat/opensolaris/sys/kstat.h
  user/hrs/ipv6/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h
  user/hrs/ipv6/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/ddt.h
  user/hrs/ipv6/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_pool.h
  user/hrs/ipv6/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h
  user/hrs/ipv6/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ioctl.h
  user/hrs/ipv6/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h
  user/hrs/ipv6/sys/conf/Makefile.powerpc
  user/hrs/ipv6/sys/conf/files
  user/hrs/ipv6/sys/dev/aac/aac.c
  user/hrs/ipv6/sys/dev/aac/aacvar.h
  user/hrs/ipv6/sys/dev/acpica/acpi.c
  user/hrs/ipv6/sys/dev/ata/ata-sata.c
  user/hrs/ipv6/sys/dev/atkbdc/atkbd.c
  user/hrs/ipv6/sys/dev/bxe/bxe_debug.h
  user/hrs/ipv6/sys/dev/bxe/bxe_link.c
  user/hrs/ipv6/sys/dev/bxe/if_bxe.c
  user/hrs/ipv6/sys/dev/bxe/if_bxe.h
  user/hrs/ipv6/sys/dev/cxgbe/adapter.h
  user/hrs/ipv6/sys/dev/cxgbe/t4_ioctl.h
  user/hrs/ipv6/sys/dev/cxgbe/t4_main.c
  user/hrs/ipv6/sys/dev/cxgbe/t4_sge.c
  user/hrs/ipv6/sys/dev/iwn/if_iwn.c
  user/hrs/ipv6/sys/dev/pci/pci_pci.c
  user/hrs/ipv6/sys/dev/xen/blkback/blkback.c
  user/hrs/ipv6/sys/dev/xen/blkfront/blkfront.c
  user/hrs/ipv6/sys/dev/xen/control/control.c
  user/hrs/ipv6/sys/dev/xen/netfront/netfront.c
  user/hrs/ipv6/sys/i386/i386/legacy.c
  user/hrs/ipv6/sys/ia64/ia64/machdep.c
  user/hrs/ipv6/sys/kern/kern_shutdown.c
  user/hrs/ipv6/sys/kern/vfs_bio.c
  user/hrs/ipv6/sys/sys/vnode.h
  user/hrs/ipv6/sys/ufs/ffs/ffs_alloc.c
  user/hrs/ipv6/sys/ufs/ffs/ffs_balloc.c
  user/hrs/ipv6/sys/ufs/ffs/ffs_extern.h
  user/hrs/ipv6/sys/ufs/ffs/ffs_inode.c
  user/hrs/ipv6/sys/ufs/ffs/ffs_softdep.c
  user/hrs/ipv6/sys/ufs/ffs/ffs_vfsops.c
  user/hrs/ipv6/sys/ufs/ffs/ffs_vnops.c
  user/hrs/ipv6/sys/ufs/ffs/fs.h
  user/hrs/ipv6/sys/ufs/ffs/softdep.h
  user/hrs/ipv6/sys/ufs/ufs/inode.h
  user/hrs/ipv6/sys/ufs/ufs/quota.h
  user/hrs/ipv6/sys/ufs/ufs/ufs_lookup.c
  user/hrs/ipv6/sys/ufs/ufs/ufs_quota.c
  user/hrs/ipv6/sys/ufs/ufs/ufsmount.h
  user/hrs/ipv6/sys/x86/x86/tsc.c
  user/hrs/ipv6/sys/xen/interface/io/xenbus.h
  user/hrs/ipv6/sys/xen/xenbus/xenbus.c
  user/hrs/ipv6/sys/xen/xenbus/xenbus_if.m
  user/hrs/ipv6/sys/xen/xenbus/xenbusb.c
  user/hrs/ipv6/sys/xen/xenbus/xenbusb.h
  user/hrs/ipv6/sys/xen/xenbus/xenbusb_back.c
  user/hrs/ipv6/sys/xen/xenbus/xenbusb_front.c
  user/hrs/ipv6/sys/xen/xenbus/xenbusb_if.m
  user/hrs/ipv6/sys/xen/xenbus/xenbusvar.h
  user/hrs/ipv6/sys/xen/xenstore/xenstorevar.h
  user/hrs/ipv6/tools/tools/README
  user/hrs/ipv6/usr.sbin/mfiutil/mfi_config.c
  user/hrs/ipv6/usr.sbin/mfiutil/mfi_drive.c
  user/hrs/ipv6/usr.sbin/mfiutil/mfi_evt.c
  user/hrs/ipv6/usr.sbin/mfiutil/mfi_flash.c
  user/hrs/ipv6/usr.sbin/mfiutil/mfi_patrol.c
  user/hrs/ipv6/usr.sbin/mfiutil/mfi_show.c
  user/hrs/ipv6/usr.sbin/mfiutil/mfi_volume.c
  user/hrs/ipv6/usr.sbin/rtadvd/config.c
  user/hrs/ipv6/usr.sbin/rtadvd/config.h
  user/hrs/ipv6/usr.sbin/rtadvd/rtadvd.8
  user/hrs/ipv6/usr.sbin/rtadvd/rtadvd.c
  user/hrs/ipv6/usr.sbin/rtadvd/rtadvd.h
Directory Properties:
  user/hrs/ipv6/   (props changed)
  user/hrs/ipv6/cddl/contrib/opensolaris/   (props changed)
  user/hrs/ipv6/contrib/bind9/   (props changed)
  user/hrs/ipv6/contrib/binutils/   (props changed)
  user/hrs/ipv6/contrib/bzip2/   (props changed)
  user/hrs/ipv6/contrib/compiler-rt/   (props changed)
  user/hrs/ipv6/contrib/dialog/   (props changed)
  user/hrs/ipv6/contrib/ee/   (props changed)
  user/hrs/ipv6/contrib/expat/   (props changed)
  user/hrs/ipv6/contrib/file/   (props changed)
  user/hrs/ipv6/contrib/gcc/   (props changed)
  user/hrs/ipv6/contrib/gdb/   (props changed)
  user/hrs/ipv6/contrib/gdtoa/   (props changed)
  user/hrs/ipv6/contrib/gnu-sort/   (props changed)
  user/hrs/ipv6/contrib/groff/   (props changed)
  user/hrs/ipv6/contrib/less/   (props changed)
  user/hrs/ipv6/contrib/libpcap/   (props changed)
  user/hrs/ipv6/contrib/libstdc++/   (props changed)
  user/hrs/ipv6/contrib/llvm/   (props changed)
  user/hrs/ipv6/contrib/llvm/tools/clang/   (props changed)
  user/hrs/ipv6/contrib/ncurses/   (props changed)
  user/hrs/ipv6/contrib/netcat/   (props changed)
  user/hrs/ipv6/contrib/ntp/   (props changed)
  user/hrs/ipv6/contrib/one-true-awk/   (props changed)
  user/hrs/ipv6/contrib/openbsm/   (props changed)
  user/hrs/ipv6/contrib/openpam/   (props changed)
  user/hrs/ipv6/contrib/pf/   (props changed)
  user/hrs/ipv6/contrib/sendmail/   (props changed)
  user/hrs/ipv6/contrib/tcpdump/   (props changed)
  user/hrs/ipv6/contrib/tcsh/   (props changed)
  user/hrs/ipv6/contrib/top/   (props changed)
  user/hrs/ipv6/contrib/top/install-sh   (props changed)
  user/hrs/ipv6/contrib/tzcode/stdtime/   (props changed)
  user/hrs/ipv6/contrib/tzcode/zic/   (props changed)
  user/hrs/ipv6/contrib/tzdata/   (props changed)
  user/hrs/ipv6/contrib/wpa/   (props changed)
  user/hrs/ipv6/contrib/xz/   (props changed)
  user/hrs/ipv6/crypto/openssh/   (props changed)
  user/hrs/ipv6/crypto/openssl/   (props changed)
  user/hrs/ipv6/gnu/lib/   (props changed)
  user/hrs/ipv6/gnu/usr.bin/binutils/   (props changed)
  user/hrs/ipv6/gnu/usr.bin/cc/cc_tools/   (props changed)
  user/hrs/ipv6/gnu/usr.bin/gdb/   (props changed)
  user/hrs/ipv6/lib/libc/   (props changed)
  user/hrs/ipv6/lib/libc/stdtime/   (props changed)
  user/hrs/ipv6/lib/libutil/   (props changed)
  user/hrs/ipv6/lib/libz/   (props changed)
  user/hrs/ipv6/sbin/   (props changed)
  user/hrs/ipv6/sbin/ipfw/   (props changed)
  user/hrs/ipv6/share/mk/bsd.arch.inc.mk   (props changed)
  user/hrs/ipv6/share/zoneinfo/   (props changed)
  user/hrs/ipv6/sys/   (props changed)
  user/hrs/ipv6/sys/amd64/include/xen/   (props changed)
  user/hrs/ipv6/sys/boot/   (props changed)
  user/hrs/ipv6/sys/boot/i386/efi/   (props changed)
  user/hrs/ipv6/sys/boot/ia64/efi/   (props changed)
  user/hrs/ipv6/sys/boot/ia64/ski/   (props changed)
  user/hrs/ipv6/sys/boot/powerpc/boot1.chrp/   (props changed)
  user/hrs/ipv6/sys/boot/powerpc/ofw/   (props changed)
  user/hrs/ipv6/sys/cddl/contrib/opensolaris/   (props changed)
  user/hrs/ipv6/sys/conf/   (props changed)
  user/hrs/ipv6/sys/contrib/dev/acpica/   (props changed)
  user/hrs/ipv6/sys/contrib/octeon-sdk/   (props changed)
  user/hrs/ipv6/sys/contrib/pf/   (props changed)
  user/hrs/ipv6/sys/contrib/x86emu/   (props changed)
  user/hrs/ipv6/usr.bin/calendar/   (props changed)
  user/hrs/ipv6/usr.bin/csup/   (props changed)
  user/hrs/ipv6/usr.bin/procstat/   (props changed)
  user/hrs/ipv6/usr.sbin/ndiscvt/   (props changed)
  user/hrs/ipv6/usr.sbin/rtsold/   (props changed)
  user/hrs/ipv6/usr.sbin/zic/   (props changed)

Modified: user/hrs/ipv6/bin/sh/eval.c
==============================================================================
--- user/hrs/ipv6/bin/sh/eval.c	Sat Jun 11 06:05:00 2011	(r222976)
+++ user/hrs/ipv6/bin/sh/eval.c	Sat Jun 11 06:56:26 2011	(r222977)
@@ -745,8 +745,9 @@ evalcommand(union node *cmd, int flags, 
 	/* Print the command if xflag is set. */
 	if (xflag) {
 		char sep = 0;
-		const char *p;
-		out2str(ps4val());
+		const char *p, *ps4;
+		ps4 = expandstr(ps4val());
+		out2str(ps4 != NULL ? ps4 : ps4val());
 		for (sp = varlist.list ; sp ; sp = sp->next) {
 			if (sep != 0)
 				out2c(' ');

Modified: user/hrs/ipv6/bin/sh/expand.c
==============================================================================
--- user/hrs/ipv6/bin/sh/expand.c	Sat Jun 11 06:05:00 2011	(r222976)
+++ user/hrs/ipv6/bin/sh/expand.c	Sat Jun 11 06:56:26 2011	(r222977)
@@ -174,6 +174,7 @@ expandarg(union node *arg, struct arglis
 	ifslastp = NULL;
 	argstr(arg->narg.text, flag);
 	if (arglist == NULL) {
+		STACKSTRNUL(expdest);
 		return;			/* here document expanded */
 	}
 	STPUTC('\0', expdest);

Modified: user/hrs/ipv6/bin/sh/main.c
==============================================================================
--- user/hrs/ipv6/bin/sh/main.c	Sat Jun 11 06:05:00 2011	(r222976)
+++ user/hrs/ipv6/bin/sh/main.c	Sat Jun 11 06:56:26 2011	(r222977)
@@ -78,7 +78,7 @@ int rootshell;
 struct jmploc main_handler;
 int localeisutf8, initial_localeisutf8;
 
-static void read_profile(const char *);
+static void read_profile(char *);
 static char *find_dot_file(char *);
 
 /*
@@ -92,7 +92,7 @@ static char *find_dot_file(char *);
 int
 main(int argc, char *argv[])
 {
-	struct stackmark smark;
+	struct stackmark smark, smark2;
 	volatile int state;
 	char *shinit;
 
@@ -139,6 +139,7 @@ main(int argc, char *argv[])
 	rootshell = 1;
 	init();
 	setstackmark(&smark);
+	setstackmark(&smark2);
 	procargs(argc, argv);
 	pwd_init(iflag);
 	if (iflag)
@@ -163,6 +164,7 @@ state2:
 	}
 state3:
 	state = 4;
+	popstackmark(&smark2);
 	if (minusc) {
 		evalstring(minusc, sflag ? 0 : EV_EXIT);
 	}
@@ -235,12 +237,16 @@ cmdloop(int top)
  */
 
 static void
-read_profile(const char *name)
+read_profile(char *name)
 {
 	int fd;
+	const char *expandedname;
 
+	expandedname = expandstr(name);
+	if (expandedname == NULL)
+		return;
 	INTOFF;
-	if ((fd = open(name, O_RDONLY)) >= 0)
+	if ((fd = open(expandedname, O_RDONLY)) >= 0)
 		setinputfd(fd, 1);
 	INTON;
 	if (fd < 0)

Modified: user/hrs/ipv6/bin/sh/parser.c
==============================================================================
--- user/hrs/ipv6/bin/sh/parser.c	Sat Jun 11 06:05:00 2011	(r222976)
+++ user/hrs/ipv6/bin/sh/parser.c	Sat Jun 11 06:56:26 2011	(r222977)
@@ -2029,3 +2029,47 @@ getprompt(void *unused __unused)
 	ps[i] = '\0';
 	return (ps);
 }
+
+
+const char *
+expandstr(char *ps)
+{
+	union node n;
+	struct jmploc jmploc;
+	struct jmploc *const savehandler = handler;
+	const int saveprompt = doprompt;
+	struct parsefile *const savetopfile = getcurrentfile();
+	struct parser_temp *const saveparser_temp = parser_temp;
+	const char *result = NULL;
+
+	if (!setjmp(jmploc.loc)) {
+		handler = &jmploc;
+		parser_temp = NULL;
+		setinputstring(ps, 1);
+		doprompt = 0;
+		readtoken1(pgetc(), DQSYNTAX, "\n\n", 0);
+		if (backquotelist != NULL)
+			error("Command substitution not allowed here");
+
+		n.narg.type = NARG;
+		n.narg.next = NULL;
+		n.narg.text = wordtext;
+		n.narg.backquote = backquotelist;
+
+		expandarg(&n, NULL, 0);
+		result = stackblock();
+		INTOFF;
+	}
+	handler = savehandler;
+	doprompt = saveprompt;
+	popfilesupto(savetopfile);
+	if (parser_temp != saveparser_temp) {
+		parser_temp_free_all();
+		parser_temp = saveparser_temp;
+	}
+	if (result != NULL) {
+		INTON;
+	} else if (exception == EXINT)
+		raise(SIGINT);
+	return result;
+}

Modified: user/hrs/ipv6/bin/sh/parser.h
==============================================================================
--- user/hrs/ipv6/bin/sh/parser.h	Sat Jun 11 06:05:00 2011	(r222976)
+++ user/hrs/ipv6/bin/sh/parser.h	Sat Jun 11 06:56:26 2011	(r222977)
@@ -82,3 +82,4 @@ void fixredir(union node *, const char *
 int goodname(const char *);
 int isassignment(const char *);
 char *getprompt(void *);
+const char *expandstr(char *);

Modified: user/hrs/ipv6/bin/sh/sh.1
==============================================================================
--- user/hrs/ipv6/bin/sh/sh.1	Sat Jun 11 06:05:00 2011	(r222976)
+++ user/hrs/ipv6/bin/sh/sh.1	Sat Jun 11 06:56:26 2011	(r222977)
@@ -32,7 +32,7 @@
 .\"	from: @(#)sh.1	8.6 (Berkeley) 5/4/95
 .\" $FreeBSD$
 .\"
-.Dd May 21, 2011
+.Dd June 10, 2011
 .Dt SH 1
 .Os
 .Sh NAME
@@ -124,8 +124,8 @@ If the environment variable
 .Ev ENV
 is set on entry to a shell, or is set in the
 .Pa .profile
-of a login shell, the shell then reads commands from the file named in
-.Ev ENV .
+of a login shell, the shell then subjects its value to parameter expansion
+and arithmetic expansion and reads commands from the named file.
 Therefore, a user should place commands that are to be executed only
 at login time in the
 .Pa .profile
@@ -324,7 +324,7 @@ Useful for debugging.
 Write each command
 (preceded by the value of the
 .Va PS4
-variable)
+variable subjected to parameter expansion and arithmetic expansion)
 to standard error before it is executed.
 Useful for debugging.
 .El

Modified: user/hrs/ipv6/cddl/compat/opensolaris/include/assert.h
==============================================================================
--- user/hrs/ipv6/cddl/compat/opensolaris/include/assert.h	Sat Jun 11 06:05:00 2011	(r222976)
+++ user/hrs/ipv6/cddl/compat/opensolaris/include/assert.h	Sat Jun 11 06:56:26 2011	(r222977)
@@ -43,6 +43,10 @@
 #include <stdio.h>
 #include <stdlib.h>
 
+#ifdef  __cplusplus
+extern "C" {
+#endif
+
 static __inline void
 __assert(const char *expr, const char *file, int line)
 {
@@ -52,4 +56,9 @@ __assert(const char *expr, const char *f
 	abort();
 	/* NOTREACHED */
 }
+
+#ifdef  __cplusplus
+}
+#endif
+
 #endif /* !_ASSERT_H_ */

Modified: user/hrs/ipv6/contrib/less/NEWS
==============================================================================
--- user/hrs/ipv6/contrib/less/NEWS	Sat Jun 11 06:05:00 2011	(r222976)
+++ user/hrs/ipv6/contrib/less/NEWS	Sat Jun 11 06:56:26 2011	(r222977)
@@ -12,6 +12,15 @@
 
 ======================================================================
 
+	Major changes between "less" versions 443 and 444
+
+* Fix bug in unget handling that can cause strange effects on the
+  command line.
+
+* Remove vestiges of obsolete -l option that can cause a crash.
+
+======================================================================
+
 	Major changes between "less" versions 436 and 443
 
 * Change search behavior such that when a search is given an explicit 

Modified: user/hrs/ipv6/contrib/less/README
==============================================================================
--- user/hrs/ipv6/contrib/less/README	Sat Jun 11 06:05:00 2011	(r222976)
+++ user/hrs/ipv6/contrib/less/README	Sat Jun 11 06:56:26 2011	(r222977)
@@ -7,9 +7,9 @@
 **************************************************************************
 **************************************************************************
 
-                            Less, version 443
+                            Less, version 444
 
-    This is the distribution of less, version 443, released 09 Apr 2011.
+    This is the distribution of less, version 444, released 09 Jun 2011.
     This program is part of the GNU project (http://www.gnu.org).
 
     This program is free software.  You may redistribute it and/or

Modified: user/hrs/ipv6/contrib/less/command.c
==============================================================================
--- user/hrs/ipv6/contrib/less/command.c	Sat Jun 11 06:05:00 2011	(r222976)
+++ user/hrs/ipv6/contrib/less/command.c	Sat Jun 11 06:56:26 2011	(r222977)
@@ -302,7 +302,7 @@ is_erase_char(c)
  */
 	static int
 mca_opt_first_char(c)
-	int c;
+    int c;
 {
 	int flag = (optflag & ~OPT_NO_PROMPT);
 	if (flag == OPT_NO_TOGGLE)
@@ -846,6 +846,7 @@ ungetcc(c)
 	ug->ug_char = c;
 	ug->ug_next = ungot;
 	ungot = ug;
+	unget_end = 0;
 }
 
 /*

Modified: user/hrs/ipv6/contrib/less/funcs.h
==============================================================================
--- user/hrs/ipv6/contrib/less/funcs.h	Sat Jun 11 06:05:00 2011	(r222976)
+++ user/hrs/ipv6/contrib/less/funcs.h	Sat Jun 11 06:56:26 2011	(r222977)
@@ -194,7 +194,6 @@
 	public void unmark ();
 	public void opt_o ();
 	public void opt__O ();
-	public void opt_l ();
 	public void opt_j ();
 	public void calc_jump_sline ();
 	public void opt_shift ();

Modified: user/hrs/ipv6/contrib/less/less.man
==============================================================================
--- user/hrs/ipv6/contrib/less/less.man	Sat Jun 11 06:05:00 2011	(r222976)
+++ user/hrs/ipv6/contrib/less/less.man	Sat Jun 11 06:56:26 2011	(r222977)
@@ -1156,7 +1156,7 @@ LESS(1)                                 
             next      8bcccbcc18b95.bb125.bb
 
        If neither LESSCHARSET nor LESSCHARDEF is set, but any of  the  strings
-       "UTF-8",  "UTF8",  "utf-8" or "utf8" is found in the LC_ALL, LC_TYPE or
+       "UTF-8",  "UTF8", "utf-8" or "utf8" is found in the LC_ALL, LC_CTYPE or
        LANG environment variables, then the default character set is utf-8.
 
        If that string is not found, but your  system  supports  the  setlocale
@@ -1580,4 +1580,4 @@ LESS(1)                                 
 
 
 
-                           Version 443: 09 Apr 2011                    LESS(1)
+                           Version 444: 09 Jun 2011                    LESS(1)

Modified: user/hrs/ipv6/contrib/less/less.nro
==============================================================================
--- user/hrs/ipv6/contrib/less/less.nro	Sat Jun 11 06:05:00 2011	(r222976)
+++ user/hrs/ipv6/contrib/less/less.nro	Sat Jun 11 06:56:26 2011	(r222977)
@@ -1,4 +1,4 @@
-.TH LESS 1 "Version 443: 09 Apr 2011"
+.TH LESS 1 "Version 444: 09 Jun 2011"
 .SH NAME
 less \- opposite of more
 .SH SYNOPSIS
@@ -1276,7 +1276,7 @@ to each of the possible values for LESSC
 .PP
 If neither LESSCHARSET nor LESSCHARDEF is set,
 but any of the strings "UTF-8", "UTF8", "utf-8" or "utf8" 
-is found in the LC_ALL, LC_TYPE or LANG
+is found in the LC_ALL, LC_CTYPE or LANG
 environment variables, then the default character set is utf-8.
 .PP
 If that string is not found, but your system supports the

Modified: user/hrs/ipv6/contrib/less/lessecho.man
==============================================================================
--- user/hrs/ipv6/contrib/less/lessecho.man	Sat Jun 11 06:05:00 2011	(r222976)
+++ user/hrs/ipv6/contrib/less/lessecho.man	Sat Jun 11 06:56:26 2011	(r222977)
@@ -46,4 +46,4 @@ LESSECHO(1)                             
 
 
 
-                           Version 443: 09 Apr 2011                LESSECHO(1)
+                           Version 444: 09 Jun 2011                LESSECHO(1)

Modified: user/hrs/ipv6/contrib/less/lessecho.nro
==============================================================================
--- user/hrs/ipv6/contrib/less/lessecho.nro	Sat Jun 11 06:05:00 2011	(r222976)
+++ user/hrs/ipv6/contrib/less/lessecho.nro	Sat Jun 11 06:56:26 2011	(r222977)
@@ -1,4 +1,4 @@
-.TH LESSECHO 1 "Version 443: 09 Apr 2011"
+.TH LESSECHO 1 "Version 444: 09 Jun 2011"
 .SH NAME
 lessecho \- expand metacharacters
 .SH SYNOPSIS

Modified: user/hrs/ipv6/contrib/less/lesskey.man
==============================================================================
--- user/hrs/ipv6/contrib/less/lesskey.man	Sat Jun 11 06:05:00 2011	(r222976)
+++ user/hrs/ipv6/contrib/less/lesskey.man	Sat Jun 11 06:56:26 2011	(r222977)
@@ -354,4 +354,4 @@ LESSKEY(1)                              
 
 
 
-                           Version 443: 09 Apr 2011                 LESSKEY(1)
+                           Version 444: 09 Jun 2011                 LESSKEY(1)

Modified: user/hrs/ipv6/contrib/less/lesskey.nro
==============================================================================
--- user/hrs/ipv6/contrib/less/lesskey.nro	Sat Jun 11 06:05:00 2011	(r222976)
+++ user/hrs/ipv6/contrib/less/lesskey.nro	Sat Jun 11 06:56:26 2011	(r222977)
@@ -1,4 +1,4 @@
-.TH LESSKEY 1 "Version 443: 09 Apr 2011"
+.TH LESSKEY 1 "Version 444: 09 Jun 2011"
 .SH NAME
 lesskey \- specify key bindings for less
 .SH SYNOPSIS

Modified: user/hrs/ipv6/contrib/less/optfunc.c
==============================================================================
--- user/hrs/ipv6/contrib/less/optfunc.c	Sat Jun 11 06:05:00 2011	(r222976)
+++ user/hrs/ipv6/contrib/less/optfunc.c	Sat Jun 11 06:56:26 2011	(r222977)
@@ -132,34 +132,6 @@ opt__O(type, s)
 #endif
 
 /*
- * Handlers for -l option.
- */
-	public void
-opt_l(type, s)
-	int type;
-	char *s;
-{
-	int err;
-	int n;
-	char *t;
-	
-	switch (type)
-	{
-	case INIT:
-		t = s;
-		n = getnum(&t, "l", &err);
-		if (err || n <= 0)
-		{
-			error("Line number is required after -l", NULL_PARG);
-			return;
-		}
-		plusoption = TRUE;
-		ungetsc(s);
-		break;
-	}
-}
-
-/*
  * Handlers for -j option.
  */
 	public void

Modified: user/hrs/ipv6/contrib/less/opttbl.c
==============================================================================
--- user/hrs/ipv6/contrib/less/opttbl.c	Sat Jun 11 06:05:00 2011	(r222976)
+++ user/hrs/ipv6/contrib/less/opttbl.c	Sat Jun 11 06:56:26 2011	(r222977)
@@ -263,10 +263,6 @@ static struct loption option[] =
 			NULL
 		}
 	},
-	{ 'l', NULL,
-		STRING|NO_TOGGLE|NO_QUERY, 0, NULL, opt_l,
-		{ NULL, NULL, NULL }
-	},
 	{ 'L', &L__optname,
 		BOOL, OPT_ON, &use_lessopen, NULL,
 		{

Modified: user/hrs/ipv6/contrib/less/version.c
==============================================================================
--- user/hrs/ipv6/contrib/less/version.c	Sat Jun 11 06:05:00 2011	(r222976)
+++ user/hrs/ipv6/contrib/less/version.c	Sat Jun 11 06:56:26 2011	(r222977)
@@ -742,6 +742,7 @@ v441  1/21/11   Fix semi-infinite loop i
 v442  3/2/11    Fix search bug.
                 Add ctrl-G line edit command.
 v443  4/9/11    Fix Windows build.
+v444  6/8/11    Fix ungetc bug; remove vestiges of obsolete -l option.
 */
 
-char version[] = "443";
+char version[] = "444";

Modified: user/hrs/ipv6/games/fortune/datfiles/fortunes
==============================================================================
--- user/hrs/ipv6/games/fortune/datfiles/fortunes	Sat Jun 11 06:05:00 2011	(r222976)
+++ user/hrs/ipv6/games/fortune/datfiles/fortunes	Sat Jun 11 06:56:26 2011	(r222977)
@@ -2057,7 +2057,7 @@ promised me faithfully that you'd be bac
 nine.  It just can't take that long to play 18 holes of golf."
 	"Honey, wait," said Harry.  "Let me explain.  I know what I promised
 you, but I have a very good reason for being late.  Fred and I tee'd off
-right on time and everything was find for the first three holes.  Then, on
+right on time and everything was fine for the first three holes.  Then, on
 the fourth tee Fred had a stroke.  I ran back to the clubhouse but couldn't
 find a doctor.  And, by the time I got back to Fred, he was dead.  So, for
 the next 15 holes, it was hit the ball, drag Fred, hit the ball, drag Fred...
@@ -25523,7 +25523,9 @@ him, prussic acid could solve our popula
 %
 If everybody minded their own business, the world would go
 around a deal faster.
-		-- The Duchess, "Through the Looking Glass"
+		-- The Duchess; Lewis Carroll,
+		   "Through the Looking-Glass,
+		   and What Alice Found There" (1871)
 %
 If everything is coming your way then you're in the wrong lane.
 %
@@ -42420,7 +42422,7 @@ in peoples' memories never really happen
 Some of them want to use you,
 Some of them want to be used by you,
 ...Everybody's looking for something.
-		-- Eurythmics
+		-- Eurythmics, "Sweet Dreams (Are Made Of This)"
 %
 Some of us are becoming the men we wanted to marry.
 		-- Gloria Steinem

Modified: user/hrs/ipv6/gnu/usr.bin/Makefile
==============================================================================
--- user/hrs/ipv6/gnu/usr.bin/Makefile	Sat Jun 11 06:05:00 2011	(r222976)
+++ user/hrs/ipv6/gnu/usr.bin/Makefile	Sat Jun 11 06:56:26 2011	(r222977)
@@ -11,7 +11,7 @@ SUBDIR= ${_binutils} \
 	${_dtc} \
 	${_gdb} \
 	${_gperf} \
-	${_grep} \
+	grep \
 	${_groff} \
 	patch \
 	${_rcs} \
@@ -27,8 +27,6 @@ _groff=		groff
 .endif
 .endif
 
-_grep=          grep
-
 .if ${MK_CVS} != "no"
 _cvs=		cvs
 .endif

Modified: user/hrs/ipv6/lib/libstand/bswap.c
==============================================================================
--- user/hrs/ipv6/lib/libstand/bswap.c	Sat Jun 11 06:05:00 2011	(r222976)
+++ user/hrs/ipv6/lib/libstand/bswap.c	Sat Jun 11 06:56:26 2011	(r222977)
@@ -8,7 +8,7 @@ __FBSDID("$FreeBSD$");
 
 #if defined(LIBC_SCCS) && !defined(lint)
 static char *rcsid = "$NetBSD: bswap32.c,v 1.1 1997/10/09 15:42:33 bouyer Exp $";
-static char *rcsid = "$NetBSD: bswap64.c,v 1.1 1997/10/09 15:42:33 bouyer Exp $";
+static char *rcsid = "$NetBSD: bswap64.c,v 1.3 2009/03/16 05:59:21 cegger Exp $";
 #endif
 
 #include <sys/types.h>
@@ -30,12 +30,28 @@ bswap32(u_int32_t x)
 
 u_int64_t
 bswap64(u_int64_t x)
-{  
-	u_int32_t *p = (u_int32_t*)&x;
-	u_int32_t t;
-	t = bswap32(p[0]);
-	p[0] = bswap32(p[1]);
-	p[1] = t;
-	return x;
-}   
-
+{
+#ifdef _LP64
+	/*
+	 * Assume we have wide enough registers to do it without touching
+	 * memory.
+	 */
+	return  ( (x << 56) & 0xff00000000000000UL ) |
+		( (x << 40) & 0x00ff000000000000UL ) |
+		( (x << 24) & 0x0000ff0000000000UL ) |
+		( (x <<  8) & 0x000000ff00000000UL ) |
+		( (x >>  8) & 0x00000000ff000000UL ) |
+		( (x >> 24) & 0x0000000000ff0000UL ) |
+		( (x >> 40) & 0x000000000000ff00UL ) |
+		( (x >> 56) & 0x00000000000000ffUL );
+#else
+	/*
+	 * Split the operation in two 32bit steps.
+	 */
+	u_int32_t tl, th;
+
+	th = bswap32((u_int32_t)(x & 0x00000000ffffffffULL));
+	tl = bswap32((u_int32_t)((x >> 32) & 0x00000000ffffffffULL));
+	return ((u_int64_t)th << 32) | tl;
+#endif
+}

Modified: user/hrs/ipv6/sbin/fsck_ffs/suj.c
==============================================================================
--- user/hrs/ipv6/sbin/fsck_ffs/suj.c	Sat Jun 11 06:05:00 2011	(r222976)
+++ user/hrs/ipv6/sbin/fsck_ffs/suj.c	Sat Jun 11 06:56:26 2011	(r222977)
@@ -1604,7 +1604,7 @@ ino_trunc(ino_t ino, off_t size)
 	 * uninitialized space later.
 	 */
 	off = blkoff(fs, size);
-	if (off) {
+	if (off && DIP(ip, di_mode) != IFDIR) {
 		uint8_t *buf;
 		long clrsize;
 
@@ -1775,13 +1775,18 @@ cg_trunc(struct suj_cg *sc)
 	struct suj_ino *sino;
 	int i;
 
-	for (i = 0; i < SUJ_HASHSIZE; i++)
-		LIST_FOREACH(sino, &sc->sc_inohash[i], si_next)
+	for (i = 0; i < SUJ_HASHSIZE; i++) {
+		LIST_FOREACH(sino, &sc->sc_inohash[i], si_next) {
 			if (sino->si_trunc) {
 				ino_trunc(sino->si_ino,
 				    sino->si_trunc->jt_size);
+				sino->si_blkadj = 0;
 				sino->si_trunc = NULL;
 			}
+			if (sino->si_blkadj)
+				ino_adjblks(sino);
+		}
+	}
 }
 
 /*
@@ -1791,7 +1796,6 @@ cg_trunc(struct suj_cg *sc)
 static void
 cg_check_blk(struct suj_cg *sc)
 {
-	struct suj_ino *sino;
 	struct suj_blk *sblk;
 	int i;
 
@@ -1799,15 +1803,6 @@ cg_check_blk(struct suj_cg *sc)
 	for (i = 0; i < SUJ_HASHSIZE; i++)
 		LIST_FOREACH(sblk, &sc->sc_blkhash[i], sb_next)
 			blk_check(sblk);
-	/*
-	 * Now that we've freed blocks which are not referenced we
-	 * make a second pass over all inodes to adjust their block
-	 * counts.
-	 */
-	for (i = 0; i < SUJ_HASHSIZE; i++)
-		LIST_FOREACH(sino, &sc->sc_inohash[i], si_next)
-			if (sino->si_blkadj)
-				ino_adjblks(sino);
 }
 
 /*
@@ -1961,14 +1956,7 @@ ino_append(union jrec *rec)
 		    "parent %d, diroff %jd\n",
 		    refrec->jr_op, refrec->jr_ino, refrec->jr_nlink,
 		    refrec->jr_parent, refrec->jr_diroff);
-	/*
-	 * Lookup the ino and clear truncate if one is found.  Partial
-	 * truncates are always done synchronously so if we discover
-	 * an operation that requires a lock the truncation has completed
-	 * and can be discarded.
-	 */
 	sino = ino_lookup(((struct jrefrec *)rec)->jr_ino, 1);
-	sino->si_trunc = NULL;
 	sino->si_hasrecs = 1;
 	srec = errmalloc(sizeof(*srec));
 	srec->sr_rec = rec;
@@ -2174,9 +2162,7 @@ blk_build(struct jblkrec *blkrec)
 	struct suj_rec *srec;
 	struct suj_blk *sblk;
 	struct jblkrec *blkrn;
-	struct suj_ino *sino;
 	ufs2_daddr_t blk;
-	off_t foff;
 	int frag;
 
 	if (debug)
@@ -2185,17 +2171,6 @@ blk_build(struct jblkrec *blkrec)
 		    blkrec->jb_op, blkrec->jb_blkno, blkrec->jb_frags,
 		    blkrec->jb_oldfrags, blkrec->jb_ino, blkrec->jb_lbn);
 
-	/*
-	 * Look up the inode and clear the truncate if any lbns after the
-	 * truncate lbn are freed or allocated.
-	 */
-	sino = ino_lookup(blkrec->jb_ino, 0);
-	if (sino && sino->si_trunc) {
-		foff = lblktosize(fs, blkrec->jb_lbn);
-		foff += lfragtosize(fs, blkrec->jb_frags);
-		if (foff > sino->si_trunc->jt_size)
-			sino->si_trunc = NULL;
-	}
 	blk = blknum(fs, blkrec->jb_blkno);
 	frag = fragnum(fs, blkrec->jb_blkno);
 	sblk = blk_lookup(blk, 1);
@@ -2242,10 +2217,15 @@ ino_build_trunc(struct jtrncrec *rec)
 	struct suj_ino *sino;
 
 	if (debug)
-		printf("ino_build_trunc: ino %d, size %jd\n",
-		    rec->jt_ino, rec->jt_size);
+		printf("ino_build_trunc: op %d ino %d, size %jd\n",
+		    rec->jt_op, rec->jt_ino, rec->jt_size);
 	sino = ino_lookup(rec->jt_ino, 1);
-	sino->si_trunc = rec;
+	if (rec->jt_op == JOP_SYNC) {
+		sino->si_trunc = NULL;
+		return;
+	}
+	if (sino->si_trunc == NULL || sino->si_trunc->jt_size > rec->jt_size)
+		sino->si_trunc = rec;
 }
 
 /*

Modified: user/hrs/ipv6/sbin/rtsol/Makefile
==============================================================================
--- user/hrs/ipv6/sbin/rtsol/Makefile	Sat Jun 11 06:05:00 2011	(r222976)
+++ user/hrs/ipv6/sbin/rtsol/Makefile	Sat Jun 11 06:56:26 2011	(r222977)
@@ -19,7 +19,7 @@ SRCDIR=	${.CURDIR}/../../usr.sbin/rtsold
 .PATH:	${SRCDIR}
 
 PROG=	rtsol
-SRCS=	rtsold.c rtsol.c if.c probe.c rtsock.c
+SRCS=	rtsold.c rtsol.c if.c probe.c dump.c rtsock.c
 NO_MAN=
 
 WARNS?=	3

Modified: user/hrs/ipv6/share/skel/dot.shrc
==============================================================================
--- user/hrs/ipv6/share/skel/dot.shrc	Sat Jun 11 06:05:00 2011	(r222976)
+++ user/hrs/ipv6/share/skel/dot.shrc	Sat Jun 11 06:56:26 2011	(r222977)
@@ -44,4 +44,4 @@ alias g='egrep -i'
 # esac
 
 # search path for cd(1)
-# CDPATH=.:$HOME
+# CDPATH=:$HOME

Modified: user/hrs/ipv6/sys/Makefile
==============================================================================
--- user/hrs/ipv6/sys/Makefile	Sat Jun 11 06:05:00 2011	(r222976)
+++ user/hrs/ipv6/sys/Makefile	Sat Jun 11 06:56:26 2011	(r222977)
@@ -12,7 +12,7 @@ CSCOPEDIRS=	boot bsm cam cddl compat con
 		geom gnu isa kern libkern modules net net80211 netatalk \
 		netgraph netinet netinet6 netipsec netipx netnatm netncp \
 		netsmb nfs nfsclient nfsserver nlm opencrypto \
-		pci rpc security sys ufs vm xdr ${CSCOPE_ARCHDIR}
+		pci rpc security sys ufs vm xdr xen ${CSCOPE_ARCHDIR}
 .if defined(ALL_ARCH)
 CSCOPE_ARCHDIR ?= amd64 arm i386 ia64 mips pc98 powerpc sparc64 x86
 .else

Modified: user/hrs/ipv6/sys/amd64/amd64/legacy.c
==============================================================================
--- user/hrs/ipv6/sys/amd64/amd64/legacy.c	Sat Jun 11 06:05:00 2011	(r222976)
+++ user/hrs/ipv6/sys/amd64/amd64/legacy.c	Sat Jun 11 06:56:26 2011	(r222977)
@@ -81,6 +81,7 @@ static device_method_t legacy_methods[] 
 	DEVMETHOD(bus_read_ivar,	legacy_read_ivar),
 	DEVMETHOD(bus_write_ivar,	legacy_write_ivar),
 	DEVMETHOD(bus_alloc_resource,	bus_generic_alloc_resource),
+	DEVMETHOD(bus_adjust_resource,	bus_generic_adjust_resource),
 	DEVMETHOD(bus_release_resource,	bus_generic_release_resource),
 	DEVMETHOD(bus_activate_resource, bus_generic_activate_resource),
 	DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource),

Modified: user/hrs/ipv6/sys/cddl/compat/opensolaris/sys/kstat.h
==============================================================================
--- user/hrs/ipv6/sys/cddl/compat/opensolaris/sys/kstat.h	Sat Jun 11 06:05:00 2011	(r222976)
+++ user/hrs/ipv6/sys/cddl/compat/opensolaris/sys/kstat.h	Sat Jun 11 06:56:26 2011	(r222977)
@@ -58,7 +58,7 @@ typedef struct kstat_named {
 	} value;
 } kstat_named_t;
 
-kstat_t *kstat_create(char *module, int instance, char *name, char *class,
+kstat_t *kstat_create(char *module, int instance, char *name, char *cls,
     uchar_t type, ulong_t ndata, uchar_t flags);
 void kstat_install(kstat_t *ksp);
 void kstat_delete(kstat_t *ksp);

Modified: user/hrs/ipv6/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h
==============================================================================
--- user/hrs/ipv6/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h	Sat Jun 11 06:05:00 2011	(r222976)
+++ user/hrs/ipv6/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h	Sat Jun 11 06:56:26 2011	(r222977)
@@ -37,8 +37,8 @@ extern "C" {
 
 typedef struct arc_buf_hdr arc_buf_hdr_t;
 typedef struct arc_buf arc_buf_t;
-typedef void arc_done_func_t(zio_t *zio, arc_buf_t *buf, void *private);
-typedef int arc_evict_func_t(void *private);
+typedef void arc_done_func_t(zio_t *zio, arc_buf_t *buf, void *priv);
+typedef int arc_evict_func_t(void *priv);
 
 /* generic arc_done_func_t's which you can use */
 arc_done_func_t arc_bcopy_func;
@@ -103,17 +103,17 @@ int arc_referenced(arc_buf_t *buf);
 #endif
 
 int arc_read(zio_t *pio, spa_t *spa, const blkptr_t *bp, arc_buf_t *pbuf,
-    arc_done_func_t *done, void *private, int priority, int zio_flags,
+    arc_done_func_t *done, void *priv, int priority, int zio_flags,
     uint32_t *arc_flags, const zbookmark_t *zb);
 int arc_read_nolock(zio_t *pio, spa_t *spa, const blkptr_t *bp,
-    arc_done_func_t *done, void *private, int priority, int flags,
+    arc_done_func_t *done, void *priv, int priority, int flags,
     uint32_t *arc_flags, const zbookmark_t *zb);
 zio_t *arc_write(zio_t *pio, spa_t *spa, uint64_t txg,
     blkptr_t *bp, arc_buf_t *buf, boolean_t l2arc, const zio_prop_t *zp,
-    arc_done_func_t *ready, arc_done_func_t *done, void *private,
+    arc_done_func_t *ready, arc_done_func_t *done, void *priv,
     int priority, int zio_flags, const zbookmark_t *zb);
 
-void arc_set_callback(arc_buf_t *buf, arc_evict_func_t *func, void *private);
+void arc_set_callback(arc_buf_t *buf, arc_evict_func_t *func, void *priv);
 int arc_buf_evict(arc_buf_t *buf);
 
 void arc_flush(spa_t *spa);

Modified: user/hrs/ipv6/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/ddt.h
==============================================================================
--- user/hrs/ipv6/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/ddt.h	Sat Jun 11 06:05:00 2011	(r222976)
+++ user/hrs/ipv6/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/ddt.h	Sat Jun 11 06:56:26 2011	(r222977)
@@ -169,15 +169,15 @@ typedef struct ddt_ops {
 #define	DDT_NAMELEN	80
 
 extern void ddt_object_name(ddt_t *ddt, enum ddt_type type,
-    enum ddt_class class, char *name);
+    enum ddt_class cls, char *name);
 extern int ddt_object_walk(ddt_t *ddt, enum ddt_type type,
-    enum ddt_class class, uint64_t *walk, ddt_entry_t *dde);
+    enum ddt_class cls, uint64_t *walk, ddt_entry_t *dde);
 extern uint64_t ddt_object_count(ddt_t *ddt, enum ddt_type type,
-    enum ddt_class class);
+    enum ddt_class cls);
 extern int ddt_object_info(ddt_t *ddt, enum ddt_type type,
-    enum ddt_class class, dmu_object_info_t *);
+    enum ddt_class cls, dmu_object_info_t *);
 extern boolean_t ddt_object_exists(ddt_t *ddt, enum ddt_type type,
-    enum ddt_class class);
+    enum ddt_class cls);
 
 extern void ddt_bp_fill(const ddt_phys_t *ddp, blkptr_t *bp,
     uint64_t txg);
@@ -235,7 +235,7 @@ extern void ddt_unload(spa_t *spa);
 extern void ddt_sync(spa_t *spa, uint64_t txg);
 extern int ddt_walk(spa_t *spa, ddt_bookmark_t *ddb, ddt_entry_t *dde);
 extern int ddt_object_update(ddt_t *ddt, enum ddt_type type,
-    enum ddt_class class, ddt_entry_t *dde, dmu_tx_t *tx);
+    enum ddt_class cls, ddt_entry_t *dde, dmu_tx_t *tx);
 
 extern const ddt_ops_t ddt_zap_ops;
 

Modified: user/hrs/ipv6/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_pool.h
==============================================================================
--- user/hrs/ipv6/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_pool.h	Sat Jun 11 06:05:00 2011	(r222976)
+++ user/hrs/ipv6/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_pool.h	Sat Jun 11 06:56:26 2011	(r222977)
@@ -126,10 +126,10 @@ void dsl_free(dsl_pool_t *dp, uint64_t t
 void dsl_free_sync(zio_t *pio, dsl_pool_t *dp, uint64_t txg,
     const blkptr_t *bpp);
 int dsl_read(zio_t *pio, spa_t *spa, const blkptr_t *bpp, arc_buf_t *pbuf,
-    arc_done_func_t *done, void *private, int priority, int zio_flags,
+    arc_done_func_t *done, void *priv, int priority, int zio_flags,
     uint32_t *arc_flags, const zbookmark_t *zb);
 int dsl_read_nolock(zio_t *pio, spa_t *spa, const blkptr_t *bpp,
-    arc_done_func_t *done, void *private, int priority, int zio_flags,
+    arc_done_func_t *done, void *priv, int priority, int zio_flags,
     uint32_t *arc_flags, const zbookmark_t *zb);
 void dsl_pool_create_origin(dsl_pool_t *dp, dmu_tx_t *tx);
 void dsl_pool_upgrade_clones(dsl_pool_t *dp, dmu_tx_t *tx);

Modified: user/hrs/ipv6/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h
==============================================================================
--- user/hrs/ipv6/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h	Sat Jun 11 06:05:00 2011	(r222976)
+++ user/hrs/ipv6/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h	Sat Jun 11 06:56:26 2011	(r222977)
@@ -655,7 +655,7 @@ extern void spa_history_log_version(spa_
 /* error handling */
 struct zbookmark;
 extern void spa_log_error(spa_t *spa, zio_t *zio);
-extern void zfs_ereport_post(const char *class, spa_t *spa, vdev_t *vd,
+extern void zfs_ereport_post(const char *cls, spa_t *spa, vdev_t *vd,
     zio_t *zio, uint64_t stateoroffset, uint64_t length);
 extern void zfs_post_remove(spa_t *spa, vdev_t *vd);
 extern void zfs_post_state_change(spa_t *spa, vdev_t *vd);

Modified: user/hrs/ipv6/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ioctl.h
==============================================================================
--- user/hrs/ipv6/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ioctl.h	Sat Jun 11 06:05:00 2011	(r222976)
+++ user/hrs/ipv6/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ioctl.h	Sat Jun 11 06:56:26 2011	(r222977)
@@ -115,6 +115,87 @@ typedef enum drr_headertype {
 /*
  * zfs ioctl command structure
  */
+struct drr_begin {
+	uint64_t drr_magic;
+	uint64_t drr_versioninfo; /* was drr_version */
+	uint64_t drr_creation_time;
+	dmu_objset_type_t drr_type;
+	uint32_t drr_flags;
+	uint64_t drr_toguid;
+	uint64_t drr_fromguid;
+	char drr_toname[MAXNAMELEN];
+};
+
+struct drr_end {
+	zio_cksum_t drr_checksum;
+	uint64_t drr_toguid;
+};
+
+struct drr_object {
+	uint64_t drr_object;
+	dmu_object_type_t drr_type;
+	dmu_object_type_t drr_bonustype;
+	uint32_t drr_blksz;
+	uint32_t drr_bonuslen;
+	uint8_t drr_checksumtype;
+	uint8_t drr_compress;
+	uint8_t drr_pad[6];
+	uint64_t drr_toguid;
+	/* bonus content follows */
+};
+
+struct drr_freeobjects {
+	uint64_t drr_firstobj;
+	uint64_t drr_numobjs;
+	uint64_t drr_toguid;
+};
+
+struct drr_write {
+	uint64_t drr_object;
+	dmu_object_type_t drr_type;
+	uint32_t drr_pad;
+	uint64_t drr_offset;
+	uint64_t drr_length;
+	uint64_t drr_toguid;
+	uint8_t drr_checksumtype;
+	uint8_t drr_checksumflags;
+	uint8_t drr_pad2[6];
+	ddt_key_t drr_key; /* deduplication key */
+	/* content follows */
+};
+
+struct drr_free {
+	uint64_t drr_object;
+	uint64_t drr_offset;
+	uint64_t drr_length;
+	uint64_t drr_toguid;
+};
+
+struct drr_write_byref {
+	/* where to put the data */
+	uint64_t drr_object;
+	uint64_t drr_offset;
+	uint64_t drr_length;
+	uint64_t drr_toguid;
+	/* where to find the prior copy of the data */
+	uint64_t drr_refguid;
+	uint64_t drr_refobject;
+	uint64_t drr_refoffset;
+	/* properties of the data */
+	uint8_t drr_checksumtype;
+	uint8_t drr_checksumflags;
+	uint8_t drr_pad2[6];
+	ddt_key_t drr_key; /* deduplication key */
+};
+
+struct drr_spill {
+	uint64_t drr_object;
+	uint64_t drr_length;
+	uint64_t drr_toguid;
+	uint64_t drr_pad[4]; /* needed for crypto */
+	/* spill data follows */
+};
+
 typedef struct dmu_replay_record {
 	enum {
 		DRR_BEGIN, DRR_OBJECT, DRR_FREEOBJECTS,
@@ -123,79 +204,14 @@ typedef struct dmu_replay_record {
 	} drr_type;
 	uint32_t drr_payloadlen;
 	union {
-		struct drr_begin {
-			uint64_t drr_magic;
-			uint64_t drr_versioninfo; /* was drr_version */
-			uint64_t drr_creation_time;
-			dmu_objset_type_t drr_type;
-			uint32_t drr_flags;
-			uint64_t drr_toguid;
-			uint64_t drr_fromguid;
-			char drr_toname[MAXNAMELEN];
-		} drr_begin;
-		struct drr_end {
-			zio_cksum_t drr_checksum;
-			uint64_t drr_toguid;
-		} drr_end;
-		struct drr_object {
-			uint64_t drr_object;
-			dmu_object_type_t drr_type;
-			dmu_object_type_t drr_bonustype;
-			uint32_t drr_blksz;
-			uint32_t drr_bonuslen;
-			uint8_t drr_checksumtype;
-			uint8_t drr_compress;
-			uint8_t drr_pad[6];
-			uint64_t drr_toguid;
-			/* bonus content follows */
-		} drr_object;
-		struct drr_freeobjects {
-			uint64_t drr_firstobj;
-			uint64_t drr_numobjs;
-			uint64_t drr_toguid;
-		} drr_freeobjects;
-		struct drr_write {
-			uint64_t drr_object;
-			dmu_object_type_t drr_type;
-			uint32_t drr_pad;
-			uint64_t drr_offset;
-			uint64_t drr_length;
-			uint64_t drr_toguid;
-			uint8_t drr_checksumtype;
-			uint8_t drr_checksumflags;
-			uint8_t drr_pad2[6];
-			ddt_key_t drr_key; /* deduplication key */
-			/* content follows */
-		} drr_write;
-		struct drr_free {
-			uint64_t drr_object;
-			uint64_t drr_offset;
-			uint64_t drr_length;
-			uint64_t drr_toguid;
-		} drr_free;
-		struct drr_write_byref {
-			/* where to put the data */
-			uint64_t drr_object;
-			uint64_t drr_offset;
-			uint64_t drr_length;
-			uint64_t drr_toguid;
-			/* where to find the prior copy of the data */
-			uint64_t drr_refguid;
-			uint64_t drr_refobject;
-			uint64_t drr_refoffset;
-			/* properties of the data */
-			uint8_t drr_checksumtype;
-			uint8_t drr_checksumflags;
-			uint8_t drr_pad2[6];
-			ddt_key_t drr_key; /* deduplication key */
-		} drr_write_byref;
-		struct drr_spill {
-			uint64_t drr_object;
-			uint64_t drr_length;
-			uint64_t drr_toguid;
-			uint64_t drr_pad[4]; /* needed for crypto */
-			/* spill data follows */
-		} drr_spill;
+		struct drr_begin drr_begin;
+		struct drr_end drr_end;
+		struct drr_object drr_object;
+		struct drr_freeobjects drr_freeobjects;
+		struct drr_write drr_write;
+		struct drr_free drr_free;
+		struct drr_write_byref drr_write_byref;
+		struct drr_spill drr_spill;
 	} drr_u;
 } dmu_replay_record_t;
 

Modified: user/hrs/ipv6/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h
==============================================================================
--- user/hrs/ipv6/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h	Sat Jun 11 06:05:00 2011	(r222976)
+++ user/hrs/ipv6/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h	Sat Jun 11 06:56:26 2011	(r222977)
@@ -426,22 +426,22 @@ struct zio {
 };
 
 extern zio_t *zio_null(zio_t *pio, spa_t *spa, vdev_t *vd,
-    zio_done_func_t *done, void *private, enum zio_flag flags);
+    zio_done_func_t *done, void *priv, enum zio_flag flags);
 
 extern zio_t *zio_root(spa_t *spa,
-    zio_done_func_t *done, void *private, enum zio_flag flags);
+    zio_done_func_t *done, void *priv, enum zio_flag flags);
 
 extern zio_t *zio_read(zio_t *pio, spa_t *spa, const blkptr_t *bp, void *data,
-    uint64_t size, zio_done_func_t *done, void *private,
+    uint64_t size, zio_done_func_t *done, void *priv,
     int priority, enum zio_flag flags, const zbookmark_t *zb);
 
 extern zio_t *zio_write(zio_t *pio, spa_t *spa, uint64_t txg, blkptr_t *bp,
     void *data, uint64_t size, const zio_prop_t *zp,
-    zio_done_func_t *ready, zio_done_func_t *done, void *private,
+    zio_done_func_t *ready, zio_done_func_t *done, void *priv,
     int priority, enum zio_flag flags, const zbookmark_t *zb);
 
 extern zio_t *zio_rewrite(zio_t *pio, spa_t *spa, uint64_t txg, blkptr_t *bp,
-    void *data, uint64_t size, zio_done_func_t *done, void *private,
+    void *data, uint64_t size, zio_done_func_t *done, void *priv,
     int priority, enum zio_flag flags, zbookmark_t *zb);
 
 extern void zio_write_override(zio_t *zio, blkptr_t *bp, int copies);
@@ -450,19 +450,20 @@ extern void zio_free(spa_t *spa, uint64_
 
 extern zio_t *zio_claim(zio_t *pio, spa_t *spa, uint64_t txg,
     const blkptr_t *bp,
-    zio_done_func_t *done, void *private, enum zio_flag flags);
+    zio_done_func_t *done, void *priv, enum zio_flag flags);
 
 extern zio_t *zio_ioctl(zio_t *pio, spa_t *spa, vdev_t *vd, int cmd,
-    zio_done_func_t *done, void *private, int priority, enum zio_flag flags);
+    zio_done_func_t *done, void *priv, int priority,
+    enum zio_flag flags);
 
 extern zio_t *zio_read_phys(zio_t *pio, vdev_t *vd, uint64_t offset,
     uint64_t size, void *data, int checksum,
-    zio_done_func_t *done, void *private, int priority, enum zio_flag flags,
+    zio_done_func_t *done, void *priv, int priority, enum zio_flag flags,
     boolean_t labels);
 
 extern zio_t *zio_write_phys(zio_t *pio, vdev_t *vd, uint64_t offset,
     uint64_t size, void *data, int checksum,
-    zio_done_func_t *done, void *private, int priority, enum zio_flag flags,
+    zio_done_func_t *done, void *priv, int priority, enum zio_flag flags,
     boolean_t labels);
 
 extern zio_t *zio_free_sync(zio_t *pio, spa_t *spa, uint64_t txg,
@@ -493,11 +494,11 @@ extern void zio_resubmit_stage_async(voi
 
 extern zio_t *zio_vdev_child_io(zio_t *zio, blkptr_t *bp, vdev_t *vd,
     uint64_t offset, void *data, uint64_t size, int type, int priority,
-    enum zio_flag flags, zio_done_func_t *done, void *private);
+    enum zio_flag flags, zio_done_func_t *done, void *priv);
 
 extern zio_t *zio_vdev_delegated_io(vdev_t *vd, uint64_t offset,
     void *data, uint64_t size, int type, int priority,
-    enum zio_flag flags, zio_done_func_t *done, void *private);
+    enum zio_flag flags, zio_done_func_t *done, void *priv);
 
 extern void zio_vdev_io_bypass(zio_t *zio);
 extern void zio_vdev_io_reissue(zio_t *zio);

Modified: user/hrs/ipv6/sys/conf/Makefile.powerpc
==============================================================================
--- user/hrs/ipv6/sys/conf/Makefile.powerpc	Sat Jun 11 06:05:00 2011	(r222976)
+++ user/hrs/ipv6/sys/conf/Makefile.powerpc	Sat Jun 11 06:56:26 2011	(r222977)
@@ -35,7 +35,7 @@ LDSCRIPT_NAME?= ldscript.${MACHINE_ARCH}
 
 INCLUDES+= -I$S/contrib/libfdt
 
-CFLAGS+= -msoft-float
+CFLAGS+= -msoft-float -Wa,-many
 
 DDB_ENABLED!=	grep DDB opt_ddb.h || true
 .if !empty(DDB_ENABLED)

Modified: user/hrs/ipv6/sys/conf/files
==============================================================================
--- user/hrs/ipv6/sys/conf/files	Sat Jun 11 06:05:00 2011	(r222976)
+++ user/hrs/ipv6/sys/conf/files	Sat Jun 11 06:56:26 2011	(r222977)

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-user@FreeBSD.ORG  Sat Jun 11 07:42:18 2011
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id BB41C1065670;
	Sat, 11 Jun 2011 07:42:18 +0000 (UTC)
	(envelope-from adrian@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id AB9E48FC12;
	Sat, 11 Jun 2011 07:42:18 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p5B7gIhH064036;
	Sat, 11 Jun 2011 07:42:18 GMT (envelope-from adrian@svn.freebsd.org)
Received: (from adrian@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p5B7gI7H064031;
	Sat, 11 Jun 2011 07:42:18 GMT (envelope-from adrian@svn.freebsd.org)
Message-Id: <201106110742.p5B7gI7H064031@svn.freebsd.org>
From: Adrian Chadd <adrian@FreeBSD.org>
Date: Sat, 11 Jun 2011 07:42:18 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r222978 - user/adrian/if_ath_tx/sys/dev/ath
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sat, 11 Jun 2011 07:42:18 -0000

Author: adrian
Date: Sat Jun 11 07:42:18 2011
New Revision: 222978
URL: http://svn.freebsd.org/changeset/base/222978

Log:
  Flesh out some more software TX queue operators.
  
  There's still a few more operators (queue software packet to hardware,
  requeue packet (from hardware) back onto the software queue, free
  software queue packets that aren't on the hardware, and mark queued packets
  as having no parent queue) to implement.
  
  It's unclear yet whether packets which are queued but whose parent node
  is going away should cause the TXCB callback to occur if needed.

Modified:
  user/adrian/if_ath_tx/sys/dev/ath/if_ath.c
  user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c
  user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.h
  user/adrian/if_ath_tx/sys/dev/ath/if_athvar.h

Modified: user/adrian/if_ath_tx/sys/dev/ath/if_ath.c
==============================================================================
--- user/adrian/if_ath_tx/sys/dev/ath/if_ath.c	Sat Jun 11 06:56:26 2011	(r222977)
+++ user/adrian/if_ath_tx/sys/dev/ath/if_ath.c	Sat Jun 11 07:42:18 2011	(r222978)
@@ -3112,6 +3112,7 @@ ath_node_alloc(struct ieee80211vap *vap,
 	ath_rate_node_init(sc, an);
 
 	/* XXX setup ath_tid */
+	ath_tx_tid_init(sc, an);
 
 	DPRINTF(sc, ATH_DEBUG_NODE, "%s: an %p\n", __func__, an);
 	return &an->an_node;
@@ -3125,8 +3126,8 @@ ath_node_free(struct ieee80211_node *ni)
 
 	DPRINTF(sc, ATH_DEBUG_NODE, "%s: ni %p\n", __func__, ni);
 
-	/* XXX ensure it's not scheduled on the TXQ; remove if needed */
-	/* XXX cleanup ath_tid */
+	/* Cleanup ath_tid, free unused bufs, unlink bufs in TXQ */
+	ath_tx_tid_cleanup(sc, ATH_NODE(ni));
 
 	ath_rate_node_cleanup(sc, ATH_NODE(ni));
 	sc->sc_node_free(ni);

Modified: user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c
==============================================================================
--- user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c	Sat Jun 11 06:56:26 2011	(r222977)
+++ user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c	Sat Jun 11 07:42:18 2011	(r222978)
@@ -1215,6 +1215,8 @@ bad:
  *
  * This is done to make it easy for the software scheduler to 
  * find which nodes/TIDs have data to send.
+ *
+ * This must be called with the TX/ATH lock held.
  */
 static void
 ath_tx_node_sched(struct ath_softc *sc, struct ath_node *an, int tid)
@@ -1232,6 +1234,22 @@ ath_tx_node_sched(struct ath_softc *sc, 
 }
 
 /*
+ * Mark the current node/TID as no longer needing to be polled for
+ * TX packets.
+ *
+ * This must be called with the TX/ATH lock held.
+ */
+static void
+ath_tx_node_unsched(struct ath_softc *sc, struct ath_node *an, int tid)
+{
+	if (an->sched == 0)
+		return;
+
+	STAILQ_REMOVE(&sc->sc_txnodeq, an, ath_node, an_list);
+	an->sched = 0;
+}
+
+/*
  * Queue the given packet on the relevant software queue.
  *
  * This however doesn't queue the packet to the hardware!
@@ -1269,3 +1287,80 @@ ath_tx_swq(struct ath_softc *sc, struct 
  * Note that this may cause the mbuf to be reallocated, so
  * m0 may not be valid.
  */
+
+
+/*
+ * Configure the per-TID node state.
+ *
+ * This likely belongs in if_ath_node.c but I can't think of anywhere
+ * else to put it just yet.
+ *
+ * This sets up the SLISTs and the mutex as appropriate.
+ */
+void
+ath_tx_tid_init(struct ath_softc *sc, struct ath_node *an)
+{
+	int i;
+	struct ath_tid *atid;
+	struct ieee80211_node *ni = &an->an_node;
+
+	for (i = 0; i < IEEE80211_TID_SIZE; i++) {
+		atid = &an->an_tid[i];
+		STAILQ_INIT(&atid->axq_q);
+		snprintf(atid->axq_name, sizeof(atid->axq_name),
+		    "%s_a%d_t%d\n", device_get_nameunit(sc->sc_dev),
+		    ni->ni_associd,
+		    i);
+		mtx_init(&atid->axq_lock, atid->axq_name, NULL, MTX_DEF);
+	}
+}
+
+/*
+ * Mark packets currently in the hardware TXQ from this TID
+ * as now having no parent software TXQ.
+ *
+ * This is done when an ath_node goes away so any pending
+ * packets going out to the device are simply freed, rather
+ * than referencing some now-nonexisting ath_node.
+ *
+ * XXX make sure that access to the hardware TXQ is correctly locked!
+ */
+static void
+ath_tx_tid_txq_unmark(struct ath_softc *sc, struct ath_node *an,
+    int tid)
+{
+	/* XXX TODO */
+}
+
+/*
+ * Free the per-TID node state.
+ *
+ * This frees any packets currently in the software queue and frees
+ * any other TID state.
+ *
+ * Since node destruction currenty doesn't wait for the last
+ * packets to be xmited, there needs to be a good place to
+ * mark packets currently in the hardware TX queue as
+ * now having no parent node!
+ */
+void
+ath_tx_tid_cleanup(struct ath_softc *sc, struct ath_node *an)
+{
+	int i;
+	struct ath_tid *atid;
+
+	for (i = 0; i < IEEE80211_TID_SIZE; i++) {
+		atid = &an->an_tid[i];
+
+		/* Free packets in sw queue */
+
+		/* Mark hw-queued packets as having no parent now */
+		ath_tx_tid_txq_unmark(sc, an, i);
+
+		/* Remove any pending hardware TXQ scheduling */
+		ath_tx_node_unsched(sc, an, i);
+
+		/* Free mutex */
+		mtx_destroy(&atid->axq_lock);
+	}
+}

Modified: user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.h
==============================================================================
--- user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.h	Sat Jun 11 06:56:26 2011	(r222977)
+++ user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.h	Sat Jun 11 07:42:18 2011	(r222978)
@@ -44,5 +44,8 @@ extern int ath_raw_xmit(struct ieee80211
 /* software queue stuff */
 extern void ath_tx_swq(struct ath_softc *sc, struct ieee80211_node *ni,
     struct ath_buf *bf, struct mbuf *m0);
+extern void ath_tx_tid_init(struct ath_softc *sc, struct ath_node *an);
+extern void ath_tx_tid_cleanup(struct ath_softc *sc, struct ath_node *an);
+
 
 #endif

Modified: user/adrian/if_ath_tx/sys/dev/ath/if_athvar.h
==============================================================================
--- user/adrian/if_ath_tx/sys/dev/ath/if_athvar.h	Sat Jun 11 06:56:26 2011	(r222977)
+++ user/adrian/if_ath_tx/sys/dev/ath/if_athvar.h	Sat Jun 11 07:42:18 2011	(r222978)
@@ -93,6 +93,8 @@ struct ath_buf;
 struct ath_tid {
 	STAILQ_HEAD(,ath_buf) axq_q;		/* pending buffers        */
 	u_int			axq_depth;	/* queue depth (stat only) */
+	struct mtx		axq_lock;	/* lock on queue, tx_buf */
+	char			axq_name[24];	/* e.g. "ath0_a1_t5" */
 	struct ath_buf *tx_buf[ATH_TID_MAX_BUFS];	/* active tx buffers, beginning at current BAW */
 };
 

From owner-svn-src-user@FreeBSD.ORG  Sat Jun 11 08:03:44 2011
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id AD52D106564A;
	Sat, 11 Jun 2011 08:03:44 +0000 (UTC)
	(envelope-from adrian@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 93C1E8FC0C;
	Sat, 11 Jun 2011 08:03:44 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p5B83iou064702;
	Sat, 11 Jun 2011 08:03:44 GMT (envelope-from adrian@svn.freebsd.org)
Received: (from adrian@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p5B83ild064699;
	Sat, 11 Jun 2011 08:03:44 GMT (envelope-from adrian@svn.freebsd.org)
Message-Id: <201106110803.p5B83ild064699@svn.freebsd.org>
From: Adrian Chadd <adrian@FreeBSD.org>
Date: Sat, 11 Jun 2011 08:03:44 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r222979 - user/adrian/if_ath_tx/sys/dev/ath
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sat, 11 Jun 2011 08:03:44 -0000

Author: adrian
Date: Sat Jun 11 08:03:44 2011
New Revision: 222979
URL: http://svn.freebsd.org/changeset/base/222979

Log:
  Some further digging shows that net80211 already takes care of refcounting
  the TX node references for me, so in theory (!) I shouldn't seen a node free
  until all pending TX packets have completed.
  
  For now, leave the functions in there which I was going to write to do this
  (primarily so I can have some checks before I do free the state!)
  
  Whilst I'm here, add a TID reference. Between this and the bf_node
  reference, enough information should (eventually) be available now for
  a completed packet (success, failure, filtered) to be matched back to
  its source node/TID queue.

Modified:
  user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c
  user/adrian/if_ath_tx/sys/dev/ath/if_athvar.h

Modified: user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c
==============================================================================
--- user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c	Sat Jun 11 07:42:18 2011	(r222978)
+++ user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c	Sat Jun 11 08:03:44 2011	(r222979)
@@ -1319,11 +1319,9 @@ ath_tx_tid_init(struct ath_softc *sc, st
  * Mark packets currently in the hardware TXQ from this TID
  * as now having no parent software TXQ.
  *
- * This is done when an ath_node goes away so any pending
- * packets going out to the device are simply freed, rather
- * than referencing some now-nonexisting ath_node.
- *
- * XXX make sure that access to the hardware TXQ is correctly locked!
+ * XXX not yet needed; there shouldn't be any packets left
+ * XXX for this node in any of the hardware queues; the node
+ * XXX isn't freed until the last TX packet has been sent.
  */
 static void
 ath_tx_tid_txq_unmark(struct ath_softc *sc, struct ath_node *an,
@@ -1333,15 +1331,32 @@ ath_tx_tid_txq_unmark(struct ath_softc *
 }
 
 /*
+ * Free any packets currently pending in the software TX queue.
+ *
+ * Since net80211 shouldn't free the node until the last packets
+ * have been sent, this function should never have to free any
+ * packets.
+ */
+static void
+ath_tx_tid_free_pkts(struct ath_softc *sc, struct ath_node *an,
+    int tid)
+{
+	struct ath_tid *atid = &an->an_tid[tid];
+	struct ieee80211_node *ni = &an->an_node;
+
+	/* XXX TODO */
+	/* For now, just print a loud warning if it occurs */
+	if (! STAILQ_EMPTY(&atid->axq_q))
+		device_printf(sc->sc_dev, "%s: AID %d TID %d queue not "
+		    "empty on queue destroy!\n",
+		    __func__, ni->ni_associd, tid);
+}
+
+/*
  * Free the per-TID node state.
  *
  * This frees any packets currently in the software queue and frees
  * any other TID state.
- *
- * Since node destruction currenty doesn't wait for the last
- * packets to be xmited, there needs to be a good place to
- * mark packets currently in the hardware TX queue as
- * now having no parent node!
  */
 void
 ath_tx_tid_cleanup(struct ath_softc *sc, struct ath_node *an)
@@ -1353,6 +1368,7 @@ ath_tx_tid_cleanup(struct ath_softc *sc,
 		atid = &an->an_tid[i];
 
 		/* Free packets in sw queue */
+		ath_tx_tid_free_pkts(sc, an, i);
 
 		/* Mark hw-queued packets as having no parent now */
 		ath_tx_tid_txq_unmark(sc, an, i);

Modified: user/adrian/if_ath_tx/sys/dev/ath/if_athvar.h
==============================================================================
--- user/adrian/if_ath_tx/sys/dev/ath/if_athvar.h	Sat Jun 11 07:42:18 2011	(r222978)
+++ user/adrian/if_ath_tx/sys/dev/ath/if_athvar.h	Sat Jun 11 08:03:44 2011	(r222979)
@@ -150,6 +150,7 @@ struct ath_buf {
 		int bfs_hdrlen;		/* length of this packet header */
 		int bfs_seqno;		/* sequence number of this packet */
 		int bfs_retries;	/* retry count */
+		uint16_t bfs_tid;	/* packet TID (or TID_MAX for no QoS) */
 		uint16_t bfs_al;	/* length of aggregate */
 		uint16_t bfs_pktdur;	/* packet duration (at current rate?) */
 		uint16_t bfs_nframes;	/* number of frames in aggregate */

From owner-svn-src-user@FreeBSD.ORG  Sat Jun 11 10:35:54 2011
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8ED911065673;
	Sat, 11 Jun 2011 10:35:54 +0000 (UTC)
	(envelope-from adrian@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 7F21C8FC14;
	Sat, 11 Jun 2011 10:35:54 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p5BAZsln071751;
	Sat, 11 Jun 2011 10:35:54 GMT (envelope-from adrian@svn.freebsd.org)
Received: (from adrian@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p5BAZsXQ071747;
	Sat, 11 Jun 2011 10:35:54 GMT (envelope-from adrian@svn.freebsd.org)
Message-Id: <201106111035.p5BAZsXQ071747@svn.freebsd.org>
From: Adrian Chadd <adrian@FreeBSD.org>
Date: Sat, 11 Jun 2011 10:35:54 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r222981 - user/adrian/if_ath_tx/sys/dev/ath
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sat, 11 Jun 2011 10:35:54 -0000

Author: adrian
Date: Sat Jun 11 10:35:53 2011
New Revision: 222981
URL: http://svn.freebsd.org/changeset/base/222981

Log:
  Flesh out some more software TX queue code
  
  ath_buf's now have both a destination tid and a destination txq.
  (I may end up also storing a destination AC, just to be complete.)
  
  The destination TXQ is pre-calculated at TID TXQ add time
  as that won't change. It's then added to the pre-determined hardware TXQ
  when the packet is ready to be scheduled.
  
  The routine to calculate the ath_node txq length is dirty.
  I shall fix soon.
  
  Packets should now be schedulable via a call to ath_tx_swq() and sit
  in the per-node queue until ath_txq_sched() is called. Packets then
  will be removed from the software queue and added to the relevant
  hardware queue.
  
  Next is writing a completion handler which looks a lot like what
  ath_tx_processq() does, but knows about the ath_node/tid involved.
  Eventually this is where the software aggregation retries will live.
  
  The TX packet scheduler isn't fair. It isn't pretending to be for now.

Modified:
  user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c
  user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.h
  user/adrian/if_ath_tx/sys/dev/ath/if_athvar.h

Modified: user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c
==============================================================================
--- user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c	Sat Jun 11 09:08:46 2011	(r222980)
+++ user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c	Sat Jun 11 10:35:53 2011	(r222981)
@@ -1214,17 +1214,13 @@ bad:
  * Mark the current node/TID as ready to TX.
  *
  * This is done to make it easy for the software scheduler to 
- * find which nodes/TIDs have data to send.
+ * find which nodes have data to send.
  *
  * This must be called with the TX/ATH lock held.
  */
 static void
-ath_tx_node_sched(struct ath_softc *sc, struct ath_node *an, int tid)
+ath_tx_node_sched(struct ath_softc *sc, struct ath_node *an)
 {
-	/*
-	 * For now, the node is marked as ready;
-	 * later code will also maintain a per-TID list.
-	 */
 	if (an->sched)
 		return;		/* already scheduled */
 
@@ -1234,13 +1230,13 @@ ath_tx_node_sched(struct ath_softc *sc, 
 }
 
 /*
- * Mark the current node/TID as no longer needing to be polled for
+ * Mark the current node as no longer needing to be polled for
  * TX packets.
  *
  * This must be called with the TX/ATH lock held.
  */
 static void
-ath_tx_node_unsched(struct ath_softc *sc, struct ath_node *an, int tid)
+ath_tx_node_unsched(struct ath_softc *sc, struct ath_node *an)
 {
 	if (an->sched == 0)
 		return;
@@ -1259,20 +1255,42 @@ ath_tx_swq(struct ath_softc *sc, struct 
     struct mbuf *m0)
 {
 	struct ath_node *an = ATH_NODE(ni);
+	struct ieee80211vap *vap = ni->ni_vap;
 	struct ieee80211_frame *wh;
+	struct ath_vap *avp = ATH_VAP(vap);
 	struct ath_tid *atid;
+	struct ath_txq *txq;	/* eventual destination queue */
 	int tid;
+	int ismcast;
+	u_int pri;
 
 	/* Fetch the TID - non-QoS frames get assigned to TID 16 */
 	wh = mtod(m0, struct ieee80211_frame *);
 	tid = ieee80211_gettid(wh);
 	atid = &an->an_tid[tid];
 
+	/* Fetch the eventual destination queue */
+	pri = M_WME_GETAC(m0);			/* honor classification */
+	ismcast = IEEE80211_IS_MULTICAST(wh->i_addr1);
+	txq = sc->sc_ac2q[pri];
+
+	/* Handle mcast, or PS STA */
+	if (ismcast && (vap->iv_ps_sta || avp->av_mcastq.axq_depth))
+		txq = &avp->av_mcastq;
+
+	/* Set local packet state, used to queue packets to hardware */
+	bf->bf_state.bfs_tid = tid;
+	bf->bf_state.bfs_txq = txq;
+
 	/* Queue frame to the tail of the software queue */
+	ATH_TXQ_LOCK(atid);
 	ATH_TXQ_INSERT_TAIL(atid, bf, bf_list);
+	ATH_TXQ_UNLOCK(atid);
 
 	/* Mark the given node/tid as having packets to dequeue */
-	ath_tx_node_sched(sc, an, tid);
+	ATH_LOCK(sc);
+	ath_tx_node_sched(sc, an);
+	ATH_UNLOCK(sc);
 }
 
 /*
@@ -1374,9 +1392,105 @@ ath_tx_tid_cleanup(struct ath_softc *sc,
 		ath_tx_tid_txq_unmark(sc, an, i);
 
 		/* Remove any pending hardware TXQ scheduling */
-		ath_tx_node_unsched(sc, an, i);
+		ath_tx_node_unsched(sc, an);
 
 		/* Free mutex */
 		mtx_destroy(&atid->axq_lock);
 	}
 }
+
+/*
+ * Schedule some packets from the given node/TID to the hardware.
+ *
+ * For non-aggregate packets, all packets can just be queued.
+ * Aggregate destinations will end up having limitations on
+ * what can actually be queued here (ie, not more than the
+ * block-ack window.)
+ */
+void
+ath_tx_tid_hw_queue(struct ath_softc *sc, struct ath_node *an, int tid)
+{
+	struct ath_buf *bf;
+	struct ath_txq *txq;
+	struct ath_tid *atid = &an->an_tid[tid];
+
+	for (;;) {
+		ATH_TXQ_LOCK(atid);
+                bf = STAILQ_FIRST(&txq->axq_q);
+		if (bf == NULL) {
+			ATH_TXQ_UNLOCK(atid);
+			break;
+		}
+		ATH_TXQ_REMOVE_HEAD(atid, bf_list);
+		ATH_TXQ_UNLOCK(atid);
+
+		txq = bf->bf_state.bfs_txq;
+		/* Sanity check! */
+		if (tid != bf->bf_state.bfs_tid) {
+			device_printf(sc->sc_dev, "%s: bfs_tid %d !="
+			    " tid %d\n",
+			    __func__, bf->bf_state.bfs_tid, tid);
+		}
+
+		/* Punt to hardware or software txq */
+		ath_tx_handoff(sc, txq, bf);
+	}
+}
+
+/*
+ * Attempt to schedule packets from the given node to the hardware.
+ */
+void
+ath_tx_hw_queue(struct ath_softc *sc, struct ath_node *an)
+{
+	struct ath_tid *atid;
+	int i;
+
+	/*
+	 * For now, just queue from all TIDs in order.
+	 * This is very likely absolutely wrong from a QoS
+	 * perspective but it'll do for now.
+	 */
+	for (i = 0; i < IEEE80211_TID_SIZE; i++) {
+		atid = &an->an_tid[i];
+		ath_tx_tid_hw_queue(sc, an, i);
+	}
+}
+
+/*
+ * This is pretty disgusting, but again it's just temporary.
+ */
+static int
+ath_txq_node_qlen(struct ath_softc *sc, struct ath_node *an)
+{
+	int qlen = 0;
+	int i;
+	for (i = 0; i < IEEE80211_TID_SIZE; i++) {
+		ATH_TXQ_LOCK(&an->an_tid[i]);
+		qlen += an->an_tid[i].axq_depth;
+		ATH_TXQ_UNLOCK(&an->an_tid[i]);
+	}
+	return qlen;
+}
+
+/*
+ * Handle scheduling some packets from whichever nodes have
+ * signaled they're (potentially) ready.
+ *
+ * This must be called with the ATH lock held.
+ */
+void
+ath_txq_sched(struct ath_softc *sc)
+{
+	struct ath_node *an, *next;
+
+	/* Iterate over the list of active nodes, queuing packets */
+	STAILQ_FOREACH_SAFE(an, &sc->sc_txnodeq, an_list, next) {
+		/* Try dequeueing packets from the current node */
+		ath_tx_hw_queue(sc, an);
+
+		/* Are any packets left on the node software queue? Remove */
+		if (! ath_txq_node_qlen(sc, an))
+			ath_tx_node_unsched(sc, an);
+	}
+} 

Modified: user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.h
==============================================================================
--- user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.h	Sat Jun 11 09:08:46 2011	(r222980)
+++ user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.h	Sat Jun 11 10:35:53 2011	(r222981)
@@ -46,6 +46,10 @@ extern void ath_tx_swq(struct ath_softc 
     struct ath_buf *bf, struct mbuf *m0);
 extern void ath_tx_tid_init(struct ath_softc *sc, struct ath_node *an);
 extern void ath_tx_tid_cleanup(struct ath_softc *sc, struct ath_node *an);
+extern void ath_tx_tid_hw_queue(struct ath_softc *sc, struct ath_node *an,
+    int tid);
+extern void ath_tx_hw_queue(struct ath_softc *sc, struct ath_node *an);
+extern void ath_txq_sched(struct ath_softc *sc);
 
 
 #endif

Modified: user/adrian/if_ath_tx/sys/dev/ath/if_athvar.h
==============================================================================
--- user/adrian/if_ath_tx/sys/dev/ath/if_athvar.h	Sat Jun 11 09:08:46 2011	(r222980)
+++ user/adrian/if_ath_tx/sys/dev/ath/if_athvar.h	Sat Jun 11 10:35:53 2011	(r222981)
@@ -151,6 +151,7 @@ struct ath_buf {
 		int bfs_seqno;		/* sequence number of this packet */
 		int bfs_retries;	/* retry count */
 		uint16_t bfs_tid;	/* packet TID (or TID_MAX for no QoS) */
+		struct ath_txq *bfs_txq;	/* eventual dest hardware TXQ */
 		uint16_t bfs_al;	/* length of aggregate */
 		uint16_t bfs_pktdur;	/* packet duration (at current rate?) */
 		uint16_t bfs_nframes;	/* number of frames in aggregate */

From owner-svn-src-user@FreeBSD.ORG  Sat Jun 11 12:40:15 2011
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 550911065672;
	Sat, 11 Jun 2011 12:40:15 +0000 (UTC)
	(envelope-from adrian@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 3B83D8FC08;
	Sat, 11 Jun 2011 12:40:15 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p5BCeFX3075401;
	Sat, 11 Jun 2011 12:40:15 GMT (envelope-from adrian@svn.freebsd.org)
Received: (from adrian@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p5BCeFWo075398;
	Sat, 11 Jun 2011 12:40:15 GMT (envelope-from adrian@svn.freebsd.org)
Message-Id: <201106111240.p5BCeFWo075398@svn.freebsd.org>
From: Adrian Chadd <adrian@FreeBSD.org>
Date: Sat, 11 Jun 2011 12:40:15 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r222983 - user/adrian/if_ath_tx/sys/dev/ath
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sat, 11 Jun 2011 12:40:15 -0000

Author: adrian
Date: Sat Jun 11 12:40:14 2011
New Revision: 222983
URL: http://svn.freebsd.org/changeset/base/222983

Log:
  * add a per-node queue depth counter
  * correctly lock access to sc->sc_txnodeq
  * fix an incorrect txq reference

Modified:
  user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c
  user/adrian/if_ath_tx/sys/dev/ath/if_athvar.h

Modified: user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c
==============================================================================
--- user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c	Sat Jun 11 12:34:08 2011	(r222982)
+++ user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c	Sat Jun 11 12:40:14 2011	(r222983)
@@ -937,6 +937,11 @@ ath_tx_start(struct ath_softc *sc, struc
 	/* Fill in the details in the descriptor list */
 	ath_tx_chaindesclist(sc, txq, bf);
 
+#if 0
+	/* add to software queue */
+	ath_tx_swq(sc, ni, bf, m0);
+#else
+
 	/*
 	 * For now, since there's no software queue,
 	 * direct-dispatch to the hardware.
@@ -945,6 +950,7 @@ ath_tx_start(struct ath_softc *sc, struc
 		ath_tx_handoff_mcast(sc, txq, bf);
 	else
 		ath_tx_handoff_hw(sc, txq, bf);
+#endif
 
 	return 0;
 }
@@ -1287,6 +1293,10 @@ ath_tx_swq(struct ath_softc *sc, struct 
 	ATH_TXQ_INSERT_TAIL(atid, bf, bf_list);
 	ATH_TXQ_UNLOCK(atid);
 
+	/* Bump queued packet counter */
+	/* XXX does this have to be atomic? */
+	an->an_qdepth++;
+
 	/* Mark the given node/tid as having packets to dequeue */
 	ATH_LOCK(sc);
 	ath_tx_node_sched(sc, an);
@@ -1416,7 +1426,7 @@ ath_tx_tid_hw_queue(struct ath_softc *sc
 
 	for (;;) {
 		ATH_TXQ_LOCK(atid);
-                bf = STAILQ_FIRST(&txq->axq_q);
+                bf = STAILQ_FIRST(&atid->axq_q);
 		if (bf == NULL) {
 			ATH_TXQ_UNLOCK(atid);
 			break;
@@ -1424,6 +1434,9 @@ ath_tx_tid_hw_queue(struct ath_softc *sc
 		ATH_TXQ_REMOVE_HEAD(atid, bf_list);
 		ATH_TXQ_UNLOCK(atid);
 
+		/* XXX does this have to be atomic? */
+		an->an_qdepth--;
+
 		txq = bf->bf_state.bfs_txq;
 		/* Sanity check! */
 		if (tid != bf->bf_state.bfs_tid) {
@@ -1457,33 +1470,24 @@ ath_tx_hw_queue(struct ath_softc *sc, st
 	}
 }
 
-/*
- * This is pretty disgusting, but again it's just temporary.
- */
 static int
 ath_txq_node_qlen(struct ath_softc *sc, struct ath_node *an)
 {
-	int qlen = 0;
-	int i;
-	for (i = 0; i < IEEE80211_TID_SIZE; i++) {
-		ATH_TXQ_LOCK(&an->an_tid[i]);
-		qlen += an->an_tid[i].axq_depth;
-		ATH_TXQ_UNLOCK(&an->an_tid[i]);
-	}
-	return qlen;
+	return an->an_qdepth;
 }
 
 /*
  * Handle scheduling some packets from whichever nodes have
  * signaled they're (potentially) ready.
- *
- * This must be called with the ATH lock held.
  */
 void
 ath_txq_sched(struct ath_softc *sc)
 {
 	struct ath_node *an, *next;
 
+	/* XXX I'm not happy the ATH lock is held for so long here */
+	ATH_LOCK(sc);
+
 	/* Iterate over the list of active nodes, queuing packets */
 	STAILQ_FOREACH_SAFE(an, &sc->sc_txnodeq, an_list, next) {
 		/* Try dequeueing packets from the current node */
@@ -1493,4 +1497,5 @@ ath_txq_sched(struct ath_softc *sc)
 		if (! ath_txq_node_qlen(sc, an))
 			ath_tx_node_unsched(sc, an);
 	}
+	ATH_UNLOCK(sc);
 } 

Modified: user/adrian/if_ath_tx/sys/dev/ath/if_athvar.h
==============================================================================
--- user/adrian/if_ath_tx/sys/dev/ath/if_athvar.h	Sat Jun 11 12:34:08 2011	(r222982)
+++ user/adrian/if_ath_tx/sys/dev/ath/if_athvar.h	Sat Jun 11 12:40:14 2011	(r222983)
@@ -109,6 +109,7 @@ struct ath_node {
 						 * added to the txq axq_nodeq */
 	struct ath_buf	*an_ff_buf[WME_NUM_AC]; /* ff staging area */
 	struct ath_tid	an_tid[IEEE80211_TID_SIZE];	/* per-TID state */
+	u_int		an_qdepth;	/* Current queue depth of all TIDs */
 	/* variable-length rate control state follows */
 };
 #define	ATH_NODE(ni)	((struct ath_node *)(ni))

From owner-svn-src-user@FreeBSD.ORG  Sat Jun 11 12:41:03 2011
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B806C1065672;
	Sat, 11 Jun 2011 12:41:03 +0000 (UTC)
	(envelope-from adrian@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id A942B8FC16;
	Sat, 11 Jun 2011 12:41:03 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p5BCf3Gn075465;
	Sat, 11 Jun 2011 12:41:03 GMT (envelope-from adrian@svn.freebsd.org)
Received: (from adrian@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p5BCf3uN075463;
	Sat, 11 Jun 2011 12:41:03 GMT (envelope-from adrian@svn.freebsd.org)
Message-Id: <201106111241.p5BCf3uN075463@svn.freebsd.org>
From: Adrian Chadd <adrian@FreeBSD.org>
Date: Sat, 11 Jun 2011 12:41:03 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r222984 - user/adrian/if_ath_tx/sys/dev/ath
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sat, 11 Jun 2011 12:41:03 -0000

Author: adrian
Date: Sat Jun 11 12:41:03 2011
New Revision: 222984
URL: http://svn.freebsd.org/changeset/base/222984

Log:
  Since there's currently no TX processing/completion task (ie, TX is
  direct-dispatch), just do swq->hwq dispatch from ath_start().

Modified:
  user/adrian/if_ath_tx/sys/dev/ath/if_ath.c

Modified: user/adrian/if_ath_tx/sys/dev/ath/if_ath.c
==============================================================================
--- user/adrian/if_ath_tx/sys/dev/ath/if_ath.c	Sat Jun 11 12:40:14 2011	(r222983)
+++ user/adrian/if_ath_tx/sys/dev/ath/if_ath.c	Sat Jun 11 12:41:03 2011	(r222984)
@@ -1901,6 +1901,12 @@ ath_start(struct ifnet *ifp)
 
 		sc->sc_wd_timer = 5;
 	}
+
+	/*
+	 * Since there's no nicer place to put this for now,
+	 * stick the software TXQ punt call here.
+	 */
+	ath_txq_sched(sc);
 }
 
 static int

From owner-svn-src-user@FreeBSD.ORG  Sat Jun 11 12:47:05 2011
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 04634106564A;
	Sat, 11 Jun 2011 12:47:05 +0000 (UTC)
	(envelope-from adrian@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id E9B668FC08;
	Sat, 11 Jun 2011 12:47:04 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p5BCl4RM075756;
	Sat, 11 Jun 2011 12:47:04 GMT (envelope-from adrian@svn.freebsd.org)
Received: (from adrian@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p5BCl4Ku075754;
	Sat, 11 Jun 2011 12:47:04 GMT (envelope-from adrian@svn.freebsd.org)
Message-Id: <201106111247.p5BCl4Ku075754@svn.freebsd.org>
From: Adrian Chadd <adrian@FreeBSD.org>
Date: Sat, 11 Jun 2011 12:47:04 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r222985 - user/adrian/if_ath_tx/sys/dev/ath
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sat, 11 Jun 2011 12:47:05 -0000

Author: adrian
Date: Sat Jun 11 12:47:04 2011
New Revision: 222985
URL: http://svn.freebsd.org/changeset/base/222985

Log:
  Make the qdepth add/sub atomic, but the qdepth check isn't yet atomic.
  I'll leave it like that for now until I better understand what, if any,
  locking is done with ath_node / ieee80211_node.
  
  Flip on the software TX queue dispatch.

Modified:
  user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c

Modified: user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c
==============================================================================
--- user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c	Sat Jun 11 12:41:03 2011	(r222984)
+++ user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c	Sat Jun 11 12:47:04 2011	(r222985)
@@ -937,7 +937,7 @@ ath_tx_start(struct ath_softc *sc, struc
 	/* Fill in the details in the descriptor list */
 	ath_tx_chaindesclist(sc, txq, bf);
 
-#if 0
+#if 1
 	/* add to software queue */
 	ath_tx_swq(sc, ni, bf, m0);
 #else
@@ -1294,8 +1294,7 @@ ath_tx_swq(struct ath_softc *sc, struct 
 	ATH_TXQ_UNLOCK(atid);
 
 	/* Bump queued packet counter */
-	/* XXX does this have to be atomic? */
-	an->an_qdepth++;
+	atomic_add_int(&an->an_qdepth, 1);
 
 	/* Mark the given node/tid as having packets to dequeue */
 	ATH_LOCK(sc);
@@ -1434,8 +1433,8 @@ ath_tx_tid_hw_queue(struct ath_softc *sc
 		ATH_TXQ_REMOVE_HEAD(atid, bf_list);
 		ATH_TXQ_UNLOCK(atid);
 
-		/* XXX does this have to be atomic? */
-		an->an_qdepth--;
+		/* Remove from queue */
+		atomic_subtract_int(&an->an_qdepth, 1);
 
 		txq = bf->bf_state.bfs_txq;
 		/* Sanity check! */
@@ -1470,6 +1469,9 @@ ath_tx_hw_queue(struct ath_softc *sc, st
 	}
 }
 
+/*
+ * XXX this needs to be atomic or ath_node locked
+ */
 static int
 ath_txq_node_qlen(struct ath_softc *sc, struct ath_node *an)
 {

From owner-svn-src-user@FreeBSD.ORG  Sat Jun 11 13:15:21 2011
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 09897106564A;
	Sat, 11 Jun 2011 13:15:20 +0000 (UTC)
	(envelope-from adrian@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 9D32C8FC1A;
	Sat, 11 Jun 2011 13:15:20 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p5BDFKds076627;
	Sat, 11 Jun 2011 13:15:20 GMT (envelope-from adrian@svn.freebsd.org)
Received: (from adrian@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p5BDFKf2076625;
	Sat, 11 Jun 2011 13:15:20 GMT (envelope-from adrian@svn.freebsd.org)
Message-Id: <201106111315.p5BDFKf2076625@svn.freebsd.org>
From: Adrian Chadd <adrian@FreeBSD.org>
Date: Sat, 11 Jun 2011 13:15:20 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r222986 - user/adrian/if_ath_tx/sys/dev/ath
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sat, 11 Jun 2011 13:15:21 -0000

Author: adrian
Date: Sat Jun 11 13:15:20 2011
New Revision: 222986
URL: http://svn.freebsd.org/changeset/base/222986

Log:
  Clarify the dirty locking that I'm currently doing at the moment.
  
  This isn't crashing (primarily because the ath_node is mostly behind the
  ATH lock rather than a per-node lock.)

Modified:
  user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c

Modified: user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c
==============================================================================
--- user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c	Sat Jun 11 12:47:04 2011	(r222985)
+++ user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c	Sat Jun 11 13:15:20 2011	(r222986)
@@ -1222,11 +1222,15 @@ bad:
  * This is done to make it easy for the software scheduler to 
  * find which nodes have data to send.
  *
- * This must be called with the TX/ATH lock held.
+ * This must be called with the ATH lock held.
  */
 static void
 ath_tx_node_sched(struct ath_softc *sc, struct ath_node *an)
 {
+	/*
+	 * XXX sched is serialised behind the ATH lock; not
+	 * XXX a per-node lock.
+	 */
 	if (an->sched)
 		return;		/* already scheduled */
 
@@ -1239,11 +1243,15 @@ ath_tx_node_sched(struct ath_softc *sc, 
  * Mark the current node as no longer needing to be polled for
  * TX packets.
  *
- * This must be called with the TX/ATH lock held.
+ * This must be called with the ATH lock held.
  */
 static void
 ath_tx_node_unsched(struct ath_softc *sc, struct ath_node *an)
 {
+	/*
+	 * XXX sched is serialised behind the ATH lock; not
+	 * XXX a per-node lock.
+	 */
 	if (an->sched == 0)
 		return;
 
@@ -1293,11 +1301,12 @@ ath_tx_swq(struct ath_softc *sc, struct 
 	ATH_TXQ_INSERT_TAIL(atid, bf, bf_list);
 	ATH_TXQ_UNLOCK(atid);
 
-	/* Bump queued packet counter */
-	atomic_add_int(&an->an_qdepth, 1);
 
 	/* Mark the given node/tid as having packets to dequeue */
 	ATH_LOCK(sc);
+	/* Bump queued packet counter */
+	/* XXX for now, an_qdepth is behind the ATH lock */
+	atomic_add_int(&an->an_qdepth, 1);
 	ath_tx_node_sched(sc, an);
 	ATH_UNLOCK(sc);
 }
@@ -1471,6 +1480,7 @@ ath_tx_hw_queue(struct ath_softc *sc, st
 
 /*
  * XXX this needs to be atomic or ath_node locked
+ * XXX This is currently serialised behind the ATH lock
  */
 static int
 ath_txq_node_qlen(struct ath_softc *sc, struct ath_node *an)

From owner-svn-src-user@FreeBSD.ORG  Sat Jun 11 13:19:59 2011
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 59A771065672;
	Sat, 11 Jun 2011 13:19:59 +0000 (UTC)
	(envelope-from adrian@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 4AEBA8FC0C;
	Sat, 11 Jun 2011 13:19:59 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p5BDJxYY076790;
	Sat, 11 Jun 2011 13:19:59 GMT (envelope-from adrian@svn.freebsd.org)
Received: (from adrian@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p5BDJxjH076788;
	Sat, 11 Jun 2011 13:19:59 GMT (envelope-from adrian@svn.freebsd.org)
Message-Id: <201106111319.p5BDJxjH076788@svn.freebsd.org>
From: Adrian Chadd <adrian@FreeBSD.org>
Date: Sat, 11 Jun 2011 13:19:59 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r222987 - user/adrian/if_ath_tx/sys/modules/ath
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sat, 11 Jun 2011 13:19:59 -0000

Author: adrian
Date: Sat Jun 11 13:19:58 2011
New Revision: 222987
URL: http://svn.freebsd.org/changeset/base/222987

Log:
  Default module values for testing.

Modified:
  user/adrian/if_ath_tx/sys/modules/ath/Makefile

Modified: user/adrian/if_ath_tx/sys/modules/ath/Makefile
==============================================================================
--- user/adrian/if_ath_tx/sys/modules/ath/Makefile	Sat Jun 11 13:15:20 2011	(r222986)
+++ user/adrian/if_ath_tx/sys/modules/ath/Makefile	Sat Jun 11 13:19:58 2011	(r222987)
@@ -142,5 +142,10 @@ CFLAGS+=  -I. -I${.CURDIR}/../../dev/ath
 
 opt_ah.h:
 	echo '#define AH_SUPPORT_AR5416 1' > $@
+	echo '#define AH_AR5416_INTERRUPT_MITIGATION 1' >> $@
+	echo '#define AH_DEBUG 1' >> $@
+	echo '#define ATH_DEBUG 1' >> $@
+	echo '#define ATH_DIAGAPI 1' >> $@
+	echo '#define ATH_ENABLE_11N 1' >> $@
 
 .include <bsd.kmod.mk>