* Fast timeout handler (per-vnet). * Sends are shuffled off to a netisr to deal with Giant. * * VIMAGE: Assume caller has set up our curvnet. */
| 1681 | * VIMAGE: Assume caller has set up our curvnet. |
| 1682 | */ |
| 1683 | static void |
| 1684 | igmp_fasttimo_vnet(void) |
| 1685 | { |
| 1686 | struct mbufq scq; /* State-change packets */ |
| 1687 | struct mbufq qrq; /* Query response packets */ |
| 1688 | struct ifnet *ifp; |
| 1689 | struct igmp_ifsoftc *igi; |
| 1690 | struct ifmultiaddr *ifma, *next; |
| 1691 | struct in_multi *inm; |
| 1692 | struct in_multi_head inm_free_tmp; |
| 1693 | int loop, uri_fasthz; |
| 1694 | |
| 1695 | loop = 0; |
| 1696 | uri_fasthz = 0; |
| 1697 | |
| 1698 | /* |
| 1699 | * Quick check to see if any work needs to be done, in order to |
| 1700 | * minimize the overhead of fasttimo processing. |
| 1701 | * SMPng: XXX Unlocked reads. |
| 1702 | */ |
| 1703 | if (!V_current_state_timers_running && |
| 1704 | !V_interface_timers_running && |
| 1705 | !V_state_change_timers_running) |
| 1706 | return; |
| 1707 | |
| 1708 | SLIST_INIT(&inm_free_tmp); |
| 1709 | IN_MULTI_LIST_LOCK(); |
| 1710 | IGMP_LOCK(); |
| 1711 | |
| 1712 | /* |
| 1713 | * IGMPv3 General Query response timer processing. |
| 1714 | */ |
| 1715 | if (V_interface_timers_running) { |
| 1716 | CTR1(KTR_IGMPV3, "%s: interface timers running", __func__); |
| 1717 | |
| 1718 | V_interface_timers_running = 0; |
| 1719 | LIST_FOREACH(igi, &V_igi_head, igi_link) { |
| 1720 | if (igi->igi_v3_timer == 0) { |
| 1721 | /* Do nothing. */ |
| 1722 | } else if (--igi->igi_v3_timer == 0) { |
| 1723 | igmp_v3_dispatch_general_query(igi); |
| 1724 | } else { |
| 1725 | V_interface_timers_running = 1; |
| 1726 | } |
| 1727 | } |
| 1728 | } |
| 1729 | |
| 1730 | if (!V_current_state_timers_running && |
| 1731 | !V_state_change_timers_running) |
| 1732 | goto out_locked; |
| 1733 | |
| 1734 | V_current_state_timers_running = 0; |
| 1735 | V_state_change_timers_running = 0; |
| 1736 | |
| 1737 | CTR1(KTR_IGMPV3, "%s: state change timers running", __func__); |
| 1738 | |
| 1739 | /* |
| 1740 | * IGMPv1/v2/v3 host report and state-change timer processing. |
no test coverage detected