diff options
author | Petr Machata <petrm@nvidia.com> | 2020-09-30 12:49:08 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-09-30 14:06:54 -0700 |
commit | 294f44c19fa65b0c813608d7ddfbb378875eb6b0 (patch) | |
tree | 70b33e671b3241ecda68c22cb4aec8e8b6a29d03 /tools | |
parent | 6e0972e0c5d8f78b64274fd1a512136aee404610 (diff) | |
download | linux-294f44c19fa65b0c813608d7ddfbb378875eb6b0.tar.gz linux-294f44c19fa65b0c813608d7ddfbb378875eb6b0.tar.bz2 linux-294f44c19fa65b0c813608d7ddfbb378875eb6b0.zip |
selftests: forwarding: devlink_lib: Add devlink_cell_size_get()
Add a helper that answers the cell size of the devlink device.
Signed-off-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/testing/selftests/net/forwarding/devlink_lib.sh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/testing/selftests/net/forwarding/devlink_lib.sh b/tools/testing/selftests/net/forwarding/devlink_lib.sh index ba6aca848702..cf4e5daf767b 100644 --- a/tools/testing/selftests/net/forwarding/devlink_lib.sh +++ b/tools/testing/selftests/net/forwarding/devlink_lib.sh @@ -549,3 +549,9 @@ devlink_cpu_port_get() echo "$DEVLINK_DEV/$cpu_dl_port_num" } + +devlink_cell_size_get() +{ + devlink sb pool show "$DEVLINK_DEV" pool 0 -j \ + | jq '.pool[][].cell_size' +} |