Thu, Mar 28, 2019 at 10:40:02PM CET, jakub.kicin...@netronome.com wrote: >On Thu, 28 Mar 2019 22:12:42 +0100, Jiri Pirko wrote: >> From: Jiri Pirko <j...@mellanox.com> >> >> To provide visibility of the ports, this patchset exposes switch ID >> for devlink ports, which are part of a switch. The rest of the ports >> if any (in case of sr-iov for example) do not set switch ID. > >I don't feel good about this patch set. There is no visibility >provided here. Should the port flavour should be a sufficient
1) this patch is mainly about avoiding need to define the ndo and moving the switch id definition to devlink port attr. 2) along with that, switch id is added as attribute. It tells the user that some devlink port is part of a switch with certain id. If port is not part of a switch (like upcoming hostport, cpu, dsa, etc), switch id is not set on that port >indication of whether netdev associated with that port can be >switched to or not? CPU, DSA, and Host flavours can't be switched >to. And the switchid can be an attribute of the devlink instance, >if we want to expose it via devlink. One devlink instance can have multiple switch ids in use as it may contain multiple switches. Take mlx5 as an instance. Currently every PF creates a separate devlink instance, however there are some features shared. In this example, with proposed idea of aliasing, there would be one devlink instance aliased between these 2 pf inctances, with 2 eswitches and 2 sets of switch ports each belonging to an eswitch - distinguished by switch id.