net: dsa: hellcreek: Report VLAN table occupancy
authorKurt Kanzenbach <kurt@kmk-computers.de>
Sat, 30 Jan 2021 13:59:33 +0000 (14:59 +0100)
committerJakub Kicinski <kuba@kernel.org>
Tue, 2 Feb 2021 02:28:33 +0000 (18:28 -0800)
commit7f976d5cf16d0a747098f67831d746fa25f18dbe
tree404f953544b811a160d68fac71e2c10d391ba7ad
parent14e8e0f6008865d823a8184a276702a6c3cbef3d
net: dsa: hellcreek: Report VLAN table occupancy

The VLAN membership configuration is cached in software already. So, it can be
reported via devlink. Add support for it:

|root@tsn:~# devlink resource show platform/ff240000.switch
|platform/ff240000.switch:
|  name VLAN size 4096 occ 4 unit entry dpipe_tables none

Signed-off-by: Kurt Kanzenbach <kurt@kmk-computers.de>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/dsa/hirschmann/hellcreek.c
drivers/net/dsa/hirschmann/hellcreek.h