[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200907165518.GM2997@nanopsycho.orion>
Date: Mon, 7 Sep 2020 18:55:18 +0200
From: Jiri Pirko <jiri@...nulli.us>
To: Jakub Kicinski <kuba@...nel.org>
Cc: Leon Romanovsky <leon@...nel.org>, davem@...emloft.net,
netdev@...r.kernel.org, kernel-team@...com, tariqt@...lanox.com,
yishaih@...lanox.com, linux-rdma@...r.kernel.org
Subject: Re: [PATCH net-next] mlx4: make sure to always set the port type
Mon, Sep 07, 2020 at 06:34:01PM CEST, kuba@...nel.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.
Powered by blists - more mailing lists