Commit 294f44c1 authored by Petr Machata's avatar Petr Machata Committed by David S. Miller
Browse files

selftests: forwarding: devlink_lib: Add devlink_cell_size_get()



Add a helper that answers the cell size of the devlink device.

Signed-off-by: default avatarPetr Machata <petrm@nvidia.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6e0972e0
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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'
}