selftests: devlink_lib: Add function for querying maximum pool size
The maximum pool size is exposed via 'devlink sb' command. The next patch will add a test which increases some pools to the maximum size. Add a function to query the value. Signed-off-by: Amit Cohen <amcohen@nvidia.com> Reviewed-by: Petr Machata <petrm@nvidia.com> Signed-off-by: Petr Machata <petrm@nvidia.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
61a00b196a
commit
bd3f785072
@ -584,3 +584,8 @@ devlink_cell_size_get()
|
||||
devlink sb pool show "$DEVLINK_DEV" pool 0 -j \
|
||||
| jq '.pool[][].cell_size'
|
||||
}
|
||||
|
||||
devlink_pool_size_get()
|
||||
{
|
||||
devlink sb show "$DEVLINK_DEV" -j | jq '.[][][]["size"]'
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user