Mon, Sep 07, 2020 at 06:34:01PM CEST, k...@kernel.org wrote:
>On Mon, 7 Sep 2020 09:19:39 +0200 Jiri Pirko wrote:
>> >The port type is being set to IB or ETH without relation to net_device,
>> >fixing it will require very major code rewrite for the stable driver
>> >that in maintenance mode.  
>> 
>> Because the eth driver is not loaded, I see. The purpose of the
>> WARN in devlink_port_type_eth_set is to prevent drivers from registering
>> particular port without netdev/ibdev. That is what was repeatedly
>> happening in the past as the driver developers didn't know they need to
>> do it or were just lazy to do so.
>> 
>> I wonder if there is any possibility to do both...
>
>I think we have two options in this case:
> - set type to eth without the netdev
> - selectively mute the warning
>
>I think the former is better, because we still want to see what the
>port type is. Perhaps we should add a:
>
>  dev_warn("devlink port type set without software interface
>            reference, device type not supported by the kernel?");
>
>That way people won't just pass NULL out of laziness, hopefully.
>
>WDYT?

Okay. That sounds probably like the best option we have.

Reply via email to