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>
This commit is contained in:
parent
6e0972e0c5
commit
294f44c19f
|
@ -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'
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue