Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Florian Fainelli <f.fainelli@gmail.com>
Cc: netdev@vger.kernel.org, Vivien Didelot <vivien.didelot@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net-next] net: dsa: loop: Return VLAN table size through devlink
Date: Tue, 18 Aug 2020 19:43:00 +0200	[thread overview]
Message-ID: <20200818174300.GI2330298@lunn.ch> (raw)
In-Reply-To: <20200818040354.44736-1-f.fainelli@gmail.com>

On Mon, Aug 17, 2020 at 09:03:54PM -0700, Florian Fainelli wrote:
> We return the VLAN table size through devlink as a simple parameter, we
> do not support altering it at runtime:
> 
> devlink resource show mdio_bus/fixed-0:1f
> mdio_bus/fixed-0:1f:
>   name VTU size 4096 occ 4096 unit entry dpipe_tables none

Hi Florian

The occ 4096 looks wrong. It is supposed to show the occupancy, how
many are in use. 

> +static u64 dsa_loop_devlink_vtu_get(void *priv)
> +{
> +	struct dsa_loop_priv *ps = priv;
> +
> +	return ARRAY_SIZE(ps->vlans);
> +}

So this should probably be looping over all vlan IDs and counting those
with members?

	Andrew

  reply	other threads:[~2020-08-18 17:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-18  4:03 Florian Fainelli
2020-08-18 17:43 ` Andrew Lunn [this message]
2020-08-18 20:07   ` Florian Fainelli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200818174300.GI2330298@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=vivien.didelot@gmail.com \
    --subject='Re: [PATCH net-next] net: dsa: loop: Return VLAN table size through devlink' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).