Date: Wed, 26 Nov 2008 00:37:47 GMT From: Marko Zec <zec@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 153565 for review Message-ID: <200811260037.mAQ0blxs043001@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=153565 Change 153565 by zec@zec_tca51 on 2008/11/26 00:37:42 A step towards unbreaking kernel build... Affected files ... .. //depot/projects/vimage/src/sys/contrib/altq/altq/altq_subr.c#12 edit .. //depot/projects/vimage/src/sys/net/if.c#50 edit .. //depot/projects/vimage/src/sys/netinet/in.c#22 edit .. //depot/projects/vimage/src/sys/netinet/in_gif.c#16 edit .. //depot/projects/vimage/src/sys/netinet/ip_input.c#41 edit .. //depot/projects/vimage/src/sys/netinet/tcp_hostcache.c#31 edit .. //depot/projects/vimage/src/sys/netinet/tcp_subr.c#61 edit .. //depot/projects/vimage/src/sys/netinet/tcp_syncache.c#47 edit .. //depot/projects/vimage/src/sys/netinet/tcp_var.h#28 edit .. //depot/projects/vimage/src/sys/netinet/vinet.h#35 edit .. //depot/projects/vimage/src/sys/netinet6/in6_var.h#7 edit .. //depot/projects/vimage/src/sys/netinet6/ip6_input.c#39 edit .. //depot/projects/vimage/src/sys/netinet6/ip6_var.h#15 edit .. //depot/projects/vimage/src/sys/netinet6/nd6.c#36 edit .. //depot/projects/vimage/src/sys/netinet6/nd6.h#11 edit .. //depot/projects/vimage/src/sys/netinet6/nd6_rtr.c#22 edit .. //depot/projects/vimage/src/sys/netinet6/raw_ip6.c#29 edit .. //depot/projects/vimage/src/sys/netinet6/scope6.c#20 edit .. //depot/projects/vimage/src/sys/netinet6/tcp6_var.h#4 edit .. //depot/projects/vimage/src/sys/netinet6/vinet6.h#26 edit .. //depot/projects/vimage/src/sys/netipsec/ipsec.c#30 edit .. //depot/projects/vimage/src/sys/netipsec/key.c#29 edit .. //depot/projects/vimage/src/sys/netipsec/keysock.c#19 edit .. //depot/projects/vimage/src/sys/netipsec/vipsec.h#17 edit .. //depot/projects/vimage/src/sys/netipsec/xform_ah.c#21 edit .. //depot/projects/vimage/src/sys/netipsec/xform_esp.c#20 edit Differences ... ==== //depot/projects/vimage/src/sys/contrib/altq/altq/altq_subr.c#12 (text+ko) ==== @@ -47,6 +47,7 @@ #include <sys/syslog.h> #include <sys/sysctl.h> #include <sys/queue.h> +#include <sys/vimage.h> #include <net/if.h> #include <net/if_dl.h> ==== //depot/projects/vimage/src/sys/net/if.c#50 (text+ko) ==== @@ -370,7 +370,6 @@ static void if_init(void *dummy __unused) { - INIT_VNET_NET(curvnet); #ifdef VIMAGE vnet_mod_register(&vnet_net_modinfo); ==== //depot/projects/vimage/src/sys/netinet/in.c#22 (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/src/sys/netinet/in_gif.c#16 (text+ko) ==== @@ -85,9 +85,6 @@ .pr_usrreqs = &rip_usrreqs }; -#ifdef VIMAGE_GLOBALS -extern int ip_gif_ttl; -#endif SYSCTL_V_INT(V_NET, vnet_gif, _net_inet_ip, IPCTL_GIF_TTL, gifttl, CTLFLAG_RW, ip_gif_ttl, 0, ""); ==== //depot/projects/vimage/src/sys/netinet/ip_input.c#41 (text+ko) ==== @@ -168,7 +168,9 @@ SYSCTL_V_STRUCT(V_NET, vnet_inet, _net_inet_ip, IPCTL_STATS, stats, CTLFLAG_RW, ipstat, ipstat, "IP statistics (struct ipstat, netinet/ip_var.h)"); +#ifdef VIMAGE_GLOBALS static uma_zone_t ipq_zone; +#endif static struct mtx ipqlock; #define IPQ_LOCK() mtx_lock(&ipqlock) ==== //depot/projects/vimage/src/sys/netinet/tcp_hostcache.c#31 (text+ko) ==== @@ -105,19 +105,6 @@ #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/src/sys/netinet/tcp_subr.c#61 (text+ko) ==== @@ -121,11 +121,11 @@ static int icmp_may_rst; static int tcp_isn_reseed_interval; static int tcp_inflight_enable; -static int tcp_inflight_rttthresh; static int tcp_inflight_min; static int tcp_inflight_max; static int tcp_inflight_stab; #endif +static int tcp_inflight_rttthresh; static int sysctl_net_inet_tcp_mss_check(SYSCTL_HANDLER_ARGS) @@ -191,9 +191,11 @@ SYSCTL_INT(_net_inet_tcp, OID_AUTO, log_debug, CTLFLAG_RW, &tcp_log_debug, 0, "Log errors caused by incoming TCP segments"); +static int tcp_tcbhashsize = 0; SYSCTL_INT(_net_inet_tcp, OID_AUTO, tcbhashsize, CTLFLAG_RDTUN, &tcp_tcbhashsize, 0, "Size of TCP control-block hashtable"); +static int do_tcpdrain = 1; SYSCTL_INT(_net_inet_tcp, OID_AUTO, do_tcpdrain, CTLFLAG_RW, &do_tcpdrain, 0, "Enable tcp_drain routine for extra help when low on mbufs"); @@ -220,6 +222,7 @@ CTLFLAG_RW, tcp_inflight_enable, 0, "Enable automatic TCP inflight data limiting"); +static int tcp_inflight_debug = 0; SYSCTL_INT(_net_inet_tcp_inflight, OID_AUTO, debug, CTLFLAG_RW, &tcp_inflight_debug, 0, "Debug TCP inflight calculations"); ==== //depot/projects/vimage/src/sys/netinet/tcp_syncache.c#47 (text+ko) ==== @@ -105,12 +105,12 @@ int tcp_sc_rst_sock_fail; #endif -SYSCTL_INT(_net_inet_tcp, OID_AUTO, syncookies, CTLFLAG_RW, - &tcp_syncookies, 0, +SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_tcp, OID_AUTO, syncookies, + CTLFLAG_RW, tcp_syncookies, 0, "Use TCP SYN cookies if the syncache overflows"); -SYSCTL_INT(_net_inet_tcp, OID_AUTO, syncookies_only, CTLFLAG_RW, - &tcp_syncookiesonly, 0, +SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_tcp, OID_AUTO, syncookies_only, + CTLFLAG_RW, tcp_syncookiesonly, 0, "Use only TCP SYN cookies"); #ifdef TCP_OFFLOAD_DISABLE @@ -855,7 +855,7 @@ * B. check that the syncookie is valid. If it is, then * cobble up a fake syncache entry, and return. */ - if (!tcp_syncookies) { + if (!V_tcp_syncookies) { SCH_UNLOCK(sch); if ((s = tcp_log_addrs(inc, th, NULL, NULL))) log(LOG_DEBUG, "%s; %s: Spurious ACK, " @@ -1117,7 +1117,7 @@ syncache_drop(sc, sch); sc = uma_zalloc(V_tcp_syncache.zone, M_NOWAIT | M_ZERO); if (sc == NULL) { - if (tcp_syncookies) { + if (V_tcp_syncookies) { bzero(&scs, sizeof(scs)); sc = &scs; } else { @@ -1226,7 +1226,7 @@ if ((th->th_flags & (TH_ECE|TH_CWR)) && V_tcp_do_ecn) sc->sc_flags |= SCF_ECN; - if (tcp_syncookies) { + if (V_tcp_syncookies) { syncookie_generate(sch, sc, &flowtmp); #ifdef INET6 if (autoflowlabel) @@ -1245,7 +1245,7 @@ * Do a standard 3-way handshake. */ if (TOEPCB_ISSET(sc) || syncache_respond(sc) == 0) { - if (tcp_syncookies && tcp_syncookiesonly && sc != &scs) + if (V_tcp_syncookies && V_tcp_syncookiesonly && sc != &scs) syncache_free(sc); else if (sc != &scs) syncache_insert(sc, sch); /* locks and unlocks sch */ ==== //depot/projects/vimage/src/sys/netinet/tcp_var.h#28 (text+ko) ==== @@ -50,6 +50,7 @@ struct mbuf *tqe_m; /* mbuf contains packet */ }; LIST_HEAD(tsegqe_head, tseg_qent); +extern int tcp_reass_qsize; extern struct uma_zone *tcp_reass_zone; struct sackblk { @@ -507,7 +508,9 @@ MALLOC_DECLARE(M_TCPLOG); #endif -#ifndef VIMAGE +extern int tcp_log_in_vain; + +#ifdef VIMAGE_GLOBALS extern struct inpcbhead tcb; /* head of queue of active tcpcb's */ extern struct inpcbinfo tcbinfo; extern struct tcpstat tcpstat; /* tcp statistics */ @@ -543,6 +546,7 @@ extern int tcp_sc_rst_sock_fail; /* RST on sock alloc failure */ extern int tcp_do_ecn; /* TCP ECN enabled/disabled */ extern int tcp_ecn_maxretries; +#endif /* VIMAGE_GLOBALS */ int tcp_addoptions(struct tcpopt *, u_char *); struct tcpcb * ==== //depot/projects/vimage/src/sys/netinet/vinet.h#35 (text+ko) ==== @@ -93,11 +93,14 @@ struct tcp_hostcache _tcp_hostcache; struct callout _tcp_hc_callout; struct tcp_syncache _tcp_syncache; + int _tcp_syncookies; + int _tcp_syncookiesonly; + int _tcp_sc_rst_sock_fail; + struct inpcbhead _divcb; struct inpcbinfo _divcbinfo; TAILQ_HEAD(, tcptw) _twq_2msl; - int _tcp_sc_rst_sock_fail; int _tcp_mssdflt; int _tcp_v6mssdflt; int _tcp_minmss; ==== //depot/projects/vimage/src/sys/netinet6/in6_var.h#7 (text+ko) ==== @@ -470,7 +470,7 @@ #endif #ifdef _KERNEL -#ifndef VIMAGE +#ifdef VIMAGE_GLOBALS extern struct in6_ifaddr *in6_ifaddr; extern struct icmp6stat icmp6stat; ==== //depot/projects/vimage/src/sys/netinet6/ip6_input.c#39 (text+ko) ==== @@ -322,7 +322,7 @@ /* This must be after route_init(), which is now SI_ORDER_THIRD */ SYSINIT(netinet6init2, SI_SUB_PROTO_DOMAIN, SI_ORDER_MIDDLE, ip6_init2, NULL); -#ifndef VIMAGE +#ifdef VIMAGE_GLOBALS extern struct route_in6 ip6_forward_rt; #endif ==== //depot/projects/vimage/src/sys/netinet6/ip6_var.h#15 (text+ko) ==== @@ -279,7 +279,7 @@ #define IP6_HDR_ALIGNED_P(ip) ((((intptr_t) (ip)) & 3) == 0) #endif -#ifndef VIMAGE +#ifdef VIMAGE_GLOBALS extern struct ip6stat ip6stat; /* statistics */ extern int ip6_defhlim; /* default hop limit */ extern int ip6_defmcasthlim; /* default multicast hop limit */ @@ -294,7 +294,7 @@ #endif extern struct socket *ip6_mrouter; /* multicast routing daemon */ -#ifndef VIMAGE +#ifdef VIMAGE_GLOBALS extern int ip6_sendredirects; /* send IP redirects when forwarding? */ extern int ip6_maxfragpackets; /* Maximum packets in reassembly queue */ extern int ip6_maxfrags; /* Maximum fragments in reassembly queue */ @@ -317,7 +317,7 @@ extern int ip6_lowportmax; /* maximum reserved port */ extern int ip6_use_tempaddr; /* whether to use temporary addresses. */ -#ifndef VIMAGE +#ifdef VIMAGE_GLOBALS extern int ip6_prefer_tempaddr; /* whether to prefer temporary addresses in the source address selection */ #endif ==== //depot/projects/vimage/src/sys/netinet6/nd6.c#36 (text+ko) ==== @@ -151,10 +151,8 @@ V_nd6_recalc_reachtm_interval = ND6_RECALC_REACHTM_INTERVAL; -#ifdef INET6 - V_dad_ignore_ns = 0; /* ignore NS in DAD - specwise incorrect*/ -#endif - V_dad_maxtry = 15; /* max # of *tries* to transmit DAD packet */ + V_dad_maxtry = 15; /* max # of *tries* to transmit DAD packet */ + V_dad_ignore_ns = 0; /* ignore NS in DAD - specwise incorrect*/ V_llinfo_nd6.ln_next = &V_llinfo_nd6; V_llinfo_nd6.ln_prev = &V_llinfo_nd6; ==== //depot/projects/vimage/src/sys/netinet6/nd6.h#11 (text+ko) ==== @@ -328,7 +328,7 @@ LIST_HEAD(nd_prhead, nd_prefix); /* nd6.c */ -#ifndef VIMAGE +#ifdef VIMAGE_GLOBALS extern int nd6_prune; extern int nd6_delay; extern int nd6_umaxtries; ==== //depot/projects/vimage/src/sys/netinet6/nd6_rtr.c#22 (text+ko) ==== @@ -87,9 +87,7 @@ #ifdef VIMAGE_GLOBALS extern int nd6_recalc_reachtm_interval; -#endif -#ifdef VIMAGE_GLOBALS static struct ifnet *nd6_defifp; int nd6_defifindex; ==== //depot/projects/vimage/src/sys/netinet6/raw_ip6.c#29 (text+ko) ==== @@ -112,19 +112,14 @@ * Raw interface to IP6 protocol. */ -#ifndef VIMAGE +#ifdef VIMAGE_GLOBALS extern struct inpcbhead ripcb; extern struct inpcbinfo ripcbinfo; - struct rip6stat rip6stat; #endif extern u_long rip_sendspace; extern u_long rip_recvspace; -#ifdef VIMAGE_GLOBALS -struct rip6stat rip6stat; -#endif - /* * Hooks for multicast forwarding. */ ==== //depot/projects/vimage/src/sys/netinet6/scope6.c#20 (text+ko) ==== @@ -50,6 +50,7 @@ #include <netinet6/in6_var.h> #include <netinet6/scope6_var.h> + /* * The scope6_lock protects the global sid default stored in * sid_default below. ==== //depot/projects/vimage/src/sys/netinet6/tcp6_var.h#4 (text+ko) ==== @@ -67,7 +67,7 @@ SYSCTL_DECL(_net_inet6_tcp6); #endif -#ifndef VIMAGE +#ifdef VIMAGE_GLOBALS extern int tcp_v6mssdflt; /* XXX */ #endif ==== //depot/projects/vimage/src/sys/netinet6/vinet6.h#26 (text+ko) ==== @@ -103,7 +103,6 @@ int _ip6_keepfaith; int _ip6stealth; time_t _ip6_log_time; - int _nd6_onlink_ns_rfc4861; int _pmtu_expire; int _pmtu_probe; ==== //depot/projects/vimage/src/sys/netipsec/ipsec.c#30 (text+ko) ==== @@ -184,7 +184,6 @@ CTLFLAG_RW, ipsec_integrity, 0, "Emulate man-in-the-middle attack"); #endif -#ifndef VIMAGE #ifdef INET6 #ifdef VIMAGE_GLOBALS struct ipsecstat ipsec6stat; @@ -194,9 +193,7 @@ int ip6_ah_net_deflev; int ip6_ipsec_ecn; #endif -#endif /* !VIMAGE */ -#ifdef INET6 SYSCTL_DECL(_net_inet6_ipsec6); /* net.inet6.ipsec6 */ @@ -2030,38 +2027,10 @@ { INIT_VNET_IPSEC(curvnet); - #ifdef IPSEC_DEBUG - V_ipsec_debug = 1; - #else - V_ipsec_debug = 0; - #endif - SECPOLICY_LOCK_INIT(&V_ip4_def_policy); V_ip4_def_policy.refcnt = 1; /* NB: disallow free */ - V_ip4_ah_offsetmask = 0; /* maybe IP_DF? */ - V_ip4_ipsec_dfbit = 0; /* DF bit on encap. 0: clear 1: set 2: copy */ - V_ip4_esp_trans_deflev = IPSEC_LEVEL_USE; - V_ip4_esp_net_deflev = IPSEC_LEVEL_USE; - V_ip4_ah_trans_deflev = IPSEC_LEVEL_USE; - V_ip4_ah_net_deflev = IPSEC_LEVEL_USE; - V_ip4_ipsec_ecn = 0; - - V_crypto_support = CRYPTOCAP_F_HARDWARE | CRYPTOCAP_F_SOFTWARE; -#ifdef REGRESSION - V_ipsec_replay = 0; - V_ipsec_integrity = 0; -#endif - -#ifdef INET6 - V_ip6_esp_trans_deflev = IPSEC_LEVEL_USE; - V_ip6_esp_net_deflev = IPSEC_LEVEL_USE; - V_ip6_ah_trans_deflev = IPSEC_LEVEL_USE; - V_ip6_ah_net_deflev = IPSEC_LEVEL_USE; - V_ip6_ipsec_ecn = 0; /* ECN ignore(-1)/forbidden(0)/allowed(1) */ -#endif - - return 0; + return (0); } /* XXX finish this! */ @@ -2070,7 +2039,7 @@ vnet_ipsec_idetach(unused) const void *unused; { - return 0; + return (0); } #endif SYSINIT(ipsec, SI_SUB_PROTO_DOMAIN, SI_ORDER_FIRST, ipsec_attach, NULL); ==== //depot/projects/vimage/src/sys/netipsec/key.c#29 (text+ko) ==== @@ -130,7 +130,6 @@ static int ipsec_esp_keymin; static int ipsec_esp_auth; static int ipsec_ah_keymin; -static u_int32_t acq_seq = 0; static LIST_HEAD(_sptree, secpolicy) sptree[IPSEC_DIR_MAX]; /* SPD */ static LIST_HEAD(_sahtree, secashead) sahtree; /* SAD */ @@ -190,7 +189,6 @@ static const u_int saorder_state_valid_prefer_new[] = { SADB_SASTATE_MATURE, SADB_SASTATE_DYING, }; -#ifndef VIMAGE static u_int saorder_state_alive[] = { /* except DEAD */ SADB_SASTATE_MATURE, SADB_SASTATE_DYING, SADB_SASTATE_LARVAL @@ -199,7 +197,6 @@ SADB_SASTATE_MATURE, SADB_SASTATE_DYING, SADB_SASTATE_LARVAL, SADB_SASTATE_DEAD }; -#endif static const int minsize[] = { sizeof(struct sadb_msg), /* SADB_EXT_RESERVED */ @@ -7209,14 +7206,6 @@ V_ipsec_esp_auth = 0; V_ipsec_ah_keymin = 128; - V_saorder_state_alive[0] = SADB_SASTATE_MATURE; - V_saorder_state_alive[1] = SADB_SASTATE_DYING; - V_saorder_state_alive[2] = SADB_SASTATE_LARVAL; - V_saorder_state_any[0] = SADB_SASTATE_MATURE; - V_saorder_state_any[1] = SADB_SASTATE_DYING; - V_saorder_state_any[2] = SADB_SASTATE_LARVAL; - V_saorder_state_any[3] = SADB_SASTATE_DEAD; - #ifdef VIMAGE if (IS_DEFAULT_VNET(curvnet)) { #endif ==== //depot/projects/vimage/src/sys/netipsec/keysock.c#19 (text+ko) ==== @@ -66,7 +66,6 @@ #include <machine/stdarg.h> -#ifndef VIMAGE struct key_cb { int key_count; int any_count; @@ -75,9 +74,7 @@ #ifdef VIMAGE_GLOBALS static struct key_cb key_cb; struct pfkeystat pfkeystat; -#endif - -static struct sockaddr key_src = { 2, PF_KEY, }; +static struct sockaddr key_src; #endif static int key_sendup0 __P((struct rawcb *, struct mbuf *, int)); ==== //depot/projects/vimage/src/sys/netipsec/vipsec.h#17 (text+ko) ==== @@ -141,7 +141,7 @@ #define V_ip4_esp_trans_deflev VNET_IPSEC(ip4_esp_trans_deflev) #define V_ip4_ipsec_dfbit VNET_IPSEC(ip4_ipsec_dfbit) #define V_ip4_ipsec_ecn VNET_IPSEC(ip4_ipsec_ecn) -#define V_ip6_ah_net_deflev VNET_IPSEC(ip6_ah_net_deflev) +#define V_ip6_ah_net_deflev VNET_IPSEC(ip6_ah_net_deflev) #define V_ip6_ah_trans_deflev VNET_IPSEC(ip6_ah_trans_deflev) #define V_ip6_esp_net_deflev VNET_IPSEC(ip6_esp_net_deflev) #define V_ip6_esp_randpad VNET_IPSEC(ip6_esp_randpad) ==== //depot/projects/vimage/src/sys/netipsec/xform_ah.c#21 (text+ko) ==== ==== //depot/projects/vimage/src/sys/netipsec/xform_esp.c#20 (text+ko) ==== @@ -997,13 +997,13 @@ { INIT_VNET_IPSEC(curvnet); - V_esp_enable = 1; - V_esp_max_ivlen = 0; - #define MAXIV(xform) \ if (xform.blocksize > V_esp_max_ivlen) \ V_esp_max_ivlen = xform.blocksize \ + V_esp_enable = 1; + V_esp_max_ivlen = 0; + MAXIV(enc_xform_des); /* SADB_EALG_DESCBC */ MAXIV(enc_xform_3des); /* SADB_EALG_3DESCBC */ MAXIV(enc_xform_rijndael128); /* SADB_X_EALG_AES */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200811260037.mAQ0blxs043001>