net/bnxt: skip get statistics for stopped queues
authorStephen Hemminger <stephen@networkplumber.org>
Wed, 21 Apr 2021 23:09:29 +0000 (16:09 -0700)
committerAjit Khaparde <ajit.khaparde@broadcom.com>
Sat, 24 Apr 2021 18:53:45 +0000 (20:53 +0200)
commit6aba4a036e0bf188f42dc8eee678f89211330fb8
tree6fed4bd11b59133e8cdffd9ee66f65dee1225c8e
parentb01e1e9a0d3e77e91dba61d90bed4ef6252e5ae0
net/bnxt: skip get statistics for stopped queues

An application using rte_flow may define a large number of queues
but only use a small subset of them at any one time.

Since querying the status of each queue requires a request/spin/reply
with the firmware, optimize by skipping the request for queues not
running.
For those queues the statistics will be 0.

This cuts the cost of single xstats query in half and has even
bigger gain for simple stats query.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
drivers/net/bnxt/bnxt_stats.c