net/sfc: optimize getting number of SW stats
authorIvan Ilchenko <ivan.ilchenko@oktetlabs.ru>
Tue, 28 Sep 2021 11:29:07 +0000 (14:29 +0300)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 11 Oct 2021 16:35:57 +0000 (18:35 +0200)
commitc704e5df3d8fc75c74235943efa68f7e0f1109f1
tree0bb91e9a14e4bc2d43ba6f28cad01bdfb6163f16
parentfc66e84d6dafad36fe09df7900c4bc533d00de58
net/sfc: optimize getting number of SW stats

Optimize getting number of SW stats by caching the
value during device configure since it's the only
place it may change.

Signed-off-by: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
drivers/net/sfc/sfc.h
drivers/net/sfc/sfc_sw_stats.c