aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/bcast.c
diff options
context:
space:
mode:
authorAllan Stephens <allan.stephens@windriver.com>2011-10-24 13:27:31 -0400
committerPaul Gortmaker <paul.gortmaker@windriver.com>2011-12-27 11:33:51 -0500
commit9157bafb44637a2cfefc222d6551100ead40e79e (patch)
tree03daf741edd6dc848ec38eff1aead23c31c5c83a /net/tipc/bcast.c
parent2b78f9a002dccc587912af4da3bf1db86909de91 (diff)
tipc: Minor optimization of broadcast link transmit queue statistic
The two broadcast link statistics fields that are used to derive the average length of that link's transmit queue are now updated only after a successful attempt to send a broadcast message, since there is no need to update these values when an unsuccessful send attempt leaves the queue unchanged. 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.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/tipc/bcast.c b/net/tipc/bcast.c
index 8f58df24bac5..dd990b081435 100644
--- a/net/tipc/bcast.c
+++ b/net/tipc/bcast.c
@@ -424,11 +424,11 @@ int tipc_bclink_send_msg(struct sk_buff *buf)
424 } 424 }
425 425
426 res = tipc_link_send_buf(bcl, buf); 426 res = tipc_link_send_buf(bcl, buf);
427 if (likely(res > 0)) 427 if (likely(res >= 0)) {
428 bclink_set_last_sent(); 428 bclink_set_last_sent();
429 429 bcl->stats.queue_sz_counts++;
430 bcl->stats.queue_sz_counts++; 430 bcl->stats.accu_queue_sz += bcl->out_queue_size;
431 bcl->stats.accu_queue_sz += bcl->out_queue_size; 431 }
432exit: 432exit:
433 spin_unlock_bh(&bc_lock); 433 spin_unlock_bh(&bc_lock);
434 return res; 434 return res;