Re: [PATCH v1 net-next] net: dsa: qca: ar9331: add ethtool stats support
From: Jakub Kicinski
Date: Mon Nov 16 2020 - 16:35:26 EST
On Sun, 15 Nov 2020 08:35:33 +0100 Oleksij Rempel wrote:
> +static const struct ar9331_mib_desc ar9331_mib[] = {
> + MIB_DESC(1, 0x00, "RxBroad"),
> + MIB_DESC(1, 0x04, "RxPause"),
> + MIB_DESC(1, 0x08, "RxMulti"),
> + MIB_DESC(1, 0x0c, "RxFcsErr"),
> + MIB_DESC(1, 0x10, "RxAlignErr"),
> + MIB_DESC(1, 0x14, "RxRunt"),
> + MIB_DESC(1, 0x18, "RxFragment"),
> + MIB_DESC(1, 0x1c, "Rx64Byte"),
> + MIB_DESC(1, 0x20, "Rx128Byte"),
> + MIB_DESC(1, 0x24, "Rx256Byte"),
> + MIB_DESC(1, 0x28, "Rx512Byte"),
> + MIB_DESC(1, 0x2c, "Rx1024Byte"),
> + MIB_DESC(1, 0x30, "Rx1518Byte"),
> + MIB_DESC(1, 0x34, "RxMaxByte"),
> + MIB_DESC(1, 0x38, "RxTooLong"),
> + MIB_DESC(2, 0x3c, "RxGoodByte"),
> + MIB_DESC(2, 0x44, "RxBadByte"),
> + MIB_DESC(1, 0x4c, "RxOverFlow"),
> + MIB_DESC(1, 0x50, "Filtered"),
> + MIB_DESC(1, 0x54, "TxBroad"),
> + MIB_DESC(1, 0x58, "TxPause"),
> + MIB_DESC(1, 0x5c, "TxMulti"),
> + MIB_DESC(1, 0x60, "TxUnderRun"),
> + MIB_DESC(1, 0x64, "Tx64Byte"),
> + MIB_DESC(1, 0x68, "Tx128Byte"),
> + MIB_DESC(1, 0x6c, "Tx256Byte"),
> + MIB_DESC(1, 0x70, "Tx512Byte"),
> + MIB_DESC(1, 0x74, "Tx1024Byte"),
> + MIB_DESC(1, 0x78, "Tx1518Byte"),
> + MIB_DESC(1, 0x7c, "TxMaxByte"),
> + MIB_DESC(1, 0x80, "TxOverSize"),
> + MIB_DESC(2, 0x84, "TxByte"),
> + MIB_DESC(1, 0x8c, "TxCollision"),
> + MIB_DESC(1, 0x90, "TxAbortCol"),
> + MIB_DESC(1, 0x94, "TxMultiCol"),
> + MIB_DESC(1, 0x98, "TxSingleCol"),
> + MIB_DESC(1, 0x9c, "TxExcDefer"),
> + MIB_DESC(1, 0xa0, "TxDefer"),
> + MIB_DESC(1, 0xa4, "TxLateCol"),
> +};
You must expose relevant statistics via the normal get_stats64 NDO
before you start dumping free form stuff in ethtool -S.