From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 806ACC761AF for ; Fri, 24 Mar 2023 14:07:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230373AbjCXOHC (ORCPT ); Fri, 24 Mar 2023 10:07:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36752 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232173AbjCXOGh (ORCPT ); Fri, 24 Mar 2023 10:06:37 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4067B1CBE6 for ; Fri, 24 Mar 2023 07:06:30 -0700 (PDT) Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pfi3j-0002p3-1V; Fri, 24 Mar 2023 15:06:23 +0100 Received: from ore by ptx.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1pfi3i-00064T-Dw; Fri, 24 Mar 2023 15:06:22 +0100 Date: Fri, 24 Mar 2023 15:06:22 +0100 From: Oleksij Rempel To: Vladimir Oltean Cc: "David S. Miller" , Andrew Lunn , Eric Dumazet , Florian Fainelli , Jakub Kicinski , Paolo Abeni , Woojung Huh , kernel@pengutronix.de, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, UNGLinuxDriver@microchip.com Subject: What is the best way to provide FDB related metrics to user space? Message-ID: <20230324140622.GB28424@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-Accept-Language: de,en X-Accept-Content-Type: text/plain User-Agent: Mutt/1.10.1 (2018-07-13) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c0 X-SA-Exim-Mail-From: ore@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 |