Netdev Archive on
help / color / mirror / Atom feed
From: Jakub Kicinski <>
To: Jiri Pirko <>
Cc: Leon Romanovsky <>,,,,,,
Subject: Re: [PATCH net-next] mlx4: make sure to always set the port type
Date: Mon, 7 Sep 2020 09:34:01 -0700	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <20200907071939.GK2997@nanopsycho.orion>

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.


  parent reply	other threads:[~2020-09-07 16:57 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-04 20:06 [PATCH net-next] mlx4: make sure to always set the port type Jakub Kicinski
2020-09-06  7:27 ` Leon Romanovsky
2020-09-06 16:33   ` Jakub Kicinski
2020-09-07  6:21     ` Jiri Pirko
2020-09-07  6:48       ` Leon Romanovsky
2020-09-07  7:19         ` Jiri Pirko
2020-09-07  9:10           ` Leon Romanovsky
2020-09-07 16:34           ` Jakub Kicinski [this message]
2020-09-07 16:55             ` Jiri Pirko
2020-09-07 16:36         ` Jakub Kicinski
2020-09-07 17:51           ` Leon Romanovsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).