From: Christian Marangi <ansuelsmth@gmail.com>
To: Mattias Forsblad <mattias.forsblad@gmail.com>
Cc: netdev@vger.kernel.org, Andrew Lunn <andrew@lunn.ch>,
Vivien Didelot <vivien.didelot@gmail.com>,
Florian Fainelli <f.fainelli@gmail.com>,
Vladimir Oltean <olteanv@gmail.com>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
linux@armlinux.org.uk
Subject: Re: [PATCH net-next v13 0/6] net: dsa: qca8k, mv88e6xxx: rmon: Add RMU support
Date: Fri, 16 Sep 2022 08:05:28 +0200 [thread overview]
Message-ID: <63247b7c.050a0220.6327b.5198@mx.google.com> (raw)
In-Reply-To: <20220916121817.4061532-1-mattias.forsblad@gmail.com>
On Fri, Sep 16, 2022 at 02:18:11PM +0200, Mattias Forsblad wrote:
> The Marvell SOHO switches have the ability to receive and transmit
> Remote Management Frames (Frame2Reg) to the CPU through the
> attached network interface.
> This 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.
>
> Next step could be to implement ATU dump.
> We've found that the gain to use RMU for single register
> read and writes is neglible.
>
> qca8k
> =====
> There's a newly introduced convenience function for sending
> and waiting for frames. Changes have been made for the qca8k
> driver to use this. Please test for regressions.
>
Hi,
I found time to test this aaaand it's broken...
I leaved some comments in the specific patch to make this work on legacy
custom completion implementation.
Ideally I will convert qca8k to the non legacy but I like your approach
of not enforcing stuff.
> RFC -> v1:
> - Track master interface availability.
> - Validate destination MAC for incoming frames.
> - Rate limit outputs.
> - Cleanup setup function validating upstream port on switch.
> - Fix return values when setting up RMU.
> - Prefix defines correctly.
> - Fix aligned accesses.
> - Validate that switch exists for incoming frames.
> - Split RMON stats function.
>
> v1 -> v2:
> - Remove unused variable.
>
> v2 -> v3:
> - Rewrite after feedback. Use tagger_data to handle
> frames more like qca8k.
> - qca8k: Change to use convenience functions introduced.
> Requesting test of this.
>
> v3 -> v4:
> - Separated patches more granular.
>
> v4 -> v5:
> - Some small fixes after feedback.
>
> v5 -> v6:
> - Rewrite of send_wait function to more adhere
> to RPC standards
> - Cleanup of ops handling
> - Move get id to when master device is available.
>
> v6 -> v7:
> - Some minor cleanups.
>
> v7 -> v8:
> - Moved defines to header file.
> - Check RMU response length and return actual
> length received.
> - Added disable/enable helpers for RMU.
> - Fixed some error paths.
>
> v8 -> v9:
> - Naming consistency for parameters/functions.
> - Streamlined completion routines.
> - Moved completion init earlier.
> - Spelling corrected.
> - Moved dsa_tagger_data declaration.
> - Minimal frame2reg decoding in tag_dsa.
> - Fixed return codes.
> - Use convenience functions.
> - Streamlined function parameters.
> - Fixed error path when master device changes
> state.
> - Still verify MAC address (per request of Andrew Lunn)
> - Use skb_get instead of skb_copy
> - Prefix defines and structs correctly.
> - Change types to __beXX.
>
> v9 -> v10:
> - Patchworks feedback fixed.
>
> v10 -> v11:
> - Fixed sparse warnings.
>
> v11 -> v12:
> - Split mv88e6xxx_stats_get_stats into separate
> functions, one for RMU and one for legacy
> access.
>
> v12 -> v13:
> - Expose all RMON counters via RMU.
>
> Regards,
> Mattias Forsblad
>
> Mattias Forsblad (6):
> net: dsa: mv88e6xxx: Add RMU enable for select switches.
> net: dsa: Add convenience functions for frame handling
> net: dsa: Introduce dsa tagger data operation.
> net: dsa: mv88e6xxxx: Add RMU functionality.
> net: dsa: mv88e6xxx: rmon: Use RMU for reading RMON data
> net: dsa: qca8k: Use new convenience functions
>
> drivers/net/dsa/mv88e6xxx/Makefile | 1 +
> drivers/net/dsa/mv88e6xxx/chip.c | 117 +++++++++-
> drivers/net/dsa/mv88e6xxx/chip.h | 31 +++
> drivers/net/dsa/mv88e6xxx/global1.c | 64 ++++++
> drivers/net/dsa/mv88e6xxx/global1.h | 3 +
> drivers/net/dsa/mv88e6xxx/rmu.c | 320 ++++++++++++++++++++++++++++
> drivers/net/dsa/mv88e6xxx/rmu.h | 73 +++++++
> drivers/net/dsa/mv88e6xxx/smi.c | 3 +
> drivers/net/dsa/qca/qca8k-8xxx.c | 61 ++----
> include/linux/dsa/mv88e6xxx.h | 6 +
> include/net/dsa.h | 11 +
> net/dsa/dsa.c | 17 ++
> net/dsa/dsa2.c | 2 +
> net/dsa/dsa_priv.h | 2 +
> net/dsa/tag_dsa.c | 40 +++-
> 15 files changed, 692 insertions(+), 59 deletions(-)
> create mode 100644 drivers/net/dsa/mv88e6xxx/rmu.c
> create mode 100644 drivers/net/dsa/mv88e6xxx/rmu.h
>
> --
> 2.25.1
>
--
Ansuel
next prev parent reply other threads:[~2022-09-16 13:34 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-16 12:18 [PATCH net-next v13 0/6] net: dsa: qca8k, mv88e6xxx: rmon: Add RMU support Mattias Forsblad
2022-09-16 6:05 ` Christian Marangi [this message]
2022-09-16 12:18 ` [PATCH net-next v13 1/6] net: dsa: mv88e6xxx: Add RMU enable for select switches Mattias Forsblad
2022-09-16 12:18 ` [PATCH net-next v13 2/6] net: dsa: Add convenience functions for frame handling Mattias Forsblad
2022-09-16 6:06 ` Christian Marangi
2022-09-16 13:47 ` Vladimir Oltean
2022-09-16 6:26 ` Christian Marangi
2022-09-16 12:18 ` [PATCH net-next v13 3/6] net: dsa: Introduce dsa tagger data operation Mattias Forsblad
2022-09-16 12:18 ` [PATCH net-next v13 4/6] net: dsa: mv88e6xxxx: Add RMU functionality Mattias Forsblad
2022-09-17 18:02 ` Andrew Lunn
2022-09-17 18:04 ` Andrew Lunn
2022-09-16 12:18 ` [PATCH net-next v13 5/6] net: dsa: mv88e6xxx: rmon: Use RMU for reading RMON data Mattias Forsblad
2022-09-16 12:18 ` [PATCH net-next v13 6/6] net: dsa: qca8k: Use new convenience functions Mattias Forsblad
2022-09-16 6:09 ` Christian Marangi
2022-09-19 5:18 ` Mattias Forsblad
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=63247b7c.050a0220.6327b.5198@mx.google.com \
--to=ansuelsmth@gmail.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=kuba@kernel.org \
--cc=linux@armlinux.org.uk \
--cc=mattias.forsblad@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.