Re: [PATCH net-next 00/11] mlxsw: extend line card model by devices and info

Jakub Kicinski
2022-05-31T22:42:04Z

On Tue, 31 May 2022 21:34:42 +0200 Jiri Pirko wrote:
> And again, for the record, I strongly believe that a separate dl
> instance for this does not make any sense at all :/ I wonder why you
> still think it does.

For purely software reuse reasons. I think the line cards will require
a lot of the same attributes as the full devlink instance, so making
them a subobject which can have all the same attributes is poor SW arch.
Think about it from OOP perspective, you'd definitely factor all that
stuff out to an abstract class. We can't do that in netlink but whatever
just make it a full dl instance and describe the link between the two.

Most NIC vendors (everyone excluding Netronome?) decided that devlink
instance is equivalent to a bus device which IIUC it was not supposed
to be. It was supposed to be the whole ASIC. If we're okay to stretch
the definition of a dl instance to be "any independently controllable
unit of HW" for NICs then IDK why we can't make a line card a dl
instance.

Are you afraid of hiding dependencies?