Message ID | 20200921162741.4081710-1-vladimir.oltean@nxp.com |
---|---|
Headers | show |
Series | Devlink regions for SJA1105 DSA driver | expand |
On Mon, Sep 21, 2020 at 07:27:39PM +0300, Vladimir Oltean wrote: > This series exposes the SJA1105 static config as a devlink region. This > can be used for debugging, for example with the sja1105_dump user space > program that I have derived from Andrew Lunn's mv88e6xxx_dump: > > https://github.com/vladimiroltean/mv88e6xxx_dump/tree/sja1105 Maybe i should rename the project dsa_dump? Andrew
On Mon, Sep 21, 2020 at 07:12:32PM +0200, Andrew Lunn wrote: > On Mon, Sep 21, 2020 at 07:27:39PM +0300, Vladimir Oltean wrote: > > This series exposes the SJA1105 static config as a devlink region. This > > can be used for debugging, for example with the sja1105_dump user space > > program that I have derived from Andrew Lunn's mv88e6xxx_dump: > > > > https://github.com/vladimiroltean/mv88e6xxx_dump/tree/sja1105 > > Maybe i should rename the project dsa_dump? I was unsure if you want to maintain that as a larger project.
On 9/21/20 11:12 AM, Vladimir Oltean wrote: > On Mon, Sep 21, 2020 at 07:12:32PM +0200, Andrew Lunn wrote: >> On Mon, Sep 21, 2020 at 07:27:39PM +0300, Vladimir Oltean wrote: >>> This series exposes the SJA1105 static config as a devlink region. This >>> can be used for debugging, for example with the sja1105_dump user space >>> program that I have derived from Andrew Lunn's mv88e6xxx_dump: >>> >>> https://github.com/vladimiroltean/mv88e6xxx_dump/tree/sja1105 >> >> Maybe i should rename the project dsa_dump? > > I was unsure if you want to maintain that as a larger project. > Cannot this be part of ethtool or iproute2 at some point and we just have each driver author submit pretty printers for the registers? -- Florian
On Mon, Sep 21, 2020 at 11:44:41AM -0700, Florian Fainelli wrote: > On 9/21/20 11:12 AM, Vladimir Oltean wrote: > > On Mon, Sep 21, 2020 at 07:12:32PM +0200, Andrew Lunn wrote: > >> On Mon, Sep 21, 2020 at 07:27:39PM +0300, Vladimir Oltean wrote: > >>> This series exposes the SJA1105 static config as a devlink region. This > >>> can be used for debugging, for example with the sja1105_dump user space > >>> program that I have derived from Andrew Lunn's mv88e6xxx_dump: > >>> > >>> https://github.com/vladimiroltean/mv88e6xxx_dump/tree/sja1105 > >> > >> Maybe i should rename the project dsa_dump? > > > > I was unsure if you want to maintain that as a larger project. > > > > Cannot this be part of ethtool or iproute2 at some point and we just > have each driver author submit pretty printers for the registers? It would be iproute2, since that is where devlink lives and where most of the code comes from. I did take some code from ethtool which Vivien wrote for the port registers. The code needs refactoring anyway, i was not thinking about others using it, and there is code in mv88e6xxx_dump which should be shared. Vladimir, could you implement the devlink DEVLINK_CMD_INFO_GET request so we know what sort of device is exporting the regions, and hence which pretty printers are relevant. Andrew
On Mon, Sep 21, 2020 at 09:03:27PM +0200, Andrew Lunn wrote: > Vladimir, could you implement the devlink DEVLINK_CMD_INFO_GET request > so we know what sort of device is exporting the regions, and hence > which pretty printers are relevant. Should I do that in this series or separately?
On Mon, Sep 21, 2020 at 07:10:09PM +0000, Vladimir Oltean wrote: > On Mon, Sep 21, 2020 at 09:03:27PM +0200, Andrew Lunn wrote: > > Vladimir, could you implement the devlink DEVLINK_CMD_INFO_GET request > > so we know what sort of device is exporting the regions, and hence > > which pretty printers are relevant. > > Should I do that in this series or separately? Up to you. I added it as part of the regions patchset. I need to know which particular device it is in order to decode the registers correctly. Andrew
On Mon, Sep 21, 2020 at 09:42:10PM +0200, Andrew Lunn wrote: > On Mon, Sep 21, 2020 at 07:10:09PM +0000, Vladimir Oltean wrote: > > On Mon, Sep 21, 2020 at 09:03:27PM +0200, Andrew Lunn wrote: > > > Vladimir, could you implement the devlink DEVLINK_CMD_INFO_GET request > > > so we know what sort of device is exporting the regions, and hence > > > which pretty printers are relevant. > > > > Should I do that in this series or separately? > > Up to you. I added it as part of the regions patchset. I was planning to add that only if I need to resend this series, otherwise I would go with a follow-on. > I need to know which particular device it is in order to decode the > registers correctly. For sja1105, the device id is part of the static config, so the region is self explanatory in that regard. But if we create a larger tool then it makes sense to report the device in DEVLINK_CMD_INFO_GET. Thanks, -Vladimir