Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1166097rwl; Fri, 24 Mar 2023 07:08:22 -0700 (PDT) X-Google-Smtp-Source: AKy350ZBCNke7g2SWuGVywDLW78JB4qJjYMZdq1HbpxTLzoYEkKXCkTA16RM2dP04XB91URG4Hfw X-Received: by 2002:aa7:dbd3:0:b0:4fc:65c7:a991 with SMTP id v19-20020aa7dbd3000000b004fc65c7a991mr3520230edt.35.1679666902168; Fri, 24 Mar 2023 07:08:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679666902; cv=none; d=google.com; s=arc-20160816; b=eX6tQ4vTgoGkEGRZJT736sppc8T2hIXvj1oHqsVyyNzQNoqs2f1MkRauQS3QZrcL/1 BNjExq7DueT6rCTfEzTXsF/hoaCpuW7SgWP/4ODTNO+9rQ2/JtHu9Br0vxkqO67mSKIA oso9Q83CQInSWhdoazs4xqvmQcHgIJkP84SCV/+jz03ZXji0WKLT6qViBgxlaYQIjO+y QeBfDKF+sdAgA8URxne0lZARMAAY38R4ZvvGZ6jXvjKgl/0ZAYdMXrdQEMZhglRsn5C8 eVS4PhhW41sU/4dVR62qBRg5seQnhHtNE1nDKXIcNHXflGq6h5PsnTBdPyTc+qzYSlGV LuKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:content-disposition:mime-version :message-id:subject:cc:to:from:date; bh=1H0j+P1Od+fOyiPudXlf/ujbZ9Dp+lLb4ob+6pYkd2A=; b=uiCIZ+xa7Iu9Ip1HphDeHHrZyvvYHeAw6WHRFv7bWLzGp9YyPFo0ZclBPWMJAiUFmw 8yXtgUWrtcgAgb/dh0g9M6NhIa40lv9xVwhsx25pq1fT7W23j7ZmTJok1Qg3ubCvkQzH 9PWH9iWyT+PLJOwRigEASNcrXmOWkDDpkW/IZLy6/das0py70RL42pe0VdVCPmfmNUz/ uh2BYwPJt+3QxvijqNbgjQlckGKBeKMzdZqLwArnK2R4pMI02XA2IkVcaUDGY7wOnZGS yX/HiBo8c99OMOqv1hOZcXIbhtC3drAxuX0tzg65U40JAmXgsgq8fSpmQh1O1S/jFVdx nV0Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l7-20020a056402028700b004bbce7cda40si20316385edv.178.2023.03.24.07.07.56; Fri, 24 Mar 2023 07:08:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232171AbjCXOHA (ORCPT + 99 others); Fri, 24 Mar 2023 10:07:00 -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 X-Spam-Status: No, score=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 |