netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Vladimir Oltean <olteanv@gmail.com>
Cc: David Miller <davem@davemloft.net>,
	netdev <netdev@vger.kernel.org>, Chris Healy <cphealy@gmail.com>,
	Vivien Didelot <vivien.didelot@gmail.com>
Subject: Re: [PATCH net-next 5/7] net: dsa: mv88e6xxx: Add devlink regions
Date: Mon, 17 Aug 2020 00:39:41 +0200	[thread overview]
Message-ID: <20200816223941.GC2294711@lunn.ch> (raw)
In-Reply-To: <20200816221205.mspo63dohn7pvxg4@skbuf>

> > +static const struct devlink_region_ops *mv88e6xxx_region_port_ops[] = {
> > +	&mv88e6xxx_region_port_0_ops,
> > +	&mv88e6xxx_region_port_1_ops,
> > +	&mv88e6xxx_region_port_2_ops,
> > +	&mv88e6xxx_region_port_3_ops,
> > +	&mv88e6xxx_region_port_4_ops,
> > +	&mv88e6xxx_region_port_5_ops,
> > +	&mv88e6xxx_region_port_6_ops,
> > +	&mv88e6xxx_region_port_7_ops,
> > +	&mv88e6xxx_region_port_8_ops,
> > +	&mv88e6xxx_region_port_9_ops,
> > +	&mv88e6xxx_region_port_10_ops,
> > +	&mv88e6xxx_region_port_11_ops,
> > +};
> > +
> 
> Sounds like there should maybe be an abstraction for 'per-port regions' in
> devlink? I think your approach hardly scales if you start having
> switches with more than 11 ports.

mv88e6xxx is unlikely to have more an 11 ports. Marvell had to move
bits around in registers in non-compatible ways to support the 6390
family with this number of ports. I doubt we will ever see a 16 port
mv88e6xxx switch, the registers are just too congested.

So this scales as far as it needs to scale.

> > +/* The ATU entry varies between chipset generations. Define a generic
> > + * format which covers all the current and hopefully future
> > + * generations
> > + */
> 
> Could you please present this generic format to us? Maybe my interpretation of
> the word "generic" is incorrect in this context?

I mean generic across all mv88e6xxx switches. The fid has been slowly
getting bigger from generation to generation. If i remember correctly,
it start off as 6 bits. 2 more bits we added, in a different
register. Then it got moved into a new register and made 14 bits in
size. There are also some bits in the atu_op register which changed
meaning over time.

In order to decode any of this information in the regions, you need to
known the specific switch the dump came from. But that is the whole
point of regions.

https://www.kernel.org/doc/html/latest/networking/devlink/devlink-region.html

   As regions are likely very device or driver specific, no generic
   regions are defined. See the driver-specific documentation files
   for information on the specific regions a driver supports.

This should also make the context of 'generic' more clear.

     Andrew

  reply	other threads:[~2020-08-16 22:39 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-16 19:43 [PATCH net-next 0/7] net: dsa: mv88e6xxx: Add devlink regions support Andrew Lunn
2020-08-16 19:43 ` [PATCH net-next 1/7] net: dsa: Add helper to convert from devlink to ds Andrew Lunn
2020-08-17 17:08   ` Florian Fainelli
2020-08-16 19:43 ` [PATCH net-next 2/7] net: dsa: Add devlink regions support to DSA Andrew Lunn
2020-08-16 21:50   ` Vladimir Oltean
2020-08-16 22:06     ` Andrew Lunn
2020-08-16 22:17       ` Vladimir Oltean
2020-08-16 19:43 ` [PATCH net-next 3/7] net: dsa: mv88e6xxx: Move devlink code into its own file Andrew Lunn
2020-08-16 19:43 ` [PATCH net-next 4/7] net: dsa: mv88e6xxx: Create helper for FIDs in use Andrew Lunn
2020-08-16 19:43 ` [PATCH net-next 5/7] net: dsa: mv88e6xxx: Add devlink regions Andrew Lunn
2020-08-16 22:12   ` Vladimir Oltean
2020-08-16 22:39     ` Andrew Lunn [this message]
2020-08-17 17:15       ` Florian Fainelli
2020-08-17 19:02         ` Andrew Lunn
2020-08-16 19:43 ` [PATCH net-next 6/7] net: dsa: wire up devlink info get Andrew Lunn
2020-08-16 21:56   ` Vladimir Oltean
2020-08-16 22:16     ` Andrew Lunn
2020-08-16 19:43 ` [PATCH net-next 7/7] net: dsa: mv88e6xxx: Implement devlink info get callback Andrew Lunn
2020-08-17 16:03   ` Jakub Kicinski
2020-08-16 20:17 ` [PATCH net-next 0/7] net: dsa: mv88e6xxx: Add devlink regions support Chris Healy
2020-08-17 17:08 ` Florian Fainelli
2020-08-17 19:08   ` Andrew Lunn

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=20200816223941.GC2294711@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=cphealy@gmail.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=vivien.didelot@gmail.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).