From: Petr Machata Date: Wed, 30 Sep 2020 10:49:08 +0000 (+0200) Subject: selftests: forwarding: devlink_lib: Add devlink_cell_size_get() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=294f44c19fa65b0c813608d7ddfbb378875eb6b0;p=linux.git 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 Signed-off-by: David S. Miller --- diff --git a/tools/testing/selftests/net/forwarding/devlink_lib.sh b/tools/testing/selftests/net/forwarding/devlink_lib.sh index ba6aca8487020..cf4e5daf767b6 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' +}