net/failsafe: improve stats accuracy
authorMatan Azrad <matan@mellanox.com>
Sat, 21 Oct 2017 20:54:45 +0000 (20:54 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 26 Oct 2017 00:33:01 +0000 (02:33 +0200)
commit321809bb8c61066f4ec790f4ac17b3c5e0c67178
tree599a91020f7227cfba5d3980ad2197f62c64a85b
parentcad92582d23886c4b9f8611da6f14577bad0b15d
net/failsafe: improve stats accuracy

The stats_get API was changed to signal a potential failure to read
stats. Furthermore, some PMDs are able to provide statistics even
after a removal event occurred.

Considering this, the fail-safe can try to access the latest
statistics of a PMD to improve statistics accuracy.

Attempt an ultimate statistics read on removal time; if that
fails, use the latest recorded snapshot.

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
drivers/net/failsafe/failsafe_ether.c