[PATCH net-next] net: airoha: better handle MIBs for GDM ports with multiple devs attached

Simon Horman horms at kernel.org
Fri Jun 12 10:08:59 PDT 2026


On Thu, Jun 11, 2026 at 12:43:00PM +0200, Lorenzo Bianconi wrote:
> In the context of a GDM port that can have multiple net_devices attached
> (GDM3 and GDM4), the HW counters (MIBs) are global for the GDM port.
> This cause duplicated stats reported to the kernel for the related
> net_device.
> The SoC supports a split MIB feature where each counter is tracked based
> on the relevant HW channel (NBQ) to account for this scenario and
> provide a way to select the related counter on accessing the MIB
> registers.
> Enable this feature for GDM3 and GDM4 and configure the relevant HW
> channel before updating the HW stats to report correct HW counter to the
> kernel for the related interface.
> Move the stats struct from port to dev since HW counter are now specific
> to the network device instead of the GDM port. Refactor
> airoha_update_hw_stats() to take airoha_eth and airoha_gdm_port
> parameters since the function operates on the entire port.
> 
> Co-developed-by: Christian Marangi <ansuelsmth at gmail.com>
> Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
> Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>

Reviewed-by: Simon Horman <horms at kernel.org>




More information about the linux-arm-kernel mailing list