Skip to content

Commit

Permalink
selftests: devlink_lib: Add function for querying maximum pool size
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Amit Cohen authored and Jakub Kicinski committed Sep 20, 2022
1 parent 61a00b1 commit bd3f785
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tools/testing/selftests/net/forwarding/devlink_lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"]'
}

0 comments on commit bd3f785

Please sign in to comment.