Lines Matching defs:link
38 #include "link.h"
55 * TIPC_DISTRIBUTE_NAME: publish or withdraw link state name type
65 struct tipc_link *link;
66 spinlock_t lock; /* per link */
73 struct tipc_link *link;
93 * @bc_entry: broadcast link entry
104 * @link_id: local and remote bearer ids of changing link, if any
204 return n->links[bearer_id].link;
315 kfree(n->bc_entry.link);
494 &n->bc_entry.namedq, snd_l, &n->bc_entry.link)) {
495 pr_warn("Broadcast rcv link refresh failed, no memory\n");
523 l = n->links[bearer_id].link;
584 &n->bc_entry.namedq, snd_l, &n->bc_entry.link)) {
585 pr_warn("Broadcast rcv link creation failed, no memory\n");
624 /* Ensure link's abort limit corresponds to current tolerance */
755 if (le->link) {
756 kfree(le->link);
757 le->link = NULL;
826 * recalculated with link lowest tolerance
834 if (le->link) {
837 tipc_node_calculate_timer(n, le->link);
838 rc = tipc_link_timeout(le->link, &xmitq);
851 * __tipc_node_link_up - handle addition of link
864 struct tipc_link *nl = n->links[bearer_id].link;
883 pr_debug("Established link <%s> on network plane %c\n",
890 /* First link? => give it both slots */
901 /* Second link => redistribute slots */
903 pr_debug("Old link <%s> becomes standby\n", tipc_link_name(ol));
912 pr_debug("New link <%s> is standby\n", tipc_link_name(nl));
915 /* Prepare synchronization with first link */
920 * tipc_node_link_up - handle addition of link
942 * This function is only called in a very special situation where link
950 * 4. Link endpoint 2A down (e.g. due to link tolerance timeout)
951 * 5. Node 2 starts failover onto link <1B-2B>
953 * ==> Node 1 does never start link/node failover!
956 * @l: link peer endpoint failingover (- can be NULL)
957 * @tnl: tunnel link
958 * @xmitq: queue for messages to be xmited on tnl link later
968 /* Don't rush, failure link may be in the process of resetting */
984 * __tipc_node_link_down - handle loss of link
1000 l = n->links[*bearer_id].link;
1010 pr_debug("Lost link <%s> on network plane %c\n",
1013 /* Select new active link if any available */
1017 _l = n->links[i].link;
1038 trace_tipc_link_reset(l, TIPC_DUMP_ALL, "link down!");
1049 /* There is still a working link => initiate failover */
1051 tnl = n->links[*bearer_id].link;
1056 trace_tipc_link_reset(l, TIPC_DUMP_ALL, "link down -> failover!");
1068 struct tipc_link *l = le->link;
1087 le->link = NULL;
1090 trace_tipc_node_link_down(n, true, "node link down or deleted!");
1202 l = le->link;
1216 /* Respond. The link will come up in due time */
1220 * If so, the link will reset soon, and the next
1225 * Ignore requests until the link goes down, if ever.
1229 /* Peer link has changed i/f address without rebooting.
1239 * - Delayed re-discovery; this link endpoint has already
1245 * reset the link, since there can be no working link
1246 * endpoint at the peer end, and the link will re-establish.
1258 * Ignore until the link goes down, if ever.
1274 /* Now create new link if not already existing */
1286 tipc_bc_sndlink(n->net), n->bc_entry.link,
1292 trace_tipc_link_reset(l, TIPC_DUMP_ALL, "link created!");
1298 le->link = l;
1532 tipc_bcast_remove_peer(n->net, n->bc_entry.link);
1535 /* Abort any ongoing link failover */
1537 l = n->links[i].link;
1560 * tipc_node_get_linkname - get the name of a link
1565 * @linkname: link name output buffer
1573 struct tipc_link *link;
1584 link = node->links[bearer_id].link;
1585 if (link) {
1586 strncpy(linkname, tipc_link_name(link), len);
1681 * tipc_node_xmit() - general link level function for message sending
1685 * @selector: a number used for deterministic link selection
1741 rc = tipc_link_xmit(le->link, list, &xmitq);
1841 rc = tipc_bcast_sync_rcv(n->net, n->bc_entry.link, hdr, xmitq);
1857 ucl = n->links[bearer_id].link;
1884 /* If NACK for other node, let rcv link for that node peek into it */
1896 rc = tipc_bcast_rcv(net, be->link, skb);
1898 /* Broadcast ACKs are sent on a unicast link */
1901 tipc_link_build_state_msg(le->link, &xmitq);
1950 l = n->links[bearer_id].link;
1959 /* Find parallel link, if any */
1961 if ((pb_id != bearer_id) && n->links[pb_id].link) {
1962 pl = n->links[pb_id].link;
2002 "node link down <- failover!");
2007 /* If parallel link was already down, and this happened before
2008 * the tunnel link came up, node failover was never started.
2021 /* Open parallel link when tunnel link reaches synch point */
2031 /* No syncing needed if only one link */
2050 /* Open tunnel link when parallel link reaches synch point */
2132 /* Discard unicast link messages destined for another node */
2150 } else if (unlikely(tipc_link_acked(n->bc_entry.link) != bc_ack)) {
2151 tipc_bcast_ack_rcv(net, n->bc_entry.link, hdr);
2158 if (le->link) {
2159 rc = tipc_link_rcv(le->link, skb, &xmitq);
2172 if (le->link) {
2173 rc = tipc_link_rcv(le->link, skb, &xmitq);
2222 if (e->link) {
2224 tipc_link_set_tolerance(e->link, b->tolerance,
2227 tipc_link_set_mtu(e->link, b->mtu);
2229 /* Update MTU for node link entry */
2230 e->mtu = tipc_link_mss(e->link);
2379 /* tipc_node_find_by_name - locate owner node of link by link's name
2381 * @name: pointer to link name string
2382 * @bearer_id: pointer to index in 'node->links' array where the link was found.
2384 * Returns pointer to node owning the link, or 0 if no matching link is found.
2401 l = n->links[i].link;
2423 struct tipc_link *link;
2454 link = node->links[bearer_id].link;
2455 if (!link) {
2473 tipc_link_set_tolerance(link, tol, &xmitq);
2479 tipc_link_set_prio(link, prio, &xmitq);
2485 tipc_link_set_queue_limits(link,
2486 tipc_link_min_win(link),
2534 struct tipc_link *link;
2543 link = node->links[bearer_id].link;
2544 if (!link) {
2550 err = __tipc_nl_add_link(net, &msg, link, 0);
2568 struct tipc_link *link;
2599 link = node->bc_entry.link;
2600 if (link && !strcmp(link_name, tipc_link_name(link))) {
2601 err = tipc_bclink_reset_stats(net, link);
2618 link = node->links[bearer_id].link;
2619 if (!link) {
2624 tipc_link_reset_stats(link);
2641 if (!node->links[i].link)
2645 node->links[i].link, NLM_F_MULTI);
2652 err = tipc_nl_add_bc_link(net, msg, node->bc_entry.link);
2666 struct nlattr *link[TIPC_NLA_LINK_MAX + 1];
2682 err = nla_parse_nested_deprecated(link,
2689 if (unlikely(!link[TIPC_NLA_LINK_BROADCAST]))
3086 * - true: dump node link data as well
3119 i += tipc_link_dump(n->links[0].link, TIPC_DUMP_NONE, buf + i);
3128 i += tipc_link_dump(n->links[1].link, TIPC_DUMP_NONE, buf + i);
3133 i += tipc_link_dump(n->bc_entry.link, TIPC_DUMP_NONE, buf + i);