Lines Matching refs: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
2052 hlist_for_each_entry_safe(pg, n, &port->mglist, mglist) in br_multicast_del_port()
2053 br_multicast_find_del_pg(br, pg); in br_multicast_del_port()
2090 struct net_bridge_port_group *pg; in __br_multicast_enable_port_ctx() local
2101 hlist_for_each_entry(pg, &pmctx->port->mglist, mglist) { in __br_multicast_enable_port_ctx()
2102 if (pg->key.addr.vid == pmctx->vlan->vid) in __br_multicast_enable_port_ctx()
2120 struct net_bridge_port_group *pg; in __br_multicast_disable_port_ctx() local
2124 hlist_for_each_entry_safe(pg, n, &pmctx->port->mglist, mglist) in __br_multicast_disable_port_ctx()
2125 if (!(pg->flags & MDB_PG_FLAGS_PERMANENT) && in __br_multicast_disable_port_ctx()
2127 pg->key.addr.vid == pmctx->vlan->vid)) in __br_multicast_disable_port_ctx()
2128 br_multicast_find_del_pg(pmctx->port->br, pg); in __br_multicast_disable_port_ctx()
2148 static int __grp_src_delete_marked(struct net_bridge_port_group *pg) in __grp_src_delete_marked() argument
2154 hlist_for_each_entry_safe(ent, tmp, &pg->src_list, node) in __grp_src_delete_marked()
2172 struct net_bridge_port_group *pg) in __grp_src_query_marked_and_rexmit() argument
2183 if (pg->key.addr.proto == htons(ETH_P_IP)) in __grp_src_query_marked_and_rexmit()
2191 hlist_for_each_entry(ent, &pg->src_list, node) { in __grp_src_query_marked_and_rexmit()
2208 __br_multicast_send_query(brmctx, pmctx, pg, &pg->key.addr, in __grp_src_query_marked_and_rexmit()
2209 &pg->key.addr, true, 1, NULL); in __grp_src_query_marked_and_rexmit()
2212 if (!timer_pending(&pg->rexmit_timer) || in __grp_src_query_marked_and_rexmit()
2213 time_after(pg->rexmit_timer.expires, lmi)) in __grp_src_query_marked_and_rexmit()
2214 mod_timer(&pg->rexmit_timer, lmi); in __grp_src_query_marked_and_rexmit()
2219 struct net_bridge_port_group *pg) in __grp_send_query_and_rexmit() argument
2228 if (pg->key.addr.proto == htons(ETH_P_IP)) in __grp_send_query_and_rexmit()
2238 pg->grp_query_rexmit_cnt = brmctx->multicast_last_member_count - 1; in __grp_send_query_and_rexmit()
2239 __br_multicast_send_query(brmctx, pmctx, pg, &pg->key.addr, in __grp_send_query_and_rexmit()
2240 &pg->key.addr, false, 0, NULL); in __grp_send_query_and_rexmit()
2241 if (!timer_pending(&pg->rexmit_timer) || in __grp_send_query_and_rexmit()
2242 time_after(pg->rexmit_timer.expires, lmi)) in __grp_send_query_and_rexmit()
2243 mod_timer(&pg->rexmit_timer, lmi); in __grp_send_query_and_rexmit()
2246 if (pg->filter_mode == MCAST_EXCLUDE && in __grp_send_query_and_rexmit()
2247 (!timer_pending(&pg->timer) || in __grp_send_query_and_rexmit()
2248 time_after(pg->timer.expires, now + br_multicast_lmqt(brmctx)))) in __grp_send_query_and_rexmit()
2249 mod_timer(&pg->timer, now + br_multicast_lmqt(brmctx)); in __grp_send_query_and_rexmit()
2258 struct net_bridge_port_group *pg, void *h_addr, in br_multicast_isinc_allow() argument
2269 src_ip.proto = pg->key.addr.proto; in br_multicast_isinc_allow()
2272 ent = br_multicast_find_group_src(pg, &src_ip); in br_multicast_isinc_allow()
2274 ent = br_multicast_new_group_src(pg, &src_ip); in br_multicast_isinc_allow()
2283 if (br_multicast_eht_handle(brmctx, pg, h_addr, srcs, nsrcs, addr_size, in br_multicast_isinc_allow()
2296 struct net_bridge_port_group *pg, void *h_addr, in __grp_src_isexc_incl() argument
2304 hlist_for_each_entry(ent, &pg->src_list, node) in __grp_src_isexc_incl()
2308 src_ip.proto = pg->key.addr.proto; in __grp_src_isexc_incl()
2311 ent = br_multicast_find_group_src(pg, &src_ip); in __grp_src_isexc_incl()
2315 ent = br_multicast_new_group_src(pg, &src_ip); in __grp_src_isexc_incl()
2320 br_multicast_eht_handle(brmctx, pg, h_addr, srcs, nsrcs, addr_size, in __grp_src_isexc_incl()
2323 __grp_src_delete_marked(pg); in __grp_src_isexc_incl()
2333 struct net_bridge_port_group *pg, void *h_addr, in __grp_src_isexc_excl() argument
2343 hlist_for_each_entry(ent, &pg->src_list, node) in __grp_src_isexc_excl()
2347 src_ip.proto = pg->key.addr.proto; in __grp_src_isexc_excl()
2350 ent = br_multicast_find_group_src(pg, &src_ip); in __grp_src_isexc_excl()
2354 ent = br_multicast_new_group_src(pg, &src_ip); in __grp_src_isexc_excl()
2363 if (br_multicast_eht_handle(brmctx, pg, h_addr, srcs, nsrcs, addr_size, in __grp_src_isexc_excl()
2367 if (__grp_src_delete_marked(pg)) in __grp_src_isexc_excl()
2374 struct net_bridge_port_group *pg, void *h_addr, in br_multicast_isexc() argument
2380 switch (pg->filter_mode) { in br_multicast_isexc()
2382 __grp_src_isexc_incl(brmctx, pg, h_addr, srcs, nsrcs, addr_size, in br_multicast_isexc()
2384 br_multicast_star_g_handle_mode(pg, MCAST_EXCLUDE); in br_multicast_isexc()
2388 changed = __grp_src_isexc_excl(brmctx, pg, h_addr, srcs, nsrcs, in br_multicast_isexc()
2393 pg->filter_mode = MCAST_EXCLUDE; in br_multicast_isexc()
2394 mod_timer(&pg->timer, jiffies + br_multicast_gmi(brmctx)); in br_multicast_isexc()
2405 struct net_bridge_port_group *pg, void *h_addr, in __grp_src_toin_incl() argument
2409 u32 src_idx, to_send = pg->src_ents; in __grp_src_toin_incl()
2415 hlist_for_each_entry(ent, &pg->src_list, node) in __grp_src_toin_incl()
2419 src_ip.proto = pg->key.addr.proto; in __grp_src_toin_incl()
2422 ent = br_multicast_find_group_src(pg, &src_ip); in __grp_src_toin_incl()
2427 ent = br_multicast_new_group_src(pg, &src_ip); in __grp_src_toin_incl()
2435 if (br_multicast_eht_handle(brmctx, pg, h_addr, srcs, nsrcs, addr_size, in __grp_src_toin_incl()
2440 __grp_src_query_marked_and_rexmit(brmctx, pmctx, pg); in __grp_src_toin_incl()
2452 struct net_bridge_port_group *pg, void *h_addr, in __grp_src_toin_excl() argument
2456 u32 src_idx, to_send = pg->src_ents; in __grp_src_toin_excl()
2462 hlist_for_each_entry(ent, &pg->src_list, node) in __grp_src_toin_excl()
2467 src_ip.proto = pg->key.addr.proto; in __grp_src_toin_excl()
2470 ent = br_multicast_find_group_src(pg, &src_ip); in __grp_src_toin_excl()
2477 ent = br_multicast_new_group_src(pg, &src_ip); in __grp_src_toin_excl()
2485 if (br_multicast_eht_handle(brmctx, pg, h_addr, srcs, nsrcs, addr_size, in __grp_src_toin_excl()
2490 __grp_src_query_marked_and_rexmit(brmctx, pmctx, pg); in __grp_src_toin_excl()
2492 __grp_send_query_and_rexmit(brmctx, pmctx, pg); in __grp_src_toin_excl()
2499 struct net_bridge_port_group *pg, void *h_addr, in br_multicast_toin() argument
2505 switch (pg->filter_mode) { in br_multicast_toin()
2507 changed = __grp_src_toin_incl(brmctx, pmctx, pg, h_addr, srcs, in br_multicast_toin()
2511 changed = __grp_src_toin_excl(brmctx, pmctx, pg, h_addr, srcs, in br_multicast_toin()
2516 if (br_multicast_eht_should_del_pg(pg)) { in br_multicast_toin()
2517 pg->flags |= MDB_PG_FLAGS_FAST_LEAVE; in br_multicast_toin()
2518 br_multicast_find_del_pg(pg->key.port->br, pg); in br_multicast_toin()
2536 struct net_bridge_port_group *pg, void *h_addr, in __grp_src_toex_incl() argument
2544 hlist_for_each_entry(ent, &pg->src_list, node) in __grp_src_toex_incl()
2548 src_ip.proto = pg->key.addr.proto; in __grp_src_toex_incl()
2551 ent = br_multicast_find_group_src(pg, &src_ip); in __grp_src_toex_incl()
2557 ent = br_multicast_new_group_src(pg, &src_ip); in __grp_src_toex_incl()
2563 br_multicast_eht_handle(brmctx, pg, h_addr, srcs, nsrcs, addr_size, in __grp_src_toex_incl()
2566 __grp_src_delete_marked(pg); in __grp_src_toex_incl()
2568 __grp_src_query_marked_and_rexmit(brmctx, pmctx, pg); in __grp_src_toex_incl()
2580 struct net_bridge_port_group *pg, void *h_addr, in __grp_src_toex_excl() argument
2589 hlist_for_each_entry(ent, &pg->src_list, node) in __grp_src_toex_excl()
2593 src_ip.proto = pg->key.addr.proto; in __grp_src_toex_excl()
2596 ent = br_multicast_find_group_src(pg, &src_ip); in __grp_src_toex_excl()
2600 ent = br_multicast_new_group_src(pg, &src_ip); in __grp_src_toex_excl()
2602 __grp_src_mod_timer(ent, pg->timer.expires); in __grp_src_toex_excl()
2612 if (br_multicast_eht_handle(brmctx, pg, h_addr, srcs, nsrcs, addr_size, in __grp_src_toex_excl()
2616 if (__grp_src_delete_marked(pg)) in __grp_src_toex_excl()
2619 __grp_src_query_marked_and_rexmit(brmctx, pmctx, pg); in __grp_src_toex_excl()
2626 struct net_bridge_port_group *pg, void *h_addr, in br_multicast_toex() argument
2632 switch (pg->filter_mode) { in br_multicast_toex()
2634 __grp_src_toex_incl(brmctx, pmctx, pg, h_addr, srcs, nsrcs, in br_multicast_toex()
2636 br_multicast_star_g_handle_mode(pg, MCAST_EXCLUDE); in br_multicast_toex()
2640 changed = __grp_src_toex_excl(brmctx, pmctx, pg, h_addr, srcs, in br_multicast_toex()
2645 pg->filter_mode = MCAST_EXCLUDE; in br_multicast_toex()
2646 mod_timer(&pg->timer, jiffies + br_multicast_gmi(brmctx)); in br_multicast_toex()
2656 struct net_bridge_port_group *pg, void *h_addr, in __grp_src_block_incl() argument
2664 hlist_for_each_entry(ent, &pg->src_list, node) in __grp_src_block_incl()
2668 src_ip.proto = pg->key.addr.proto; in __grp_src_block_incl()
2671 ent = br_multicast_find_group_src(pg, &src_ip); in __grp_src_block_incl()
2678 if (br_multicast_eht_handle(brmctx, pg, h_addr, srcs, nsrcs, addr_size, in __grp_src_block_incl()
2683 __grp_src_query_marked_and_rexmit(brmctx, pmctx, pg); in __grp_src_block_incl()
2694 struct net_bridge_port_group *pg, void *h_addr, in __grp_src_block_excl() argument
2702 hlist_for_each_entry(ent, &pg->src_list, node) in __grp_src_block_excl()
2706 src_ip.proto = pg->key.addr.proto; in __grp_src_block_excl()
2709 ent = br_multicast_find_group_src(pg, &src_ip); in __grp_src_block_excl()
2711 ent = br_multicast_new_group_src(pg, &src_ip); in __grp_src_block_excl()
2713 __grp_src_mod_timer(ent, pg->timer.expires); in __grp_src_block_excl()
2723 if (br_multicast_eht_handle(brmctx, pg, h_addr, srcs, nsrcs, addr_size, in __grp_src_block_excl()
2728 __grp_src_query_marked_and_rexmit(brmctx, pmctx, pg); in __grp_src_block_excl()
2735 struct net_bridge_port_group *pg, void *h_addr, in br_multicast_block() argument
2740 switch (pg->filter_mode) { in br_multicast_block()
2742 changed = __grp_src_block_incl(brmctx, pmctx, pg, h_addr, srcs, in br_multicast_block()
2746 changed = __grp_src_block_excl(brmctx, pmctx, pg, h_addr, srcs, in br_multicast_block()
2751 if ((pg->filter_mode == MCAST_INCLUDE && hlist_empty(&pg->src_list)) || in br_multicast_block()
2752 br_multicast_eht_should_del_pg(pg)) { in br_multicast_block()
2753 if (br_multicast_eht_should_del_pg(pg)) in br_multicast_block()
2754 pg->flags |= MDB_PG_FLAGS_FAST_LEAVE; in br_multicast_block()
2755 br_multicast_find_del_pg(pg->key.port->br, pg); in br_multicast_block()
2771 struct net_bridge_port_group *pg; in br_multicast_find_port() local
2773 for (pg = mlock_dereference(mp->ports, br); in br_multicast_find_port()
2774 pg; in br_multicast_find_port()
2775 pg = mlock_dereference(pg->next, br)) in br_multicast_find_port()
2776 if (br_port_group_equal(pg, p, src)) in br_multicast_find_port()
2777 return pg; in br_multicast_find_port()
2789 struct net_bridge_port_group *pg; in br_ip4_multicast_igmp3_report() local
2856 pg = br_multicast_find_port(mdst, pmctx->port, src); in br_ip4_multicast_igmp3_report()
2857 if (!pg || (pg->flags & MDB_PG_FLAGS_PERMANENT)) in br_ip4_multicast_igmp3_report()
2864 changed = br_multicast_isinc_allow(brmctx, pg, h_addr, in br_ip4_multicast_igmp3_report()
2869 changed = br_multicast_isinc_allow(brmctx, pg, h_addr, in br_ip4_multicast_igmp3_report()
2874 changed = br_multicast_isexc(brmctx, pg, h_addr, in br_ip4_multicast_igmp3_report()
2879 changed = br_multicast_toin(brmctx, pmctx, pg, h_addr, in br_ip4_multicast_igmp3_report()
2884 changed = br_multicast_toex(brmctx, pmctx, pg, h_addr, in br_ip4_multicast_igmp3_report()
2889 changed = br_multicast_block(brmctx, pmctx, pg, h_addr, in br_ip4_multicast_igmp3_report()
2895 br_mdb_notify(brmctx->br->dev, mdst, pg, RTM_NEWMDB); in br_ip4_multicast_igmp3_report()
2911 struct net_bridge_port_group *pg; in br_ip6_multicast_mld2_report() local
2994 pg = br_multicast_find_port(mdst, pmctx->port, src); in br_ip6_multicast_mld2_report()
2995 if (!pg || (pg->flags & MDB_PG_FLAGS_PERMANENT)) in br_ip6_multicast_mld2_report()
3000 changed = br_multicast_isinc_allow(brmctx, pg, h_addr, in br_ip6_multicast_mld2_report()
3006 changed = br_multicast_isinc_allow(brmctx, pg, h_addr, in br_ip6_multicast_mld2_report()
3012 changed = br_multicast_isexc(brmctx, pg, h_addr, in br_ip6_multicast_mld2_report()
3018 changed = br_multicast_toin(brmctx, pmctx, pg, h_addr, in br_ip6_multicast_mld2_report()
3024 changed = br_multicast_toex(brmctx, pmctx, pg, h_addr, in br_ip6_multicast_mld2_report()
3030 changed = br_multicast_block(brmctx, pmctx, pg, h_addr, in br_ip6_multicast_mld2_report()
3037 br_mdb_notify(brmctx->br->dev, mdst, pg, RTM_NEWMDB); in br_ip6_multicast_mld2_report()