netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH iproute2-next v3] devlink: report cell size
  2019-02-04 15:28 [PATCH iproute2-next v3] devlink: report cell size Jakub Kicinski
@ 2019-02-04 15:25 ` Jiri Pirko
  2019-02-06 17:19 ` David Ahern
  1 sibling, 0 replies; 3+ messages in thread
From: Jiri Pirko @ 2019-02-04 15:25 UTC (permalink / raw)
  To: Jakub Kicinski; +Cc: idosch, dsahern, stephen, oss-drivers, netdev

Mon, Feb 04, 2019 at 04:28:59PM CET, jakub.kicinski@netronome.com wrote:
>Print the value of DEVLINK_ATTR_SB_POOL_CELL_SIZE, if reported.
>
>Example:
>pci/0000:82:00.0:
>  sb 1 pool 0 type egress size 40945664 thtype static cell_size 2048
>  sb 2 pool 0 type egress size 258867200 thtype static cell_size 10240
>...
>
>v3: - don't double space.
>v2: - fix spelling.
>
>Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
>Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com>

Acked-by: Jiri Pirko <jiri@mellanox.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH iproute2-next v3] devlink: report cell size
@ 2019-02-04 15:28 Jakub Kicinski
  2019-02-04 15:25 ` Jiri Pirko
  2019-02-06 17:19 ` David Ahern
  0 siblings, 2 replies; 3+ messages in thread
From: Jakub Kicinski @ 2019-02-04 15:28 UTC (permalink / raw)
  To: idosch, jiri, dsahern; +Cc: stephen, oss-drivers, netdev, Jakub Kicinski

Print the value of DEVLINK_ATTR_SB_POOL_CELL_SIZE, if reported.

Example:
pci/0000:82:00.0:
  sb 1 pool 0 type egress size 40945664 thtype static cell_size 2048
  sb 2 pool 0 type egress size 258867200 thtype static cell_size 10240
...

v3: - don't double space.
v2: - fix spelling.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com>
---
 devlink/devlink.c     |  3 +++
 man/man8/devlink-sb.8 | 10 ++++++++++
 2 files changed, 13 insertions(+)

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..91b681897d01 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 it is not multiple of
+.B cell_size.
+
 .SS devlink sb pool set - set attributes of pool
 
 .PP
-- 
2.19.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH iproute2-next v3] devlink: report cell size
  2019-02-04 15:28 [PATCH iproute2-next v3] devlink: report cell size Jakub Kicinski
  2019-02-04 15:25 ` Jiri Pirko
@ 2019-02-06 17:19 ` David Ahern
  1 sibling, 0 replies; 3+ messages in thread
From: David Ahern @ 2019-02-06 17:19 UTC (permalink / raw)
  To: Jakub Kicinski, idosch, jiri; +Cc: stephen, oss-drivers, netdev

On 2/4/19 7:28 AM, Jakub Kicinski wrote:
> Print the value of DEVLINK_ATTR_SB_POOL_CELL_SIZE, if reported.
> 
> Example:
> pci/0000:82:00.0:
>   sb 1 pool 0 type egress size 40945664 thtype static cell_size 2048
>   sb 2 pool 0 type egress size 258867200 thtype static cell_size 10240
> ...
> 
> v3: - don't double space.
> v2: - fix spelling.
> 
> Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
> Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com>
> ---
>  devlink/devlink.c     |  3 +++
>  man/man8/devlink-sb.8 | 10 ++++++++++
>  2 files changed, 13 insertions(+)

applied to iproute2-next. Thanks

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-02-06 17:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-04 15:28 [PATCH iproute2-next v3] devlink: report cell size Jakub Kicinski
2019-02-04 15:25 ` Jiri Pirko
2019-02-06 17:19 ` David Ahern

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).