PERFORCE change 153678 for review
Marko Zec
zec at FreeBSD.org
Thu Nov 27 16:47:57 PST 2008
http://perforce.freebsd.org/chv.cgi?CH=153678
Change 153678 by zec at zec_tca51 on 2008/11/28 00:47:05
Alchemy... Remove #ifdef VIMAGE blocks around virtualization
container declarations, and make quite a few black-magic adjustments
required to unbreak the build.
Affected files ...
.. //depot/projects/vimage-commit2/src/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c#9 edit
.. //depot/projects/vimage-commit2/src/sys/contrib/ipfilter/netinet/mlfk_ipl.c#2 edit
.. //depot/projects/vimage-commit2/src/sys/kern/kern_prot.c#3 edit
.. //depot/projects/vimage-commit2/src/sys/net/vnet.h#6 edit
.. //depot/projects/vimage-commit2/src/sys/netgraph/ng_eiface.c#11 edit
.. //depot/projects/vimage-commit2/src/sys/netinet/in.c#14 edit
.. //depot/projects/vimage-commit2/src/sys/netinet/ip_id.c#8 edit
.. //depot/projects/vimage-commit2/src/sys/netinet/ip_input.c#19 edit
.. //depot/projects/vimage-commit2/src/sys/netinet/ip_var.h#8 edit
.. //depot/projects/vimage-commit2/src/sys/netinet/tcp_hostcache.c#14 edit
.. //depot/projects/vimage-commit2/src/sys/netinet/tcp_hostcache.h#1 add
.. //depot/projects/vimage-commit2/src/sys/netinet/vinet.h#15 edit
.. //depot/projects/vimage-commit2/src/sys/netinet6/in6_ifattach.c#16 edit
.. //depot/projects/vimage-commit2/src/sys/netinet6/vinet6.h#13 edit
.. //depot/projects/vimage-commit2/src/sys/netipsec/keysock.c#17 edit
.. //depot/projects/vimage-commit2/src/sys/netipsec/keysock.h#2 edit
.. //depot/projects/vimage-commit2/src/sys/netipsec/vipsec.h#12 edit
.. //depot/projects/vimage-commit2/src/sys/rpc/rpc.h#2 edit
.. //depot/projects/vimage-commit2/src/sys/sys/param.h#17 edit
Differences ...
==== //depot/projects/vimage-commit2/src/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c#9 (text+ko) ====
@@ -121,7 +121,7 @@
#endif
extern int ip_optcopy __P((struct ip *, struct ip *));
-#if (__FreeBSD_version > 460000)
+#if (__FreeBSD_version > 460000) && (__FreeBSD_version < 800000)
extern int path_mtu_discovery;
#endif
==== //depot/projects/vimage-commit2/src/sys/contrib/ipfilter/netinet/mlfk_ipl.c#2 (text+ko) ====
@@ -43,7 +43,6 @@
static int ipf_modload(void);
static int ipf_modunload(void);
-SYSCTL_DECL(_net_inet);
#define SYSCTL_IPF(parent, nbr, name, access, ptr, val, descr) \
SYSCTL_OID(parent, nbr, name, CTLTYPE_INT|access, \
ptr, val, sysctl_ipf_int, "I", descr);
==== //depot/projects/vimage-commit2/src/sys/kern/kern_prot.c#3 (text+ko) ====
==== //depot/projects/vimage-commit2/src/sys/net/vnet.h#6 (text+ko) ====
@@ -33,9 +33,10 @@
#ifndef _NET_VNET_H_
#define _NET_VNET_H_
-#ifdef VIMAGE
#include "opt_route.h"
+#include <sys/param.h>
+#include <sys/systm.h>
#include <sys/proc.h>
#include <sys/protosw.h>
#include <sys/socket.h>
@@ -66,8 +67,6 @@
int _ether_ipfw;
};
-#endif
-
/*
* Symbol translation macros
*/
==== //depot/projects/vimage-commit2/src/sys/netgraph/ng_eiface.c#11 (text+ko) ====
@@ -447,7 +447,9 @@
caddr_t ptr;
int buflen;
+#if 0 /* XXX SA_SIZE(s) defined in net/route.h */
#define SA_SIZE(s) ((s)->sa_len<sizeof(*(s))? sizeof(*(s)):(s)->sa_len)
+#endif
/* Determine size of response and allocate it */
buflen = 0;
==== //depot/projects/vimage-commit2/src/sys/netinet/in.c#14 (text+ko) ====
@@ -70,7 +70,6 @@
static int subnetsarelocal;
static int sameprefixcarponly;
extern struct inpcbinfo ripcbinfo;
-extern struct inpcbinfo udbinfo;
#endif
SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_ip, OID_AUTO, subnets_are_local,
==== //depot/projects/vimage-commit2/src/sys/netinet/ip_id.c#8 (text+ko) ====
@@ -104,7 +104,6 @@
MTX_SYSINIT(ip_id_mtx, &ip_id_mtx, "ip_id_mtx", MTX_DEF);
-SYSCTL_DECL(_net_inet_ip);
SYSCTL_PROC(_net_inet_ip, OID_AUTO, random_id_period, CTLTYPE_INT|CTLFLAG_RW,
&array_size, 0, sysctl_ip_id_change, "IU", "IP ID Array size");
SYSCTL_INT(_net_inet_ip, OID_AUTO, random_id_collisions, CTLFLAG_RD,
==== //depot/projects/vimage-commit2/src/sys/netinet/ip_input.c#19 (text+ko) ====
@@ -104,7 +104,7 @@
static int ip_rsvp_on;
struct socket *ip_rsvpd;
int rsvp_on;
-static TAILQ_HEAD(ipqhead, ipq) ipq[IPREASS_NHASH];
+static struct ipqhead ipq[IPREASS_NHASH];
static int maxnipq; /* Administrative limit on # reass queues. */
static int maxfragsperpacket;
int ipstealth;
==== //depot/projects/vimage-commit2/src/sys/netinet/ip_var.h#8 (text+ko) ====
@@ -234,6 +234,7 @@
void in_delayed_cksum(struct mbuf *m);
+#if 0 /* XXX moved to netinet/vinet.h */
static __inline uint16_t ip_newid(void);
extern int ip_do_randomid;
@@ -245,6 +246,7 @@
return htons(V_ip_id++);
}
+#endif
#endif /* _KERNEL */
==== //depot/projects/vimage-commit2/src/sys/netinet/tcp_hostcache.c#14 (text+ko) ====
@@ -98,55 +98,12 @@
#include <vm/uma.h>
-
-TAILQ_HEAD(hc_qhead, hc_metrics);
-
-struct hc_head {
- struct hc_qhead hch_bucket;
- u_int hch_length;
- struct mtx hch_mtx;
-};
-
-struct hc_metrics {
- /* housekeeping */
- TAILQ_ENTRY(hc_metrics) rmx_q;
- struct hc_head *rmx_head; /* head of bucket tail queue */
- struct in_addr ip4; /* IP address */
- struct in6_addr ip6; /* IP6 address */
- /* endpoint specific values for TCP */
- u_long rmx_mtu; /* MTU for this path */
- u_long rmx_ssthresh; /* outbound gateway buffer limit */
- u_long rmx_rtt; /* estimated round trip time */
- u_long rmx_rttvar; /* estimated rtt variance */
- u_long rmx_bandwidth; /* estimated bandwidth */
- u_long rmx_cwnd; /* congestion window */
- u_long rmx_sendpipe; /* outbound delay-bandwidth product */
- u_long rmx_recvpipe; /* inbound delay-bandwidth product */
- /* TCP hostcache internal data */
- int rmx_expire; /* lifetime for object */
- u_long rmx_hits; /* number of hits */
- u_long rmx_updates; /* number of updates */
-};
-
/* Arbitrary values */
#define TCP_HOSTCACHE_HASHSIZE 512
#define TCP_HOSTCACHE_BUCKETLIMIT 30
#define TCP_HOSTCACHE_EXPIRE 60*60 /* one hour */
#define TCP_HOSTCACHE_PRUNE 5*60 /* every 5 minutes */
-struct tcp_hostcache {
- struct hc_head *hashbase;
- uma_zone_t zone;
- u_int hashsize;
- u_int hashmask;
- u_int bucket_limit;
- u_int cache_count;
- u_int cache_limit;
- int expire;
- int prune;
- int purgeall;
-};
-
#ifdef VIMAGE_GLOBALS
static struct tcp_hostcache tcp_hostcache;
static struct callout tcp_hc_callout;
==== //depot/projects/vimage-commit2/src/sys/netinet/vinet.h#15 (text+ko) ====
@@ -33,11 +33,12 @@
#ifndef _NETINET_VINET_H_
#define _NETINET_VINET_H_
-#ifdef VIMAGE
#include <sys/socketvar.h>
#include <sys/sysctl.h>
#include <sys/md5.h>
+#include <net/vnet.h>
+
#include <netinet/in.h>
#include <netinet/in_systm.h>
#include <netinet/in_var.h>
@@ -196,8 +197,6 @@
int _icmp_quotelen;
int _icmpbmcastecho;
};
-#endif
-
/*
* Symbol translation macros
@@ -333,4 +332,17 @@
#define V_udpstat VNET_INET(udpstat)
#define V_useloopback VNET_INET(useloopback)
+/* XXX moved from netinet/ip_var.h */
+static __inline uint16_t ip_newid(void);
+extern int ip_do_randomid;
+
+static __inline uint16_t
+ip_newid(void)
+{
+ if (V_ip_do_randomid)
+ return ip_randomid();
+
+ return htons(V_ip_id++);
+}
+
#endif /* !_NETINET_VINET_H_ */
==== //depot/projects/vimage-commit2/src/sys/netinet6/in6_ifattach.c#16 (text+ko) ====
@@ -65,7 +65,6 @@
unsigned long in6_maxmtu;
int ip6_auto_linklocal;
struct callout in6_tmpaddrtimer_ch;
-extern struct inpcbinfo udbinfo;
extern struct inpcbinfo ripcbinfo;
#endif
==== //depot/projects/vimage-commit2/src/sys/netinet6/vinet6.h#13 (text+ko) ====
@@ -33,7 +33,6 @@
#ifndef _NETINET6_VINET6_H_
#define _NETINET6_VINET6_H_
-#ifdef VIMAGE
#include <sys/socket.h>
#include <netinet/ip6.h>
#include <net/if.h>
@@ -154,15 +153,12 @@
struct ip6_pktopts _ip6_opts;
};
-#endif
-
#define INIT_VNET_INET6(vnet) \
INIT_FROM_VNET(vnet, VNET_MOD_INET6, struct vnet_inet6, vnet_inet6)
#define VNET_INET6(sym) VSYM(vnet_inet6, sym)
-
/*
* Symbol translation macros
*/
==== //depot/projects/vimage-commit2/src/sys/netipsec/keysock.c#17 (text+ko) ====
@@ -66,11 +66,6 @@
#include <machine/stdarg.h>
-struct key_cb {
- int key_count;
- int any_count;
-};
-
#ifdef VIMAGE_GLOBALS
static struct key_cb key_cb;
struct pfkeystat pfkeystat;
==== //depot/projects/vimage-commit2/src/sys/netipsec/keysock.h#2 (text+ko) ====
@@ -58,6 +58,11 @@
u_quad_t sockerr; /* # of socket related errors */
};
+struct key_cb {
+ int key_count;
+ int any_count;
+};
+
#define KEY_SENDUP_ONE 0
#define KEY_SENDUP_ALL 1
#define KEY_SENDUP_REGISTERED 2
==== //depot/projects/vimage-commit2/src/sys/netipsec/vipsec.h#12 (text+ko) ====
@@ -33,7 +33,6 @@
#ifndef _NETIPSEC_VIPSEC_H_
#define _NETIPSEC_VIPSEC_H_
-#ifdef VIMAGE
#include <sys/proc.h>
#include <sys/protosw.h>
#include <sys/socket.h>
@@ -112,7 +111,6 @@
LIST_HEAD(, secacq) _acqtree;
LIST_HEAD(, secspacq) _spacqtree;
};
-#endif
/*
* Symbol translation macros
==== //depot/projects/vimage-commit2/src/sys/rpc/rpc.h#2 (text+ko) ====
==== //depot/projects/vimage-commit2/src/sys/sys/param.h#17 (text+ko) ====
@@ -92,9 +92,13 @@
#include <sys/priority.h>
#endif
+#ifndef FALSE
#define FALSE 0
+#endif
+#ifndef TRUE
#define TRUE 1
#endif
+#endif
#ifndef _KERNEL
/* Signals. */
More information about the p4-projects
mailing list