Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 May 2008 11:26:45 GMT
From:      John Birrell <jb@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 141757 for review
Message-ID:  <200805171126.m4HBQjpv053639@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=141757

Change 141757 by jb@freebsd3 on 2008/05/17 11:26:08

	IFC

Affected files ...

.. //depot/projects/dtrace/src/sys/net/if.c#17 integrate
.. //depot/projects/dtrace/src/sys/netipsec/ipsec.h#8 integrate
.. //depot/projects/dtrace/src/sys/netipsec/ipsec_osdep.h#6 delete
.. //depot/projects/dtrace/src/tools/test/README#5 integrate
.. //depot/projects/dtrace/src/tools/test/dtrace/Makefile#32 integrate

Differences ...

==== //depot/projects/dtrace/src/sys/net/if.c#17 (text+ko) ====

@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  *
  *	@(#)if.c	8.5 (Berkeley) 1/9/95
- * $FreeBSD: src/sys/net/if.c,v 1.279 2008/05/09 23:02:56 julian Exp $
+ * $FreeBSD: src/sys/net/if.c,v 1.280 2008/05/17 03:38:13 brooks Exp $
  */
 
 #include "opt_compat.h"
@@ -111,7 +111,6 @@
 static void	if_freemulti(struct ifmultiaddr *);
 static void	if_grow(void);
 static void	if_init(void *);
-static void	if_check(void *);
 static void	if_qflush(struct ifaltq *);
 static void	if_route(struct ifnet *, int flag, int fam);
 static int	if_setflag(struct ifnet *, int, int, int *, int);
@@ -155,7 +154,7 @@
  * System initialization
  */
 SYSINIT(interfaces, SI_SUB_INIT_IF, SI_ORDER_FIRST, if_init, NULL);
-SYSINIT(interface_check, SI_SUB_PROTO_IF, SI_ORDER_FIRST, if_check, NULL);
+SYSINIT(interface_check, SI_SUB_PROTO_IF, SI_ORDER_FIRST, if_slowtimo, NULL);
 
 MALLOC_DEFINE(M_IFNET, "ifnet", "interface internals");
 MALLOC_DEFINE(M_IFADDR, "ifaddr", "interface address");
@@ -320,32 +319,6 @@
 	ifindex_table = e;
 }
 
-/* ARGSUSED*/
-static void
-if_check(void *dummy __unused)
-{
-	struct ifnet *ifp;
-	int s;
-
-	s = splimp();
-	IFNET_RLOCK();	/* could sleep on rare error; mostly okay XXX */
-	TAILQ_FOREACH(ifp, &ifnet, if_link) {
-		if (ifp->if_snd.ifq_maxlen == 0) {
-			if_printf(ifp, "XXX: driver didn't set ifq_maxlen\n");
-			ifp->if_snd.ifq_maxlen = ifqmaxlen;
-		}
-		if (!mtx_initialized(&ifp->if_snd.ifq_mtx)) {
-			if_printf(ifp,
-			    "XXX: driver didn't initialize queue mtx\n");
-			mtx_init(&ifp->if_snd.ifq_mtx, "unknown",
-			    MTX_NETWORK_LOCK, MTX_DEF);
-		}
-	}
-	IFNET_RUNLOCK();
-	splx(s);
-	if_slowtimo(0);
-}
-
 /*
  * Allocate a struct ifnet and an index for an interface.  A layer 2
  * common structure will also be allocated if an allocation routine is
@@ -525,6 +498,15 @@
 	ifa->ifa_refcnt = 1;
 	TAILQ_INSERT_HEAD(&ifp->if_addrhead, ifa, ifa_link);
 	ifp->if_broadcastaddr = NULL; /* reliably crash if used uninitialized */
+
+	/*
+	 * XXX: why do we warn about this? We're correcting it and most
+	 * drivers just set the value the way we do.
+	 */
+	if (ifp->if_snd.ifq_maxlen == 0) {
+		if_printf(ifp, "XXX: driver didn't set ifq_maxlen\n");
+		ifp->if_snd.ifq_maxlen = ifqmaxlen;
+	}
 	ifp->if_snd.altq_type = 0;
 	ifp->if_snd.altq_disc = NULL;
 	ifp->if_snd.altq_flags &= ALTQF_CANTCHANGE;

==== //depot/projects/dtrace/src/sys/netipsec/ipsec.h#8 (text+ko) ====

@@ -1,4 +1,4 @@
-/*	$FreeBSD: src/sys/netipsec/ipsec.h,v 1.15 2008/02/02 14:11:31 bz Exp $	*/
+/*	$FreeBSD: src/sys/netipsec/ipsec.h,v 1.16 2008/05/17 04:00:11 gnn Exp $	*/
 /*	$KAME: ipsec.h,v 1.53 2001/11/20 08:32:38 itojun Exp $	*/
 
 /*-
@@ -44,10 +44,17 @@
 
 #include <net/pfkeyv2.h>
 #include <netipsec/keydb.h>
-#include <netipsec/ipsec_osdep.h>
 
 #ifdef _KERNEL
 
+#define	IPSEC_SPLASSERT_SOFTNET(_m)	/* XXX-BZ remove me */
+#define	IPSEC_ASSERT(_c,_m) KASSERT(_c, _m)
+
+#define	IPSEC_IS_PRIVILEGED_SO(_so) \
+	((_so)->so_cred != NULL && \
+	 priv_check_cred((_so)->so_cred, PRIV_NETINET_IPSEC, 0) \
+	 == 0)
+
 /*
  * Security Policy Index
  * Ensure that both address families in the "src" and "dst" are same.

==== //depot/projects/dtrace/src/tools/test/README#5 (text+ko) ====

@@ -1,4 +1,4 @@
-$FreeBSD: src/tools/test/README,v 1.4 2001/10/08 12:28:31 asmodai Exp $
+$FreeBSD: src/tools/test/README,v 1.5 2008/05/17 02:09:48 jb Exp $
 
 This directory is for test programs.
 

==== //depot/projects/dtrace/src/tools/test/dtrace/Makefile#32 (text+ko) ====




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200805171126.m4HBQjpv053639>