lists.openwall.net | 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 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Thu, 27 Nov 2014 06:09:11 -0800 From: Florian Fainelli <f.fainelli@...il.com> To: Jiri Pirko <jiri@...nulli.us>, Thomas Graf <tgraf@...g.ch> CC: John Fastabend <john.fastabend@...il.com>, netdev@...r.kernel.org, davem@...emloft.net, nhorman@...driver.com, andy@...yhouse.net, dborkman@...hat.com, ogerlitz@...lanox.com, jesse@...ira.com, pshelar@...ira.com, azhou@...ira.com, ben@...adent.org.uk, stephen@...workplumber.org, jeffrey.t.kirsher@...el.com, vyasevic@...hat.com, xiyou.wangcong@...il.com, john.r.fastabend@...el.com, edumazet@...gle.com, jhs@...atatu.com, sfeldma@...il.com, roopa@...ulusnetworks.com, linville@...driver.com, jasowang@...hat.com, ebiederm@...ssion.com, nicolas.dichtel@...nd.com, ryazanov.s.a@...il.com, buytenh@...tstofly.org, aviadr@...lanox.com, nbd@...nwrt.org, alexei.starovoitov@...il.com, Neil.Jerram@...aswitch.com, ronye@...lanox.com, simon.horman@...ronome.com, alexander.h.duyck@...hat.com, john.ronciak@...el.com, mleitner@...hat.com, shrijeet@...il.com, gospo@...ulusnetworks.com, bcrl@...ck.org Subject: Re: [patch net-next v2 05/10] rocker: introduce rocker switch driver Le 11/11/2014 07:40, Jiri Pirko a écrit : > Tue, Nov 11, 2014 at 04:32:32PM CET, tgraf@...g.ch wrote: >> On 11/11/14 at 04:19pm, Jiri Pirko wrote: >>> Tue, Nov 11, 2014 at 03:29:46PM CET, tgraf@...g.ch wrote: >>>> On 11/10/14 at 02:04pm, John Fastabend wrote: >>>>> On 11/09/2014 02:51 AM, Jiri Pirko wrote: >>>>>> +static int rocker_port_sw_parent_id_get(struct net_device *dev, >>>>>> + struct netdev_phys_item_id *psid) >>>>>> +{ >>>>>> + struct rocker_port *rocker_port = netdev_priv(dev); >>>>>> + struct rocker *rocker = rocker_port->rocker; >>>>>> + >>>>> >>>>> hmm looks like you read this out of a magic switch register :) but >>>>> my switch doesn't have this magic reg. I suposse the switch MAC address >>>>> should work. >>>> >>>> This needs more work afterwards. Either we define that the switch ID >>>> is only unique in combination with the parent ifindex or we need to >>>> introduce a notation of uniquness into the switch ID itself. >>> >>> This is something similar to physical port id. Each driver should take >>> care of generating that id. >> >> If the ID is only unique within a driver, then the user space cannot >> rely on using the ID to group switch ports. Multiple drivers might >> come up with the same ID. > > Well, as I said, it is the same as for physical port id. But if needed, > there can be added some simple mechanism for the id registration > ensuring their uniqueness. We could use the idr/ida subsystem to provide a global unique id per switch device that gets registered, ultimately, I suspect that a management application might want to get some sense of the topology by exploiting some unique HW properties such as: - MDIO bus address for MDIO-connected switches - SPI chip-select address - GPIO(s) used to connect - PCI bus/slot they are also unique by design, and add to that any revision/OUI register that is available for the driver. I can't find of a good way to hash that to produce a unique identifier, but maybe we can use that information somehow. > >> >> Even now, multiple rocker instances would have the same ID. > > It depends on what hw returns to driver. > -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists