Netdev List
 help / color / mirror / Atom feed
From: Jakub Kicinski <jakub.kicinski@netronome.com>
To: Florian Fainelli <f.fainelli@gmail.com>
Cc: davem@davemloft.net, jiri@resnulli.us, mkubecek@suse.cz,
	andrew@lunn.ch, netdev@vger.kernel.org,
	oss-drivers@netronome.com
Subject: Re: [PATCH net-next v2 3/5] devlink: create a special NDO for getting the devlink instance
Date: Fri, 22 Feb 2019 12:09:51 -0800	[thread overview]
Message-ID: <20190222120951.4eb762f9@cakuba.netronome.com> (raw)
In-Reply-To: <4ae4a622-f45f-36a4-2ff5-b0553a40dc22@gmail.com>

On Fri, 22 Feb 2019 12:04:07 -0800, Florian Fainelli wrote:
> On 2/22/19 11:54 AM, Jakub Kicinski wrote:
> > Instead of iterating over all devlink ports add a NDO which
> > will return the devlink instance from the driver.
> > 
> > v2: add the netdev_to_devlink() helper (Michal)
> > 
> > Suggested-by: Jiri Pirko <jiri@resnulli.us>
> > Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
> > ---  
> [snip]
> 
> > -	mutex_unlock(&devlink_mutex);
> > +	devlink = netdev_to_devlink(dev);
> > +	if (!devlink || !devlink->ops->info_get)
> > +		return;  
> 
> AFAICT devlink_create() allows one to specify a NULL ops argument (not
> that this makes sense), so probably need to add a check against
> devlink->ops here as well, unless we want to change devlink_create() to
> refuse a NULL ops pointer.

Oh, you're right!  devlink_nl_cmd_reload() seems to be missing that
check as well.  Let me respin quickly.

> Other than that:
> 
> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>

Thanks!

  reply	other threads:[~2019-02-22 20:10 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-22 19:54 [PATCH net-next v2 0/5] devlink: make ethtool compat reliable Jakub Kicinski
2019-02-22 19:54 ` [PATCH net-next v2 1/5] net: devlink: turn devlink into a built-in Jakub Kicinski
2019-02-22 20:07   ` Florian Fainelli
2019-02-22 19:54 ` [PATCH net-next v2 2/5] ethtool: hold a reference to the netdevice around devlink compat Jakub Kicinski
2019-02-22 20:09   ` Florian Fainelli
2019-02-22 21:20     ` Jakub Kicinski
2019-02-22 19:54 ` [PATCH net-next v2 3/5] devlink: create a special NDO for getting the devlink instance Jakub Kicinski
2019-02-22 20:04   ` Florian Fainelli
2019-02-22 20:09     ` Jakub Kicinski [this message]
2019-02-22 19:54 ` [PATCH net-next v2 4/5] nfp: add .ndo_get_devlink Jakub Kicinski
2019-02-22 19:54 ` [PATCH net-next v2 5/5] nfp: remove ethtool flashing fallback Jakub Kicinski

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=20190222120951.4eb762f9@cakuba.netronome.com \
    --to=jakub.kicinski@netronome.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=jiri@resnulli.us \
    --cc=mkubecek@suse.cz \
    --cc=netdev@vger.kernel.org \
    --cc=oss-drivers@netronome.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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