From: Florian Fainelli <f.fainelli@gmail.com>
To: Andrew Lunn <andrew@lunn.ch>, 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 10:15:07 -0700 [thread overview]
Message-ID: <93a2b736-ff45-4529-c63a-b384db12b232@gmail.com> (raw)
In-Reply-To: <20200816223941.GC2294711@lunn.ch>
On 8/16/20 3:39 PM, Andrew Lunn wrote:
>>> +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.
Any number greater than 1 could justify finding a solution that scales.
>
> 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.
Looking at the documentation above (assuming it is up to date), these
are raw hex dumps of the region, which is mildly useful.
If we were to pretty print those regions such that they can fully
replace the infamous debugfs interface patch from Vivien that has been
floated around before, what other information is available (besides the
driver name) for the user-space tools to do that pretty printing?
Right now, as with any single user facility it is a bit difficult to
determine whether a DSA common representation would be warranted.
--
Florian
next prev parent reply other threads:[~2020-08-17 17:15 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
2020-08-17 17:15 ` Florian Fainelli [this message]
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=93a2b736-ff45-4529-c63a-b384db12b232@gmail.com \
--to=f.fainelli@gmail.com \
--cc=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).