lkml.org 
[lkml]   [2024]   [Feb]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC] net: hsr: Provide RedBox support
Hi Andrew,

> On Wed, Feb 28, 2024 at 08:31:15AM -0800, Stephen Hemminger wrote:
> > On Wed, 28 Feb 2024 16:07:35 +0100
> > Lukasz Majewski <lukma@denx.de> 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.

Am I correct, that recommended approach would be to:

1. Modify iproute2 to support for example:

ip addr show dev hsr1 nodes {proxy} ?

2. Shall the currently exported:

/sys/kernel/debug/hsr/hsrX/node_table be left as it is (for legacy
usage) or shall it be removed and replaced with netlink and iproute2 ?

>
> Andrew




Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH, Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2024-05-27 15:27    [W:0.063 / U:0.572 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site