From owner-p4-projects@FreeBSD.ORG Fri Jun 6 21:47:56 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B9B13106566B; Fri, 6 Jun 2008 21:47:56 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7C5541065680 for ; Fri, 6 Jun 2008 21:47:56 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 7B0F58FC1C for ; Fri, 6 Jun 2008 21:47:56 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m56Lluum002364 for ; Fri, 6 Jun 2008 21:47:56 GMT (envelope-from julian@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m56LluRP002362 for perforce@freebsd.org; Fri, 6 Jun 2008 21:47:56 GMT (envelope-from julian@freebsd.org) Date: Fri, 6 Jun 2008 21:47:56 GMT Message-Id: <200806062147.m56LluRP002362@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to julian@freebsd.org using -f From: Julian Elischer To: Perforce Change Reviews Cc: Subject: PERFORCE change 143056 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jun 2008 21:47:57 -0000 http://perforce.freebsd.org/chv.cgi?CH=143056 Change 143056 by julian@julian_trafmon1 on 2008/06/06 21:47:53 Patches cleanly Affected files ... .. //depot/projects/vimage-commit/V_#3 edit Differences ... ==== //depot/projects/vimage-commit/V_#3 (text+ko) ==== @@ -1021,10 +1021,6 @@ #include #include #include -@@ -190,6 +213,7 @@ - static int - netioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td) - { @@ -223,6 +247,7 @@ static int netkqfilter(struct cdev *dev, struct knote *kn) @@ -2354,9 +2350,6 @@ struct m_tag *tag; /* - netisr_queue(NETISR_ROUTE, m); /* mbuf is free'd on failure. */ - } - @@ -1139,6 +1154,7 @@ static int sysctl_iflist(int af, struct walkarg *w) @@ -2776,10 +2769,6 @@ /* Link together node and private info */ NG_NODE_SET_PRIVATE(node, priv); -@@ -558,6 +585,24 @@ - return (0); - } - @@ -765,13 +816,16 @@ static int ng_iface_shutdown(node_p node) @@ -3190,6 +3179,7 @@ +SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_ip, OID_AUTO, subnets_are_local, + CTLFLAG_RW, subnetsarelocal, 0, + "Treat all subnets as directly connected"); ++static int sameprefixcarponly = 0; +SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_ip, OID_AUTO, same_prefix_carp_only, + CTLFLAG_RW, sameprefixcarponly, 0, + "Refuse to create same prefixes on different interfaces"); @@ -5258,6 +5248,7 @@ #include #include +@@ -81,12 +87,13 @@ static void ifaddr_change(void *arg __unused, struct ifnet *ifp) { @@ -5794,7 +5785,7 @@ #include #include #include -@@ -84,34 +88,33 @@ +@@ -84,34 +88,34 @@ #include @@ -9422,7 +9413,7 @@ #include #include #include -@@ -123,25 +127,27 @@ +@@ -123,25 +127,24 @@ extern struct uma_zone *sack_hole_zone; @@ -9637,7 +9628,7 @@ uma_zone_t sack_hole_zone; -@@ -253,7 +274,28 @@ +@@ -253,7 +274,8 @@ void tcp_init(void) { @@ -9646,7 +9637,7 @@ int hashsize = TCBHASHSIZE; tcp_delacktime = TCPTV_DELACK; tcp_keepinit = TCPTV_KEEP_INIT; -@@ -265,25 +307,25 @@ +@@ -265,25 +307,23 @@ if (tcp_rexmit_min < 1) tcp_rexmit_min = 1; tcp_rexmit_slop = TCPTV_CPU_VAR; @@ -9678,7 +9669,6 @@ + V_tcbinfo.ipi_porthashbase = hashinit(hashsize, M_PCB, + &V_tcbinfo.ipi_porthashmask); + V_tcbinfo.ipi_zone = tcp_ipi_zone; -+ V_tcbinfo.ipi_vnet = curvnet; #ifdef INET6 #define TCP_MINPROTOHDR (sizeof(struct ip6_hdr) + sizeof(struct tcphdr)) #else /* INET6 */ @@ -10350,21 +10340,7 @@ #include #include #include -@@ -193,50 +144,55 @@ - #define TCP_SYNCACHE_HASHSIZE 512 - #define TCP_SYNCACHE_BUCKETLIMIT 30 - - struct tcp_syncache { - struct syncache_head *hashbase; - uma_zone_t zone; - u_int hashsize; - u_int hashmask; - u_int bucket_limit; - u_int cache_count; /* XXX: unprotected */ - u_int cache_limit; - u_int rexmt_limit; - u_int hash_secret; - }; +@@ -207,36 +158,42 @@ static struct tcp_syncache tcp_syncache; SYSCTL_NODE(_net_inet_tcp, OID_AUTO, syncache, CTLFLAG_RW, 0, "TCP SYN cache"); @@ -10399,7 +10375,7 @@ + rexmtlimit, CTLFLAG_RW, + tcp_syncache.rexmt_limit, 0, "Limit on SYN/ACK retransmissions"); --int tcp_sc_rst_sock_fail = 1; + int tcp_sc_rst_sock_fail = 1; -SYSCTL_INT(_net_inet_tcp_syncache, OID_AUTO, rst_on_sock_fail, CTLFLAG_RW, - &tcp_sc_rst_sock_fail, 0, "Send reset on socket allocation failure"); +SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_tcp_syncache, OID_AUTO, @@ -10421,7 +10397,7 @@ (inc)->inc6_faddr.s6_addr32[0] ^ \ (inc)->inc6_faddr.s6_addr32[3] ^ \ (inc)->inc_fport ^ (inc)->inc_lport) & mask) -@@ -260,62 +208,67 @@ +@@ -260,62 +208,66 @@ static void syncache_free(struct syncache *sc) { @@ -10453,7 +10429,6 @@ + V_tcp_syncache.bucket_limit = TCP_SYNCACHE_BUCKETLIMIT; + V_tcp_syncache.rexmt_limit = SYNCACHE_MAXREXMTS; + V_tcp_syncache.hash_secret = arc4random(); -+ V_tcp_sc_rst_sock_fail = 1; TUNABLE_INT_FETCH("net.inet.tcp.syncache.hashsize", - &tcp_syncache.hashsize); @@ -10505,7 +10480,6 @@ /* Create the syncache entry zone. */ - tcp_syncache.zone = uma_zcreate("syncache", sizeof(struct syncache), -+ /* XXX one zone for all vnets should do fine - revisit!!! */ + V_tcp_syncache.zone = uma_zcreate("syncache", sizeof(struct syncache), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); - uma_zone_set_max(tcp_syncache.zone, tcp_syncache.cache_limit); @@ -11556,7 +11530,7 @@ #include #include -@@ -53,14 +54,16 @@ +@@ -53,14 +54,15 @@ #include #include #include @@ -13802,25 +13776,6 @@ #include #include #include -@@ -60,18 +66,13 @@ - #include - #include - - unsigned long in6_maxmtu = 0; - - #ifdef IP6_AUTO_LINKLOCAL - int ip6_auto_linklocal = IP6_AUTO_LINKLOCAL; - #else - int ip6_auto_linklocal = 1; /* enable by default */ - #endif - - struct callout in6_tmpaddrtimer_ch; - - extern struct inpcbinfo udbinfo; - extern struct inpcbinfo ripcbinfo; - - static int get_rand_ifid(struct ifnet *, struct in6_addr *); - static int generate_tmp_ifid(u_int8_t *, const u_int8_t *, u_int8_t *); @@ -103,9 +104,10 @@ static int get_rand_ifid(struct ifnet *ifp, struct in6_addr *in6) @@ -19674,14 +19629,16 @@ m_freem(m); return ENOENT; } -@@ -199,8 +204,8 @@ +@@ -199,7 +204,7 @@ DPRINTF(("%s: attempted to use uninitialized SA %s/%08lx/%u\n", __func__, ipsec_address(&dst_address), (u_long) ntohl(spi), sproto)); - IPSEC_ISTAT(sproto, espstat.esps_noxform, ahstat.ahs_noxform, - ipcompstat.ipcomps_noxform); + IPSEC_ISTAT(sproto, V_espstat.esps_noxform, V_ahstat.ahs_noxform, ++ V_ipcompstat.ipcomps_noxform); return ENXIO; + } @@ -276,6 +281,7 @@ ipsec4_common_input_cb(struct mbuf *m, struct secasvar *sav, int skip, int protoff, struct m_tag *mt) @@ -19738,7 +19695,7 @@ error = EACCES; goto bad; } -@@ -380,9 +386,9 @@ +@@ -380,8 +386,8 @@ struct ip6_hdr ip6n; if (m->m_pkthdr.len - skip < sizeof(struct ip6_hdr)) {