mlxsw: spectrum_buffers: Implement occupancy monitoring
authorJiri Pirko <jiri@mellanox.com>
Thu, 14 Apr 2016 16:19:30 +0000 (18:19 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 14 Apr 2016 20:22:06 +0000 (16:22 -0400)
commit2d0ed39fbdee64835dc710b4ee3897f2bb9f8cf4
treec72e8d90ee43bd977cf500750f5059adc6524400
parentcaf7297e7ab5f8aa9d482200748a066adbfa5775
mlxsw: spectrum_buffers: Implement occupancy monitoring

Implement occupancy API introduced in devlink and mlxsw core. This is
done by accessing SBPM register for Port-Pool and SBSR for Port-TC
current and max occupancy values. Max clear is implemented using the
same registers.

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