Re: [PATCH net-next v5 08/13] net: dsa: rzn1-a5psw: add statistics support

Vladimir Oltean
2022-05-19T18:24:43Z

On Thu, May 19, 2022 at 05:31:02PM +0200, Clément Léger wrote:
> diff --git a/drivers/net/dsa/rzn1_a5psw.h b/drivers/net/dsa/rzn1_a5psw.h
> index 306cab55db24..649165d37fde 100644
> --- a/drivers/net/dsa/rzn1_a5psw.h
> +++ b/drivers/net/dsa/rzn1_a5psw.h
> @@ -146,7 +146,50 @@
>
> #define A5PSW_STATS_HIWORD 0x900
>
> -#define A5PSW_DUMMY_WORKAROUND 0x5000
> +/* Stats */
> +#define A5PSW_aFramesTransmittedOK 0x868
> +#define A5PSW_aFramesReceivedOK 0x86C
> +#define A5PSW_aFrameCheckSequenceErrors 0x870
> +#define A5PSW_aAlignmentErrors 0x874
> +#define A5PSW_aOctetsTransmittedOK 0x878
> +#define A5PSW_aOctetsReceivedOK 0x87C
> +#define A5PSW_aTxPAUSEMACCtrlFrames 0x880
> +#define A5PSW_aRxPAUSEMACCtrlFrames 0x884
> + /* If */

It would probably be good to keep the same alignment for all comments here.

> +#define A5PSW_ifInErrors 0x888
> +#define A5PSW_ifOutErrors 0x88C
> +#define A5PSW_ifInUcastPkts 0x890
> +#define A5PSW_ifInMulticastPkts 0x894
> +#define A5PSW_ifInBroadcastPkts 0x898
> +#define A5PSW_ifOutDiscards 0x89C
> +#define A5PSW_ifOutUcastPkts 0x8A0
> +#define A5PSW_ifOutMulticastPkts 0x8A4
> +#define A5PSW_ifOutBroadcastPkts 0x8A8
> + /* Ether */
> +#define A5PSW_etherStatsDropEvents 0x8AC
> +#define A5PSW_etherStatsOctets 0x8B0
> +#define A5PSW_etherStatsPkts 0x8B4
> +#define A5PSW_etherStatsUndersizePkts 0x8B8
> +#define A5PSW_etherStatsOversizePkts 0x8BC
> +#define A5PSW_etherStatsPkts64Octets 0x8C0
> +#define A5PSW_etherStatsPkts65to127Octets 0x8C4
> +#define A5PSW_etherStatsPkts128to255Octets 0x8C8
> +#define A5PSW_etherStatsPkts256to511Octets 0x8CC
> +#define A5PSW_etherStatsPkts512to1023Octets 0x8D0
> +#define A5PSW_etherStatsPkts1024to1518Octets 0x8D4
> +#define A5PSW_etherStatsPkts1519toXOctets 0x8D8
> +#define A5PSW_etherStatsJabbers 0x8DC
> +#define A5PSW_etherStatsFragments 0x8E0
> +
> +#define A5PSW_VLANReceived 0x8E8
> +#define A5PSW_VLANTransmitted 0x8EC
> +
> +#define A5PSW_aDeferred 0x910
> +#define A5PSW_aMultipleCollisions 0x914
> +#define A5PSW_aSingleCollisions 0x918
> +#define A5PSW_aLateCollisions 0x91C
> +#define A5PSW_aExcessiveCollisions 0x920
> +#define A5PSW_aCarrierSenseErrors 0x924