diff options
author | Ido Schimmel <idosch@mellanox.com> | 2019-04-30 11:42:08 +0300 |
---|---|---|
committer | David Ahern <dsahern@gmail.com> | 2019-04-30 11:23:08 -0700 |
commit | 517ea57c6dfc44093df8ca8e1852e9417643185d (patch) | |
tree | 3835d375f1b4e15726c7f71af231584d0bef3627 | |
parent | 4d9e90f36b3f92644ed5c915758b403953727e40 (diff) | |
download | iproute2-517ea57c6dfc44093df8ca8e1852e9417643185d.tar.gz |
devlink: Increase column size for larger shared buffers
With current number of spaces the output is mangled if the shared buffer
is congested.
Before:
# devlink sb occupancy show swp25
swp25:
pool: 0: 33384960/39344256 1: 0/0 2: 0/0 3: 0/0
4: 0/720 5: 0/0 6: 0/0 7: 0/0
8: 0/288 9: 0/0 10: 0/0
itc: 0(0): 33272064/39344256 1(0): 0/0 2(0): 0/0 3(0): 0/0
4(0): 0/0 5(0): 0/0 6(0): 0/0 7(0): 0/0
etc: 0(4): 0/720 1(4): 0/0 2(4): 0/0 3(4): 0/0
4(4): 0/0 5(4): 0/0 6(4): 0/0 7(4): 0/0
8(8): 0/288 9(8): 0/0 10(8): 0/0 11(8): 0/0
12(8): 0/0 13(8): 0/0 14(8): 0/0 15(8): 0/0
After:
# devlink sb occupancy show swp25
swp25:
pool: 0: 39070080/39344256 1: 0/0 2: 0/0 3: 0/0
4: 0/720 5: 0/0 6: 0/0 7: 0/0
8: 0/288 9: 0/0 10: 0/0
itc: 0(0): 39062016/39344256 1(0): 0/0 2(0): 0/0 3(0): 0/0
4(0): 0/0 5(0): 0/0 6(0): 0/0 7(0): 0/0
etc: 0(4): 0/720 1(4): 0/0 2(4): 0/0 3(4): 0/0
4(4): 0/0 5(4): 0/0 6(4): 0/0 7(4): 0/0
8(8): 0/288 9(8): 0/0 10(8): 0/0 11(8): 0/0
12(8): 0/0 13(8): 0/0 14(8): 0/0 15(8): 0/0
v2:
* Increase number of spaces to make the change more future-proof
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Reported-by: Alex Kushnarov <alexanderk@mellanox.com>
Signed-off-by: David Ahern <dsahern@gmail.com>
-rw-r--r-- | devlink/devlink.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/devlink/devlink.c b/devlink/devlink.c index dc6e73fe..5bf81f55 100644 --- a/devlink/devlink.c +++ b/devlink/devlink.c @@ -3422,7 +3422,7 @@ static void pr_out_occ_show_item_list(const char *label, struct list_head *list, occ_item->bound_pool_index); else pr_out_sp(7, "%2u:", occ_item->index); - pr_out_sp(15, "%7u/%u", occ_item->cur, occ_item->max); + pr_out_sp(21, "%10u/%u", occ_item->cur, occ_item->max); if (i++ % 4 == 0) pr_out("\n"); } |