Received: by 2002:a05:7208:13ca:b0:7f:395a:35b6 with SMTP id r10csp10717rbe; Wed, 28 Feb 2024 09:03:31 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXt4qT1ERvn60S+chzqxXULHWgSc700XuZE95Y21RWBsYhc3fmJbKFATG8YjezuAKBy398IJKfCYA0bDX3AYBqZwaqNbpnBrb8yIdal2g== X-Google-Smtp-Source: AGHT+IG/Two/sXh+jOkZcWJh+1JKEskauBQEXpECQU/YMOW/GAJFA64jH/1dB3DY10vPuafJFyN2 X-Received: by 2002:a05:6402:e94:b0:566:59f5:26db with SMTP id h20-20020a0564020e9400b0056659f526dbmr38534eda.11.1709139811278; Wed, 28 Feb 2024 09:03:31 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709139811; cv=pass; d=google.com; s=arc-20160816; b=zL2U97TKsctCm/8qqu9l9ds9m6wnNEfN20VoTslWtJmnCpscFjFc/T1T0nZ7XKJbPo HNz7SbSNrAS4/EJV/0kGa3eSTHPvpnNEu9MSF8YQ+ZUPnHVOF+JQZd0uLdDOs3FhugCk 4SJCI/VDWXnD5Xjk0OuWIWXeNrLBrAHNgb2jAxZ64r3jwJKTLjmzOk1tyiCY6Ar0fAPh RzIedLk2+mqaLuPCRRIT1T/0lRN2OcQlpCLukXzz7ZUuaTmXnfvbU2fVxVGijhds1+ba /16SJalAEhrPSqFXo4H9czPebkOvpWm+Bn9hTHr9bBW/K8KtqVA7o26bPD5U7fKZ490A Y9Wg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=WZIwgafTAhhv1XNOq3h2R/R0NGX/4FdMgEriBHnaWc8=; fh=GPgLy5xRGGPOsPp1LbNGs6tN+kg52dAJkRrNc3/+Rhw=; b=dVVnBSvYkAQNAzI7ic1ThYcS98L0wUQ76CsVAX5tFw2+rjghJ1ZQTmjulWxed5RVwK Ew+l6hZ89hRWg7TwFYccpuv/u2VGaDijqk+yyrJzv35Bbo/RNs/pKzSEk3gu1mMNsXTf q25gQwSQops6/w7iwxX8J1V9YsXXrod1xG2AKR9PI+NCSjIPkNnrZxOAiCEc64vwug+V zvbrE0gFxUaXoH6vi1iiL65HmYkiQJ933mHVuME301hF6SxKk5suK+iIVM6qrjQwuj9N datbuBS3F3yl8Mb39+5e0UtopiwxtuLSwfDZYoQhmg6XaGfpQzCPMltxOkRE2iKjGudc 4r8Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=x6+4Vun1; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-85406-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85406-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id v23-20020a056402175700b00565be70a86bsi1807334edx.46.2024.02.28.09.03.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 09:03:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-85406-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=x6+4Vun1; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-85406-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85406-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 0FF151F25B3F for ; Wed, 28 Feb 2024 17:03:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 790B93FBA2; Wed, 28 Feb 2024 17:03:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="x6+4Vun1" Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4089F6EF11; Wed, 28 Feb 2024 17:03:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=156.67.10.101 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709139799; cv=none; b=bqtptrPgR1Z2r/tMen8p7f/2z3cPdcl62pI7souYvXzhhLEmaCmw5nLN2m1RwMwEoZ0lqRSykg6oNNALUO+XQTq7uhw1PeT9CgUMc0VLsBI1+qGL/N3CkL0AZMxE56MllCSxkr/xsXn6dBOAftjU1oscbJRnDJxlAbVVISHYY+g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709139799; c=relaxed/simple; bh=BYXJGv7dAgJecW7P0Y0TtC6QmvDjA9vPjNKxGnXoRto=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=iv/rPD1Z4wEKz4w/KPjRscCAgw1PAvhEmd6vr32EckuapIlF8eG0lwMz0JUJtF4zAfOyNuFW8YgLV9H2RSJemxvifG7VnK+5iQ2pDxixkRsAsh0gNf9AGeasI7OTmXY3/uOIyG/lh8RAo6M438qhTWelAt89ZQYy7NXlrpPKjpg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b=x6+4Vun1; arc=none smtp.client-ip=156.67.10.101 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=WZIwgafTAhhv1XNOq3h2R/R0NGX/4FdMgEriBHnaWc8=; b=x6+4Vun1Hd1wQAOSnoqkj2N3kJ Ub86h0jXx+yPPE6dM8BsY5ZC+87HNyKdToJuy7XA2gAhO1YE8gGuAFLXzu0OM60D6HEWDSfvWlhUa UF1LuhJPLeKxQCNClC+yN+UZucewwlCasgwBlHYR2eXPZ05zMyZ/HNc2Bk5sv6bJ2Ffk=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1rfNKe-008y7o-6Z; Wed, 28 Feb 2024 18:03:00 +0100 Date: Wed, 28 Feb 2024 18:03:00 +0100 From: Andrew Lunn To: Stephen Hemminger Cc: Lukasz Majewski , Oleksij Rempel , Eric Dumazet , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Jakub Kicinski , netdev@vger.kernel.org, Tristram.Ha@microchip.com, Sebastian Andrzej Siewior , Paolo Abeni , Ravi Gunasekaran , Simon Horman , Wojciech Drewek , Nikita Zhandarovich , Murali Karicheri , Dan Carpenter , Ziyang Xuan , Kristian Overskeid , Matthieu Baerts , linux-kernel@vger.kernel.org Subject: Re: [RFC] net: hsr: Provide RedBox support Message-ID: References: <20240228150735.3647892-1-lukma@denx.de> <20240228083115.01d4c93e@hermes.local> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240228083115.01d4c93e@hermes.local> On Wed, Feb 28, 2024 at 08:31:15AM -0800, Stephen Hemminger wrote: > On Wed, 28 Feb 2024 16:07:35 +0100 > Lukasz Majewski wrote: > > > > > +/* hsr_proxy_node_table_show - Formats and prints proxy node_table entries */ > > +static int > > +hsr_proxy_node_table_show(struct seq_file *sfp, void *data) > > +{ > > + struct hsr_priv *priv = (struct hsr_priv *)sfp->private; > > + struct hsr_node *node; > > + > > + seq_printf(sfp, "Proxy Node Table entries for HSR device\n"); > > + seq_puts(sfp, "MAC-Address-SAN, time_in\n"); > > + rcu_read_lock(); > > + list_for_each_entry_rcu(node, &priv->proxy_node_db, mac_list) { > > + seq_printf(sfp, "%pM ", &node->macaddress_A[0]); > > + seq_printf(sfp, "%10lx\n", node->time_in[HSR_PT_INTERLINK]); > > + } > > + rcu_read_unlock(); > > + return 0; > > +} > > + > > DEFINE_SHOW_ATTRIBUTE(hsr_node_table); > > +DEFINE_SHOW_ATTRIBUTE(hsr_proxy_node_table); > > NAK > Do not abuse sysfs to be a debug proc style output. This is actually debugfs, not sysfs. However, i agree, we want information like this exported via netlink as the primary interface to the end user. debugfs is not suitable for that. Andrew