mlxsw: spectrum: Support for counters on router interfaces
authorArkadi Sharshevsky <arkadis@mellanox.com>
Tue, 28 Mar 2017 15:24:15 +0000 (17:24 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 29 Mar 2017 00:11:55 +0000 (17:11 -0700)
commite0c0afd8aa4e2f0ecfb7f6d9c4c7f87e07d54132
treec29c31e69379b31d6535b48413ae40b9ce7bfbee
parentba73e97a6376c2e0522ff372f2555388deab8ce6
mlxsw: spectrum: Support for counters on router interfaces

Add support for counter allocation on router interfaces. The allocation
depends on the counter state of relevant table. In case the counting is
disabled or no counters left the counter index will be set as invalid.

Also a counter pool for router allocation is added.

Signed-off-by: Arakdi Sharshevsky <arkadis@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/resources.h
drivers/net/ethernet/mellanox/mlxsw/spectrum_cnt.c
drivers/net/ethernet/mellanox/mlxsw/spectrum_cnt.h
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.h [new file with mode: 0644]