diff options
Diffstat (limited to 'net/tipc/link.c')
-rw-r--r-- | net/tipc/link.c | 102 |
1 files changed, 32 insertions, 70 deletions
diff --git a/net/tipc/link.c b/net/tipc/link.c index 1a7e4665af8..a3616b99529 100644 --- a/net/tipc/link.c +++ b/net/tipc/link.c | |||
@@ -202,41 +202,6 @@ static unsigned int align(unsigned int i) | |||
202 | return (i + 3) & ~3u; | 202 | return (i + 3) & ~3u; |
203 | } | 203 | } |
204 | 204 | ||
205 | static int link_working_working(struct link *l_ptr) | ||
206 | { | ||
207 | return (l_ptr->state == WORKING_WORKING); | ||
208 | } | ||
209 | |||
210 | static int link_working_unknown(struct link *l_ptr) | ||
211 | { | ||
212 | return (l_ptr->state == WORKING_UNKNOWN); | ||
213 | } | ||
214 | |||
215 | static int link_reset_unknown(struct link *l_ptr) | ||
216 | { | ||
217 | return (l_ptr->state == RESET_UNKNOWN); | ||
218 | } | ||
219 | |||
220 | static int link_reset_reset(struct link *l_ptr) | ||
221 | { | ||
222 | return (l_ptr->state == RESET_RESET); | ||
223 | } | ||
224 | |||
225 | static int link_blocked(struct link *l_ptr) | ||
226 | { | ||
227 | return (l_ptr->exp_msg_count || l_ptr->blocked); | ||
228 | } | ||
229 | |||
230 | static int link_congested(struct link *l_ptr) | ||
231 | { | ||
232 | return (l_ptr->out_queue_size >= l_ptr->queue_limit[0]); | ||
233 | } | ||
234 | |||
235 | static u32 link_max_pkt(struct link *l_ptr) | ||
236 | { | ||
237 | return l_ptr->max_pkt; | ||
238 | } | ||
239 | |||
240 | static void link_init_max_pkt(struct link *l_ptr) | 205 | static void link_init_max_pkt(struct link *l_ptr) |
241 | { | 206 | { |
242 | u32 max_pkt; | 207 | u32 max_pkt; |
@@ -468,7 +433,7 @@ struct link *tipc_link_create(struct bearer *b_ptr, const u32 peer, | |||
468 | 433 | ||
469 | l_ptr->pmsg = (struct tipc_msg *)&l_ptr->proto_msg; | 434 | l_ptr->pmsg = (struct tipc_msg *)&l_ptr->proto_msg; |
470 | msg = l_ptr->pmsg; | 435 | msg = l_ptr->pmsg; |
471 | msg_init(msg, LINK_PROTOCOL, RESET_MSG, INT_H_SIZE, l_ptr->addr); | 436 | tipc_msg_init(msg, LINK_PROTOCOL, RESET_MSG, INT_H_SIZE, l_ptr->addr); |
472 | msg_set_size(msg, sizeof(l_ptr->proto_msg)); | 437 | msg_set_size(msg, sizeof(l_ptr->proto_msg)); |
473 | msg_set_session(msg, (tipc_random & 0xffff)); | 438 | msg_set_session(msg, (tipc_random & 0xffff)); |
474 | msg_set_bearer_id(msg, b_ptr->identity); | 439 | msg_set_bearer_id(msg, b_ptr->identity); |
@@ -561,9 +526,8 @@ static int link_schedule_port(struct link *l_ptr, u32 origport, u32 sz) | |||
561 | goto exit; | 526 | goto exit; |
562 | if (!list_empty(&p_ptr->wait_list)) | 527 | if (!list_empty(&p_ptr->wait_list)) |
563 | goto exit; | 528 | goto exit; |
564 | p_ptr->congested_link = l_ptr; | ||
565 | p_ptr->publ.congested = 1; | 529 | p_ptr->publ.congested = 1; |
566 | p_ptr->waiting_pkts = 1 + ((sz - 1) / link_max_pkt(l_ptr)); | 530 | p_ptr->waiting_pkts = 1 + ((sz - 1) / l_ptr->max_pkt); |
567 | list_add_tail(&p_ptr->wait_list, &l_ptr->waiting_ports); | 531 | list_add_tail(&p_ptr->wait_list, &l_ptr->waiting_ports); |
568 | l_ptr->stats.link_congs++; | 532 | l_ptr->stats.link_congs++; |
569 | exit: | 533 | exit: |
@@ -592,7 +556,6 @@ void tipc_link_wakeup_ports(struct link *l_ptr, int all) | |||
592 | if (win <= 0) | 556 | if (win <= 0) |
593 | break; | 557 | break; |
594 | list_del_init(&p_ptr->wait_list); | 558 | list_del_init(&p_ptr->wait_list); |
595 | p_ptr->congested_link = NULL; | ||
596 | spin_lock_bh(p_ptr->publ.lock); | 559 | spin_lock_bh(p_ptr->publ.lock); |
597 | p_ptr->publ.congested = 0; | 560 | p_ptr->publ.congested = 0; |
598 | p_ptr->wakeup(&p_ptr->publ); | 561 | p_ptr->wakeup(&p_ptr->publ); |
@@ -877,7 +840,7 @@ static void link_state_event(struct link *l_ptr, unsigned event) | |||
877 | case TIMEOUT_EVT: | 840 | case TIMEOUT_EVT: |
878 | dbg_link("TIM "); | 841 | dbg_link("TIM "); |
879 | if (l_ptr->next_in_no != l_ptr->checkpoint) { | 842 | if (l_ptr->next_in_no != l_ptr->checkpoint) { |
880 | dbg_link("-> WW \n"); | 843 | dbg_link("-> WW\n"); |
881 | l_ptr->state = WORKING_WORKING; | 844 | l_ptr->state = WORKING_WORKING; |
882 | l_ptr->fsm_msg_cnt = 0; | 845 | l_ptr->fsm_msg_cnt = 0; |
883 | l_ptr->checkpoint = l_ptr->next_in_no; | 846 | l_ptr->checkpoint = l_ptr->next_in_no; |
@@ -934,7 +897,7 @@ static void link_state_event(struct link *l_ptr, unsigned event) | |||
934 | link_set_timer(l_ptr, cont_intv); | 897 | link_set_timer(l_ptr, cont_intv); |
935 | break; | 898 | break; |
936 | case RESET_MSG: | 899 | case RESET_MSG: |
937 | dbg_link("RES \n"); | 900 | dbg_link("RES\n"); |
938 | dbg_link(" -> RR\n"); | 901 | dbg_link(" -> RR\n"); |
939 | l_ptr->state = RESET_RESET; | 902 | l_ptr->state = RESET_RESET; |
940 | l_ptr->fsm_msg_cnt = 0; | 903 | l_ptr->fsm_msg_cnt = 0; |
@@ -947,7 +910,7 @@ static void link_state_event(struct link *l_ptr, unsigned event) | |||
947 | l_ptr->started = 1; | 910 | l_ptr->started = 1; |
948 | /* fall through */ | 911 | /* fall through */ |
949 | case TIMEOUT_EVT: | 912 | case TIMEOUT_EVT: |
950 | dbg_link("TIM \n"); | 913 | dbg_link("TIM\n"); |
951 | tipc_link_send_proto_msg(l_ptr, RESET_MSG, 0, 0, 0, 0, 0); | 914 | tipc_link_send_proto_msg(l_ptr, RESET_MSG, 0, 0, 0, 0, 0); |
952 | l_ptr->fsm_msg_cnt++; | 915 | l_ptr->fsm_msg_cnt++; |
953 | link_set_timer(l_ptr, cont_intv); | 916 | link_set_timer(l_ptr, cont_intv); |
@@ -1017,7 +980,7 @@ static int link_bundle_buf(struct link *l_ptr, | |||
1017 | return 0; | 980 | return 0; |
1018 | if (skb_tailroom(bundler) < (pad + size)) | 981 | if (skb_tailroom(bundler) < (pad + size)) |
1019 | return 0; | 982 | return 0; |
1020 | if (link_max_pkt(l_ptr) < (to_pos + size)) | 983 | if (l_ptr->max_pkt < (to_pos + size)) |
1021 | return 0; | 984 | return 0; |
1022 | 985 | ||
1023 | skb_put(bundler, pad + size); | 986 | skb_put(bundler, pad + size); |
@@ -1062,9 +1025,9 @@ int tipc_link_send_buf(struct link *l_ptr, struct sk_buff *buf) | |||
1062 | u32 size = msg_size(msg); | 1025 | u32 size = msg_size(msg); |
1063 | u32 dsz = msg_data_sz(msg); | 1026 | u32 dsz = msg_data_sz(msg); |
1064 | u32 queue_size = l_ptr->out_queue_size; | 1027 | u32 queue_size = l_ptr->out_queue_size; |
1065 | u32 imp = msg_tot_importance(msg); | 1028 | u32 imp = tipc_msg_tot_importance(msg); |
1066 | u32 queue_limit = l_ptr->queue_limit[imp]; | 1029 | u32 queue_limit = l_ptr->queue_limit[imp]; |
1067 | u32 max_packet = link_max_pkt(l_ptr); | 1030 | u32 max_packet = l_ptr->max_pkt; |
1068 | 1031 | ||
1069 | msg_set_prevnode(msg, tipc_own_addr); /* If routed message */ | 1032 | msg_set_prevnode(msg, tipc_own_addr); /* If routed message */ |
1070 | 1033 | ||
@@ -1127,7 +1090,7 @@ int tipc_link_send_buf(struct link *l_ptr, struct sk_buff *buf) | |||
1127 | struct tipc_msg bundler_hdr; | 1090 | struct tipc_msg bundler_hdr; |
1128 | 1091 | ||
1129 | if (bundler) { | 1092 | if (bundler) { |
1130 | msg_init(&bundler_hdr, MSG_BUNDLER, OPEN_MSG, | 1093 | tipc_msg_init(&bundler_hdr, MSG_BUNDLER, OPEN_MSG, |
1131 | INT_H_SIZE, l_ptr->addr); | 1094 | INT_H_SIZE, l_ptr->addr); |
1132 | skb_copy_to_linear_data(bundler, &bundler_hdr, | 1095 | skb_copy_to_linear_data(bundler, &bundler_hdr, |
1133 | INT_H_SIZE); | 1096 | INT_H_SIZE); |
@@ -1195,7 +1158,7 @@ static int link_send_buf_fast(struct link *l_ptr, struct sk_buff *buf, | |||
1195 | int res = msg_data_sz(msg); | 1158 | int res = msg_data_sz(msg); |
1196 | 1159 | ||
1197 | if (likely(!link_congested(l_ptr))) { | 1160 | if (likely(!link_congested(l_ptr))) { |
1198 | if (likely(msg_size(msg) <= link_max_pkt(l_ptr))) { | 1161 | if (likely(msg_size(msg) <= l_ptr->max_pkt)) { |
1199 | if (likely(list_empty(&l_ptr->b_ptr->cong_links))) { | 1162 | if (likely(list_empty(&l_ptr->b_ptr->cong_links))) { |
1200 | link_add_to_outqueue(l_ptr, buf, msg); | 1163 | link_add_to_outqueue(l_ptr, buf, msg); |
1201 | if (likely(tipc_bearer_send(l_ptr->b_ptr, buf, | 1164 | if (likely(tipc_bearer_send(l_ptr->b_ptr, buf, |
@@ -1212,7 +1175,7 @@ static int link_send_buf_fast(struct link *l_ptr, struct sk_buff *buf, | |||
1212 | } | 1175 | } |
1213 | } | 1176 | } |
1214 | else | 1177 | else |
1215 | *used_max_pkt = link_max_pkt(l_ptr); | 1178 | *used_max_pkt = l_ptr->max_pkt; |
1216 | } | 1179 | } |
1217 | return tipc_link_send_buf(l_ptr, buf); /* All other cases */ | 1180 | return tipc_link_send_buf(l_ptr, buf); /* All other cases */ |
1218 | } | 1181 | } |
@@ -1280,7 +1243,7 @@ again: | |||
1280 | * (Must not hold any locks while building message.) | 1243 | * (Must not hold any locks while building message.) |
1281 | */ | 1244 | */ |
1282 | 1245 | ||
1283 | res = msg_build(hdr, msg_sect, num_sect, sender->publ.max_pkt, | 1246 | res = tipc_msg_build(hdr, msg_sect, num_sect, sender->publ.max_pkt, |
1284 | !sender->user_port, &buf); | 1247 | !sender->user_port, &buf); |
1285 | 1248 | ||
1286 | read_lock_bh(&tipc_net_lock); | 1249 | read_lock_bh(&tipc_net_lock); |
@@ -1319,7 +1282,7 @@ exit: | |||
1319 | * then re-try fast path or fragment the message | 1282 | * then re-try fast path or fragment the message |
1320 | */ | 1283 | */ |
1321 | 1284 | ||
1322 | sender->publ.max_pkt = link_max_pkt(l_ptr); | 1285 | sender->publ.max_pkt = l_ptr->max_pkt; |
1323 | tipc_node_unlock(node); | 1286 | tipc_node_unlock(node); |
1324 | read_unlock_bh(&tipc_net_lock); | 1287 | read_unlock_bh(&tipc_net_lock); |
1325 | 1288 | ||
@@ -1391,7 +1354,7 @@ again: | |||
1391 | /* Prepare reusable fragment header: */ | 1354 | /* Prepare reusable fragment header: */ |
1392 | 1355 | ||
1393 | msg_dbg(hdr, ">FRAGMENTING>"); | 1356 | msg_dbg(hdr, ">FRAGMENTING>"); |
1394 | msg_init(&fragm_hdr, MSG_FRAGMENTER, FIRST_FRAGMENT, | 1357 | tipc_msg_init(&fragm_hdr, MSG_FRAGMENTER, FIRST_FRAGMENT, |
1395 | INT_H_SIZE, msg_destnode(hdr)); | 1358 | INT_H_SIZE, msg_destnode(hdr)); |
1396 | msg_set_link_selector(&fragm_hdr, sender->publ.ref); | 1359 | msg_set_link_selector(&fragm_hdr, sender->publ.ref); |
1397 | msg_set_size(&fragm_hdr, max_pkt); | 1360 | msg_set_size(&fragm_hdr, max_pkt); |
@@ -1482,8 +1445,8 @@ error: | |||
1482 | tipc_node_unlock(node); | 1445 | tipc_node_unlock(node); |
1483 | goto reject; | 1446 | goto reject; |
1484 | } | 1447 | } |
1485 | if (link_max_pkt(l_ptr) < max_pkt) { | 1448 | if (l_ptr->max_pkt < max_pkt) { |
1486 | sender->publ.max_pkt = link_max_pkt(l_ptr); | 1449 | sender->publ.max_pkt = l_ptr->max_pkt; |
1487 | tipc_node_unlock(node); | 1450 | tipc_node_unlock(node); |
1488 | for (; buf_chain; buf_chain = buf) { | 1451 | for (; buf_chain; buf_chain = buf) { |
1489 | buf = buf_chain->next; | 1452 | buf = buf_chain->next; |
@@ -1553,7 +1516,7 @@ u32 tipc_link_push_packet(struct link *l_ptr) | |||
1553 | 1516 | ||
1554 | /* Continue retransmission now, if there is anything: */ | 1517 | /* Continue retransmission now, if there is anything: */ |
1555 | 1518 | ||
1556 | if (r_q_size && buf && !skb_cloned(buf)) { | 1519 | if (r_q_size && buf) { |
1557 | msg_set_ack(buf_msg(buf), mod(l_ptr->next_in_no - 1)); | 1520 | msg_set_ack(buf_msg(buf), mod(l_ptr->next_in_no - 1)); |
1558 | msg_set_bcast_ack(buf_msg(buf), l_ptr->owner->bclink.last_in); | 1521 | msg_set_bcast_ack(buf_msg(buf), l_ptr->owner->bclink.last_in); |
1559 | if (tipc_bearer_send(l_ptr->b_ptr, buf, &l_ptr->media_addr)) { | 1522 | if (tipc_bearer_send(l_ptr->b_ptr, buf, &l_ptr->media_addr)) { |
@@ -1650,7 +1613,7 @@ static void link_reset_all(unsigned long addr) | |||
1650 | tipc_node_lock(n_ptr); | 1613 | tipc_node_lock(n_ptr); |
1651 | 1614 | ||
1652 | warn("Resetting all links to %s\n", | 1615 | warn("Resetting all links to %s\n", |
1653 | addr_string_fill(addr_string, n_ptr->addr)); | 1616 | tipc_addr_string_fill(addr_string, n_ptr->addr)); |
1654 | 1617 | ||
1655 | for (i = 0; i < MAX_BEARERS; i++) { | 1618 | for (i = 0; i < MAX_BEARERS; i++) { |
1656 | if (n_ptr->links[i]) { | 1619 | if (n_ptr->links[i]) { |
@@ -1692,7 +1655,7 @@ static void link_retransmit_failure(struct link *l_ptr, struct sk_buff *buf) | |||
1692 | n_ptr = l_ptr->owner->next; | 1655 | n_ptr = l_ptr->owner->next; |
1693 | tipc_node_lock(n_ptr); | 1656 | tipc_node_lock(n_ptr); |
1694 | 1657 | ||
1695 | addr_string_fill(addr_string, n_ptr->addr); | 1658 | tipc_addr_string_fill(addr_string, n_ptr->addr); |
1696 | tipc_printf(TIPC_OUTPUT, "Multicast link info for %s\n", addr_string); | 1659 | tipc_printf(TIPC_OUTPUT, "Multicast link info for %s\n", addr_string); |
1697 | tipc_printf(TIPC_OUTPUT, "Supported: %d, ", n_ptr->bclink.supported); | 1660 | tipc_printf(TIPC_OUTPUT, "Supported: %d, ", n_ptr->bclink.supported); |
1698 | tipc_printf(TIPC_OUTPUT, "Acked: %u\n", n_ptr->bclink.acked); | 1661 | tipc_printf(TIPC_OUTPUT, "Acked: %u\n", n_ptr->bclink.acked); |
@@ -1722,15 +1685,16 @@ void tipc_link_retransmit(struct link *l_ptr, struct sk_buff *buf, | |||
1722 | dbg("Retransmitting %u in link %x\n", retransmits, l_ptr); | 1685 | dbg("Retransmitting %u in link %x\n", retransmits, l_ptr); |
1723 | 1686 | ||
1724 | if (tipc_bearer_congested(l_ptr->b_ptr, l_ptr)) { | 1687 | if (tipc_bearer_congested(l_ptr->b_ptr, l_ptr)) { |
1725 | if (!skb_cloned(buf)) { | 1688 | if (l_ptr->retransm_queue_size == 0) { |
1726 | msg_dbg(msg, ">NO_RETR->BCONG>"); | 1689 | msg_dbg(msg, ">NO_RETR->BCONG>"); |
1727 | dbg_print_link(l_ptr, " "); | 1690 | dbg_print_link(l_ptr, " "); |
1728 | l_ptr->retransm_queue_head = msg_seqno(msg); | 1691 | l_ptr->retransm_queue_head = msg_seqno(msg); |
1729 | l_ptr->retransm_queue_size = retransmits; | 1692 | l_ptr->retransm_queue_size = retransmits; |
1730 | return; | ||
1731 | } else { | 1693 | } else { |
1732 | /* Don't retransmit if driver already has the buffer */ | 1694 | err("Unexpected retransmit on link %s (qsize=%d)\n", |
1695 | l_ptr->name, l_ptr->retransm_queue_size); | ||
1733 | } | 1696 | } |
1697 | return; | ||
1734 | } else { | 1698 | } else { |
1735 | /* Detect repeated retransmit failures on uncongested bearer */ | 1699 | /* Detect repeated retransmit failures on uncongested bearer */ |
1736 | 1700 | ||
@@ -1745,7 +1709,7 @@ void tipc_link_retransmit(struct link *l_ptr, struct sk_buff *buf, | |||
1745 | } | 1709 | } |
1746 | } | 1710 | } |
1747 | 1711 | ||
1748 | while (retransmits && (buf != l_ptr->next_out) && buf && !skb_cloned(buf)) { | 1712 | while (retransmits && (buf != l_ptr->next_out) && buf) { |
1749 | msg = buf_msg(buf); | 1713 | msg = buf_msg(buf); |
1750 | msg_set_ack(msg, mod(l_ptr->next_in_no - 1)); | 1714 | msg_set_ack(msg, mod(l_ptr->next_in_no - 1)); |
1751 | msg_set_bcast_ack(msg, l_ptr->owner->bclink.last_in); | 1715 | msg_set_bcast_ack(msg, l_ptr->owner->bclink.last_in); |
@@ -2434,7 +2398,7 @@ void tipc_link_changeover(struct link *l_ptr) | |||
2434 | return; | 2398 | return; |
2435 | } | 2399 | } |
2436 | 2400 | ||
2437 | msg_init(&tunnel_hdr, CHANGEOVER_PROTOCOL, | 2401 | tipc_msg_init(&tunnel_hdr, CHANGEOVER_PROTOCOL, |
2438 | ORIGINAL_MSG, INT_H_SIZE, l_ptr->addr); | 2402 | ORIGINAL_MSG, INT_H_SIZE, l_ptr->addr); |
2439 | msg_set_bearer_id(&tunnel_hdr, l_ptr->peer_bearer_id); | 2403 | msg_set_bearer_id(&tunnel_hdr, l_ptr->peer_bearer_id); |
2440 | msg_set_msgcnt(&tunnel_hdr, msgcount); | 2404 | msg_set_msgcnt(&tunnel_hdr, msgcount); |
@@ -2489,7 +2453,7 @@ void tipc_link_send_duplicate(struct link *l_ptr, struct link *tunnel) | |||
2489 | struct sk_buff *iter; | 2453 | struct sk_buff *iter; |
2490 | struct tipc_msg tunnel_hdr; | 2454 | struct tipc_msg tunnel_hdr; |
2491 | 2455 | ||
2492 | msg_init(&tunnel_hdr, CHANGEOVER_PROTOCOL, | 2456 | tipc_msg_init(&tunnel_hdr, CHANGEOVER_PROTOCOL, |
2493 | DUPLICATE_MSG, INT_H_SIZE, l_ptr->addr); | 2457 | DUPLICATE_MSG, INT_H_SIZE, l_ptr->addr); |
2494 | msg_set_msgcnt(&tunnel_hdr, l_ptr->out_queue_size); | 2458 | msg_set_msgcnt(&tunnel_hdr, l_ptr->out_queue_size); |
2495 | msg_set_bearer_id(&tunnel_hdr, l_ptr->peer_bearer_id); | 2459 | msg_set_bearer_id(&tunnel_hdr, l_ptr->peer_bearer_id); |
@@ -2680,7 +2644,7 @@ int tipc_link_send_long_buf(struct link *l_ptr, struct sk_buff *buf) | |||
2680 | u32 dsz = msg_data_sz(inmsg); | 2644 | u32 dsz = msg_data_sz(inmsg); |
2681 | unchar *crs = buf->data; | 2645 | unchar *crs = buf->data; |
2682 | u32 rest = insize; | 2646 | u32 rest = insize; |
2683 | u32 pack_sz = link_max_pkt(l_ptr); | 2647 | u32 pack_sz = l_ptr->max_pkt; |
2684 | u32 fragm_sz = pack_sz - INT_H_SIZE; | 2648 | u32 fragm_sz = pack_sz - INT_H_SIZE; |
2685 | u32 fragm_no = 1; | 2649 | u32 fragm_no = 1; |
2686 | u32 destaddr; | 2650 | u32 destaddr; |
@@ -2695,7 +2659,7 @@ int tipc_link_send_long_buf(struct link *l_ptr, struct sk_buff *buf) | |||
2695 | 2659 | ||
2696 | /* Prepare reusable fragment header: */ | 2660 | /* Prepare reusable fragment header: */ |
2697 | 2661 | ||
2698 | msg_init(&fragm_hdr, MSG_FRAGMENTER, FIRST_FRAGMENT, | 2662 | tipc_msg_init(&fragm_hdr, MSG_FRAGMENTER, FIRST_FRAGMENT, |
2699 | INT_H_SIZE, destaddr); | 2663 | INT_H_SIZE, destaddr); |
2700 | msg_set_link_selector(&fragm_hdr, msg_link_selector(inmsg)); | 2664 | msg_set_link_selector(&fragm_hdr, msg_link_selector(inmsg)); |
2701 | msg_set_long_msgno(&fragm_hdr, mod(l_ptr->long_msg_seq_no++)); | 2665 | msg_set_long_msgno(&fragm_hdr, mod(l_ptr->long_msg_seq_no++)); |
@@ -3126,7 +3090,7 @@ static int tipc_link_stats(const char *name, char *buf, const u32 buf_size) | |||
3126 | tipc_printf(&pb, "Link <%s>\n" | 3090 | tipc_printf(&pb, "Link <%s>\n" |
3127 | " %s MTU:%u Priority:%u Tolerance:%u ms" | 3091 | " %s MTU:%u Priority:%u Tolerance:%u ms" |
3128 | " Window:%u packets\n", | 3092 | " Window:%u packets\n", |
3129 | l_ptr->name, status, link_max_pkt(l_ptr), | 3093 | l_ptr->name, status, l_ptr->max_pkt, |
3130 | l_ptr->priority, l_ptr->tolerance, l_ptr->queue_limit[0]); | 3094 | l_ptr->priority, l_ptr->tolerance, l_ptr->queue_limit[0]); |
3131 | tipc_printf(&pb, " RX packets:%u fragments:%u/%u bundles:%u/%u\n", | 3095 | tipc_printf(&pb, " RX packets:%u fragments:%u/%u bundles:%u/%u\n", |
3132 | l_ptr->next_in_no - l_ptr->stats.recv_info, | 3096 | l_ptr->next_in_no - l_ptr->stats.recv_info, |
@@ -3271,7 +3235,7 @@ u32 tipc_link_get_max_pkt(u32 dest, u32 selector) | |||
3271 | tipc_node_lock(n_ptr); | 3235 | tipc_node_lock(n_ptr); |
3272 | l_ptr = n_ptr->active_links[selector & 1]; | 3236 | l_ptr = n_ptr->active_links[selector & 1]; |
3273 | if (l_ptr) | 3237 | if (l_ptr) |
3274 | res = link_max_pkt(l_ptr); | 3238 | res = l_ptr->max_pkt; |
3275 | tipc_node_unlock(n_ptr); | 3239 | tipc_node_unlock(n_ptr); |
3276 | } | 3240 | } |
3277 | read_unlock_bh(&tipc_net_lock); | 3241 | read_unlock_bh(&tipc_net_lock); |
@@ -3294,7 +3258,7 @@ static void link_dump_rec_queue(struct link *l_ptr) | |||
3294 | info("buffer %x invalid\n", crs); | 3258 | info("buffer %x invalid\n", crs); |
3295 | return; | 3259 | return; |
3296 | } | 3260 | } |
3297 | msg_dbg(buf_msg(crs), "In rec queue: \n"); | 3261 | msg_dbg(buf_msg(crs), "In rec queue:\n"); |
3298 | crs = crs->next; | 3262 | crs = crs->next; |
3299 | } | 3263 | } |
3300 | } | 3264 | } |
@@ -3329,9 +3293,7 @@ static void link_print(struct link *l_ptr, struct print_buf *buf, | |||
3329 | if (l_ptr->next_out) | 3293 | if (l_ptr->next_out) |
3330 | tipc_printf(buf, "%u..", | 3294 | tipc_printf(buf, "%u..", |
3331 | msg_seqno(buf_msg(l_ptr->next_out))); | 3295 | msg_seqno(buf_msg(l_ptr->next_out))); |
3332 | tipc_printf(buf, "%u]", | 3296 | tipc_printf(buf, "%u]", msg_seqno(buf_msg(l_ptr->last_out))); |
3333 | msg_seqno(buf_msg | ||
3334 | (l_ptr->last_out)), l_ptr->out_queue_size); | ||
3335 | if ((mod(msg_seqno(buf_msg(l_ptr->last_out)) - | 3297 | if ((mod(msg_seqno(buf_msg(l_ptr->last_out)) - |
3336 | msg_seqno(buf_msg(l_ptr->first_out))) | 3298 | msg_seqno(buf_msg(l_ptr->first_out))) |
3337 | != (l_ptr->out_queue_size - 1)) || | 3299 | != (l_ptr->out_queue_size - 1)) || |