Message ID | 20220818102924.287719-1-mattias.forsblad@gmail.com (mailing list archive) |
---|---|
Headers | show |
Series | net: dsa: mv88e6xxx: Add RMU support | expand |
On Thu, Aug 18, 2022 at 12:29:21PM +0200, Mattias Forsblad wrote: > The Marvell SOHO switches have the ability to receive and transmit > Remote Management Frames (Frame2Reg) to the CPU through the > switch attached network interface. > These frames is handled by the Remote Management Unit (RMU) in > the switch. > These frames can contain different payloads: > single switch register read and writes, daisy chained switch > register read and writes, RMON/MIB dump/dump clear and ATU dump. > The dump functions are very costly over MDIO but it's > only a couple of network packets via the RMU. Handling these > operations via RMU instead of MDIO also relieves access > contention on the MDIO bus. > > This request for comment series implements RMU layer 2 and > layer 3 handling and also collecting RMON counters > through the RMU. > > Next step could be to implement single read and writes but we've > found that the gain to transfer this to RMU is neglible. > > Regards, > Mattias Forsblad Have you seen how things work with qca8k_connect_tag_protocol()/ qca8k_master_change()/qca8k_read_eth()/qca8k_write_eth()/ qca8k_phy_eth_command()?
On Thu, Aug 18, 2022 at 12:29:21PM +0200, Mattias Forsblad wrote: > The Marvell SOHO switches have the ability to receive and transmit > Remote Management Frames (Frame2Reg) to the CPU through the > switch attached network interface. > These frames is handled by the Remote Management Unit (RMU) in > the switch. Please try to avoid all the additional whitespace your editor/mailer has added. > Next step could be to implement single read and writes but we've > found that the gain to transfer this to RMU is neglible. I agree that RMON is a good first step. Dumping the ATU and VTU would also make a lot of sense. For general register access, did you try combining multiple writes and one read into an RMU packet? At least during initial setup, i suspect there are some code flows which follow that pattern with lots of writes. And a collection of read/modify/write might benefit. Andrew
On 2022-08-18 13:58, Vladimir Oltean wrote: > On Thu, Aug 18, 2022 at 12:29:21PM +0200, Mattias Forsblad wrote: >> The Marvell SOHO switches have the ability to receive and transmit >> Remote Management Frames (Frame2Reg) to the CPU through the >> switch attached network interface. >> These frames is handled by the Remote Management Unit (RMU) in >> the switch. >> These frames can contain different payloads: >> single switch register read and writes, daisy chained switch >> register read and writes, RMON/MIB dump/dump clear and ATU dump. >> The dump functions are very costly over MDIO but it's >> only a couple of network packets via the RMU. Handling these >> operations via RMU instead of MDIO also relieves access >> contention on the MDIO bus. >> >> This request for comment series implements RMU layer 2 and >> layer 3 handling and also collecting RMON counters >> through the RMU. >> >> Next step could be to implement single read and writes but we've >> found that the gain to transfer this to RMU is neglible. >> >> Regards, >> Mattias Forsblad > > Have you seen how things work with qca8k_connect_tag_protocol()/ > qca8k_master_change()/qca8k_read_eth()/qca8k_write_eth()/ > qca8k_phy_eth_command()? No, I have not. I'll take a look at those. Thanks.
On 2022-08-18 14:31, Andrew Lunn wrote: > On Thu, Aug 18, 2022 at 12:29:21PM +0200, Mattias Forsblad wrote: >> The Marvell SOHO switches have the ability to receive and transmit >> Remote Management Frames (Frame2Reg) to the CPU through the >> switch attached network interface. >> These frames is handled by the Remote Management Unit (RMU) in >> the switch. > > Please try to avoid all the additional whitespace your editor/mailer > has added. > >> Next step could be to implement single read and writes but we've >> found that the gain to transfer this to RMU is neglible. > > I agree that RMON is a good first step. Dumping the ATU and VTU would > also make a lot of sense. > > For general register access, did you try combining multiple writes and > one read into an RMU packet? At least during initial setup, i suspect > there are some code flows which follow that pattern with lots of > writes. And a collection of read/modify/write might benefit. > > Andrew In another stack I've used aggregated writes with great improvements so it that is something that could be investigated. One large oversight when implementing RMU in HW there is no operation for masked writes which makes it a bit trickier. It would be great if there was a transaction-based API which would easier map for aggregated accesses. Oltean mentioned something about qck8k that I'll have a look into.