What is the best way to provide FDB related metrics to user space?

From: Oleksij Rempel
Date: Fri Mar 24 2023 - 10:07:04 EST


Hello all,

I am currently working on implementing an interface to provide
FDB-related metrics to user space, such as the size of the FDB, the
count of objects, and so on. The IEEE 802.1Q-2018 standard offers some
guidance on this topic. For instance, section "17.2.4 Structure of the
IEEE8021-Q-BRIDGE-MIB" defines the ieee8021QBridgeFdbDynamicCount
object, and section "12.7.1.1.3 Outputs" provides additional outputs
that can be utilized for proper bridge management.

I've noticed that some DSA drivers implement devlink raw access to the
FDB. I am wondering if it would be acceptable to provide a generic
interface for all DSA switches for these kinds of metrics. What would be
the best interface to use for this purpose - devlink, sysfs, or
something else?

Best regards,
Oleskij
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |