Lines Matching full:pg
83 struct net_bridge_port_group *pg);
209 br_multicast_pg_to_port_ctx(const struct net_bridge_port_group *pg) in br_multicast_pg_to_port_ctx() argument
211 struct net_bridge_mcast_port *pmctx = &pg->key.port->multicast_ctx; in br_multicast_pg_to_port_ctx()
214 lockdep_assert_held_once(&pg->key.port->br->multicast_lock); in br_multicast_pg_to_port_ctx()
217 if (!pg->key.addr.vid || in br_multicast_pg_to_port_ctx()
218 !br_opt_get(pg->key.port->br, BROPT_MCAST_VLAN_SNOOPING_ENABLED)) in br_multicast_pg_to_port_ctx()
228 vlan = br_vlan_find(nbp_vlan_group_rcu(pg->key.port), pg->key.addr.vid); in br_multicast_pg_to_port_ctx()
293 struct net_bridge_port_group *pg, in __fwd_add_star_excl() argument
302 sg_key.port = pg->key.port; in __fwd_add_star_excl()
308 sg_ip, pg->eth_addr, in __fwd_add_star_excl()
317 static void __fwd_del_star_excl(struct net_bridge_port_group *pg, in __fwd_del_star_excl() argument
321 struct net_bridge *br = pg->key.port->br; in __fwd_del_star_excl()
325 sg_key.port = pg->key.port; in __fwd_del_star_excl()
343 void br_multicast_star_g_handle_mode(struct net_bridge_port_group *pg, in br_multicast_star_g_handle_mode() argument
346 struct net_bridge *br = pg->key.port->br; in br_multicast_star_g_handle_mode()
352 if (WARN_ON(!br_multicast_is_star_g(&pg->key.addr))) in br_multicast_star_g_handle_mode()
355 mp = br_mdb_ip_get(br, &pg->key.addr); in br_multicast_star_g_handle_mode()
358 pmctx = br_multicast_pg_to_port_ctx(pg); in br_multicast_star_g_handle_mode()
363 sg_ip = pg->key.addr; in br_multicast_star_g_handle_mode()
370 if (pg_lst == pg) in br_multicast_star_g_handle_mode()
378 __fwd_del_star_excl(pg, &sg_ip); in br_multicast_star_g_handle_mode()
381 __fwd_add_star_excl(pmctx, pg, &sg_ip); in br_multicast_star_g_handle_mode()
410 struct net_bridge_port_group *pg; in br_multicast_star_g_host_state() local
418 for (pg = mlock_dereference(star_mp->ports, br); in br_multicast_star_g_host_state()
419 pg; in br_multicast_star_g_host_state()
420 pg = mlock_dereference(pg->next, br)) { in br_multicast_star_g_host_state()
423 hlist_for_each_entry(src_ent, &pg->src_list, node) { in br_multicast_star_g_host_state()
475 struct net_bridge_port_group *pg; in br_multicast_sg_add_exclude_ports() local
487 for (pg = mlock_dereference(star_mp->ports, br); in br_multicast_sg_add_exclude_ports()
488 pg; in br_multicast_sg_add_exclude_ports()
489 pg = mlock_dereference(pg->next, br)) { in br_multicast_sg_add_exclude_ports()
492 if (pg == sg || pg->filter_mode == MCAST_INCLUDE) in br_multicast_sg_add_exclude_ports()
495 sg_key.port = pg->key.port; in br_multicast_sg_add_exclude_ports()
499 pmctx = br_multicast_pg_to_port_ctx(pg); in br_multicast_sg_add_exclude_ports()
527 pmctx = br_multicast_pg_to_port_ctx(src->pg); in br_multicast_fwd_src_add()
531 sg_ip = src->pg->key.addr; in br_multicast_fwd_src_add()
535 src->pg->eth_addr, MCAST_INCLUDE, false, in br_multicast_fwd_src_add()
549 star_mp = br_mdb_ip_get(src->br, &src->pg->key.addr); in br_multicast_fwd_src_add()
559 struct net_bridge_port_group *p, *pg = src->pg; in br_multicast_fwd_src_remove() local
565 sg_ip = pg->key.addr; in br_multicast_fwd_src_remove()
575 if (!br_port_group_equal(p, pg->key.port, pg->eth_addr)) in br_multicast_fwd_src_remove()
601 sg_key.addr = src->pg->key.addr; in br_multicast_fwd_src_handle()
603 sg_key.port = src->pg->key.port; in br_multicast_fwd_src_handle()
680 struct net_bridge *br = src->pg->key.port->br; in __br_multicast_del_group_src()
683 src->pg->src_ents--; in __br_multicast_del_group_src()
792 struct net_bridge_port_group *pg; in br_multicast_destroy_port_group() local
794 pg = container_of(gc, struct net_bridge_port_group, mcast_gc); in br_multicast_destroy_port_group()
795 WARN_ON(!hlist_unhashed(&pg->mglist)); in br_multicast_destroy_port_group()
796 WARN_ON(!hlist_empty(&pg->src_list)); in br_multicast_destroy_port_group()
798 timer_shutdown_sync(&pg->rexmit_timer); in br_multicast_destroy_port_group()
799 timer_shutdown_sync(&pg->timer); in br_multicast_destroy_port_group()
800 kfree_rcu(pg, rcu); in br_multicast_destroy_port_group()
804 struct net_bridge_port_group *pg, in br_multicast_del_pg() argument
807 struct net_bridge *br = pg->key.port->br; in br_multicast_del_pg()
811 rcu_assign_pointer(*pp, pg->next); in br_multicast_del_pg()
812 hlist_del_init(&pg->mglist); in br_multicast_del_pg()
813 br_multicast_eht_clean_sets(pg); in br_multicast_del_pg()
814 hlist_for_each_entry_safe(ent, tmp, &pg->src_list, node) in br_multicast_del_pg()
816 br_mdb_notify(br->dev, mp, pg, RTM_DELMDB); in br_multicast_del_pg()
818 rhashtable_remove_fast(&br->sg_port_tbl, &pg->rhnode, in br_multicast_del_pg()
822 br_multicast_star_g_handle_mode(pg, MCAST_INCLUDE); in br_multicast_del_pg()
824 br_multicast_port_ngroups_dec(pg->key.port, pg->key.addr.vid); in br_multicast_del_pg()
825 hlist_add_head(&pg->mcast_gc.gc_node, &br->mcast_gc_list); in br_multicast_del_pg()
833 struct net_bridge_port_group *pg) in br_multicast_find_del_pg() argument
839 mp = br_mdb_ip_get(br, &pg->key.addr); in br_multicast_find_del_pg()
846 if (p != pg) in br_multicast_find_del_pg()
849 br_multicast_del_pg(mp, pg, pp); in br_multicast_find_del_pg()
858 struct net_bridge_port_group *pg = from_timer(pg, t, timer); in br_multicast_port_group_expired() local
860 struct net_bridge *br = pg->key.port->br; in br_multicast_port_group_expired()
865 if (!netif_running(br->dev) || timer_pending(&pg->timer) || in br_multicast_port_group_expired()
866 hlist_unhashed(&pg->mglist) || pg->flags & MDB_PG_FLAGS_PERMANENT) in br_multicast_port_group_expired()
869 changed = !!(pg->filter_mode == MCAST_EXCLUDE); in br_multicast_port_group_expired()
870 pg->filter_mode = MCAST_INCLUDE; in br_multicast_port_group_expired()
871 hlist_for_each_entry_safe(src_ent, tmp, &pg->src_list, node) { in br_multicast_port_group_expired()
878 if (hlist_empty(&pg->src_list)) { in br_multicast_port_group_expired()
879 br_multicast_find_del_pg(br, pg); in br_multicast_port_group_expired()
881 struct net_bridge_mdb_entry *mp = br_mdb_ip_get(br, &pg->key.addr); in br_multicast_port_group_expired()
883 if (changed && br_multicast_is_star_g(&pg->key.addr)) in br_multicast_port_group_expired()
884 br_multicast_star_g_handle_mode(pg, MCAST_INCLUDE); in br_multicast_port_group_expired()
888 br_mdb_notify(br->dev, mp, pg, RTM_NEWMDB); in br_multicast_port_group_expired()
927 struct net_bridge_port_group *pg, in br_ip4_multicast_alloc_query() argument
933 struct net_bridge_port *p = pg ? pg->key.port : NULL; in br_ip4_multicast_alloc_query()
950 if (pg && with_srcs) { in br_ip4_multicast_alloc_query()
953 hlist_for_each_entry(ent, &pg->src_list, node) { in br_ip4_multicast_alloc_query()
1037 if (!pg || !with_srcs) in br_ip4_multicast_alloc_query()
1041 hlist_for_each_entry(ent, &pg->src_list, node) { in br_ip4_multicast_alloc_query()
1074 struct net_bridge_port_group *pg, in br_ip6_multicast_alloc_query() argument
1081 struct net_bridge_port *p = pg ? pg->key.port : NULL; in br_ip6_multicast_alloc_query()
1100 if (pg && with_srcs) { in br_ip6_multicast_alloc_query()
1103 hlist_for_each_entry(ent, &pg->src_list, node) { in br_ip6_multicast_alloc_query()
1200 if (!pg || !with_srcs) in br_ip6_multicast_alloc_query()
1204 hlist_for_each_entry(ent, &pg->src_list, node) { in br_ip6_multicast_alloc_query()
1239 struct net_bridge_port_group *pg, in br_multicast_alloc_query() argument
1251 return br_ip4_multicast_alloc_query(brmctx, pmctx, pg, in br_multicast_alloc_query()
1266 return br_ip6_multicast_alloc_query(brmctx, pmctx, pg, in br_multicast_alloc_query()
1317 struct net_bridge_port_group *pg; in br_multicast_group_src_expired() local
1325 pg = src->pg; in br_multicast_group_src_expired()
1326 if (pg->filter_mode == MCAST_INCLUDE) { in br_multicast_group_src_expired()
1328 if (!hlist_empty(&pg->src_list)) in br_multicast_group_src_expired()
1330 br_multicast_find_del_pg(br, pg); in br_multicast_group_src_expired()
1340 br_multicast_find_group_src(struct net_bridge_port_group *pg, struct br_ip *ip) in br_multicast_find_group_src() argument
1346 hlist_for_each_entry(ent, &pg->src_list, node) in br_multicast_find_group_src()
1352 hlist_for_each_entry(ent, &pg->src_list, node) in br_multicast_find_group_src()
1363 br_multicast_new_group_src(struct net_bridge_port_group *pg, struct br_ip *src_ip) in br_multicast_new_group_src() argument
1367 if (unlikely(pg->src_ents >= PG_SRC_ENT_LIMIT)) in br_multicast_new_group_src()
1389 grp_src->pg = pg; in br_multicast_new_group_src()
1390 grp_src->br = pg->key.port->br; in br_multicast_new_group_src()
1395 hlist_add_head_rcu(&grp_src->node, &pg->src_list); in br_multicast_new_group_src()
1396 pg->src_ents++; in br_multicast_new_group_src()
1564 struct net_bridge_port_group *pg; in br_multicast_add_group() local
1568 pg = __br_multicast_add_group(brmctx, pmctx, group, src, filter_mode, in br_multicast_add_group()
1571 err = PTR_ERR_OR_ZERO(pg); in br_multicast_add_group()
1782 struct net_bridge_port_group *pg, in __br_multicast_send_query() argument
1798 skb = br_multicast_alloc_query(brmctx, pmctx, pg, ip_dst, group, in __br_multicast_send_query()
1938 struct net_bridge_port_group *pg = from_timer(pg, t, rexmit_timer); in br_multicast_port_group_rexmit() local
1940 struct net_bridge *br = pg->key.port->br; in br_multicast_port_group_rexmit()
1946 if (!netif_running(br->dev) || hlist_unhashed(&pg->mglist) || in br_multicast_port_group_rexmit()
1950 pmctx = br_multicast_pg_to_port_ctx(pg); in br_multicast_port_group_rexmit()
1957 if (pg->key.addr.proto == htons(ETH_P_IP)) in br_multicast_port_group_rexmit()
1967 if (pg->grp_query_rexmit_cnt) { in br_multicast_port_group_rexmit()
1968 pg->grp_query_rexmit_cnt--; in br_multicast_port_group_rexmit()
1969 __br_multicast_send_query(brmctx, pmctx, pg, &pg->key.addr, in br_multicast_port_group_rexmit()
1970 &pg->key.addr, false, 1, NULL); in br_multicast_port_group_rexmit()
1972 __br_multicast_send_query(brmctx, pmctx, pg, &pg->key.addr, in br_multicast_port_group_rexmit()
1973 &pg->key.addr, true, 0, &need_rexmit); in br_multicast_port_group_rexmit()
1975 if (pg->grp_query_rexmit_cnt || need_rexmit) in br_multicast_port_group_rexmit()
1976 mod_timer(&pg->rexmit_timer, jiffies + in br_multicast_port_group_rexmit()
2046 struct net_bridge_port_group *pg; in br_multicast_del_port() local
2051 hlist_for_each_entry_safe(pg, n, &port->mglist, mglist) in br_multicast_del_port()
2052 br_multicast_find_del_pg(br, pg); in br_multicast_del_port()
2088 struct net_bridge_port_group *pg; in __br_multicast_enable_port_ctx() local
2099 hlist_for_each_entry(pg, &pmctx->port->mglist, mglist) { in __br_multicast_enable_port_ctx()
2100 if (pg->key.addr.vid == pmctx->vlan->vid) in __br_multicast_enable_port_ctx()
2118 struct net_bridge_port_group *pg; in __br_multicast_disable_port_ctx() local
2122 hlist_for_each_entry_safe(pg, n, &pmctx->port->mglist, mglist) in __br_multicast_disable_port_ctx()
2123 if (!(pg->flags & MDB_PG_FLAGS_PERMANENT) && in __br_multicast_disable_port_ctx()
2125 pg->key.addr.vid == pmctx->vlan->vid)) in __br_multicast_disable_port_ctx()
2126 br_multicast_find_del_pg(pmctx->port->br, pg); in __br_multicast_disable_port_ctx()
2146 static int __grp_src_delete_marked(struct net_bridge_port_group *pg) in __grp_src_delete_marked() argument
2152 hlist_for_each_entry_safe(ent, tmp, &pg->src_list, node) in __grp_src_delete_marked()
2170 struct net_bridge_port_group *pg) in __grp_src_query_marked_and_rexmit() argument
2181 if (pg->key.addr.proto == htons(ETH_P_IP)) in __grp_src_query_marked_and_rexmit()
2189 hlist_for_each_entry(ent, &pg->src_list, node) { in __grp_src_query_marked_and_rexmit()
2206 __br_multicast_send_query(brmctx, pmctx, pg, &pg->key.addr, in __grp_src_query_marked_and_rexmit()
2207 &pg->key.addr, true, 1, NULL); in __grp_src_query_marked_and_rexmit()
2210 if (!timer_pending(&pg->rexmit_timer) || in __grp_src_query_marked_and_rexmit()
2211 time_after(pg->rexmit_timer.expires, lmi)) in __grp_src_query_marked_and_rexmit()
2212 mod_timer(&pg->rexmit_timer, lmi); in __grp_src_query_marked_and_rexmit()
2217 struct net_bridge_port_group *pg) in __grp_send_query_and_rexmit() argument
2226 if (pg->key.addr.proto == htons(ETH_P_IP)) in __grp_send_query_and_rexmit()
2236 pg->grp_query_rexmit_cnt = brmctx->multicast_last_member_count - 1; in __grp_send_query_and_rexmit()
2237 __br_multicast_send_query(brmctx, pmctx, pg, &pg->key.addr, in __grp_send_query_and_rexmit()
2238 &pg->key.addr, false, 0, NULL); in __grp_send_query_and_rexmit()
2239 if (!timer_pending(&pg->rexmit_timer) || in __grp_send_query_and_rexmit()
2240 time_after(pg->rexmit_timer.expires, lmi)) in __grp_send_query_and_rexmit()
2241 mod_timer(&pg->rexmit_timer, lmi); in __grp_send_query_and_rexmit()
2244 if (pg->filter_mode == MCAST_EXCLUDE && in __grp_send_query_and_rexmit()
2245 (!timer_pending(&pg->timer) || in __grp_send_query_and_rexmit()
2246 time_after(pg->timer.expires, now + br_multicast_lmqt(brmctx)))) in __grp_send_query_and_rexmit()
2247 mod_timer(&pg->timer, now + br_multicast_lmqt(brmctx)); in __grp_send_query_and_rexmit()
2256 struct net_bridge_port_group *pg, void *h_addr, in br_multicast_isinc_allow() argument
2267 src_ip.proto = pg->key.addr.proto; in br_multicast_isinc_allow()
2270 ent = br_multicast_find_group_src(pg, &src_ip); in br_multicast_isinc_allow()
2272 ent = br_multicast_new_group_src(pg, &src_ip); in br_multicast_isinc_allow()
2281 if (br_multicast_eht_handle(brmctx, pg, h_addr, srcs, nsrcs, addr_size, in br_multicast_isinc_allow()
2294 struct net_bridge_port_group *pg, void *h_addr, in __grp_src_isexc_incl() argument
2302 hlist_for_each_entry(ent, &pg->src_list, node) in __grp_src_isexc_incl()
2306 src_ip.proto = pg->key.addr.proto; in __grp_src_isexc_incl()
2309 ent = br_multicast_find_group_src(pg, &src_ip); in __grp_src_isexc_incl()
2313 ent = br_multicast_new_group_src(pg, &src_ip); in __grp_src_isexc_incl()
2318 br_multicast_eht_handle(brmctx, pg, h_addr, srcs, nsrcs, addr_size, in __grp_src_isexc_incl()
2321 __grp_src_delete_marked(pg); in __grp_src_isexc_incl()
2331 struct net_bridge_port_group *pg, void *h_addr, in __grp_src_isexc_excl() argument
2341 hlist_for_each_entry(ent, &pg->src_list, node) in __grp_src_isexc_excl()
2345 src_ip.proto = pg->key.addr.proto; in __grp_src_isexc_excl()
2348 ent = br_multicast_find_group_src(pg, &src_ip); in __grp_src_isexc_excl()
2352 ent = br_multicast_new_group_src(pg, &src_ip); in __grp_src_isexc_excl()
2361 if (br_multicast_eht_handle(brmctx, pg, h_addr, srcs, nsrcs, addr_size, in __grp_src_isexc_excl()
2365 if (__grp_src_delete_marked(pg)) in __grp_src_isexc_excl()
2372 struct net_bridge_port_group *pg, void *h_addr, in br_multicast_isexc() argument
2378 switch (pg->filter_mode) { in br_multicast_isexc()
2380 __grp_src_isexc_incl(brmctx, pg, h_addr, srcs, nsrcs, addr_size, in br_multicast_isexc()
2382 br_multicast_star_g_handle_mode(pg, MCAST_EXCLUDE); in br_multicast_isexc()
2386 changed = __grp_src_isexc_excl(brmctx, pg, h_addr, srcs, nsrcs, in br_multicast_isexc()
2391 pg->filter_mode = MCAST_EXCLUDE; in br_multicast_isexc()
2392 mod_timer(&pg->timer, jiffies + br_multicast_gmi(brmctx)); in br_multicast_isexc()
2403 struct net_bridge_port_group *pg, void *h_addr, in __grp_src_toin_incl() argument
2407 u32 src_idx, to_send = pg->src_ents; in __grp_src_toin_incl()
2413 hlist_for_each_entry(ent, &pg->src_list, node) in __grp_src_toin_incl()
2417 src_ip.proto = pg->key.addr.proto; in __grp_src_toin_incl()
2420 ent = br_multicast_find_group_src(pg, &src_ip); in __grp_src_toin_incl()
2425 ent = br_multicast_new_group_src(pg, &src_ip); in __grp_src_toin_incl()
2433 if (br_multicast_eht_handle(brmctx, pg, h_addr, srcs, nsrcs, addr_size, in __grp_src_toin_incl()
2438 __grp_src_query_marked_and_rexmit(brmctx, pmctx, pg); in __grp_src_toin_incl()
2450 struct net_bridge_port_group *pg, void *h_addr, in __grp_src_toin_excl() argument
2454 u32 src_idx, to_send = pg->src_ents; in __grp_src_toin_excl()
2460 hlist_for_each_entry(ent, &pg->src_list, node) in __grp_src_toin_excl()
2465 src_ip.proto = pg->key.addr.proto; in __grp_src_toin_excl()
2468 ent = br_multicast_find_group_src(pg, &src_ip); in __grp_src_toin_excl()
2475 ent = br_multicast_new_group_src(pg, &src_ip); in __grp_src_toin_excl()
2483 if (br_multicast_eht_handle(brmctx, pg, h_addr, srcs, nsrcs, addr_size, in __grp_src_toin_excl()
2488 __grp_src_query_marked_and_rexmit(brmctx, pmctx, pg); in __grp_src_toin_excl()
2490 __grp_send_query_and_rexmit(brmctx, pmctx, pg); in __grp_src_toin_excl()
2497 struct net_bridge_port_group *pg, void *h_addr, in br_multicast_toin() argument
2503 switch (pg->filter_mode) { in br_multicast_toin()
2505 changed = __grp_src_toin_incl(brmctx, pmctx, pg, h_addr, srcs, in br_multicast_toin()
2509 changed = __grp_src_toin_excl(brmctx, pmctx, pg, h_addr, srcs, in br_multicast_toin()
2514 if (br_multicast_eht_should_del_pg(pg)) { in br_multicast_toin()
2515 pg->flags |= MDB_PG_FLAGS_FAST_LEAVE; in br_multicast_toin()
2516 br_multicast_find_del_pg(pg->key.port->br, pg); in br_multicast_toin()
2518 * access pg after the delete so we have to return false in br_multicast_toin()
2534 struct net_bridge_port_group *pg, void *h_addr, in __grp_src_toex_incl() argument
2542 hlist_for_each_entry(ent, &pg->src_list, node) in __grp_src_toex_incl()
2546 src_ip.proto = pg->key.addr.proto; in __grp_src_toex_incl()
2549 ent = br_multicast_find_group_src(pg, &src_ip); in __grp_src_toex_incl()
2555 ent = br_multicast_new_group_src(pg, &src_ip); in __grp_src_toex_incl()
2561 br_multicast_eht_handle(brmctx, pg, h_addr, srcs, nsrcs, addr_size, in __grp_src_toex_incl()
2564 __grp_src_delete_marked(pg); in __grp_src_toex_incl()
2566 __grp_src_query_marked_and_rexmit(brmctx, pmctx, pg); in __grp_src_toex_incl()
2578 struct net_bridge_port_group *pg, void *h_addr, in __grp_src_toex_excl() argument
2587 hlist_for_each_entry(ent, &pg->src_list, node) in __grp_src_toex_excl()
2591 src_ip.proto = pg->key.addr.proto; in __grp_src_toex_excl()
2594 ent = br_multicast_find_group_src(pg, &src_ip); in __grp_src_toex_excl()
2598 ent = br_multicast_new_group_src(pg, &src_ip); in __grp_src_toex_excl()
2600 __grp_src_mod_timer(ent, pg->timer.expires); in __grp_src_toex_excl()
2610 if (br_multicast_eht_handle(brmctx, pg, h_addr, srcs, nsrcs, addr_size, in __grp_src_toex_excl()
2614 if (__grp_src_delete_marked(pg)) in __grp_src_toex_excl()
2617 __grp_src_query_marked_and_rexmit(brmctx, pmctx, pg); in __grp_src_toex_excl()
2624 struct net_bridge_port_group *pg, void *h_addr, in br_multicast_toex() argument
2630 switch (pg->filter_mode) { in br_multicast_toex()
2632 __grp_src_toex_incl(brmctx, pmctx, pg, h_addr, srcs, nsrcs, in br_multicast_toex()
2634 br_multicast_star_g_handle_mode(pg, MCAST_EXCLUDE); in br_multicast_toex()
2638 changed = __grp_src_toex_excl(brmctx, pmctx, pg, h_addr, srcs, in br_multicast_toex()
2643 pg->filter_mode = MCAST_EXCLUDE; in br_multicast_toex()
2644 mod_timer(&pg->timer, jiffies + br_multicast_gmi(brmctx)); in br_multicast_toex()
2654 struct net_bridge_port_group *pg, void *h_addr, in __grp_src_block_incl() argument
2662 hlist_for_each_entry(ent, &pg->src_list, node) in __grp_src_block_incl()
2666 src_ip.proto = pg->key.addr.proto; in __grp_src_block_incl()
2669 ent = br_multicast_find_group_src(pg, &src_ip); in __grp_src_block_incl()
2676 if (br_multicast_eht_handle(brmctx, pg, h_addr, srcs, nsrcs, addr_size, in __grp_src_block_incl()
2681 __grp_src_query_marked_and_rexmit(brmctx, pmctx, pg); in __grp_src_block_incl()
2692 struct net_bridge_port_group *pg, void *h_addr, in __grp_src_block_excl() argument
2700 hlist_for_each_entry(ent, &pg->src_list, node) in __grp_src_block_excl()
2704 src_ip.proto = pg->key.addr.proto; in __grp_src_block_excl()
2707 ent = br_multicast_find_group_src(pg, &src_ip); in __grp_src_block_excl()
2709 ent = br_multicast_new_group_src(pg, &src_ip); in __grp_src_block_excl()
2711 __grp_src_mod_timer(ent, pg->timer.expires); in __grp_src_block_excl()
2721 if (br_multicast_eht_handle(brmctx, pg, h_addr, srcs, nsrcs, addr_size, in __grp_src_block_excl()
2726 __grp_src_query_marked_and_rexmit(brmctx, pmctx, pg); in __grp_src_block_excl()
2733 struct net_bridge_port_group *pg, void *h_addr, in br_multicast_block() argument
2738 switch (pg->filter_mode) { in br_multicast_block()
2740 changed = __grp_src_block_incl(brmctx, pmctx, pg, h_addr, srcs, in br_multicast_block()
2744 changed = __grp_src_block_excl(brmctx, pmctx, pg, h_addr, srcs, in br_multicast_block()
2749 if ((pg->filter_mode == MCAST_INCLUDE && hlist_empty(&pg->src_list)) || in br_multicast_block()
2750 br_multicast_eht_should_del_pg(pg)) { in br_multicast_block()
2751 if (br_multicast_eht_should_del_pg(pg)) in br_multicast_block()
2752 pg->flags |= MDB_PG_FLAGS_FAST_LEAVE; in br_multicast_block()
2753 br_multicast_find_del_pg(pg->key.port->br, pg); in br_multicast_block()
2755 * access pg after the delete so we have to return false in br_multicast_block()
2769 struct net_bridge_port_group *pg; in br_multicast_find_port() local
2771 for (pg = mlock_dereference(mp->ports, br); in br_multicast_find_port()
2772 pg; in br_multicast_find_port()
2773 pg = mlock_dereference(pg->next, br)) in br_multicast_find_port()
2774 if (br_port_group_equal(pg, p, src)) in br_multicast_find_port()
2775 return pg; in br_multicast_find_port()
2787 struct net_bridge_port_group *pg; in br_ip4_multicast_igmp3_report() local
2854 pg = br_multicast_find_port(mdst, pmctx->port, src); in br_ip4_multicast_igmp3_report()
2855 if (!pg || (pg->flags & MDB_PG_FLAGS_PERMANENT)) in br_ip4_multicast_igmp3_report()
2862 changed = br_multicast_isinc_allow(brmctx, pg, h_addr, in br_ip4_multicast_igmp3_report()
2867 changed = br_multicast_isinc_allow(brmctx, pg, h_addr, in br_ip4_multicast_igmp3_report()
2872 changed = br_multicast_isexc(brmctx, pg, h_addr, in br_ip4_multicast_igmp3_report()
2877 changed = br_multicast_toin(brmctx, pmctx, pg, h_addr, in br_ip4_multicast_igmp3_report()
2882 changed = br_multicast_toex(brmctx, pmctx, pg, h_addr, in br_ip4_multicast_igmp3_report()
2887 changed = br_multicast_block(brmctx, pmctx, pg, h_addr, in br_ip4_multicast_igmp3_report()
2893 br_mdb_notify(brmctx->br->dev, mdst, pg, RTM_NEWMDB); in br_ip4_multicast_igmp3_report()
2909 struct net_bridge_port_group *pg; in br_ip6_multicast_mld2_report() local
2992 pg = br_multicast_find_port(mdst, pmctx->port, src); in br_ip6_multicast_mld2_report()
2993 if (!pg || (pg->flags & MDB_PG_FLAGS_PERMANENT)) in br_ip6_multicast_mld2_report()
2998 changed = br_multicast_isinc_allow(brmctx, pg, h_addr, in br_ip6_multicast_mld2_report()
3004 changed = br_multicast_isinc_allow(brmctx, pg, h_addr, in br_ip6_multicast_mld2_report()
3010 changed = br_multicast_isexc(brmctx, pg, h_addr, in br_ip6_multicast_mld2_report()
3016 changed = br_multicast_toin(brmctx, pmctx, pg, h_addr, in br_ip6_multicast_mld2_report()
3022 changed = br_multicast_toex(brmctx, pmctx, pg, h_addr, in br_ip6_multicast_mld2_report()
3028 changed = br_multicast_block(brmctx, pmctx, pg, h_addr, in br_ip6_multicast_mld2_report()
3035 br_mdb_notify(brmctx->br->dev, mdst, pg, RTM_NEWMDB); in br_ip6_multicast_mld2_report()