From owner-p4-projects@FreeBSD.ORG Sat Jul 28 09:18:27 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1CAAC16A420; Sat, 28 Jul 2007 09:18:27 +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 CC7E916A418 for ; Sat, 28 Jul 2007 09:18:26 +0000 (UTC) (envelope-from zec@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id CDFC713C461 for ; Sat, 28 Jul 2007 09:18:26 +0000 (UTC) (envelope-from zec@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 l6S9IQPS067001 for ; Sat, 28 Jul 2007 09:18:26 GMT (envelope-from zec@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l6S9IQ68066998 for perforce@freebsd.org; Sat, 28 Jul 2007 09:18:26 GMT (envelope-from zec@FreeBSD.org) Date: Sat, 28 Jul 2007 09:18:26 GMT Message-Id: <200707280918.l6S9IQ68066998@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to zec@FreeBSD.org using -f From: Marko Zec To: Perforce Change Reviews Cc: Subject: PERFORCE change 124251 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: Sat, 28 Jul 2007 09:18:27 -0000 http://perforce.freebsd.org/chv.cgi?CH=124251 Change 124251 by zec@zec_tpx32 on 2007/07/28 09:17:50 Unbreak kernel build in a followup to a clumsy IFC. Affected files ... .. //depot/projects/vimage/src/sys/netinet/tcp_syncache.c#15 edit .. //depot/projects/vimage/src/sys/netinet/tcp_syncache.h#5 edit .. //depot/projects/vimage/src/sys/netinet6/udp6_usrreq.c#15 edit .. //depot/projects/vimage/src/sys/netinet6/vinet6.h#7 edit Differences ... ==== //depot/projects/vimage/src/sys/netinet/tcp_syncache.c#15 (text+ko) ==== @@ -1537,12 +1537,13 @@ int syncache_pcbcount(void) { + INIT_VNET_INET(curvnet); struct syncache_head *sch; int count, i; - for (count = 0, i = 0; i < tcp_syncache.hashsize; i++) { + for (count = 0, i = 0; i < V_tcp_syncache.hashsize; i++) { /* No need to lock for a read. */ - sch = &tcp_syncache.hashbase[i]; + sch = &V_tcp_syncache.hashbase[i]; count += sch->sch_length; } return count; @@ -1560,13 +1561,14 @@ int syncache_pcblist(struct sysctl_req *req, int max_pcbs, int *pcbs_exported) { + INIT_VNET_INET(curvnet); struct xtcpcb xt; struct syncache *sc; struct syncache_head *sch; int count, error, i; - for (count = 0, error = 0, i = 0; i < tcp_syncache.hashsize; i++) { - sch = &tcp_syncache.hashbase[i]; + for (count = 0, error = 0, i = 0; i < V_tcp_syncache.hashsize; i++) { + sch = &V_tcp_syncache.hashbase[i]; SCH_LOCK(sch); TAILQ_FOREACH(sc, &sch->sch_bucket, sc_hash) { if (count >= max_pcbs) { ==== //depot/projects/vimage/src/sys/netinet/tcp_syncache.h#5 (text+ko) ==== @@ -34,6 +34,19 @@ #ifndef _NETINET_TCP_SYNCACHE_H_ #define _NETINET_TCP_SYNCACHE_H_ +#ifdef _KERNEL + +void syncache_init(void); +void syncache_unreach(struct in_conninfo *, struct tcphdr *); +int syncache_expand(struct in_conninfo *, struct tcpopt *, + struct tcphdr *, struct socket **, struct mbuf *); +void syncache_add(struct in_conninfo *, struct tcpopt *, + struct tcphdr *, struct inpcb *, struct socket **, struct mbuf *); +void syncache_chkrst(struct in_conninfo *, struct tcphdr *); +void syncache_badack(struct in_conninfo *); +int syncache_pcbcount(void); +int syncache_pcblist(struct sysctl_req *req, int max_pcbs, + int *pcbs_exported); struct syncache { TAILQ_ENTRY(syncache) sc_hash; @@ -95,4 +108,5 @@ u_int hash_secret; }; +#endif /* _KERNEL */ #endif /* !_NETINET_TCP_SYNCACHE_H_ */ ==== //depot/projects/vimage/src/sys/netinet6/udp6_usrreq.c#15 (text+ko) ==== @@ -486,13 +486,14 @@ 0, udp6_getcred, "S,xucred", "Get the xucred of a UDP6 connection"); #define in6pcb inpcb -#define udp6stat udpstat +#define V_udp6stat V_udpstat #define udp6s_opackets udps_opackets static int udp6_output(struct in6pcb *in6p, struct mbuf *m, struct sockaddr *addr6, struct mbuf *control, struct thread *td) { + INIT_VNET_INET(curvnet); u_int32_t ulen = m->m_pkthdr.len; u_int32_t plen = sizeof(struct udphdr) + ulen; struct ip6_hdr *ip6; @@ -689,7 +690,7 @@ flags = 0; - udp6stat.udp6s_opackets++; + V_udp6stat.udp6s_opackets++; error = ip6_output(m, optp, NULL, flags, in6p->in6p_moptions, NULL, in6p); break; ==== //depot/projects/vimage/src/sys/netinet6/vinet6.h#7 (text+ko) ==== @@ -52,7 +52,6 @@ #define VNET_INET6(sym) VSYM(vnet_inet6, sym) - #ifdef VIMAGE struct vnet_inet6 { struct vnet *parent_vnet;