Lines Matching refs:port
41 struct net_bridge_port *port);
43 struct net_bridge_port *port,
48 struct net_bridge_port *port,
286 br_mdb_notify(br->dev, p->port, &pg->addr, RTM_DELMDB, in br_multicast_del_pg()
303 struct net_bridge *br = pg->port->br; in br_multicast_port_group_expired()
530 struct net_bridge *br, struct net_bridge_port *port, in br_multicast_get_group() argument
554 port ? port->dev->name : br->dev->name); in br_multicast_get_group()
565 port ? port->dev->name : br->dev->name); in br_multicast_get_group()
578 port ? port->dev->name : br->dev->name); in br_multicast_get_group()
587 port ? port->dev->name : br->dev->name, in br_multicast_get_group()
604 struct net_bridge_port *port, struct br_ip *group) in br_multicast_new_group() argument
620 mp = br_multicast_get_group(br, port, group, hash); in br_multicast_new_group()
652 struct net_bridge_port *port, in br_multicast_new_port_group() argument
664 p->port = port; in br_multicast_new_port_group()
667 hlist_add_head(&p->mglist, &port->mglist); in br_multicast_new_port_group()
674 struct net_bridge_port *port, in br_multicast_add_group() argument
685 (port && port->state == BR_STATE_DISABLED)) in br_multicast_add_group()
688 mp = br_multicast_new_group(br, port, group); in br_multicast_add_group()
693 if (!port) { in br_multicast_add_group()
702 if (p->port == port) in br_multicast_add_group()
704 if ((unsigned long)p->port < (unsigned long)port) in br_multicast_add_group()
708 p = br_multicast_new_port_group(port, group, *pp, MDB_TEMPORARY); in br_multicast_add_group()
712 br_mdb_notify(br->dev, port, group, RTM_NEWMDB, MDB_TEMPORARY); in br_multicast_add_group()
725 struct net_bridge_port *port, in br_ip4_multicast_add_group() argument
738 return br_multicast_add_group(br, port, &br_group); in br_ip4_multicast_add_group()
743 struct net_bridge_port *port, in br_ip6_multicast_add_group() argument
756 return br_multicast_add_group(br, port, &br_group); in br_ip6_multicast_add_group()
762 struct net_bridge_port *port = (void *)data; in br_multicast_router_expired() local
763 struct net_bridge *br = port->br; in br_multicast_router_expired()
766 if (port->multicast_router != 1 || in br_multicast_router_expired()
767 timer_pending(&port->multicast_router_timer) || in br_multicast_router_expired()
768 hlist_unhashed(&port->rlist)) in br_multicast_router_expired()
771 hlist_del_init_rcu(&port->rlist); in br_multicast_router_expired()
772 br_rtr_notify(br->dev, port, RTM_DELMDB); in br_multicast_router_expired()
824 struct net_bridge_port *port, in __br_multicast_send_query() argument
833 if (port) { in __br_multicast_send_query()
834 skb->dev = port->dev; in __br_multicast_send_query()
836 dev_net(port->dev), NULL, skb, NULL, skb->dev, in __br_multicast_send_query()
845 struct net_bridge_port *port, in br_multicast_send_query() argument
858 if (port ? (own_query == &port->ip4_own_query) : in br_multicast_send_query()
872 __br_multicast_send_query(br, port, &br_group); in br_multicast_send_query()
882 br_multicast_port_query_expired(struct net_bridge_port *port, in br_multicast_port_query_expired() argument
885 struct net_bridge *br = port->br; in br_multicast_port_query_expired()
888 if (port->state == BR_STATE_DISABLED || in br_multicast_port_query_expired()
889 port->state == BR_STATE_BLOCKING) in br_multicast_port_query_expired()
895 br_multicast_send_query(port->br, port, query); in br_multicast_port_query_expired()
903 struct net_bridge_port *port = (void *)data; in br_ip4_multicast_port_query_expired() local
905 br_multicast_port_query_expired(port, &port->ip4_own_query); in br_ip4_multicast_port_query_expired()
911 struct net_bridge_port *port = (void *)data; in br_ip6_multicast_port_query_expired() local
913 br_multicast_port_query_expired(port, &port->ip6_own_query); in br_ip6_multicast_port_query_expired()
917 void br_multicast_add_port(struct net_bridge_port *port) in br_multicast_add_port() argument
919 port->multicast_router = 1; in br_multicast_add_port()
921 setup_timer(&port->multicast_router_timer, br_multicast_router_expired, in br_multicast_add_port()
922 (unsigned long)port); in br_multicast_add_port()
923 setup_timer(&port->ip4_own_query.timer, in br_multicast_add_port()
924 br_ip4_multicast_port_query_expired, (unsigned long)port); in br_multicast_add_port()
926 setup_timer(&port->ip6_own_query.timer, in br_multicast_add_port()
927 br_ip6_multicast_port_query_expired, (unsigned long)port); in br_multicast_add_port()
931 void br_multicast_del_port(struct net_bridge_port *port) in br_multicast_del_port() argument
933 struct net_bridge *br = port->br; in br_multicast_del_port()
939 hlist_for_each_entry_safe(pg, n, &port->mglist, mglist) in br_multicast_del_port()
942 del_timer_sync(&port->multicast_router_timer); in br_multicast_del_port()
954 static void __br_multicast_enable_port(struct net_bridge_port *port) in __br_multicast_enable_port() argument
956 struct net_bridge *br = port->br; in __br_multicast_enable_port()
961 br_multicast_enable(&port->ip4_own_query); in __br_multicast_enable_port()
963 br_multicast_enable(&port->ip6_own_query); in __br_multicast_enable_port()
965 if (port->multicast_router == 2 && hlist_unhashed(&port->rlist)) in __br_multicast_enable_port()
966 br_multicast_add_router(br, port); in __br_multicast_enable_port()
969 void br_multicast_enable_port(struct net_bridge_port *port) in br_multicast_enable_port() argument
971 struct net_bridge *br = port->br; in br_multicast_enable_port()
974 __br_multicast_enable_port(port); in br_multicast_enable_port()
978 void br_multicast_disable_port(struct net_bridge_port *port) in br_multicast_disable_port() argument
980 struct net_bridge *br = port->br; in br_multicast_disable_port()
985 hlist_for_each_entry_safe(pg, n, &port->mglist, mglist) in br_multicast_disable_port()
989 if (!hlist_unhashed(&port->rlist)) { in br_multicast_disable_port()
990 hlist_del_init_rcu(&port->rlist); in br_multicast_disable_port()
991 br_rtr_notify(br->dev, port, RTM_DELMDB); in br_multicast_disable_port()
993 del_timer(&port->multicast_router_timer); in br_multicast_disable_port()
994 del_timer(&port->ip4_own_query.timer); in br_multicast_disable_port()
996 del_timer(&port->ip6_own_query.timer); in br_multicast_disable_port()
1002 struct net_bridge_port *port, in br_ip4_multicast_igmp3_report() argument
1051 br_ip4_multicast_leave_group(br, port, group, vid); in br_ip4_multicast_igmp3_report()
1053 err = br_ip4_multicast_add_group(br, port, group, vid); in br_ip4_multicast_igmp3_report()
1064 struct net_bridge_port *port, in br_ip6_multicast_mld2_report() argument
1121 br_ip6_multicast_leave_group(br, port, &grec->grec_mca, in br_ip6_multicast_mld2_report()
1124 err = br_ip6_multicast_add_group(br, port, in br_ip6_multicast_mld2_report()
1136 struct net_bridge_port *port, in br_ip4_multicast_select_querier() argument
1155 rcu_assign_pointer(br->ip4_querier.port, port); in br_ip4_multicast_select_querier()
1162 struct net_bridge_port *port, in br_ip6_multicast_select_querier() argument
1178 rcu_assign_pointer(br->ip6_querier.port, port); in br_ip6_multicast_select_querier()
1185 struct net_bridge_port *port, in br_multicast_select_querier() argument
1190 return br_ip4_multicast_select_querier(br, port, saddr->u.ip4); in br_multicast_select_querier()
1193 return br_ip6_multicast_select_querier(br, port, &saddr->u.ip6); in br_multicast_select_querier()
1217 struct net_bridge_port *port) in br_multicast_add_router() argument
1222 if (!hlist_unhashed(&port->rlist)) in br_multicast_add_router()
1226 if ((unsigned long) port >= (unsigned long) p) in br_multicast_add_router()
1232 hlist_add_behind_rcu(&port->rlist, slot); in br_multicast_add_router()
1234 hlist_add_head_rcu(&port->rlist, &br->router_list); in br_multicast_add_router()
1235 br_rtr_notify(br->dev, port, RTM_NEWMDB); in br_multicast_add_router()
1239 struct net_bridge_port *port) in br_multicast_mark_router() argument
1243 if (!port) { in br_multicast_mark_router()
1250 if (port->multicast_router != 1) in br_multicast_mark_router()
1253 br_multicast_add_router(br, port); in br_multicast_mark_router()
1255 mod_timer(&port->multicast_router_timer, in br_multicast_mark_router()
1260 struct net_bridge_port *port, in br_multicast_query_received() argument
1265 if (!br_multicast_select_querier(br, port, saddr)) in br_multicast_query_received()
1269 br_multicast_mark_router(br, port); in br_multicast_query_received()
1273 struct net_bridge_port *port, in br_ip4_multicast_query() argument
1292 (port && port->state == BR_STATE_DISABLED)) in br_ip4_multicast_query()
1319 br_multicast_query_received(br, port, &br->ip4_other_query, in br_ip4_multicast_query()
1352 struct net_bridge_port *port, in br_ip6_multicast_query() argument
1371 (port && port->state == BR_STATE_DISABLED)) in br_ip6_multicast_query()
1401 br_multicast_query_received(br, port, &br->ip6_other_query, in br_ip6_multicast_query()
1436 struct net_bridge_port *port, in br_multicast_leave_group() argument
1449 (port && port->state == BR_STATE_DISABLED)) in br_multicast_leave_group()
1457 if (port && (port->flags & BR_MULTICAST_FAST_LEAVE)) { in br_multicast_leave_group()
1463 if (p->port != port) in br_multicast_leave_group()
1470 br_mdb_notify(br->dev, port, group, RTM_DELMDB, in br_multicast_leave_group()
1484 __br_multicast_send_query(br, port, &mp->addr); in br_multicast_leave_group()
1494 if (p->port != port) in br_multicast_leave_group()
1512 if (!port) { in br_multicast_leave_group()
1526 if (p->port != port) in br_multicast_leave_group()
1543 struct net_bridge_port *port, in br_ip4_multicast_leave_group() argument
1553 own_query = port ? &port->ip4_own_query : &br->ip4_own_query; in br_ip4_multicast_leave_group()
1559 br_multicast_leave_group(br, port, &br_group, &br->ip4_other_query, in br_ip4_multicast_leave_group()
1565 struct net_bridge_port *port, in br_ip6_multicast_leave_group() argument
1575 own_query = port ? &port->ip6_own_query : &br->ip6_own_query; in br_ip6_multicast_leave_group()
1581 br_multicast_leave_group(br, port, &br_group, &br->ip6_other_query, in br_ip6_multicast_leave_group()
1587 struct net_bridge_port *port, in br_multicast_ipv4_rcv() argument
1612 err = br_ip4_multicast_add_group(br, port, ih->group, vid); in br_multicast_ipv4_rcv()
1615 err = br_ip4_multicast_igmp3_report(br, port, skb_trimmed, vid); in br_multicast_ipv4_rcv()
1618 err = br_ip4_multicast_query(br, port, skb_trimmed, vid); in br_multicast_ipv4_rcv()
1621 br_ip4_multicast_leave_group(br, port, ih->group, vid); in br_multicast_ipv4_rcv()
1633 struct net_bridge_port *port, in br_multicast_ipv6_rcv() argument
1657 err = br_ip6_multicast_add_group(br, port, &mld->mld_mca, vid); in br_multicast_ipv6_rcv()
1660 err = br_ip6_multicast_mld2_report(br, port, skb_trimmed, vid); in br_multicast_ipv6_rcv()
1663 err = br_ip6_multicast_query(br, port, skb_trimmed, vid); in br_multicast_ipv6_rcv()
1666 br_ip6_multicast_leave_group(br, port, &mld->mld_mca, vid); in br_multicast_ipv6_rcv()
1677 int br_multicast_rcv(struct net_bridge *br, struct net_bridge_port *port, in br_multicast_rcv() argument
1688 return br_multicast_ipv4_rcv(br, port, skb, vid); in br_multicast_rcv()
1691 return br_multicast_ipv6_rcv(br, port, skb, vid); in br_multicast_rcv()
1706 RCU_INIT_POINTER(querier->port, NULL); in br_multicast_query_expired()
1746 br->ip4_querier.port = NULL; in br_multicast_init()
1749 br->ip6_querier.port = NULL; in br_multicast_init()
1897 struct net_bridge_port *port; in br_multicast_start_querier() local
1902 list_for_each_entry_rcu(port, &br->port_list, list) { in br_multicast_start_querier()
1903 if (port->state == BR_STATE_DISABLED || in br_multicast_start_querier()
1904 port->state == BR_STATE_BLOCKING) in br_multicast_start_querier()
1908 br_multicast_enable(&port->ip4_own_query); in br_multicast_start_querier()
1911 br_multicast_enable(&port->ip6_own_query); in br_multicast_start_querier()
1920 struct net_bridge_port *port; in br_multicast_toggle() local
1950 list_for_each_entry(port, &br->port_list, list) in br_multicast_toggle()
1951 __br_multicast_enable_port(port); in br_multicast_toggle()
2053 struct net_bridge_port *port; in br_multicast_list_adjacent() local
2062 port = br_port_get_rcu(dev); in br_multicast_list_adjacent()
2063 if (!port || !port->br) in br_multicast_list_adjacent()
2066 br = port->br; in br_multicast_list_adjacent()
2068 list_for_each_entry_rcu(port, &br->port_list, list) { in br_multicast_list_adjacent()
2069 if (!port->dev || port->dev == dev) in br_multicast_list_adjacent()
2072 hlist_for_each_entry_rcu(group, &port->mglist, mglist) { in br_multicast_list_adjacent()
2101 struct net_bridge_port *port; in br_multicast_has_querier_anywhere() local
2109 port = br_port_get_rcu(dev); in br_multicast_has_querier_anywhere()
2110 if (!port || !port->br) in br_multicast_has_querier_anywhere()
2113 br = port->br; in br_multicast_has_querier_anywhere()
2138 struct net_bridge_port *port; in br_multicast_has_querier_adjacent() local
2145 port = br_port_get_rcu(dev); in br_multicast_has_querier_adjacent()
2146 if (!port || !port->br) in br_multicast_has_querier_adjacent()
2149 br = port->br; in br_multicast_has_querier_adjacent()
2154 rcu_dereference(br->ip4_querier.port) == port) in br_multicast_has_querier_adjacent()
2160 rcu_dereference(br->ip6_querier.port) == port) in br_multicast_has_querier_adjacent()