Date: Fri, 21 May 2010 14:05:45 GMT From: Ivor Prebeg <iprebeg@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 178588 for review Message-ID: <201005211405.o4LE5jrZ035935@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/@@178588?ac=10 Change 178588 by iprebeg@iprebeg_zeus on 2010/05/21 14:05:16 Removed ip_mrouter_reset Affected files ... .. //depot/projects/vimage/src/sys/netinet/ip_mroute.c#40 edit Differences ... ==== //depot/projects/vimage/src/sys/netinet/ip_mroute.c#40 (text+ko) ==== @@ -605,23 +605,6 @@ } static void -ip_mrouter_reset(void) -{ - - /* - V_pim_assert_enabled = 0; - V_mrt_api_config = 0; - - callout_init(&V_expire_upcalls_ch, CALLOUT_MPSAFE); - - V_bw_upcalls_n = 0; - bzero(V_bw_meter_timers, sizeof(V_bw_meter_timers)); - callout_init(&V_bw_upcalls_ch, CALLOUT_MPSAFE); - callout_init(&V_bw_meter_ch, CALLOUT_MPSAFE); - */ -} - -static void if_detached_event(void *arg __unused, struct ifnet *ifp) { vifi_t vifi; @@ -724,7 +707,9 @@ struct ifnet *ifp; struct ifreq ifr; + printf ("V_mcast: before MROUTER LOCK\n"); MROUTER_LOCK(); + printf ("V_mcast: after MROUTER LOCK\n"); if (V_ip_mrouter == NULL) { MROUTER_UNLOCK(); @@ -739,7 +724,8 @@ V_mrt_api_config = 0; VIF_LOCK(); - + + printf ("V_mcast: after VIF LOCK, before numvifs loop\n"); /* * For each phyint in use, disable promiscuous reception of all IP * multicasts. @@ -759,12 +745,15 @@ bzero((caddr_t)V_viftable, sizeof(V_viftable)); V_numvifs = 0; V_pim_assert_enabled = 0; - + + printf ("V_mcast: before VIF UNLOCK, after numvifs loop\n"); VIF_UNLOCK(); + printf ("V_mcast: after VIF UNLOCK, before stopping callouts\n"); callout_stop(&V_expire_upcalls_ch); callout_stop(&V_bw_upcalls_ch); callout_stop(&V_bw_meter_ch); + printf ("V_mcast: after stopping callouts\n"); MFC_LOCK(); @@ -2831,18 +2820,15 @@ { MALLOC(V_nexpire, u_char *, mfchashsize, M_MRTABLE, M_WAITOK|M_ZERO); - - /* from ip_mrouter_reset */ - V_pim_assert_enabled = 0; - V_mrt_api_config = 0; - - callout_init(&V_expire_upcalls_ch, CALLOUT_MPSAFE); - - V_bw_upcalls_n = 0; - bzero(V_bw_meter_timers, sizeof(V_bw_meter_timers)); - callout_init(&V_bw_upcalls_ch, CALLOUT_MPSAFE); - callout_init(&V_bw_meter_ch, CALLOUT_MPSAFE); - /* from ip_mrouter_reset */ + V_pim_assert_enabled = 0; + V_mrt_api_config = 0; + + callout_init(&V_expire_upcalls_ch, CALLOUT_MPSAFE); + + V_bw_upcalls_n = 0; + bzero(V_bw_meter_timers, sizeof(V_bw_meter_timers)); + callout_init(&V_bw_upcalls_ch, CALLOUT_MPSAFE); + callout_init(&V_bw_meter_ch, CALLOUT_MPSAFE); } VNET_SYSINIT(vnet_mroute_init, SI_SUB_PSEUDO, SI_ORDER_MIDDLE, vnet_mroute_init, @@ -2852,9 +2838,7 @@ vnet_mroute_uninit(const void *unused __unused) { -#ifndef VIMAGE X_ip_mrouter_done(); -#endif FREE(V_nexpire, M_MRTABLE); V_nexpire = NULL; } @@ -2892,7 +2876,6 @@ pim_squelch_wholepkt = 0; TUNABLE_ULONG_FETCH("net.inet.pim.squelch_wholepkt", &pim_squelch_wholepkt); - ip_mrouter_reset(); pim_encap_cookie = encap_attach_func(AF_INET, IPPROTO_PIM, pim_encapcheck, &in_pim_protosw, NULL);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201005211405.o4LE5jrZ035935>