]> www.infradead.org Git - users/jedix/linux-maple.git/commit
net: dsa: mv88e6xxx: replace ATU violation prints with trace points
authorVladimir Oltean <vladimir.oltean@nxp.com>
Fri, 9 Dec 2022 17:28:16 +0000 (19:28 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 6 Apr 2023 10:10:57 +0000 (12:10 +0200)
commitbe831b5c696334e8ee6cfce2cf9b92923f07aae9
tree49f8661751c7cc5a5a9d84772803f3365a9b0713
parent8f872c781f6476665c0b09260a429ab03139339e
net: dsa: mv88e6xxx: replace ATU violation prints with trace points

commit 8646384d80f3d3b4a66b3284dbbd8232d1b8799e upstream.

In applications where the switch ports must perform 802.1X based
authentication and are therefore locked, ATU violation interrupts are
quite to be expected as part of normal operation. The problem is that
they currently spam the kernel log, even if rate limited.

Create a series of trace points, all derived from the same event class,
which log these violations to the kernel's trace buffer, which is both
much faster and much easier to ignore than printing to a serial console.

New usage model:

$ trace-cmd list | grep mv88e6xxx
mv88e6xxx
mv88e6xxx:mv88e6xxx_atu_full_violation
mv88e6xxx:mv88e6xxx_atu_miss_violation
mv88e6xxx:mv88e6xxx_atu_member_violation
$ trace-cmd record -e mv88e6xxx sleep 10

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Saeed Mahameed <saeed@kernel.org>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Cc: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/dsa/mv88e6xxx/Makefile
drivers/net/dsa/mv88e6xxx/global1_atu.c
drivers/net/dsa/mv88e6xxx/trace.c [new file with mode: 0644]
drivers/net/dsa/mv88e6xxx/trace.h [new file with mode: 0644]