Lines Matching +full:rcv +full:- +full:sel
4 * Copyright (c) 2000-2006, 2012-2016, Ericsson AB
5 * Copyright (c) 2005-2006, 2010-2014, Wind River Systems
83 * struct tipc_node - TIPC node structure
103 * @peer_id: 128-bit ID of peer
195 static struct tipc_link *node_active_link(struct tipc_node *n, int sel) in node_active_link() argument
197 int bearer_id = n->active_links[sel & 1]; in node_active_link()
202 return n->links[bearer_id].link; in node_active_link()
205 int tipc_node_get_mtu(struct net *net, u32 addr, u32 sel, bool connected) in tipc_node_get_mtu() argument
218 if (n->peer_net && connected) { in tipc_node_get_mtu()
223 bearer_id = n->active_links[sel & 1]; in tipc_node_get_mtu()
225 mtu = n->links[bearer_id].mtu; in tipc_node_get_mtu()
246 memcpy(id, &n->peer_id, TIPC_NODEID_LEN); in tipc_node_get_id()
259 caps = n->capabilities; in tipc_node_get_capabilities()
266 return (node) ? node->addr : 0; in tipc_node_get_addr()
271 return node->peer_id_string; in tipc_node_get_id_str()
276 * tipc_node_crypto_rx - Retrieve crypto RX handle from node
282 return (__n) ? __n->crypto_rx : NULL; in tipc_node_crypto_rx()
287 return container_of(pos, struct tipc_node, list)->crypto_rx; in tipc_node_crypto_rx_by_list()
295 return (n) ? n->crypto_rx : NULL; in tipc_node_crypto_rx_by_addr()
304 tipc_crypto_stop(&n->crypto_rx); in tipc_node_free()
313 kfree(n->bc_entry.link); in tipc_node_kref_release()
314 call_rcu(&n->rcu, tipc_node_free); in tipc_node_kref_release()
319 kref_put(&node->kref, tipc_node_kref_release); in tipc_node_put()
324 kref_get(&node->kref); in tipc_node_get()
328 * tipc_node_find - locate specified node object, if it exists
337 hlist_for_each_entry_rcu(node, &tn->node_htable[thash], hash) { in tipc_node_find()
338 if (node->addr != addr || node->preliminary) in tipc_node_find()
340 if (!kref_get_unless_zero(&node->kref)) in tipc_node_find()
348 /* tipc_node_find_by_id - locate specified node object by its 128-bit id
350 * to find the node by its 32-bit id, and is not time critical
359 list_for_each_entry_rcu(n, &tn->node_list, list) { in tipc_node_find_by_id()
360 read_lock_bh(&n->lock); in tipc_node_find_by_id()
361 if (!memcmp(id, n->peer_id, 16) && in tipc_node_find_by_id()
362 kref_get_unless_zero(&n->kref)) in tipc_node_find_by_id()
364 read_unlock_bh(&n->lock); in tipc_node_find_by_id()
373 __acquires(n->lock) in tipc_node_read_lock()
375 read_lock_bh(&n->lock); in tipc_node_read_lock()
379 __releases(n->lock) in tipc_node_read_unlock()
381 read_unlock_bh(&n->lock); in tipc_node_read_unlock()
385 __acquires(n->lock) in tipc_node_write_lock()
387 write_lock_bh(&n->lock); in tipc_node_write_lock()
391 __releases(n->lock) in tipc_node_write_unlock_fast()
393 write_unlock_bh(&n->lock); in tipc_node_write_unlock_fast()
397 __releases(n->lock) in tipc_node_write_unlock()
400 struct net *net = n->net; in tipc_node_write_unlock()
401 u32 flags = n->action_flags; in tipc_node_write_unlock()
407 write_unlock_bh(&n->lock); in tipc_node_write_unlock()
412 TIPC_LINK_STATE, n->addr, n->addr); in tipc_node_write_unlock()
413 sk.ref = n->link_id; in tipc_node_write_unlock()
415 node = n->addr; in tipc_node_write_unlock()
416 bearer_id = n->link_id & 0xffff; in tipc_node_write_unlock()
417 publ_list = &n->publ_list; in tipc_node_write_unlock()
419 n->action_flags &= ~(TIPC_NOTIFY_NODE_DOWN | TIPC_NOTIFY_NODE_UP | in tipc_node_write_unlock()
422 write_unlock_bh(&n->lock); in tipc_node_write_unlock()
425 tipc_publ_notify(net, publ_list, node, n->capabilities); in tipc_node_write_unlock()
428 tipc_named_node_up(net, node, n->capabilities); in tipc_node_write_unlock()
442 int net_id = tipc_netid(n->net); in tipc_node_assign_peer_net()
447 if (n->peer_net) in tipc_node_assign_peer_net()
455 if (tn_peer->net_id != net_id) in tipc_node_assign_peer_net()
457 if (memcmp(n->peer_id, tn_peer->node_id, NODE_ID_LEN)) in tipc_node_assign_peer_net()
459 hash_chk = tipc_net_hash_mixes(tmp, tn_peer->random); in tipc_node_assign_peer_net()
462 n->peer_net = tmp; in tipc_node_assign_peer_net()
463 n->peer_hash_mix = hash_mixes; in tipc_node_assign_peer_net()
479 spin_lock_bh(&tn->node_list_lock); in tipc_node_create()
483 if (!n->preliminary) in tipc_node_create()
491 n->capabilities, &n->bc_entry.inputq1, in tipc_node_create()
492 &n->bc_entry.namedq, snd_l, &n->bc_entry.link)) { in tipc_node_create()
493 pr_warn("Broadcast rcv link refresh failed, no memory\n"); in tipc_node_create()
499 n->preliminary = false; in tipc_node_create()
500 n->addr = addr; in tipc_node_create()
501 hlist_del_rcu(&n->hash); in tipc_node_create()
502 hlist_add_head_rcu(&n->hash, in tipc_node_create()
503 &tn->node_htable[tipc_hashfn(addr)]); in tipc_node_create()
504 list_del_rcu(&n->list); in tipc_node_create()
505 list_for_each_entry_rcu(temp_node, &tn->node_list, list) { in tipc_node_create()
506 if (n->addr < temp_node->addr) in tipc_node_create()
509 list_add_tail_rcu(&n->list, &temp_node->list); in tipc_node_create()
513 if (n->peer_hash_mix ^ hash_mixes) in tipc_node_create()
515 if (n->capabilities == capabilities) in tipc_node_create()
519 n->capabilities = capabilities; in tipc_node_create()
521 l = n->links[bearer_id].link; in tipc_node_create()
528 tn->capabilities = TIPC_NODE_CAPABILITIES; in tipc_node_create()
529 list_for_each_entry_rcu(temp_node, &tn->node_list, list) { in tipc_node_create()
530 tn->capabilities &= temp_node->capabilities; in tipc_node_create()
534 (tn->capabilities & TIPC_BCAST_RCAST)); in tipc_node_create()
543 tipc_nodeid2string(n->peer_id_string, peer_id); in tipc_node_create()
545 if (unlikely(tipc_crypto_start(&n->crypto_rx, net, n))) { in tipc_node_create()
546 pr_warn("Failed to start crypto RX(%s)!\n", n->peer_id_string); in tipc_node_create()
552 n->addr = addr; in tipc_node_create()
553 n->preliminary = preliminary; in tipc_node_create()
554 memcpy(&n->peer_id, peer_id, 16); in tipc_node_create()
555 n->net = net; in tipc_node_create()
556 n->peer_net = NULL; in tipc_node_create()
557 n->peer_hash_mix = 0; in tipc_node_create()
560 n->capabilities = capabilities; in tipc_node_create()
561 kref_init(&n->kref); in tipc_node_create()
562 rwlock_init(&n->lock); in tipc_node_create()
563 INIT_HLIST_NODE(&n->hash); in tipc_node_create()
564 INIT_LIST_HEAD(&n->list); in tipc_node_create()
565 INIT_LIST_HEAD(&n->publ_list); in tipc_node_create()
566 INIT_LIST_HEAD(&n->conn_sks); in tipc_node_create()
567 skb_queue_head_init(&n->bc_entry.namedq); in tipc_node_create()
568 skb_queue_head_init(&n->bc_entry.inputq1); in tipc_node_create()
569 __skb_queue_head_init(&n->bc_entry.arrvq); in tipc_node_create()
570 skb_queue_head_init(&n->bc_entry.inputq2); in tipc_node_create()
572 spin_lock_init(&n->links[i].lock); in tipc_node_create()
573 n->state = SELF_DOWN_PEER_LEAVING; in tipc_node_create()
574 n->delete_at = jiffies + msecs_to_jiffies(NODE_CLEANUP_AFTER); in tipc_node_create()
575 n->signature = INVALID_NODE_SIG; in tipc_node_create()
576 n->active_links[0] = INVALID_BEARER_ID; in tipc_node_create()
577 n->active_links[1] = INVALID_BEARER_ID; in tipc_node_create()
581 n->capabilities, &n->bc_entry.inputq1, in tipc_node_create()
582 &n->bc_entry.namedq, snd_l, &n->bc_entry.link)) { in tipc_node_create()
583 pr_warn("Broadcast rcv link creation failed, no memory\n"); in tipc_node_create()
589 timer_setup(&n->timer, tipc_node_timeout, 0); in tipc_node_create()
591 n->keepalive_intv = 10000; in tipc_node_create()
592 intv = jiffies + msecs_to_jiffies(n->keepalive_intv); in tipc_node_create()
593 if (!mod_timer(&n->timer, intv)) in tipc_node_create()
595 hlist_add_head_rcu(&n->hash, &tn->node_htable[tipc_hashfn(addr)]); in tipc_node_create()
596 list_for_each_entry_rcu(temp_node, &tn->node_list, list) { in tipc_node_create()
597 if (n->addr < temp_node->addr) in tipc_node_create()
600 list_add_tail_rcu(&n->list, &temp_node->list); in tipc_node_create()
602 tn->capabilities = TIPC_NODE_CAPABILITIES; in tipc_node_create()
603 list_for_each_entry_rcu(temp_node, &tn->node_list, list) { in tipc_node_create()
604 tn->capabilities &= temp_node->capabilities; in tipc_node_create()
606 tipc_bcast_toggle_rcast(net, (tn->capabilities & TIPC_BCAST_RCAST)); in tipc_node_create()
609 spin_unlock_bh(&tn->node_list_lock); in tipc_node_create()
619 if (intv < n->keepalive_intv) in tipc_node_calculate_timer()
620 n->keepalive_intv = intv; in tipc_node_calculate_timer()
623 tipc_link_set_abort_limit(l, tol / n->keepalive_intv); in tipc_node_calculate_timer()
629 tipc_crypto_key_flush(node->crypto_rx); in tipc_node_delete_from_list()
631 list_del_rcu(&node->list); in tipc_node_delete_from_list()
632 hlist_del_rcu(&node->hash); in tipc_node_delete_from_list()
641 del_timer_sync(&node->timer); in tipc_node_delete()
650 spin_lock_bh(&tn->node_list_lock); in tipc_node_stop()
651 list_for_each_entry_safe(node, t_node, &tn->node_list, list) in tipc_node_stop()
653 spin_unlock_bh(&tn->node_list_lock); in tipc_node_stop()
669 list_add_tail(subscr, &n->publ_list); in tipc_node_subscribe()
704 return -EHOSTUNREACH; in tipc_node_add_conn()
708 err = -EHOSTUNREACH; in tipc_node_add_conn()
711 conn->peer_node = dnode; in tipc_node_add_conn()
712 conn->port = port; in tipc_node_add_conn()
713 conn->peer_port = peer_port; in tipc_node_add_conn()
716 list_add_tail(&conn->list, &node->conn_sks); in tipc_node_add_conn()
736 list_for_each_entry_safe(conn, safe, &node->conn_sks, list) { in tipc_node_remove_conn()
737 if (port != conn->port) in tipc_node_remove_conn()
739 list_del(&conn->list); in tipc_node_remove_conn()
751 struct tipc_link_entry *le = &node->links[i]; in tipc_node_clear_links()
753 if (le->link) { in tipc_node_clear_links()
754 kfree(le->link); in tipc_node_clear_links()
755 le->link = NULL; in tipc_node_clear_links()
756 node->link_cnt--; in tipc_node_clear_links()
761 /* tipc_node_cleanup - delete nodes that does not
767 struct tipc_net *tn = tipc_net(peer->net); in tipc_node_cleanup()
771 if (!spin_trylock_bh(&tn->node_list_lock)) in tipc_node_cleanup()
776 if (!node_is_up(peer) && time_after(jiffies, peer->delete_at)) { in tipc_node_cleanup()
784 spin_unlock_bh(&tn->node_list_lock); in tipc_node_cleanup()
789 tn->capabilities = TIPC_NODE_CAPABILITIES; in tipc_node_cleanup()
790 list_for_each_entry_rcu(temp_node, &tn->node_list, list) { in tipc_node_cleanup()
791 tn->capabilities &= temp_node->capabilities; in tipc_node_cleanup()
793 tipc_bcast_toggle_rcast(peer->net, in tipc_node_cleanup()
794 (tn->capabilities & TIPC_BCAST_RCAST)); in tipc_node_cleanup()
795 spin_unlock_bh(&tn->node_list_lock); in tipc_node_cleanup()
799 /* tipc_node_timeout - handle expiration of node timer
806 int remains = n->link_cnt; in tipc_node_timeout()
819 tipc_crypto_timeout(n->crypto_rx); in tipc_node_timeout()
827 n->keepalive_intv = 10000; in tipc_node_timeout()
831 le = &n->links[bearer_id]; in tipc_node_timeout()
832 if (le->link) { in tipc_node_timeout()
833 spin_lock_bh(&le->lock); in tipc_node_timeout()
835 tipc_node_calculate_timer(n, le->link); in tipc_node_timeout()
836 rc = tipc_link_timeout(le->link, &xmitq); in tipc_node_timeout()
837 spin_unlock_bh(&le->lock); in tipc_node_timeout()
838 remains--; in tipc_node_timeout()
841 tipc_bearer_xmit(n->net, bearer_id, &xmitq, &le->maddr, n); in tipc_node_timeout()
845 mod_timer(&n->timer, jiffies + msecs_to_jiffies(n->keepalive_intv)); in tipc_node_timeout()
849 * __tipc_node_link_up - handle addition of link
859 int *slot0 = &n->active_links[0]; in __tipc_node_link_up()
860 int *slot1 = &n->active_links[1]; in __tipc_node_link_up()
862 struct tipc_link *nl = n->links[bearer_id].link; in __tipc_node_link_up()
871 n->working_links++; in __tipc_node_link_up()
872 n->action_flags |= TIPC_NOTIFY_LINK_UP; in __tipc_node_link_up()
873 n->link_id = tipc_link_id(nl); in __tipc_node_link_up()
876 n->links[bearer_id].mtu = tipc_link_mss(nl); in __tipc_node_link_up()
878 tipc_bearer_add_dest(n->net, bearer_id, n->addr); in __tipc_node_link_up()
879 tipc_bcast_inc_bearer_dst_cnt(n->net, bearer_id); in __tipc_node_link_up()
893 n->action_flags |= TIPC_NOTIFY_NODE_UP; in __tipc_node_link_up()
895 tipc_bcast_add_peer(n->net, nl, xmitq); in __tipc_node_link_up()
918 * tipc_node_link_up - handle addition of link
932 maddr = &n->links[bearer_id].maddr; in tipc_node_link_up()
933 tipc_bearer_xmit(n->net, bearer_id, xmitq, maddr, n); in tipc_node_link_up()
938 * tipc_node_link_failover() - start failover in case "half-failover"
944 * 1. Both links <1A-2A>, <1B-2B> down
947 * 3. Link <1B-2B> up
949 * 5. Node 2 starts failover onto link <1B-2B>
954 * @l: link peer endpoint failingover (- can be NULL)
962 /* Avoid to be "self-failover" that can never end */ in tipc_node_link_failover()
973 n->sync_point = tipc_link_rcv_nxt(tnl) + (U16_MAX / 2 - 1); in tipc_node_link_failover()
982 * __tipc_node_link_down - handle loss of link
992 struct tipc_link_entry *le = &n->links[*bearer_id]; in __tipc_node_link_down()
993 int *slot0 = &n->active_links[0]; in __tipc_node_link_down()
994 int *slot1 = &n->active_links[1]; in __tipc_node_link_down()
998 l = n->links[*bearer_id].link; in __tipc_node_link_down()
1002 n->working_links--; in __tipc_node_link_down()
1003 n->action_flags |= TIPC_NOTIFY_LINK_DOWN; in __tipc_node_link_down()
1004 n->link_id = tipc_link_id(l); in __tipc_node_link_down()
1006 tipc_bearer_remove_dest(n->net, *bearer_id, n->addr); in __tipc_node_link_down()
1015 _l = n->links[i].link; in __tipc_node_link_down()
1040 *maddr = &n->links[*bearer_id].maddr; in __tipc_node_link_down()
1041 node_lost_contact(n, &le->inputq); in __tipc_node_link_down()
1042 tipc_bcast_dec_bearer_dst_cnt(n->net, *bearer_id); in __tipc_node_link_down()
1045 tipc_bcast_dec_bearer_dst_cnt(n->net, *bearer_id); in __tipc_node_link_down()
1048 *bearer_id = n->active_links[0]; in __tipc_node_link_down()
1049 tnl = n->links[*bearer_id].link; in __tipc_node_link_down()
1052 n->sync_point = tipc_link_rcv_nxt(tnl) + (U16_MAX / 2 - 1); in __tipc_node_link_down()
1054 trace_tipc_link_reset(l, TIPC_DUMP_ALL, "link down -> failover!"); in __tipc_node_link_down()
1059 *maddr = &n->links[*bearer_id].maddr; in __tipc_node_link_down()
1064 struct tipc_link_entry *le = &n->links[bearer_id]; in tipc_node_link_down()
1066 struct tipc_link *l = le->link; in tipc_node_link_down()
1085 le->link = NULL; in tipc_node_link_down()
1086 n->link_cnt--; in tipc_node_link_down()
1091 tipc_mon_remove_peer(n->net, n->addr, old_bearer_id); in tipc_node_link_down()
1093 tipc_bearer_xmit(n->net, bearer_id, &xmitq, maddr, n); in tipc_node_link_down()
1094 tipc_sk_rcv(n->net, &le->inputq); in tipc_node_link_down()
1099 return n->active_links[0] != INVALID_BEARER_ID; in node_is_up()
1122 addr ^= tipc_net(net)->random; in tipc_node_suggest_addr()
1143 if (!memcmp(n->peer_id, id, NODE_ID_LEN)) in tipc_node_try_addr()
1154 sugg_addr = n->addr; in tipc_node_try_addr()
1155 preliminary = n->preliminary; in tipc_node_try_addr()
1162 if (tn->trial_addr == addr) in tipc_node_try_addr()
1197 le = &n->links[b->identity]; in tipc_node_check_dest()
1200 l = le->link; in tipc_node_check_dest()
1203 addr_match = l && !memcmp(&le->maddr, maddr, sizeof(*maddr)); in tipc_node_check_dest()
1204 sign_match = (signature == n->signature); in tipc_node_check_dest()
1211 if (!n->peer_hash_mix) in tipc_node_check_dest()
1212 n->peer_hash_mix = hash_mixes; in tipc_node_check_dest()
1237 * - Delayed re-discovery; this link endpoint has already in tipc_node_check_dest()
1238 * reset and re-established contact with the peer, before in tipc_node_check_dest()
1241 * - The peer came back so fast that our side has not in tipc_node_check_dest()
1244 * endpoint at the peer end, and the link will re-establish. in tipc_node_check_dest()
1247 n->signature = signature; in tipc_node_check_dest()
1252 n->signature = signature; in tipc_node_check_dest()
1263 n->signature = signature; in tipc_node_check_dest()
1274 if (n->link_cnt == 2) in tipc_node_check_dest()
1277 if_name = strchr(b->name, ':') + 1; in tipc_node_check_dest()
1279 if (!tipc_link_create(net, if_name, b->identity, b->tolerance, in tipc_node_check_dest()
1280 b->net_plane, b->mtu, b->priority, in tipc_node_check_dest()
1281 b->min_win, b->max_win, session, in tipc_node_check_dest()
1283 n->capabilities, in tipc_node_check_dest()
1284 tipc_bc_sndlink(n->net), n->bc_entry.link, in tipc_node_check_dest()
1285 &le->inputq, in tipc_node_check_dest()
1286 &n->bc_entry.namedq, &l)) { in tipc_node_check_dest()
1293 if (n->state == NODE_FAILINGOVER) in tipc_node_check_dest()
1296 le->link = l; in tipc_node_check_dest()
1297 n->link_cnt++; in tipc_node_check_dest()
1299 if (n->link_cnt == 1) { in tipc_node_check_dest()
1300 intv = jiffies + msecs_to_jiffies(n->keepalive_intv); in tipc_node_check_dest()
1301 if (!mod_timer(&n->timer, intv)) in tipc_node_check_dest()
1305 memcpy(&le->maddr, maddr, sizeof(*maddr)); in tipc_node_check_dest()
1309 tipc_node_link_down(n, b->identity, false); in tipc_node_check_dest()
1319 list_for_each_entry_rcu(n, &tn->node_list, list) { in tipc_node_delete_links()
1329 pr_warn("Resetting all links to %x\n", n->addr); in tipc_node_reset_links()
1337 /* tipc_node_fsm_evt - node finite state machine
1342 int state = n->state; in tipc_node_fsm_evt()
1507 trace_tipc_node_fsm(n->peer_id, n->state, state, evt); in tipc_node_fsm_evt()
1508 n->state = state; in tipc_node_fsm_evt()
1513 trace_tipc_node_fsm(n->peer_id, n->state, state, evt); in tipc_node_fsm_evt()
1521 struct list_head *conns = &n->conn_sks; in node_lost_contact()
1525 pr_debug("Lost contact with %x\n", n->addr); in node_lost_contact()
1526 n->delete_at = jiffies + msecs_to_jiffies(NODE_CLEANUP_AFTER); in node_lost_contact()
1530 tipc_bcast_remove_peer(n->net, n->bc_entry.link); in node_lost_contact()
1531 skb_queue_purge(&n->bc_entry.namedq); in node_lost_contact()
1535 l = n->links[i].link; in node_lost_contact()
1541 n->action_flags |= TIPC_NOTIFY_NODE_DOWN; in node_lost_contact()
1542 n->peer_net = NULL; in node_lost_contact()
1543 n->peer_hash_mix = 0; in node_lost_contact()
1547 SHORT_H_SIZE, 0, tipc_own_addr(n->net), in node_lost_contact()
1548 conn->peer_node, conn->port, in node_lost_contact()
1549 conn->peer_port, TIPC_ERR_NO_NODE); in node_lost_contact()
1552 list_del(&conn->list); in node_lost_contact()
1558 * tipc_node_get_linkname - get the name of a link
1572 int err = -EINVAL; in tipc_node_get_linkname()
1582 link = node->links[bearer_id].link; in tipc_node_get_linkname()
1599 hdr = genlmsg_put(msg->skb, msg->portid, msg->seq, &tipc_genl_family, in __tipc_nl_add_node()
1602 return -EMSGSIZE; in __tipc_nl_add_node()
1604 attrs = nla_nest_start_noflag(msg->skb, TIPC_NLA_NODE); in __tipc_nl_add_node()
1608 if (nla_put_u32(msg->skb, TIPC_NLA_NODE_ADDR, node->addr)) in __tipc_nl_add_node()
1611 if (nla_put_flag(msg->skb, TIPC_NLA_NODE_UP)) in __tipc_nl_add_node()
1614 nla_nest_end(msg->skb, attrs); in __tipc_nl_add_node()
1615 genlmsg_end(msg->skb, hdr); in __tipc_nl_add_node()
1620 nla_nest_cancel(msg->skb, attrs); in __tipc_nl_add_node()
1622 genlmsg_cancel(msg->skb, hdr); in __tipc_nl_add_node()
1624 return -EMSGSIZE; in __tipc_nl_add_node()
1640 spin_lock_init(&list->lock); in tipc_lxc_xmit()
1665 spin_lock_init(&list->lock); in tipc_lxc_xmit()
1679 * tipc_node_xmit() - general link level function for message sending
1685 * Return: 0 if success, otherwise: -ELINKCONG,-EHOSTUNREACH,-EMSGSIZE,-ENOBUF
1700 spin_lock_init(&list->lock); in tipc_node_xmit()
1708 return -EHOSTUNREACH; in tipc_node_xmit()
1714 peer_net = n->peer_net; in tipc_node_xmit()
1728 bearer_id = n->active_links[selector & 1]; in tipc_node_xmit()
1733 return -EHOSTUNREACH; in tipc_node_xmit()
1737 le = &n->links[bearer_id]; in tipc_node_xmit()
1738 spin_lock_bh(&le->lock); in tipc_node_xmit()
1739 rc = tipc_link_xmit(le->link, list, &xmitq); in tipc_node_xmit()
1740 spin_unlock_bh(&le->lock); in tipc_node_xmit()
1743 if (unlikely(rc == -ENOBUFS)) in tipc_node_xmit()
1746 tipc_bearer_xmit(net, bearer_id, &xmitq, &le->maddr, n); in tipc_node_xmit()
1805 dst = n->addr; in tipc_node_broadcast()
1822 struct tipc_bclink_entry *be = &n->bc_entry; in tipc_node_mcast_rcv()
1825 spin_lock_bh(&be->inputq2.lock); in tipc_node_mcast_rcv()
1826 spin_lock_bh(&be->inputq1.lock); in tipc_node_mcast_rcv()
1827 skb_queue_splice_tail_init(&be->inputq1, &be->arrvq); in tipc_node_mcast_rcv()
1828 spin_unlock_bh(&be->inputq1.lock); in tipc_node_mcast_rcv()
1829 spin_unlock_bh(&be->inputq2.lock); in tipc_node_mcast_rcv()
1830 tipc_sk_mcast_rcv(n->net, &be->arrvq, &be->inputq2); in tipc_node_mcast_rcv()
1839 rc = tipc_bcast_sync_rcv(n->net, n->bc_entry.link, hdr, xmitq); in tipc_node_bc_sync_rcv()
1855 ucl = n->links[bearer_id].link; in tipc_node_bc_sync_rcv()
1862 * tipc_node_bc_rcv - process TIPC broadcast packet arriving from off-node
1882 /* If NACK for other node, let rcv link for that node peek into it */ in tipc_node_bc_rcv()
1891 be = &n->bc_entry; in tipc_node_bc_rcv()
1892 le = &n->links[bearer_id]; in tipc_node_bc_rcv()
1894 rc = tipc_bcast_rcv(net, be->link, skb); in tipc_node_bc_rcv()
1899 tipc_link_build_state_msg(le->link, &xmitq); in tipc_node_bc_rcv()
1904 tipc_bearer_xmit(net, bearer_id, &xmitq, &le->maddr, n); in tipc_node_bc_rcv()
1906 if (!skb_queue_empty(&be->inputq1)) in tipc_node_bc_rcv()
1910 if (!skb_queue_empty(&n->bc_entry.namedq)) in tipc_node_bc_rcv()
1911 tipc_named_rcv(net, &n->bc_entry.namedq, in tipc_node_bc_rcv()
1912 &n->bc_entry.named_rcv_nxt, in tipc_node_bc_rcv()
1913 &n->bc_entry.named_open); in tipc_node_bc_rcv()
1923 * tipc_node_check_state - check and if necessary update node state
1939 int state = n->state; in tipc_node_check_state()
1948 l = n->links[bearer_id].link; in tipc_node_check_state()
1959 if ((pb_id != bearer_id) && n->links[pb_id].link) { in tipc_node_check_state()
1960 pl = n->links[pb_id].link; in tipc_node_check_state()
1996 syncpt = oseqno + exp_pkts - 1; in tipc_node_check_state()
2000 "node link down <- failover!"); in tipc_node_check_state()
2011 if (n->state != NODE_FAILINGOVER) in tipc_node_check_state()
2015 if (less(syncpt, n->sync_point)) in tipc_node_check_state()
2016 n->sync_point = syncpt; in tipc_node_check_state()
2020 if ((n->state == NODE_FAILINGOVER) && tipc_link_is_up(l)) { in tipc_node_check_state()
2021 if (!more(rcv_nxt, n->sync_point)) in tipc_node_check_state()
2035 if (n->capabilities & TIPC_TUNNEL_ENHANCED) in tipc_node_check_state()
2038 syncpt = msg_seqno(msg_inner_hdr(hdr)) + exp_pkts - 1; in tipc_node_check_state()
2041 if (n->state == SELF_UP_PEER_UP) { in tipc_node_check_state()
2042 n->sync_point = syncpt; in tipc_node_check_state()
2049 if (n->state == NODE_SYNCHING) { in tipc_node_check_state()
2057 dlv_nxt = tipc_link_rcv_nxt(pl) - inputq_len; in tipc_node_check_state()
2058 if (more(dlv_nxt, n->sync_point)) { in tipc_node_check_state()
2075 * tipc_rcv - process TIPC packets/messages arriving from off-node
2089 int bearer_id = b->identity; in tipc_rcv()
2097 if (TIPC_SKB_CB(skb)->decrypted || !tipc_ehdr_validate(skb)) in tipc_rcv()
2098 goto rcv; in tipc_rcv()
2100 ehdr = (struct tipc_ehdr *)skb->data; in tipc_rcv()
2101 if (likely(ehdr->user != LINK_CONFIG)) { in tipc_rcv()
2102 n = tipc_node_find(net, ntohl(ehdr->addr)); in tipc_rcv()
2106 n = tipc_node_find_by_id(net, ehdr->id); in tipc_rcv()
2109 tipc_crypto_rcv(net, (n) ? n->crypto_rx : NULL, &skb, b); in tipc_rcv()
2113 rcv: in tipc_rcv()
2115 /* Ensure message is well-formed before touching the header */ in tipc_rcv()
2139 le = &n->links[bearer_id]; in tipc_rcv()
2149 } else if (unlikely(tipc_link_acked(n->bc_entry.link) != bc_ack)) { in tipc_rcv()
2150 tipc_bcast_ack_rcv(net, n->bc_entry.link, hdr); in tipc_rcv()
2155 if (likely((n->state == SELF_UP_PEER_UP) && (usr != TUNNEL_PROTOCOL))) { in tipc_rcv()
2156 spin_lock_bh(&le->lock); in tipc_rcv()
2157 if (le->link) { in tipc_rcv()
2158 rc = tipc_link_rcv(le->link, skb, &xmitq); in tipc_rcv()
2161 spin_unlock_bh(&le->lock); in tipc_rcv()
2171 if (le->link) { in tipc_rcv()
2172 rc = tipc_link_rcv(le->link, skb, &xmitq); in tipc_rcv()
2185 if (unlikely(!skb_queue_empty(&n->bc_entry.namedq))) in tipc_rcv()
2186 tipc_named_rcv(net, &n->bc_entry.namedq, in tipc_rcv()
2187 &n->bc_entry.named_rcv_nxt, in tipc_rcv()
2188 &n->bc_entry.named_open); in tipc_rcv()
2190 if (unlikely(!skb_queue_empty(&n->bc_entry.inputq1))) in tipc_rcv()
2193 if (!skb_queue_empty(&le->inputq)) in tipc_rcv()
2194 tipc_sk_rcv(net, &le->inputq); in tipc_rcv()
2197 tipc_bearer_xmit(net, bearer_id, &xmitq, &le->maddr, n); in tipc_rcv()
2209 int bearer_id = b->identity; in tipc_node_apply_property()
2218 list_for_each_entry_rcu(n, &tn->node_list, list) { in tipc_node_apply_property()
2220 e = &n->links[bearer_id]; in tipc_node_apply_property()
2221 if (e->link) { in tipc_node_apply_property()
2223 tipc_link_set_tolerance(e->link, b->tolerance, in tipc_node_apply_property()
2226 tipc_link_set_mtu(e->link, b->mtu); in tipc_node_apply_property()
2229 e->mtu = tipc_link_mss(e->link); in tipc_node_apply_property()
2233 tipc_bearer_xmit(net, bearer_id, &xmitq, &e->maddr, NULL); in tipc_node_apply_property()
2241 struct net *net = sock_net(skb->sk); in tipc_nl_peer_rm()
2252 if (!info->attrs[TIPC_NLA_NET]) in tipc_nl_peer_rm()
2253 return -EINVAL; in tipc_nl_peer_rm()
2256 info->attrs[TIPC_NLA_NET], in tipc_nl_peer_rm()
2257 tipc_nl_net_policy, info->extack); in tipc_nl_peer_rm()
2267 return -EINVAL; in tipc_nl_peer_rm()
2272 return -EINVAL; in tipc_nl_peer_rm()
2279 return -ENOTSUPP; in tipc_nl_peer_rm()
2281 spin_lock_bh(&tn->node_list_lock); in tipc_nl_peer_rm()
2284 spin_unlock_bh(&tn->node_list_lock); in tipc_nl_peer_rm()
2285 return -ENXIO; in tipc_nl_peer_rm()
2289 if (peer->state != SELF_DOWN_PEER_DOWN && in tipc_nl_peer_rm()
2290 peer->state != SELF_DOWN_PEER_LEAVING) { in tipc_nl_peer_rm()
2292 err = -EBUSY; in tipc_nl_peer_rm()
2301 tn->capabilities = TIPC_NODE_CAPABILITIES; in tipc_nl_peer_rm()
2302 list_for_each_entry_rcu(temp_node, &tn->node_list, list) { in tipc_nl_peer_rm()
2303 tn->capabilities &= temp_node->capabilities; in tipc_nl_peer_rm()
2305 tipc_bcast_toggle_rcast(net, (tn->capabilities & TIPC_BCAST_RCAST)); in tipc_nl_peer_rm()
2309 spin_unlock_bh(&tn->node_list_lock); in tipc_nl_peer_rm()
2317 struct net *net = sock_net(skb->sk); in tipc_nl_node_dump()
2319 int done = cb->args[0]; in tipc_nl_node_dump()
2320 int last_addr = cb->args[1]; in tipc_nl_node_dump()
2328 msg.portid = NETLINK_CB(cb->skb).portid; in tipc_nl_node_dump()
2329 msg.seq = cb->nlh->nlmsg_seq; in tipc_nl_node_dump()
2343 cb->prev_seq = 1; in tipc_nl_node_dump()
2344 return -EPIPE; in tipc_nl_node_dump()
2349 list_for_each_entry_rcu(node, &tn->node_list, list) { in tipc_nl_node_dump()
2350 if (node->preliminary) in tipc_nl_node_dump()
2353 if (node->addr == last_addr) in tipc_nl_node_dump()
2362 last_addr = node->addr; in tipc_nl_node_dump()
2371 cb->args[0] = done; in tipc_nl_node_dump()
2372 cb->args[1] = last_addr; in tipc_nl_node_dump()
2375 return skb->len; in tipc_nl_node_dump()
2378 /* tipc_node_find_by_name - locate owner node of link by link's name
2381 * @bearer_id: pointer to index in 'node->links' array where the link was found.
2397 list_for_each_entry_rcu(n, &tn->node_list, list) { in tipc_node_find_by_name()
2400 l = n->links[i].link; in tipc_node_find_by_name()
2426 struct net *net = sock_net(skb->sk); in tipc_nl_node_set_link()
2430 if (!info->attrs[TIPC_NLA_LINK]) in tipc_nl_node_set_link()
2431 return -EINVAL; in tipc_nl_node_set_link()
2434 info->attrs[TIPC_NLA_LINK], in tipc_nl_node_set_link()
2435 tipc_nl_link_policy, info->extack); in tipc_nl_node_set_link()
2440 return -EINVAL; in tipc_nl_node_set_link()
2449 return -EINVAL; in tipc_nl_node_set_link()
2453 link = node->links[bearer_id].link; in tipc_nl_node_set_link()
2455 res = -EINVAL; in tipc_nl_node_set_link()
2492 tipc_bearer_xmit(net, bearer_id, &xmitq, &node->links[bearer_id].maddr, in tipc_nl_node_set_link()
2505 msg.portid = info->snd_portid; in tipc_nl_node_get_link()
2506 msg.seq = info->snd_seq; in tipc_nl_node_get_link()
2508 if (!info->attrs[TIPC_NLA_LINK]) in tipc_nl_node_get_link()
2509 return -EINVAL; in tipc_nl_node_get_link()
2512 info->attrs[TIPC_NLA_LINK], in tipc_nl_node_get_link()
2513 tipc_nl_link_policy, info->extack); in tipc_nl_node_get_link()
2518 return -EINVAL; in tipc_nl_node_get_link()
2524 return -ENOMEM; in tipc_nl_node_get_link()
2527 err = tipc_nl_add_bc_link(net, &msg, tipc_net(net)->bcl); in tipc_nl_node_get_link()
2537 err = -EINVAL; in tipc_nl_node_get_link()
2542 link = node->links[bearer_id].link; in tipc_nl_node_get_link()
2545 err = -EINVAL; in tipc_nl_node_get_link()
2570 struct net *net = sock_net(skb->sk); in tipc_nl_node_reset_link_stats()
2574 if (!info->attrs[TIPC_NLA_LINK]) in tipc_nl_node_reset_link_stats()
2575 return -EINVAL; in tipc_nl_node_reset_link_stats()
2578 info->attrs[TIPC_NLA_LINK], in tipc_nl_node_reset_link_stats()
2579 tipc_nl_link_policy, info->extack); in tipc_nl_node_reset_link_stats()
2584 return -EINVAL; in tipc_nl_node_reset_link_stats()
2588 err = -EINVAL; in tipc_nl_node_reset_link_stats()
2596 list_for_each_entry_rcu(node, &tn->node_list, list) { in tipc_nl_node_reset_link_stats()
2598 link = node->bc_entry.link; in tipc_nl_node_reset_link_stats()
2612 return -EINVAL; in tipc_nl_node_reset_link_stats()
2614 le = &node->links[bearer_id]; in tipc_nl_node_reset_link_stats()
2616 spin_lock_bh(&le->lock); in tipc_nl_node_reset_link_stats()
2617 link = node->links[bearer_id].link; in tipc_nl_node_reset_link_stats()
2619 spin_unlock_bh(&le->lock); in tipc_nl_node_reset_link_stats()
2621 return -EINVAL; in tipc_nl_node_reset_link_stats()
2624 spin_unlock_bh(&le->lock); in tipc_nl_node_reset_link_stats()
2640 if (!node->links[i].link) in __tipc_nl_add_node_links()
2644 node->links[i].link, NLM_F_MULTI); in __tipc_nl_add_node_links()
2651 err = tipc_nl_add_bc_link(net, msg, node->bc_entry.link); in __tipc_nl_add_node_links()
2663 struct net *net = sock_net(skb->sk); in tipc_nl_node_dump_link()
2664 struct nlattr **attrs = genl_dumpit_info(cb)->info.attrs; in tipc_nl_node_dump_link()
2669 u32 prev_node = cb->args[0]; in tipc_nl_node_dump_link()
2670 u32 prev_link = cb->args[1]; in tipc_nl_node_dump_link()
2671 int done = cb->args[2]; in tipc_nl_node_dump_link()
2672 bool bc_link = cb->args[3]; in tipc_nl_node_dump_link()
2679 /* Check if broadcast-receiver links dumping is needed */ in tipc_nl_node_dump_link()
2689 return -EINVAL; in tipc_nl_node_dump_link()
2695 msg.portid = NETLINK_CB(cb->skb).portid; in tipc_nl_node_dump_link()
2696 msg.seq = cb->nlh->nlmsg_seq; in tipc_nl_node_dump_link()
2708 cb->prev_seq = 1; in tipc_nl_node_dump_link()
2713 list_for_each_entry_continue_rcu(node, &tn->node_list, in tipc_nl_node_dump_link()
2722 prev_node = node->addr; in tipc_nl_node_dump_link()
2725 err = tipc_nl_add_bc_link(net, &msg, tn->bcl); in tipc_nl_node_dump_link()
2729 list_for_each_entry_rcu(node, &tn->node_list, list) { in tipc_nl_node_dump_link()
2737 prev_node = node->addr; in tipc_nl_node_dump_link()
2744 cb->args[0] = prev_node; in tipc_nl_node_dump_link()
2745 cb->args[1] = prev_link; in tipc_nl_node_dump_link()
2746 cb->args[2] = done; in tipc_nl_node_dump_link()
2747 cb->args[3] = bc_link; in tipc_nl_node_dump_link()
2749 return skb->len; in tipc_nl_node_dump_link()
2755 struct net *net = sock_net(skb->sk); in tipc_nl_node_set_monitor()
2758 if (!info->attrs[TIPC_NLA_MON]) in tipc_nl_node_set_monitor()
2759 return -EINVAL; in tipc_nl_node_set_monitor()
2762 info->attrs[TIPC_NLA_MON], in tipc_nl_node_set_monitor()
2764 info->extack); in tipc_nl_node_set_monitor()
2786 hdr = genlmsg_put(msg->skb, msg->portid, msg->seq, &tipc_genl_family, in __tipc_nl_add_monitor_prop()
2789 return -EMSGSIZE; in __tipc_nl_add_monitor_prop()
2791 attrs = nla_nest_start_noflag(msg->skb, TIPC_NLA_MON); in __tipc_nl_add_monitor_prop()
2797 if (nla_put_u32(msg->skb, TIPC_NLA_MON_ACTIVATION_THRESHOLD, val)) in __tipc_nl_add_monitor_prop()
2800 nla_nest_end(msg->skb, attrs); in __tipc_nl_add_monitor_prop()
2801 genlmsg_end(msg->skb, hdr); in __tipc_nl_add_monitor_prop()
2806 nla_nest_cancel(msg->skb, attrs); in __tipc_nl_add_monitor_prop()
2808 genlmsg_cancel(msg->skb, hdr); in __tipc_nl_add_monitor_prop()
2810 return -EMSGSIZE; in __tipc_nl_add_monitor_prop()
2815 struct net *net = sock_net(skb->sk); in tipc_nl_node_get_monitor()
2821 return -ENOMEM; in tipc_nl_node_get_monitor()
2822 msg.portid = info->snd_portid; in tipc_nl_node_get_monitor()
2823 msg.seq = info->snd_seq; in tipc_nl_node_get_monitor()
2836 struct net *net = sock_net(skb->sk); in tipc_nl_node_dump_monitor()
2837 u32 prev_bearer = cb->args[0]; in tipc_nl_node_dump_monitor()
2846 msg.portid = NETLINK_CB(cb->skb).portid; in tipc_nl_node_dump_monitor()
2847 msg.seq = cb->nlh->nlmsg_seq; in tipc_nl_node_dump_monitor()
2856 cb->args[0] = bearer_id; in tipc_nl_node_dump_monitor()
2858 return skb->len; in tipc_nl_node_dump_monitor()
2864 struct net *net = sock_net(skb->sk); in tipc_nl_node_dump_monitor_peer()
2865 u32 prev_node = cb->args[1]; in tipc_nl_node_dump_monitor_peer()
2866 u32 bearer_id = cb->args[2]; in tipc_nl_node_dump_monitor_peer()
2867 int done = cb->args[0]; in tipc_nl_node_dump_monitor_peer()
2872 struct nlattr **attrs = genl_dumpit_info(cb)->info.attrs; in tipc_nl_node_dump_monitor_peer()
2876 return -EINVAL; in tipc_nl_node_dump_monitor_peer()
2886 return -EINVAL; in tipc_nl_node_dump_monitor_peer()
2891 return -EINVAL; in tipc_nl_node_dump_monitor_peer()
2898 msg.portid = NETLINK_CB(cb->skb).portid; in tipc_nl_node_dump_monitor_peer()
2899 msg.seq = cb->nlh->nlmsg_seq; in tipc_nl_node_dump_monitor_peer()
2907 cb->args[0] = done; in tipc_nl_node_dump_monitor_peer()
2908 cb->args[1] = prev_node; in tipc_nl_node_dump_monitor_peer()
2909 cb->args[2] = bearer_id; in tipc_nl_node_dump_monitor_peer()
2911 return skb->len; in tipc_nl_node_dump_monitor_peer()
2922 return -ENODATA; in tipc_nl_retrieve_key()
2925 return -EINVAL; in tipc_nl_retrieve_key()
2927 if (key->keylen > TIPC_AEAD_KEYLEN_MAX || in tipc_nl_retrieve_key()
2929 return -EINVAL; in tipc_nl_retrieve_key()
2940 return -ENODATA; in tipc_nl_retrieve_nodeid()
2943 return -EINVAL; in tipc_nl_retrieve_nodeid()
2954 return -ENODATA; in tipc_nl_retrieve_rekeying()
2963 struct net *net = sock_net(skb->sk); in __tipc_nl_node_set_key()
2964 struct tipc_crypto *tx = tipc_net(net)->crypto_tx, *c = tx; in __tipc_nl_node_set_key()
2972 if (!info->attrs[TIPC_NLA_NODE]) in __tipc_nl_node_set_key()
2973 return -EINVAL; in __tipc_nl_node_set_key()
2976 info->attrs[TIPC_NLA_NODE], in __tipc_nl_node_set_key()
2977 tipc_nl_node_policy, info->extack); in __tipc_nl_node_set_key()
2984 return -EPERM; in __tipc_nl_node_set_key()
2988 if (rc == -ENODATA) in __tipc_nl_node_set_key()
2992 if (rc == -ENODATA && rekeying) in __tipc_nl_node_set_key()
3003 case -ENODATA: in __tipc_nl_node_set_key()
3013 return -ENOMEM; in __tipc_nl_node_set_key()
3014 c = n->crypto_rx; in __tipc_nl_node_set_key()
3055 struct net *net = sock_net(skb->sk); in __tipc_nl_node_flush_key()
3059 tipc_crypto_key_flush(tn->crypto_tx); in __tipc_nl_node_flush_key()
3061 list_for_each_entry_rcu(n, &tn->node_list, list) in __tipc_nl_node_flush_key()
3062 tipc_crypto_key_flush(n->crypto_rx); in __tipc_nl_node_flush_key()
3081 * tipc_node_dump - dump TIPC node data
3084 * - false: dump only tipc node data
3085 * - true: dump node link data as well
3098 i += scnprintf(buf, sz, "node data: %x", n->addr); in tipc_node_dump()
3099 i += scnprintf(buf + i, sz - i, " %x", n->state); in tipc_node_dump()
3100 i += scnprintf(buf + i, sz - i, " %d", n->active_links[0]); in tipc_node_dump()
3101 i += scnprintf(buf + i, sz - i, " %d", n->active_links[1]); in tipc_node_dump()
3102 i += scnprintf(buf + i, sz - i, " %x", n->action_flags); in tipc_node_dump()
3103 i += scnprintf(buf + i, sz - i, " %u", n->failover_sent); in tipc_node_dump()
3104 i += scnprintf(buf + i, sz - i, " %u", n->sync_point); in tipc_node_dump()
3105 i += scnprintf(buf + i, sz - i, " %d", n->link_cnt); in tipc_node_dump()
3106 i += scnprintf(buf + i, sz - i, " %u", n->working_links); in tipc_node_dump()
3107 i += scnprintf(buf + i, sz - i, " %x", n->capabilities); in tipc_node_dump()
3108 i += scnprintf(buf + i, sz - i, " %lu\n", n->keepalive_intv); in tipc_node_dump()
3113 i += scnprintf(buf + i, sz - i, "link_entry[0]:\n"); in tipc_node_dump()
3114 i += scnprintf(buf + i, sz - i, " mtu: %u\n", n->links[0].mtu); in tipc_node_dump()
3115 i += scnprintf(buf + i, sz - i, " media: "); in tipc_node_dump()
3116 i += tipc_media_addr_printf(buf + i, sz - i, &n->links[0].maddr); in tipc_node_dump()
3117 i += scnprintf(buf + i, sz - i, "\n"); in tipc_node_dump()
3118 i += tipc_link_dump(n->links[0].link, TIPC_DUMP_NONE, buf + i); in tipc_node_dump()
3119 i += scnprintf(buf + i, sz - i, " inputq: "); in tipc_node_dump()
3120 i += tipc_list_dump(&n->links[0].inputq, false, buf + i); in tipc_node_dump()
3122 i += scnprintf(buf + i, sz - i, "link_entry[1]:\n"); in tipc_node_dump()
3123 i += scnprintf(buf + i, sz - i, " mtu: %u\n", n->links[1].mtu); in tipc_node_dump()
3124 i += scnprintf(buf + i, sz - i, " media: "); in tipc_node_dump()
3125 i += tipc_media_addr_printf(buf + i, sz - i, &n->links[1].maddr); in tipc_node_dump()
3126 i += scnprintf(buf + i, sz - i, "\n"); in tipc_node_dump()
3127 i += tipc_link_dump(n->links[1].link, TIPC_DUMP_NONE, buf + i); in tipc_node_dump()
3128 i += scnprintf(buf + i, sz - i, " inputq: "); in tipc_node_dump()
3129 i += tipc_list_dump(&n->links[1].inputq, false, buf + i); in tipc_node_dump()
3131 i += scnprintf(buf + i, sz - i, "bclink:\n "); in tipc_node_dump()
3132 i += tipc_link_dump(n->bc_entry.link, TIPC_DUMP_NONE, buf + i); in tipc_node_dump()
3150 spin_lock_bh(&tn->node_list_lock); in tipc_node_pre_cleanup_net()
3151 list_for_each_entry_rcu(n, &tn->node_list, list) { in tipc_node_pre_cleanup_net()
3152 if (!n->peer_net) in tipc_node_pre_cleanup_net()
3154 if (n->peer_net != exit_net) in tipc_node_pre_cleanup_net()
3157 n->peer_net = NULL; in tipc_node_pre_cleanup_net()
3158 n->peer_hash_mix = 0; in tipc_node_pre_cleanup_net()
3162 spin_unlock_bh(&tn->node_list_lock); in tipc_node_pre_cleanup_net()