Date: Sat, 28 Jul 2007 09:18:26 GMT From: Marko Zec <zec@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 124251 for review Message-ID: <200707280918.l6S9IQ68066998@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200707280918.l6S9IQ68066998>