Subject: Re: [patch net-next RFC 00/10] introduce line card support for modular switch

From: Jiri Pirko <[email-masked]>
Date: Wed, 3 Feb 2021 15:57:51 +0100

Mon, Feb 01, 2021 at 02:41:07PM CET, [email-masked] wrote:
>On Mon, Feb 01, 2021 at 09:16:41AM +0100, Jiri Pirko wrote:
>> Sun, Jan 31, 2021 at 06:09:24PM CET, [email-masked] wrote:
>> >On 1/30/21 7:19 AM, Jiri Pirko wrote:
>> >> Fri, Jan 29, 2021 at 06:31:59PM CET, [email-masked] wrote:
>> >>>> Platform line card driver is aware of line card I2C topology, its
>> >>>> responsibility is to detect line card basic hardware type, create I2C
>> >>>> topology (mux), connect all the necessary I2C devices, like hotswap
>> >>>> devices, voltage and power regulators devices, iio/a2d devices and line
>> >>>> card EEPROMs, creates LED instances for LED located on a line card, exposes
>> >>>> line card related attributes, like CPLD and FPGA versions, reset causes,
>> >>>> required powered through line card hwmon interface.
>> >>>
>> >>> So this driver, and the switch driver need to talk to each other, so
>> >>> the switch driver actually knows what, if anything, is in the slot.
>> >> 
>> >> Not possible in case the BMC is a different host, which is common
>> >> scenario.
>> >> 
>> >
>> >User provisions a 4 port card, but a 2 port card is inserted. How is
>> >this detected and the user told the wrong card is inserted?
>> 
>> The card won't get activated.
>> The user won't see the type of inserted linecard. Again, it is not
>> possible for ASIC to access the linecard eeprom. See Vadim's reply.
>> 
>> 
>> >
>> >If it is not detected that's a serious problem, no?
>> 
>> That is how it is, unfortunatelly.
>> 
>> 
>> >
>> >If it is detected why can't the same mechanism be used for auto
>> >provisioning?
>> 
>> Again, not possible to detect.
>
>If the platform line card driver is running in the host, you can
>detect it. From your wording, it sounds like some systems do have this
>driver in the host. So please add the needed code.

But if not, it cannot. We still need the provisioning then.

>
>When the platform line card driver is on the BMC, you need a proxy in
>between. Isn't this what IPMI and Redfish is all about? The proxy
>driver can offer the same interface as the platform line card driver.

Do you have any example of kernel driver which is doing some thing like
that?

>    Andrew