lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 28 Aug 2015 13:52:55 +0200
From:	Andrew Lunn <>
To:	Scott Feldman <>
Cc:	Netdev <>,
	Ji??í Pírko <>,
	"David S. Miller" <>,
	Florian Fainelli <>,
	Roopa Prabhu <>
Subject: Re: [RFC PATCH net-next 0/2] Add new switchdev device class

> So with kobj, a device can have a parent.  So I experimented with my
> RFC patch and changed register_switchdev to take a parent switchdev
> arg, which is NULL for leaf switchdevs:
> int register_switchdev(struct switchdev *sdev, const char *name,
>                        struct switchdev *parent)
> {
>         struct device *dev = &sdev->dev;
>         int err;
>         device_initialize(dev);
>         dev->class = &switchdev_class;
>         if (parent)
>                 dev->parent = &parent->dev;
>         err = dev_set_name(dev, "%s", name);
>         if (err)
>                 return err;
>         return device_add(dev);
> }

> With this, we can stack switchdevs, I guess as high as we want.  Does
> this look usable for DSA?   An attr set on the master would get pushed
> down to the leaves.  We'd can do it with the same style of recursive
> algos we use for switchdev port attrs.

Since this is a file system, we are limited to trees. But the hardware
is actually a graph. The interconnect points are ports on the switch,
and possible trunks/bonds of ports. I doubt there is a nice way to
represent this.

So it probably makes sense to have the switch with the port to the
host as the root of the tree, and all other switches are leafs of that

How do you envisage addressing? I want to use netlink to read the
global registers from a specific switch for example.

To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to
More majordomo info at

Powered by blists - more mailing lists