Message ID | 20190204013919.816-1-jakub.kicinski@netronome.com |
---|---|
State | Superseded |
Delegated to: | David Ahern |
Headers | show |
Series | [iproute2-next] devlink: report cell size | expand |
On Sun, Feb 03, 2019 at 05:39:19PM -0800, Jakub Kicinski wrote: > diff --git a/man/man8/devlink-sb.8 b/man/man8/devlink-sb.8 > index 1882833a3fa7..767c932dd4c1 100644 > --- a/man/man8/devlink-sb.8 > +++ b/man/man8/devlink-sb.8 > @@ -128,6 +128,16 @@ Behaviour of this argument it the same for every command. > - specifies the devlink device to show pools. > If this argument is omitted all pools of all devices are listed. > > +Display available pools listing their > +.B type, size, thtype > +and > +.B cell_size. cell_size > +is the allocation granularity of memory within the shared buffer. Drivers > +may round up, round down or reject > +.B size > +passed to the set command if its not multiple of s/its/it is/ > +.B cell_size. > + > .SS devlink sb pool set - set attributes of pool > > .PP > -- > 2.19.2 >
diff --git a/devlink/devlink.c b/devlink/devlink.c index fc4b18d1b613..40f6105af109 100644 --- a/devlink/devlink.c +++ b/devlink/devlink.c @@ -2891,6 +2891,9 @@ static void pr_out_sb_pool(struct dl *dl, struct nlattr **tb) mnl_attr_get_u32(tb[DEVLINK_ATTR_SB_POOL_SIZE])); pr_out_str(dl, "thtype", threshold_type_name(mnl_attr_get_u8(tb[DEVLINK_ATTR_SB_POOL_THRESHOLD_TYPE]))); + if (tb[DEVLINK_ATTR_SB_POOL_CELL_SIZE]) + pr_out_uint(dl, "cell_size", + mnl_attr_get_u32(tb[DEVLINK_ATTR_SB_POOL_CELL_SIZE])); pr_out_handle_end(dl); } diff --git a/man/man8/devlink-sb.8 b/man/man8/devlink-sb.8 index 1882833a3fa7..767c932dd4c1 100644 --- a/man/man8/devlink-sb.8 +++ b/man/man8/devlink-sb.8 @@ -128,6 +128,16 @@ Behaviour of this argument it the same for every command. - specifies the devlink device to show pools. If this argument is omitted all pools of all devices are listed. +Display available pools listing their +.B type, size, thtype +and +.B cell_size. cell_size +is the allocation granularity of memory within the shared buffer. Drivers +may round up, round down or reject +.B size +passed to the set command if its not multiple of +.B cell_size. + .SS devlink sb pool set - set attributes of pool .PP