diff options
author | David S. Miller <davem@davemloft.net> | 2019-11-06 05:09:45 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-11-06 05:09:45 +0300 |
commit | 973ff55bef3899dec111248b4a71f84aa4ac05ef (patch) | |
tree | fbbbb6bb8ec7b0e004c97febde2f168ff9e88c83 /include | |
parent | 2ee6ad1ddf77ca13ae5a72ddc5cad3d64dc6443c (diff) | |
parent | e0c69ca7dfbbaaa6f9167c65f5cde740557aaed9 (diff) | |
download | linux-973ff55bef3899dec111248b4a71f84aa4ac05ef.tar.xz |
Merge branch 'mv88e6xxx-ATU-occupancy-as-devlink-resource'
Andrew Lunn says:
====================
mv88e6xxx ATU occupancy as devlink resource
This patchset add generic support to DSA for devlink resources. The
Marvell switch Address Translation Unit occupancy is then exported as
a resource. In order to do this, the number of ATU entries is added to
the per switch info structure. Helpers are added, and then the
resource itself is then added.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/dsa.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/net/dsa.h b/include/net/dsa.h index e4c697b95c70..9507611a41f0 100644 --- a/include/net/dsa.h +++ b/include/net/dsa.h @@ -586,6 +586,22 @@ int dsa_devlink_params_register(struct dsa_switch *ds, void dsa_devlink_params_unregister(struct dsa_switch *ds, const struct devlink_param *params, size_t params_count); +int dsa_devlink_resource_register(struct dsa_switch *ds, + const char *resource_name, + u64 resource_size, + u64 resource_id, + u64 parent_resource_id, + const struct devlink_resource_size_params *size_params); + +void dsa_devlink_resources_unregister(struct dsa_switch *ds); + +void dsa_devlink_resource_occ_get_register(struct dsa_switch *ds, + u64 resource_id, + devlink_resource_occ_get_t *occ_get, + void *occ_get_priv); +void dsa_devlink_resource_occ_get_unregister(struct dsa_switch *ds, + u64 resource_id); + struct dsa_devlink_priv { struct dsa_switch *ds; }; |