]> git.proxmox.com Git - mirror_iproute2.git/commitdiff
devlink: report cell size
authorJakub Kicinski <jakub.kicinski@netronome.com>
Mon, 4 Feb 2019 15:28:59 +0000 (07:28 -0800)
committerDavid Ahern <dsahern@gmail.com>
Wed, 6 Feb 2019 16:46:22 +0000 (08:46 -0800)
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>
Signed-off-by: David Ahern <dsahern@gmail.com>
devlink/devlink.c
man/man8/devlink-sb.8

index 3651e90c115975d077c726c6611e2f0f9f9dc2cb..4c44c3bea724a4147e9966ae4b1f2e33b4a2ef10 100644 (file)
@@ -2722,6 +2722,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);
 }
 
index 1882833a3fa7dfae62ddf580cafb5a327d786f2b..91b681897d01c05ed13caf4e7b50d27ed9723d73 100644 (file)
@@ -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