mlxsw: spectrum_acl: Ask device for rule stats only if counter was created
authorJiri Pirko <jiri@mellanox.com>
Sat, 7 Mar 2020 11:40:18 +0000 (12:40 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 9 Mar 2020 04:07:48 +0000 (21:07 -0700)
commitf16e7f64e4b5811902497b25cbe9c8a746659753
tree01972c04283f80bfcdd3acee0e4a2eb1aa448fd4
parent48855479510be1f8769cb13174f29dd8a44b4256
mlxsw: spectrum_acl: Ask device for rule stats only if counter was created

Set a flag in case rule counter was created. Only query the device for
stats of a rule, which has the valid counter assigned.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum.h
drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c