diff options
author | Srikanth Jampala <Jampala.Srikanth@cavium.com> | 2018-09-21 17:08:01 +0530 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2018-09-28 12:46:26 +0800 |
commit | fec165c947935b2b65fac3ee8081b4a5aa960872 (patch) | |
tree | 04cc31bf9324ee21200f385ff353e18bd25bf8bb /drivers/crypto/cavium/nitrox/nitrox_main.c | |
parent | 48e10548f82ea33e01ab8ed92dbcb9513463cb90 (diff) |
crypto: cavium/nitrox - add support for per device request statistics.
Add per device statistics like number of requests posted,
dropped and completed etc.
Signed-off-by: Srikanth Jampala <Jampala.Srikanth@cavium.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/cavium/nitrox/nitrox_main.c')
-rw-r--r-- | drivers/crypto/cavium/nitrox/nitrox_main.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/crypto/cavium/nitrox/nitrox_main.c b/drivers/crypto/cavium/nitrox/nitrox_main.c index acce0f0b9c7a..362e7217354c 100644 --- a/drivers/crypto/cavium/nitrox/nitrox_main.c +++ b/drivers/crypto/cavium/nitrox/nitrox_main.c @@ -542,6 +542,11 @@ static int nitrox_probe(struct pci_dev *pdev, if (err) goto pf_hw_fail; + /* clear the statistics */ + atomic64_set(&ndev->stats.posted, 0); + atomic64_set(&ndev->stats.completed, 0); + atomic64_set(&ndev->stats.dropped, 0); + atomic_set(&ndev->state, __NDEV_READY); /* barrier to sync with other cpus */ smp_mb__after_atomic(); |