From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.0 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3573EC10F14 for ; Tue, 23 Apr 2019 06:37:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F3AB620674 for ; Tue, 23 Apr 2019 06:37:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="8TzrBhoa" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726247AbfDWGhJ (ORCPT ); Tue, 23 Apr 2019 02:37:09 -0400 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:52913 "EHLO out4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725882AbfDWGhI (ORCPT ); Tue, 23 Apr 2019 02:37:08 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 49D912218B; Tue, 23 Apr 2019 02:37:05 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Tue, 23 Apr 2019 02:37:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=+1cCr0PU42/KPLG6P dSgrfgALEZycBmV7MEnOUTxFG4=; b=8TzrBhoai2WOs5ysJCpP+u69khoLzb/1C yQnOdZvzXd1XuhWl2wD1LNrRBPIOGs8y/7dgrPwl/zh/cT2T5sQ9ZqM3Q1BB5NhJ 0Y1biy1ulV7f3bd6bN/FSyZ9gc6mULzk6oBAthOiQQrrx4sWa4466mL+u/CK8hXd wz46eteIkNxBXpY+kQ2k6x6C9xfdArfrd4qObdAPwAMAsxUDqmJhGGT85mtS2u53 bqnfxR3cYiwXuSa/YcfPFv0tfihFRonHYWr5Bv/hqQxhR8odAL+N49FukwQGLbTV TQ0np+FYd8EbE5JhZnI9zs4wnk8Vip1uNiYGIcawV2+z10SmtO49w== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduuddrgeejgdeliecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffoggfgsedtkeertdertd dtnecuhfhrohhmpefkughoucfutghhihhmmhgvlhcuoehiughoshgthhesihguohhstghh rdhorhhgqeenucfkphepudelfedrgeejrdduieehrddvhedunecurfgrrhgrmhepmhgrih hlfhhrohhmpehiughoshgthhesihguohhstghhrdhorhhgnecuvehluhhsthgvrhfuihii vgeptd X-ME-Proxy: Received: from splinter.mtl.com (unknown [193.47.165.251]) by mail.messagingengine.com (Postfix) with ESMTPA id 5518110316; Tue, 23 Apr 2019 02:37:02 -0400 (EDT) From: Ido Schimmel To: netdev@vger.kernel.org Cc: dsahern@gmail.com, jiri@mellanox.com, alexanderk@mellanox.com, mlxsw@mellanox.com, Ido Schimmel Subject: [PATCH iproute2-next] devlink: Increase column size for larger shared buffers Date: Tue, 23 Apr 2019 09:36:30 +0300 Message-Id: <20190423063630.5599-1-idosch@idosch.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Ido Schimmel 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 Reported-by: Alex Kushnarov Tested-by: Alex Kushnarov --- 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