PERFORCE change 143726 for review
Julian Elischer
julian at FreeBSD.org
Wed Jun 18 22:06:06 UTC 2008
http://perforce.freebsd.org/chv.cgi?CH=143726
Change 143726 by julian at julian_trafmon1 on 2008/06/18 22:05:07
more moerging from vimage main
Affected files ...
.. //depot/projects/vimage-devel/src/sys/kern/kern_clock.c#4 integrate
.. //depot/projects/vimage-devel/src/sys/kern/kern_vimage.c#3 integrate
.. //depot/projects/vimage-devel/src/sys/net/vnet.h#3 integrate
.. //depot/projects/vimage-devel/src/sys/netgraph/ng_pipe.c#2 integrate
.. //depot/projects/vimage-devel/src/sys/netgraph/ng_pipe.h#2 integrate
.. //depot/projects/vimage-devel/src/sys/netgraph/ng_wormhole.c#3 integrate
.. //depot/projects/vimage-devel/src/sys/netgraph/vnetgraph.h#2 integrate
.. //depot/projects/vimage-devel/src/sys/netinet/ip_fw2.c#3 integrate
.. //depot/projects/vimage-devel/src/sys/netinet/tcp_subr.c#3 integrate
.. //depot/projects/vimage-devel/src/sys/netinet/tcp_syncache.h#2 integrate
.. //depot/projects/vimage-devel/src/sys/netinet/vinet.h#2 integrate
.. //depot/projects/vimage-devel/src/sys/netinet6/ip6_input.c#3 integrate
.. //depot/projects/vimage-devel/src/sys/netinet6/nd6.c#3 integrate
.. //depot/projects/vimage-devel/src/sys/netinet6/vinet6.h#2 integrate
.. //depot/projects/vimage-devel/src/sys/netipsec/vipsec.h#2 integrate
.. //depot/projects/vimage-devel/src/sys/sys/sysctl.h#3 integrate
.. //depot/projects/vimage-devel/src/sys/sys/vimage.h#4 integrate
Differences ...
==== //depot/projects/vimage-devel/src/sys/kern/kern_clock.c#4 (text+ko) ====
@@ -502,7 +502,8 @@
sel = CP_IDLE;
}
}
- atomic_add_long(&V_cp_time[sel], 1); /* XXX remove atomic! */
+ cp_time[sel]++;
+
#ifdef VIMAGE
if (sel != CP_INTR)
sel = CP_IDLE;
==== //depot/projects/vimage-devel/src/sys/kern/kern_vimage.c#3 (text+ko) ====
@@ -1,6 +1,6 @@
/*-
- * Copyright (c) 2004, 2005, 2006 University of Zagreb
- * Copyright (c) 2006 FreeBSD Foundation
+ * Copyright (c) 2004-2008 University of Zagreb
+ * Copyright (c) 2006-2008 FreeBSD Foundation
*
* This software was developed by the University of Zagreb and the
* FreeBSD Foundation under sponsorship by the Stichting NLnet and the
@@ -26,8 +26,6 @@
* 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.
- *
- * XXX RCS tag goes here
*/
#include "opt_ddb.h"
==== //depot/projects/vimage-devel/src/sys/net/vnet.h#3 (text+ko) ====
@@ -1,6 +1,6 @@
/*-
- * Copyright (c) 2006 University of Zagreb
- * Copyright (c) 2006 FreeBSD Foundation
+ * Copyright (c) 2006-2008 University of Zagreb
+ * Copyright (c) 2006-2008 FreeBSD Foundation
*
* This software was developed by the University of Zagreb and the
* FreeBSD Foundation under sponsorship by the Stichting NLnet and the
@@ -26,8 +26,6 @@
* 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.
- *
- * XXX RCS tag goes here
*/
#ifndef _NET_VNET_H_
==== //depot/projects/vimage-devel/src/sys/netgraph/ng_pipe.c#2 (text+ko) ====
@@ -1,6 +1,6 @@
/*
- * Copyright (c) 2004, 2005, 2007 University of Zagreb
- * Copyright (c) 2007 FreeBSD Foundation
+ * Copyright (c) 2004-2008 University of Zagreb
+ * Copyright (c) 2007-2008 FreeBSD Foundation
*
* This software was developed by the University of Zagreb and the
* FreeBSD Foundation under sponsorship by the Stichting NLnet and the
@@ -539,7 +539,8 @@
* NIH sindrome, so probably it would be wise to look around what other
* folks have found out to be a good and efficient IP hash function...
*/
-static int ip_hash(struct mbuf *m, int offset)
+static int
+ip_hash(struct mbuf *m, int offset)
{
u_int64_t i;
struct ip *ip = (struct ip *)(mtod(m, u_char *) + offset);
==== //depot/projects/vimage-devel/src/sys/netgraph/ng_pipe.h#2 (text+ko) ====
@@ -1,6 +1,6 @@
/*
- * Copyright (c) 2004, 2007 University of Zagreb
- * Copyright (c) 2007 FreeBSD Foundation
+ * Copyright (c) 2004-2008 University of Zagreb
+ * Copyright (c) 2007-2008 FreeBSD Foundation
*
* This software was developed by the University of Zagreb and the
* FreeBSD Foundation under sponsorship by the Stichting NLnet and the
==== //depot/projects/vimage-devel/src/sys/netgraph/ng_wormhole.c#3 (text+ko) ====
@@ -1,6 +1,6 @@
/*-
- * Copyright (c) 2007 University of Zagreb
- * Copyright (c) 2007 FreeBSD Foundation
+ * Copyright (c) 2007-2008 University of Zagreb
+ * Copyright (c) 2007-2008 FreeBSD Foundation
*
* This software was developed by the University of Zagreb and the
* FreeBSD Foundation under sponsorship by the Stichting NLnet and the
@@ -26,8 +26,6 @@
* 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.
- *
- * XXX RCS tag goes here
*/
/*
==== //depot/projects/vimage-devel/src/sys/netgraph/vnetgraph.h#2 (text+ko) ====
@@ -1,6 +1,6 @@
/*-
- * Copyright (c) 2006 University of Zagreb
- * Copyright (c) 2006 FreeBSD Foundation
+ * Copyright (c) 2006-2008 University of Zagreb
+ * Copyright (c) 2006-2008 FreeBSD Foundation
*
* This software was developed by the University of Zagreb and the
* FreeBSD Foundation under sponsorship by the Stichting NLnet and the
@@ -26,8 +26,6 @@
* 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.
- *
- * XXX RCS tag goes here
*/
#ifndef _NETGRAPH_VNETGRPAH_H_
==== //depot/projects/vimage-devel/src/sys/netinet/ip_fw2.c#3 (text+ko) ====
==== //depot/projects/vimage-devel/src/sys/netinet/tcp_subr.c#3 (text+ko) ====
@@ -196,9 +196,11 @@
&tcp_inflight_debug, 0, "Debug TCP inflight calculations");
static int sysctl_tcp_inflight_rttthresh(SYSCTL_HANDLER_ARGS);
-int sysctl_tcp_inflight_rttthresh(SYSCTL_HANDLER_ARGS)
+
+static int
+sysctl_tcp_inflight_rttthresh(SYSCTL_HANDLER_ARGS)
{
- return (0); /* XXX MARKO REVISIT */
+ return (0); /* XXX MARKO REVISIT */
}
SYSCTL_PROC(_net_inet_tcp_inflight, OID_AUTO, rttthresh,
CTLTYPE_INT|CTLFLAG_RW, 0, 0, sysctl_tcp_inflight_rttthresh, "I",
==== //depot/projects/vimage-devel/src/sys/netinet/tcp_syncache.h#2 (text+ko) ====
==== //depot/projects/vimage-devel/src/sys/netinet/vinet.h#2 (text+ko) ====
@@ -1,6 +1,6 @@
/*-
- * Copyright (c) 2006 University of Zagreb
- * Copyright (c) 2006 FreeBSD Foundation
+ * Copyright (c) 2006-2008 University of Zagreb
+ * Copyright (c) 2006-2008 FreeBSD Foundation
*
* This software was developed by the University of Zagreb and the
* FreeBSD Foundation under sponsorship by the Stichting NLnet and the
@@ -26,8 +26,6 @@
* 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.
- *
- * XXX RCS tag goes here
*/
#ifndef _NETINET_VINET_H_
==== //depot/projects/vimage-devel/src/sys/netinet6/ip6_input.c#3 (text+ko) ====
@@ -153,9 +153,10 @@
VNET_MOD_DECLARE(INET6, inet6, NULL, NULL, INET, NULL)
-static void vnet_inet6_register()
+static void
+vnet_inet6_register(void)
{
- vnet_mod_register(&vnet_inet6_modinfo);
+ vnet_mod_register(&vnet_inet6_modinfo);
}
SYSINIT(inet6, SI_SUB_PROTO_BEGIN, SI_ORDER_FIRST, vnet_inet6_register, 0);
==== //depot/projects/vimage-devel/src/sys/netinet6/nd6.c#3 (text+ko) ====
@@ -472,7 +472,7 @@
ln = (struct llinfo_nd6 *)arg;
- if (ln->ln_ntick > 0) {
+ if (ln->ln_ntick > 0) {
if (ln->ln_ntick > INT_MAX) {
ln->ln_ntick -= INT_MAX;
nd6_llinfo_settimer(ln, INT_MAX);
==== //depot/projects/vimage-devel/src/sys/netinet6/vinet6.h#2 (text+ko) ====
@@ -1,6 +1,6 @@
/*-
- * Copyright (c) 2006 University of Zagreb
- * Copyright (c) 2006 FreeBSD Foundation
+ * Copyright (c) 2006-2008 University of Zagreb
+ * Copyright (c) 2006-2008 FreeBSD Foundation
*
* This software was developed by the University of Zagreb and the
* FreeBSD Foundation under sponsorship by the Stichting NLnet and the
@@ -26,8 +26,6 @@
* 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.
- *
- * XXX RCS tag goes here
*/
#ifndef _NETINET6_VINET6_H_
==== //depot/projects/vimage-devel/src/sys/netipsec/vipsec.h#2 (text+ko) ====
@@ -1,6 +1,6 @@
/*
- * Copyright (c) 2007 University of Zagreb
- * Copyright (c) 2007 FreeBSD Foundation
+ * Copyright (c) 2007-2008 University of Zagreb
+ * Copyright (c) 2007-2008 FreeBSD Foundation
*
* This software was developed by the University of Zagreb and the
* FreeBSD Foundation under sponsorship by the Stichting NLnet and the
@@ -26,8 +26,6 @@
* 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.
- *
- * XXX RCS tag goes here
*/
#ifndef _NETIPSEC_VIPSEC_H_
==== //depot/projects/vimage-devel/src/sys/sys/sysctl.h#3 (text+ko) ====
@@ -247,10 +247,10 @@
#ifdef VIMAGE
#define SYSCTL_V_OID(subs, mod, parent, nbr, name, kind, a1, a2, \
handler, fmt, descr) \
- static struct sysctl_v_oid sysctl__##parent##_##name = { \
- &sysctl_##parent##_children, { 0 }, nbr, kind, \
- (void *) offsetof(struct mod, _##a1), a2, #name, \
- handler, fmt, 0, __DESCR(descr), subs, V_MOD_##mod }; \
+ static struct sysctl_v_oid sysctl__##parent##_##name = { \
+ &sysctl_##parent##_children, { 0 }, nbr, kind, \
+ (void *) offsetof(struct mod, _##a1), a2, #name, \
+ handler, fmt, 0, __DESCR(descr), subs, V_MOD_##mod }; \
DATA_SET(sysctl_set, sysctl__##parent##_##name)
#else
#define SYSCTL_V_OID(subs, mod, parent, nbr, name, kind, a1, a2, \
==== //depot/projects/vimage-devel/src/sys/sys/vimage.h#4 (text+ko) ====
@@ -1,6 +1,6 @@
/*-
- * Copyright (c) 2006 University of Zagreb
- * Copyright (c) 2006 FreeBSD Foundation
+ * Copyright (c) 2006-2008 University of Zagreb
+ * Copyright (c) 2006-2008 FreeBSD Foundation
*
* This software was developed by the University of Zagreb and the
* FreeBSD Foundation under sponsorship by the Stichting NLnet and the
@@ -26,8 +26,6 @@
* 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.
- *
- * XXX RCS tag goes here
*/
#ifndef _NET_VIMAGE_H_
@@ -51,7 +49,10 @@
struct ifnet; /* XXX must go away */
#define curvnet curthread->td_vnet
-#define basevnet thread0.td_vnet
+
+#define basevnet thread0.td_ucred->cr_vimage->v_vnet
+#define basevprocg thread0.td_ucred->cr_vimage->v_procg
+#define basevcpu thread0.td_ucred->cr_vimage->v_cpu
typedef int vnet_attach_fn(const void *);
typedef int vnet_detach_fn(const void *);
@@ -231,7 +232,7 @@
#define VNET_ITERLOOP_END() \
CURVNET_RESTORE(); \
} \
- VNET_LIST_UNREF();
+ VNET_LIST_UNREF();
#else /* !VNET_DEBUG */
@@ -261,7 +262,7 @@
#define VNET_ITERLOOP_END() \
CURVNET_RESTORE(); \
} \
- VNET_LIST_UNREF();
+ VNET_LIST_UNREF();
#endif /* !VNET_DEBUG */
@@ -321,13 +322,16 @@
#define VCPU(sym) VSYM(vcpu, sym)
#define V_hostname VPROCG(hostname)
-#define G_hostname VSYM(basevnet, hostname) /* global hostname */
+#define G_hostname VSYM(basevprocg, hostname) /* global hostname */
#define V_domainname VPROCG(domainname)
#define V_morphing_symlinks VPROCG(morphing_symlinks)
+
+#ifdef NOTYET
#define V_cp_time VPROCG(cp_time)
#define V_averunnable VPROCG(averunnable)
#define V_sched_tdcnt VPROCG(sched_tdcnt)
#define V_tdq_sysload VPROCG(tdq_sysload)
+#endif
#define V_acc_statcalls VCPU(acc_statcalls)
#define V_avg1_fixp VCPU(avg1_fixp)
@@ -405,18 +409,18 @@
u_int nprocs;
- long _cp_time[CPUSTATES];
-
char _hostname[MAXHOSTNAMELEN];
char _domainname[MAXHOSTNAMELEN];
int _morphing_symlinks;
+#if 0
+ long _cp_time[CPUSTATES];
+
struct loadavg _averunnable; /* from kern/kern_synch.c */
int _sched_tdcnt; /* from kern/sched_4bsd.c */
int _tdq_sysload[32]; /* XXX MAXCPUS from kern/sched_ule.c (SMP) */
-#if 0
u_int proc_limit; /* max. number of processes */
struct msgbuf *msgbufp;
More information about the p4-projects
mailing list