Date: Wed, 4 Mar 2009 15:12:02 GMT From: Marko Zec <zec@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 158673 for review Message-ID: <200903041512.n24FC2pY011308@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=158673 Change 158673 by zec@zec_amdx2 on 2009/03/04 15:11:08 Nuke V_udp_ipi_zone Affected files ... .. //depot/projects/vimage/src/sys/netinet/udp_usrreq.c#49 edit .. //depot/projects/vimage/src/sys/netinet/vinet.h#51 edit Differences ... ==== //depot/projects/vimage/src/sys/netinet/udp_usrreq.c#49 (text+ko) ==== @@ -152,16 +152,12 @@ static int udp_output(struct inpcb *, struct mbuf *, struct sockaddr *, struct mbuf *, struct thread *); -#ifdef VIMAGE_GLOBALS -static struct uma_zone *udp_ipi_zone; -#endif - static void udp_zone_change(void *tag) { INIT_VNET_INET(curvnet); /* XXX */ - uma_zone_set_max(V_udp_ipi_zone, maxsockets); + uma_zone_set_max(V_udbinfo.ipi_zone, maxsockets); } static int @@ -181,12 +177,8 @@ V_udp_blackhole = 0; - V_udp_ipi_zone = uma_zcreate("udpcb", sizeof(struct inpcb), NULL, - NULL, udp_inpcb_init, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE); - uma_zone_set_max(V_udp_ipi_zone, maxsockets); EVENTHANDLER_REGISTER(maxsockets_change, udp_zone_change, NULL, EVENTHANDLER_PRI_ANY); - V_udbinfo.ipi_vnet = curvnet; INP_INFO_LOCK_INIT(&V_udbinfo, "udp"); LIST_INIT(&V_udb); @@ -195,7 +187,10 @@ &V_udbinfo.ipi_hashmask); V_udbinfo.ipi_porthashbase = hashinit(UDBHASHSIZE, M_PCB, &V_udbinfo.ipi_porthashmask); - V_udbinfo.ipi_zone = V_udp_ipi_zone; + V_udbinfo.ipi_zone = uma_zcreate("udpcb", sizeof(struct inpcb), NULL, + NULL, udp_inpcb_init, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE); + V_udbinfo.ipi_vnet = curvnet; + uma_zone_set_max(V_udbinfo.ipi_zone, maxsockets); } #ifdef VIMAGE ==== //depot/projects/vimage/src/sys/netinet/vinet.h#51 (text+ko) ==== @@ -90,7 +90,6 @@ struct uma_zone *_tcpcb_zone; struct uma_zone *_tcptw_zone; struct uma_zone *_sack_hole_zone; - struct uma_zone *_udp_ipi_zone; struct tcp_syncache _tcp_syncache; int _tcp_syncookies; @@ -348,7 +347,6 @@ #define V_udb VNET_INET(udb) #define V_udbinfo VNET_INET(udbinfo) #define V_udp_blackhole VNET_INET(udp_blackhole) -#define V_udp_ipi_zone VNET_INET(udp_ipi_zone) #define V_udpstat VNET_INET(udpstat) #define V_useloopback VNET_INET(useloopback)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200903041512.n24FC2pY011308>
