]> git.baikalelectronics.ru Git - kernel.git/commit
bonding: make global bonding stats more reliable
authorAndy Gospodarek <gospo@cumulusnetworks.com>
Mon, 29 Sep 2014 02:34:37 +0000 (22:34 -0400)
committerDavid S. Miller <davem@davemloft.net>
Tue, 30 Sep 2014 05:20:07 +0000 (01:20 -0400)
commitd714f17a6e0142869c10b9eb8b3242318efe33bf
tree692fa18ddfe4fea8c3a9a43210dcfdb44300f95c
parent0cc6f3263776b4b1752c4a2f4aa3ddd0ae1022c4
bonding: make global bonding stats more reliable

As the code stands today, bonding stats are based simply on the stats
from the member interfaces.  If a member was to be removed from a bond,
the stats would instantly drop.  This would be confusing to an admin
would would suddonly see interface stats drop while traffic is still
flowing.

In addition to preventing the stats drops mentioned above, new members
will now be added to the bond and only traffic received after the member
was added to the bond will be counted as part of bonding stats.  Bonding
counters will also be updated when any slaves are dropped to make sure
the reported stats are reliable.

v2: Changes suggested by Nik to properly allocate/free stats memory.
v3: Properly destroy workqueue and fix netlink configuration path.
v4: Moved cached stats into bonding and slave structs as there does not
seem to be a complexity/performance benefit to using alloc'd memory vs
in-struct memory.

Signed-off-by: Andy Gospodarek <gospo@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/bonding/bond_main.c
drivers/net/bonding/bonding.h