diff options
Diffstat (limited to 'net/tipc/bcast.c')
| -rw-r--r-- | net/tipc/bcast.c | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/net/tipc/bcast.c b/net/tipc/bcast.c index e4e6d8cd47e6..54f89f90ac33 100644 --- a/net/tipc/bcast.c +++ b/net/tipc/bcast.c | |||
| @@ -347,7 +347,7 @@ static void bclink_peek_nack(struct tipc_msg *msg) | |||
| 347 | 347 | ||
| 348 | tipc_node_lock(n_ptr); | 348 | tipc_node_lock(n_ptr); |
| 349 | 349 | ||
| 350 | if (n_ptr->bclink.supported && | 350 | if (n_ptr->bclink.recv_permitted && |
| 351 | (n_ptr->bclink.last_in != n_ptr->bclink.last_sent) && | 351 | (n_ptr->bclink.last_in != n_ptr->bclink.last_sent) && |
| 352 | (n_ptr->bclink.last_in == msg_bcgap_after(msg))) | 352 | (n_ptr->bclink.last_in == msg_bcgap_after(msg))) |
| 353 | n_ptr->bclink.oos_state = 2; | 353 | n_ptr->bclink.oos_state = 2; |
| @@ -429,7 +429,7 @@ void tipc_bclink_recv_pkt(struct sk_buff *buf) | |||
| 429 | goto exit; | 429 | goto exit; |
| 430 | 430 | ||
| 431 | tipc_node_lock(node); | 431 | tipc_node_lock(node); |
| 432 | if (unlikely(!node->bclink.supported)) | 432 | if (unlikely(!node->bclink.recv_permitted)) |
| 433 | goto unlock; | 433 | goto unlock; |
| 434 | 434 | ||
| 435 | /* Handle broadcast protocol message */ | 435 | /* Handle broadcast protocol message */ |
| @@ -564,7 +564,7 @@ exit: | |||
| 564 | 564 | ||
| 565 | u32 tipc_bclink_acks_missing(struct tipc_node *n_ptr) | 565 | u32 tipc_bclink_acks_missing(struct tipc_node *n_ptr) |
| 566 | { | 566 | { |
| 567 | return (n_ptr->bclink.supported && | 567 | return (n_ptr->bclink.recv_permitted && |
| 568 | (tipc_bclink_get_last_sent() != n_ptr->bclink.acked)); | 568 | (tipc_bclink_get_last_sent() != n_ptr->bclink.acked)); |
| 569 | } | 569 | } |
| 570 | 570 | ||
| @@ -619,16 +619,14 @@ static int tipc_bcbearer_send(struct sk_buff *buf, | |||
| 619 | if (bcbearer->remains_new.count == bcbearer->remains.count) | 619 | if (bcbearer->remains_new.count == bcbearer->remains.count) |
| 620 | continue; /* bearer pair doesn't add anything */ | 620 | continue; /* bearer pair doesn't add anything */ |
| 621 | 621 | ||
| 622 | if (p->blocked || | 622 | if (!tipc_bearer_blocked(p)) |
| 623 | p->media->send_msg(buf, p, &p->media->bcast_addr)) { | 623 | tipc_bearer_send(p, buf, &p->media->bcast_addr); |
| 624 | else if (s && !tipc_bearer_blocked(s)) | ||
| 624 | /* unable to send on primary bearer */ | 625 | /* unable to send on primary bearer */ |
| 625 | if (!s || s->blocked || | 626 | tipc_bearer_send(s, buf, &s->media->bcast_addr); |
| 626 | s->media->send_msg(buf, s, | 627 | else |
| 627 | &s->media->bcast_addr)) { | 628 | /* unable to send on either bearer */ |
| 628 | /* unable to send on either bearer */ | 629 | continue; |
| 629 | continue; | ||
| 630 | } | ||
| 631 | } | ||
| 632 | 630 | ||
| 633 | if (s) { | 631 | if (s) { |
| 634 | bcbearer->bpairs[bp_index].primary = s; | 632 | bcbearer->bpairs[bp_index].primary = s; |
| @@ -731,8 +729,8 @@ int tipc_bclink_stats(char *buf, const u32 buf_size) | |||
| 731 | " TX naks:%u acks:%u dups:%u\n", | 729 | " TX naks:%u acks:%u dups:%u\n", |
| 732 | s->sent_nacks, s->sent_acks, s->retransmitted); | 730 | s->sent_nacks, s->sent_acks, s->retransmitted); |
| 733 | ret += tipc_snprintf(buf + ret, buf_size - ret, | 731 | ret += tipc_snprintf(buf + ret, buf_size - ret, |
| 734 | " Congestion bearer:%u link:%u Send queue max:%u avg:%u\n", | 732 | " Congestion link:%u Send queue max:%u avg:%u\n", |
| 735 | s->bearer_congs, s->link_congs, s->max_queue_sz, | 733 | s->link_congs, s->max_queue_sz, |
| 736 | s->queue_sz_counts ? | 734 | s->queue_sz_counts ? |
| 737 | (s->accu_queue_sz / s->queue_sz_counts) : 0); | 735 | (s->accu_queue_sz / s->queue_sz_counts) : 0); |
| 738 | 736 | ||
| @@ -766,7 +764,6 @@ int tipc_bclink_set_queue_limits(u32 limit) | |||
| 766 | 764 | ||
| 767 | void tipc_bclink_init(void) | 765 | void tipc_bclink_init(void) |
| 768 | { | 766 | { |
| 769 | INIT_LIST_HEAD(&bcbearer->bearer.cong_links); | ||
| 770 | bcbearer->bearer.media = &bcbearer->media; | 767 | bcbearer->bearer.media = &bcbearer->media; |
| 771 | bcbearer->media.send_msg = tipc_bcbearer_send; | 768 | bcbearer->media.send_msg = tipc_bcbearer_send; |
| 772 | sprintf(bcbearer->media.name, "tipc-broadcast"); | 769 | sprintf(bcbearer->media.name, "tipc-broadcast"); |
