Lines Matching refs:bearer_id

176 static void __tipc_node_link_down(struct tipc_node *n, int *bearer_id,
179 static void tipc_node_link_down(struct tipc_node *n, int bearer_id,
199 int bearer_id = n->active_links[sel & 1]; in node_active_link() local
201 if (unlikely(bearer_id == INVALID_BEARER_ID)) in node_active_link()
204 return n->links[bearer_id].link; in node_active_link()
210 int bearer_id; in tipc_node_get_mtu() local
225 bearer_id = n->active_links[sel & 1]; in tipc_node_get_mtu()
226 if (likely(bearer_id != INVALID_BEARER_ID)) in tipc_node_get_mtu()
227 mtu = n->links[bearer_id].mtu; in tipc_node_get_mtu()
406 u32 bearer_id, node; in tipc_node_write_unlock() local
418 bearer_id = n->link_id & 0xffff; in tipc_node_write_unlock()
433 tipc_mon_peer_up(net, node, bearer_id); in tipc_node_write_unlock()
437 tipc_mon_peer_down(net, node, bearer_id); in tipc_node_write_unlock()
478 int bearer_id; in tipc_node_create() local
522 for (bearer_id = 0; bearer_id < MAX_BEARERS; bearer_id++) { in tipc_node_create()
523 l = n->links[bearer_id].link; in tipc_node_create()
809 int bearer_id; in tipc_node_timeout() local
831 for (bearer_id = 0; remains && (bearer_id < MAX_BEARERS); bearer_id++) { in tipc_node_timeout()
833 le = &n->links[bearer_id]; in tipc_node_timeout()
843 tipc_bearer_xmit(n->net, bearer_id, &xmitq, &le->maddr, n); in tipc_node_timeout()
845 tipc_node_link_down(n, bearer_id, false); in tipc_node_timeout()
858 static void __tipc_node_link_up(struct tipc_node *n, int bearer_id, in __tipc_node_link_up() argument
864 struct tipc_link *nl = n->links[bearer_id].link; in __tipc_node_link_up()
878 n->links[bearer_id].mtu = tipc_link_mss(nl); in __tipc_node_link_up()
880 tipc_bearer_add_dest(n->net, bearer_id, n->addr); in __tipc_node_link_up()
881 tipc_bcast_inc_bearer_dst_cnt(n->net, bearer_id); in __tipc_node_link_up()
892 *slot0 = bearer_id; in __tipc_node_link_up()
893 *slot1 = bearer_id; in __tipc_node_link_up()
904 *slot0 = bearer_id; in __tipc_node_link_up()
905 *slot1 = bearer_id; in __tipc_node_link_up()
910 *slot1 = bearer_id; in __tipc_node_link_up()
927 static void tipc_node_link_up(struct tipc_node *n, int bearer_id, in tipc_node_link_up() argument
933 __tipc_node_link_up(n, bearer_id, xmitq); in tipc_node_link_up()
934 maddr = &n->links[bearer_id].maddr; in tipc_node_link_up()
935 tipc_bearer_xmit(n->net, bearer_id, xmitq, maddr, n); in tipc_node_link_up()
990 static void __tipc_node_link_down(struct tipc_node *n, int *bearer_id, in __tipc_node_link_down() argument
994 struct tipc_link_entry *le = &n->links[*bearer_id]; in __tipc_node_link_down()
1000 l = n->links[*bearer_id].link; in __tipc_node_link_down()
1008 tipc_bearer_remove_dest(n->net, *bearer_id, n->addr); in __tipc_node_link_down()
1042 *maddr = &n->links[*bearer_id].maddr; in __tipc_node_link_down()
1044 tipc_bcast_dec_bearer_dst_cnt(n->net, *bearer_id); in __tipc_node_link_down()
1047 tipc_bcast_dec_bearer_dst_cnt(n->net, *bearer_id); in __tipc_node_link_down()
1050 *bearer_id = n->active_links[0]; in __tipc_node_link_down()
1051 tnl = n->links[*bearer_id].link; in __tipc_node_link_down()
1061 *maddr = &n->links[*bearer_id].maddr; in __tipc_node_link_down()
1064 static void tipc_node_link_down(struct tipc_node *n, int bearer_id, bool delete) in tipc_node_link_down() argument
1066 struct tipc_link_entry *le = &n->links[bearer_id]; in tipc_node_link_down()
1069 int old_bearer_id = bearer_id; in tipc_node_link_down()
1079 __tipc_node_link_down(n, &bearer_id, &xmitq, &maddr); in tipc_node_link_down()
1095 tipc_bearer_xmit(n->net, bearer_id, &xmitq, maddr, n); in tipc_node_link_down()
1315 void tipc_node_delete_links(struct net *net, int bearer_id) in tipc_node_delete_links() argument
1322 tipc_node_link_down(n, bearer_id, true); in tipc_node_delete_links()
1570 int tipc_node_get_linkname(struct net *net, u32 bearer_id, u32 addr, in tipc_node_get_linkname() argument
1580 if (bearer_id >= MAX_BEARERS) in tipc_node_get_linkname()
1584 link = node->links[bearer_id].link; in tipc_node_get_linkname()
1697 int bearer_id; in tipc_node_xmit() local
1730 bearer_id = n->active_links[selector & 1]; in tipc_node_xmit()
1731 if (unlikely(bearer_id == INVALID_BEARER_ID)) { in tipc_node_xmit()
1739 le = &n->links[bearer_id]; in tipc_node_xmit()
1746 tipc_node_link_down(n, bearer_id, false); in tipc_node_xmit()
1748 tipc_bearer_xmit(net, bearer_id, &xmitq, &le->maddr, n); in tipc_node_xmit()
1836 int bearer_id, struct sk_buff_head *xmitq) in tipc_node_bc_sync_rcv() argument
1857 ucl = n->links[bearer_id].link; in tipc_node_bc_sync_rcv()
1871 static void tipc_node_bc_rcv(struct net *net, struct sk_buff *skb, int bearer_id) in tipc_node_bc_rcv() argument
1894 le = &n->links[bearer_id]; in tipc_node_bc_rcv()
1906 tipc_bearer_xmit(net, bearer_id, &xmitq, &le->maddr, n); in tipc_node_bc_rcv()
1933 int bearer_id, struct sk_buff_head *xmitq) in tipc_node_check_state() argument
1950 l = n->links[bearer_id].link; in tipc_node_check_state()
1961 if ((pb_id != bearer_id) && n->links[pb_id].link) { in tipc_node_check_state()
2042 __tipc_node_link_up(n, bearer_id, xmitq); in tipc_node_check_state()
2091 int bearer_id = b->identity; in tipc_rcv() local
2129 return tipc_node_bc_rcv(net, skb, bearer_id); in tipc_rcv()
2140 le = &n->links[bearer_id]; in tipc_rcv()
2149 tipc_node_bc_sync_rcv(n, hdr, bearer_id, &xmitq); in tipc_rcv()
2171 if (tipc_node_check_state(n, skb, bearer_id, &xmitq)) { in tipc_rcv()
2181 tipc_node_link_up(n, bearer_id, &xmitq); in tipc_rcv()
2184 tipc_node_link_down(n, bearer_id, false); in tipc_rcv()
2198 tipc_bearer_xmit(net, bearer_id, &xmitq, &le->maddr, n); in tipc_rcv()
2210 int bearer_id = b->identity; in tipc_node_apply_property() local
2221 e = &n->links[bearer_id]; in tipc_node_apply_property()
2234 tipc_bearer_xmit(net, bearer_id, &xmitq, &e->maddr, NULL); in tipc_node_apply_property()
2388 unsigned int *bearer_id) in tipc_node_find_by_name() argument
2396 *bearer_id = 0; in tipc_node_find_by_name()
2403 *bearer_id = i; in tipc_node_find_by_name()
2421 int bearer_id; in tipc_nl_node_set_link() local
2448 node = tipc_node_find_by_name(net, name, &bearer_id); in tipc_nl_node_set_link()
2454 link = node->links[bearer_id].link; in tipc_nl_node_set_link()
2493 tipc_bearer_xmit(net, bearer_id, &xmitq, &node->links[bearer_id].maddr, in tipc_nl_node_set_link()
2532 int bearer_id; in tipc_nl_node_get_link() local
2536 node = tipc_node_find_by_name(net, name, &bearer_id); in tipc_nl_node_get_link()
2543 link = node->links[bearer_id].link; in tipc_nl_node_get_link()
2567 unsigned int bearer_id; in tipc_nl_node_reset_link_stats() local
2611 node = tipc_node_find_by_name(net, link_name, &bearer_id); in tipc_nl_node_reset_link_stats()
2615 le = &node->links[bearer_id]; in tipc_nl_node_reset_link_stats()
2618 link = node->links[bearer_id].link; in tipc_nl_node_reset_link_stats()
2840 int bearer_id; in tipc_nl_node_dump_monitor() local
2851 for (bearer_id = prev_bearer; bearer_id < MAX_BEARERS; bearer_id++) { in tipc_nl_node_dump_monitor()
2852 err = __tipc_nl_add_monitor(net, &msg, bearer_id); in tipc_nl_node_dump_monitor()
2857 cb->args[0] = bearer_id; in tipc_nl_node_dump_monitor()
2867 u32 bearer_id = cb->args[2]; in tipc_nl_node_dump_monitor_peer() local
2889 bearer_id = nla_get_u32(mon[TIPC_NLA_MON_REF]); in tipc_nl_node_dump_monitor_peer()
2891 if (bearer_id >= MAX_BEARERS) in tipc_nl_node_dump_monitor_peer()
2903 err = tipc_nl_add_monitor_peer(net, &msg, bearer_id, &prev_node); in tipc_nl_node_dump_monitor_peer()
2910 cb->args[2] = bearer_id; in tipc_nl_node_dump_monitor_peer()