]> git.kernelconcepts.de Git - karo-tx-linux.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)
commit5f0c5f73e5efaee2928c4cabcf48b03f6ba99fc8
tree692fa18ddfe4fea8c3a9a43210dcfdb44300f95c
parentb0ab6f92752b9f9d8da980506e9df3bd9dcd7ed3
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