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=-6.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,URIBL_BLOCKED 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 5B1B9C10F03 for ; Wed, 24 Apr 2019 02:27:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1AF5B214C6 for ; Wed, 24 Apr 2019 02:27:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="nRBUcaoh" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726687AbfDXC1k (ORCPT ); Tue, 23 Apr 2019 22:27:40 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:46620 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726142AbfDXC1j (ORCPT ); Tue, 23 Apr 2019 22:27:39 -0400 Received: by mail-pf1-f194.google.com with SMTP id 9so8448008pfj.13 for ; Tue, 23 Apr 2019 19:27:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=JxuVgtiez8rKJqwgbOm3BYSrP8w6YDtSPhPhpLAX8JU=; b=nRBUcaohwt9vSz6UZI0563yAqhGRvIvbqrcJyd2knxC5e805oooELbstl59Bm5JLQU LtB+KE66rWEBXJPOp0c8b8QOT+vsSMoY+aeBE/3nHpOiH6z5RCQVdOPT+1cNPY1DpqZO 4iWaspIFfM7efY+vqJM36Tf3AuWMSMrtmoVz6ZXnqSlVQLNwK/0dyqht8Y8ig9oUOpW2 xAg3jZRRqZfOX8MkpSIScG9p2ejt7Snrep5ml54/ujH8SHnwPR8APOz0gMuzqhtBIhOG 8tkU4U0cAnyngW6lleU546FjSnP6wTfT57CuiwGc30oa+eji+MkzDnsdAE0pLH4JOKcj Ybsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=JxuVgtiez8rKJqwgbOm3BYSrP8w6YDtSPhPhpLAX8JU=; b=XumlrcuGl2FsYKhoLHUfXtUgRg14BAHurOIq7Wu51Iyvo5lkusPiYH69dqP5zav0RC FwR+ESi2jrLYVE2BGuX7YujcSoFMOSNWOr0vkAM28Xh/dqXPFrg4v1H90U0AELDDeg7+ XtE0456C4SZvZt8wKJjgzDC5uhqypz/i32pMp+170JNcVMp047BBt9kF71ZWAwHPgvLl 4qGXmlC1xveuiVXkRYEbVaZYhbCQ+0K9rQuAZnRO3kb6J2sUpQ1F6TO4ncQ4AiVdkaXm 8NxAiSfJ6qKYM8J6at4HvdxJyvPzRuoiFJsfLQltgwcdMeGfXbAu/I5amY0l1DndPbDf 2wfg== X-Gm-Message-State: APjAAAX31cHvftxSChXvxCX58P9WsgMuP3l+QYrLfm+D98BM42rvJNB9 AD4PPd8C7E2OmkqBSOtLETY= X-Google-Smtp-Source: APXvYqx51L1psjU66OEpB7l/p/q0TE/wnyIKQ4uxfcaKDcVEUXssGLfBFNB+qBnBLfFVkz8scoz3Hw== X-Received: by 2002:a63:700f:: with SMTP id l15mr28747327pgc.3.1556072859018; Tue, 23 Apr 2019 19:27:39 -0700 (PDT) Received: from ?IPv6:2601:282:800:fd80:f9d7:480d:ac20:8c99? ([2601:282:800:fd80:f9d7:480d:ac20:8c99]) by smtp.googlemail.com with ESMTPSA id 25sm27444980pfo.145.2019.04.23.19.27.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Apr 2019 19:27:37 -0700 (PDT) Subject: Re: [PATCH iproute2-next] devlink: Increase column size for larger shared buffers To: Ido Schimmel , netdev@vger.kernel.org Cc: dsahern@gmail.com, jiri@mellanox.com, alexanderk@mellanox.com, mlxsw@mellanox.com, Ido Schimmel References: <20190423063630.5599-1-idosch@idosch.org> From: David Ahern Message-ID: Date: Tue, 23 Apr 2019 20:27:36 -0600 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20190423063630.5599-1-idosch@idosch.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On 4/23/19 12:36 AM, Ido Schimmel wrote: > 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 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?