[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200907093401.547ae9b8@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date: Mon, 7 Sep 2020 09:34:01 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Jiri Pirko <jiri@...nulli.us>
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
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?
Powered by blists - more mailing lists