Commit bd3f7850 authored by Amit Cohen's avatar Amit Cohen Committed by Jakub Kicinski
Browse files

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: default avatarAmit Cohen <amcohen@nvidia.com>
Reviewed-by: default avatarPetr Machata <petrm@nvidia.com>
Signed-off-by: default avatarPetr Machata <petrm@nvidia.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 61a00b19
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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"]'
}