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=-8.5 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED,USER_AGENT_MUTT 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 996ECC282C4 for ; Mon, 4 Feb 2019 15:00:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6AD0F2087C for ; Mon, 4 Feb 2019 15:00:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=resnulli-us.20150623.gappssmtp.com header.i=@resnulli-us.20150623.gappssmtp.com header.b="HoReT0wb" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729819AbfBDPAh (ORCPT ); Mon, 4 Feb 2019 10:00:37 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:39221 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727178AbfBDPAh (ORCPT ); Mon, 4 Feb 2019 10:00:37 -0500 Received: by mail-wr1-f68.google.com with SMTP id t27so144219wra.6 for ; Mon, 04 Feb 2019 07:00:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=resnulli-us.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=s22AuRZk/Axtxn11oQbuGgeSZfduruNLZGmGSuQtB2w=; b=HoReT0wbNZwqJkdzt9EJHhGjLZS9CRcCs4vFCmQ0LWJfMU7khMIi5G17+PgOnBRA3B 9GOKB3V9XDFGoIY24exrhzBYM7tApUAYUwoEyVbNyfcSsoM+gpAx8XcSOf6p3cFGT/kp 8LcDsFvuSwhV49sb83ARA3myKVq/z88twi8SITFg56HIRcOdE3DwGl3WKPU5sny+U+sG 1jyyAplIzC2MrtDosuUYtLaK5/nVRg+tQTnHbrx3WBJyPrtEYwvIOtgOw8bBIzXVtZcl 9hU0shJiF1nZPu82NZU0BgRS53LO/ExuFLeIctuXEIZPEupRNm/gO6ZMmdk0CxmECkT7 ViAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=s22AuRZk/Axtxn11oQbuGgeSZfduruNLZGmGSuQtB2w=; b=WpPC4YlN0ONqe5obXwvgmmhKs0sIQM9lQp7IlR0aKC6NpG/ow9q4KPHyx/q6dMNRDz goPuF7fGidX38rQ8irC1bUz2WUJkATQl2PONPfi6zoNrMsbkDrG2r1nFmFPLMgrv3r+f macCw8yNn/+6zJ0DWLUFAXLJOBH2QgxKTB89DZ4f7qbhzVjURJM0gwiT2q+aU6aKKrxO +y9xt+z3L2KaiKo1EcJUOYn+KT8OdHxX/qOFlQobGqtWTppC4r3FM+C9oBz1i4wk9d5R a+In4LXY5noPhEFCGRlEFLm6Tq70c30BGAiqr0/41jD7g18I5DzF1jkYy3sHRaBrp420 13DQ== X-Gm-Message-State: AJcUukfltSquRoW59z6gFVz1Y+Vk1NJqD1fi7h8W5SsClSxVk7crj42b ulWqWl9aoH6EL7E7xCLGTRem6g== X-Google-Smtp-Source: ALg8bN69CfIFdL3z8kHDqQSLSoKkj2d2lJoprp+n/6dt9MMfrM9oC/fU/fb4ZW8Np5ZhhAkatOGYPQ== X-Received: by 2002:a5d:56d2:: with SMTP id m18mr52113764wrw.113.1549292435384; Mon, 04 Feb 2019 07:00:35 -0800 (PST) Received: from localhost (mail.chocen-mesto.cz. [85.163.43.2]) by smtp.gmail.com with ESMTPSA id l19sm7438386wme.21.2019.02.04.07.00.34 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 04 Feb 2019 07:00:34 -0800 (PST) Date: Mon, 4 Feb 2019 15:51:25 +0100 From: Jiri Pirko To: Jakub Kicinski Cc: idosch@mellanox.com, dsahern@gmail.com, stephen@networkplumber.org, oss-drivers@netronome.com, netdev@vger.kernel.org Subject: Re: [PATCH iproute2-next v2] devlink: report cell size Message-ID: <20190204145125.GB2118@nanopsycho> References: <20190204144442.5704-1-jakub.kicinski@netronome.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190204144442.5704-1-jakub.kicinski@netronome.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Mon, Feb 04, 2019 at 03:44:42PM CET, jakub.kicinski@netronome.com wrote: >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 >... > >v2: - fix spelling. > >Signed-off-by: Jakub Kicinski >Reviewed-by: Quentin Monnet >--- > devlink/devlink.c | 3 +++ > man/man8/devlink-sb.8 | 10 ++++++++++ > 2 files changed, 13 insertions(+) > >diff --git a/devlink/devlink.c b/devlink/devlink.c >index fc4b18d1b613..40f6105af109 100644 >--- a/devlink/devlink.c >+++ b/devlink/devlink.c >@@ -2891,6 +2891,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); > } > >diff --git a/man/man8/devlink-sb.8 b/man/man8/devlink-sb.8 >index 1882833a3fa7..0deacd9ccd23 100644 >--- a/man/man8/devlink-sb.8 >+++ b/man/man8/devlink-sb.8 >@@ -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 Double space. Other than this nit, looks fine to me. >+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 >-- >2.19.2 >