All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH iproute2-next] devlink: Increase column size for larger shared buffers
@ 2019-04-23  6:36 Ido Schimmel
  2019-04-24  2:27 ` David Ahern
  0 siblings, 1 reply; 3+ messages in thread
From: Ido Schimmel @ 2019-04-23  6:36 UTC (permalink / raw)
  To: netdev; +Cc: dsahern, jiri, alexanderk, mlxsw, Ido Schimmel

From: Ido Schimmel <idosch@mellanox.com>

With current number of spaces the output is mangled if the shared buffer
is congested.

Before:

# devlink sb occupancy show swp32
swp32:
  pool: 0:    10220112/10222128 1:          0/0       2:          0/0       3:          0/0
        4:    10221120/10222128 5:          0/0       6:          0/0       7:          0/0
        8:      41328/46368   9:          0/0      10:          0/0
  itc:  0(0): 10220112/10222128 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): 10221120/10222128 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):   43344/46368   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 swp32
swp32:
  pool: 0:    10220112/10222128 1:          0/0         2:          0/0         3:          0/0
        4:    10221120/10222128 5:          0/0         6:          0/0         7:          0/0
        8:      41328/46368     9:          0/0        10:          0/0
  itc:  0(0): 10220112/10222128 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): 10221120/10222128 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):   43344/46368     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

Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Reported-by: Alex Kushnarov <alexanderk@mellanox.com>
Tested-by: Alex Kushnarov <alexanderk@mellanox.com>
---
 devlink/devlink.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/devlink/devlink.c b/devlink/devlink.c
index dc6e73fec20c..1306c4c126ad 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(17, "%7u/%u", occ_item->cur, occ_item->max);
 		if (i++ % 4 == 0)
 			pr_out("\n");
 	}
-- 
2.20.1


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

* Re: [PATCH iproute2-next] devlink: Increase column size for larger shared buffers
  2019-04-23  6:36 [PATCH iproute2-next] devlink: Increase column size for larger shared buffers Ido Schimmel
@ 2019-04-24  2:27 ` David Ahern
  2019-04-30  6:24   ` Ido Schimmel
  0 siblings, 1 reply; 3+ messages in thread
From: David Ahern @ 2019-04-24  2:27 UTC (permalink / raw)
  To: Ido Schimmel, netdev; +Cc: dsahern, jiri, alexanderk, mlxsw, Ido Schimmel

On 4/23/19 12:36 AM, Ido Schimmel wrote:
> From: Ido Schimmel <idosch@mellanox.com>
> 
> With current number of spaces the output is mangled if the shared buffer
> is congested.
> 
> Before:
> 
> # devlink sb occupancy show swp32
> swp32:
>   pool: 0:    10220112/10222128 1:          0/0       2:          0/0       3:          0/0
>         4:    10221120/10222128 5:          0/0       6:          0/0       7:          0/0
>         8:      41328/46368   9:          0/0      10:          0/0
>   itc:  0(0): 10220112/10222128 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): 10221120/10222128 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):   43344/46368   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 swp32
> swp32:
>   pool: 0:    10220112/10222128 1:          0/0         2:          0/0         3:          0/0
>         4:    10221120/10222128 5:          0/0         6:          0/0         7:          0/0
>         8:      41328/46368     9:          0/0        10:          0/0
>   itc:  0(0): 10220112/10222128 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): 10221120/10222128 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):   43344/46368     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
> 
> Signed-off-by: Ido Schimmel <idosch@mellanox.com>
> Reported-by: Alex Kushnarov <alexanderk@mellanox.com>
> Tested-by: Alex Kushnarov <alexanderk@mellanox.com>
> ---
>  devlink/devlink.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/devlink/devlink.c b/devlink/devlink.c
> index dc6e73fec20c..1306c4c126ad 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(17, "%7u/%u", occ_item->cur, occ_item->max);
>  		if (i++ % 4 == 0)
>  			pr_out("\n");
>  	}
> 

2 more columns fixes the current problem, what assurances are there that
the occupancy levels and max won't reach 100 million in the next few years?


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

* Re: [PATCH iproute2-next] devlink: Increase column size for larger shared buffers
  2019-04-24  2:27 ` David Ahern
@ 2019-04-30  6:24   ` Ido Schimmel
  0 siblings, 0 replies; 3+ messages in thread
From: Ido Schimmel @ 2019-04-30  6:24 UTC (permalink / raw)
  To: David Ahern; +Cc: netdev, jiri, alexanderk, mlxsw, Ido Schimmel

On Tue, Apr 23, 2019 at 08:27:36PM -0600, David Ahern wrote:
> 2 more columns fixes the current problem, what assurances are there that
> the occupancy levels and max won't reach 100 million in the next few years?

Yes, I thought about that as well, but while the size of the shared
buffers is getting bigger and bigger (with the number of ports), I'm not
familiar with sizes at the levels you're referring to.

Anyway, point taken, I'll make this more future-proof.

Thanks!

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

end of thread, other threads:[~2019-04-30  6:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-23  6:36 [PATCH iproute2-next] devlink: Increase column size for larger shared buffers Ido Schimmel
2019-04-24  2:27 ` David Ahern
2019-04-30  6:24   ` Ido Schimmel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.