tipc: Flush unsent broadcast messages when contact with last node is lost
authorAllan Stephens <allan.stephens@windriver.com>
Mon, 24 Oct 2011 18:59:20 +0000 (14:59 -0400)
committerPaul Gortmaker <paul.gortmaker@windriver.com>
Tue, 27 Dec 2011 16:33:52 +0000 (11:33 -0500)
Adds code to release any unsent broadcast messages in the broadcast link
transmit queue if TIPC loses contact with its only neighboring node.
Previously, a broadcast link that was in the congested state would hold
on to the unsent messages, even though the messages were now undeliverable.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
net/tipc/bcast.c

index dd990b081435158bc387b3522d87a7e9a7aeee32..4609819ea807c2e61c5a06b1bfc8cfbb81da3679 100644 (file)
@@ -252,7 +252,17 @@ void tipc_bclink_acknowledge(struct tipc_node *n_ptr, u32 acked)
 
        while (crs && less_eq(buf_seqno(crs), acked)) {
                next = crs->next;
-               bcbuf_decr_acks(crs);
+
+               if (crs != bcl->next_out)
+                       bcbuf_decr_acks(crs);
+               else if (bclink->bcast_nodes.count)
+                       break;
+               else {
+                       bcbuf_set_acks(crs, 0);
+                       bcl->next_out = next;
+                       bclink_set_last_sent();
+               }
+
                if (bcbuf_acks(crs) == 0) {
                        bcl->first_out = next;
                        bcl->out_queue_size--;
This page took 0.025362 seconds and 5 git commands to generate.