aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/bcast.c
diff options
context:
space:
mode:
authorAllan Stephens <allan.stephens@windriver.com>2011-04-07 10:44:54 -0400
committerPaul Gortmaker <paul.gortmaker@windriver.com>2011-09-01 11:16:36 -0400
commit2ff9f924a565aa22c06169c89fcd2133d820a9d2 (patch)
tree5dd153eb662631134d70327293b128745c5012e5 /net/tipc/bcast.c
parent2e2d9be8454e295374dfbddd7ceaba2e4fc01c76 (diff)
tipc: Cosmetic changes to broadcast bearer send routine
Updates the comments in the broadcast bearer send routine to more accurately describe the processing done by the routine. Also replaces the improper use of a TIPC payload message error status symbol (in a place that has nothing to do with such errors) with its numeric equivalent. Signed-off-by: Allan Stephens <allan.stephens@windriver.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Diffstat (limited to 'net/tipc/bcast.c')
-rw-r--r--net/tipc/bcast.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/net/tipc/bcast.c b/net/tipc/bcast.c
index 411c54b152f0..7abdca0de281 100644
--- a/net/tipc/bcast.c
+++ b/net/tipc/bcast.c
@@ -535,10 +535,11 @@ u32 tipc_bclink_acks_missing(struct tipc_node *n_ptr)
535/** 535/**
536 * tipc_bcbearer_send - send a packet through the broadcast pseudo-bearer 536 * tipc_bcbearer_send - send a packet through the broadcast pseudo-bearer
537 * 537 *
538 * Send through as many bearers as necessary to reach all nodes 538 * Send packet over as many bearers as necessary to reach all nodes
539 * that support TIPC multicasting. 539 * that have joined the broadcast link.
540 * 540 *
541 * Returns 0 if packet sent successfully, non-zero if not 541 * Returns 0 (packet sent successfully) under all circumstances,
542 * since the broadcast link's pseudo-bearer never blocks
542 */ 543 */
543 544
544static int tipc_bcbearer_send(struct sk_buff *buf, 545static int tipc_bcbearer_send(struct sk_buff *buf,
@@ -547,7 +548,12 @@ static int tipc_bcbearer_send(struct sk_buff *buf,
547{ 548{
548 int bp_index; 549 int bp_index;
549 550
550 /* Prepare buffer for broadcasting (if first time trying to send it) */ 551 /*
552 * Prepare broadcast link message for reliable transmission,
553 * if first time trying to send it;
554 * preparation is skipped for broadcast link protocol messages
555 * since they are sent in an unreliable manner and don't need it
556 */
551 557
552 if (likely(!msg_non_seq(buf_msg(buf)))) { 558 if (likely(!msg_non_seq(buf_msg(buf)))) {
553 struct tipc_msg *msg; 559 struct tipc_msg *msg;
@@ -596,18 +602,12 @@ static int tipc_bcbearer_send(struct sk_buff *buf,
596 } 602 }
597 603
598 if (bcbearer->remains_new.count == 0) 604 if (bcbearer->remains_new.count == 0)
599 return 0; 605 break; /* all targets reached */
600 606
601 bcbearer->remains = bcbearer->remains_new; 607 bcbearer->remains = bcbearer->remains_new;
602 } 608 }
603 609
604 /* 610 return 0;
605 * Unable to reach all targets (indicate success, since currently
606 * there isn't code in place to properly block & unblock the
607 * pseudo-bearer used by the broadcast link)
608 */
609
610 return TIPC_OK;
611} 611}
612 612
613/** 613/**