]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
tipc: Fix bug in broadcast link transmit statistics computation
authorAllan Stephens <allan.stephens@windriver.com>
Tue, 17 Aug 2010 11:00:10 +0000 (11:00 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 18 Aug 2010 00:31:55 +0000 (17:31 -0700)
Modify TIPC's broadcast link so that it counts each piece of a
fragmented message individually, rather than as treating the group
as a single message.  This ensures that proper correlation of sent
and received traffic can be done when the broadcast link statistics
are displayed, and is consistent with the way fragments are counted
by TIPC's unicast links.

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

index eefdd1a85f4f29b90a7b0c30745de822270a786c..b11248c2d788f5a1075b9aea1dd502bf0fd61b07 100644 (file)
@@ -409,10 +409,8 @@ int tipc_bclink_send_msg(struct sk_buff *buf)
        res = tipc_link_send_buf(bcl, buf);
        if (unlikely(res == -ELINKCONG))
                buf_discard(buf);
-       else {
-               bcl->stats.sent_info++;
+       else
                bclink_set_last_sent();
-       }
 
        if (bcl->out_queue_size > bcl->stats.max_queue_sz)
                bcl->stats.max_queue_sz = bcl->out_queue_size;
@@ -578,6 +576,7 @@ static int tipc_bcbearer_send(struct sk_buff *buf,
                msg = buf_msg(buf);
                msg_set_non_seq(msg, 1);
                msg_set_mc_netid(msg, tipc_net_id);
+               bcl->stats.sent_info++;
        }
 
        /* Send buffer over bearers until all targets reached */