[net-next PATCH 0/6] net: dsa: mt7530: modernize MIB handling + fix

Christian Marangi ansuelsmth at gmail.com
Thu Apr 10 09:30:08 PDT 2025


This small series modernize MIB handling for MT7530 and also
implement .get_stats64.

It was reported that kernel and Switch MIB desync in scenario where
a packet is forwarded from a port to another. In such case, the
forwarding is offloaded and the kernel is not aware of the
transmitted packet. To handle this, read the counter directly
from Switch registers.

Christian Marangi (6):
  net: dsa: mt7530: generalize read port stats logic
  net: dsa: mt7530: move pkt size and rx err MIB counter to rmon stats
    API
  net: dsa: mt7530: move pause MIB counter to eth_ctrl stats API
  net: dsa: mt7530: move pkt stats and err MIB counter to eth_mac stats
    API
  net: dsa: mt7530: move remaining MIB counter to define
  net: dsa: mt7530: implement .get_stats64

 drivers/net/dsa/mt7530.c | 246 +++++++++++++++++++++++++++++++--------
 drivers/net/dsa/mt7530.h |  42 +++++++
 2 files changed, 239 insertions(+), 49 deletions(-)

-- 
2.48.1




More information about the Linux-mediatek mailing list