[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190301084839.1792f418@cakuba.netronome.com>
Date: Fri, 1 Mar 2019 08:48:39 -0800
From: Jakub Kicinski <jakub.kicinski@...ronome.com>
To: Jiri Pirko <jiri@...nulli.us>
Cc: netdev@...r.kernel.org, davem@...emloft.net, mlxsw@...lanox.com,
idosch@...lanox.com, dirk.vandermerwe@...ronome.com,
f.fainelli@...il.com, andrew@...n.ch, vivien.didelot@...il.com
Subject: Re: [patch net-next 5/5] net: devlink: remove unused
devlink_port_get_phys_port_name() function
On Fri, 1 Mar 2019 17:27:20 +0100, Jiri Pirko wrote:
> Fri, Mar 01, 2019 at 05:25:29PM CET, jakub.kicinski@...ronome.com wrote:
> >On Fri, 1 Mar 2019 09:14:02 +0100, Jiri Pirko wrote:
> >> From: Jiri Pirko <jiri@...lanox.com>
> >>
> >> Now it is unused, remove it.
> >>
> >> Signed-off-by: Jiri Pirko <jiri@...lanox.com>
> >
> >Oh, you nuke this completely, that's going to conflict hard with my
> >series :)
> >
> >(Provided the locking is okay) I think it'd be good if we flipped the
> >logic in dev_get_phys_port_name(). Always try devlink:
> >
> >@@ -7872,7 +7873,7 @@ int dev_get_phys_port_name(struct net_device *dev,
> > const struct net_device_ops *ops = dev->netdev_ops;
> >
> >+ if (!devlink_compat_phys_port_name_get(dev, name, len))
> >+ return 0;
> > if (!ops->ndo_get_phys_port_name)
> > return -EOPNOTSUPP;
> > return ops->ndo_get_phys_port_name(dev, name, len);
> > }
> >
> >NFP is using a single set of NDOs for PFs and VFs (which don't have
> >devlink ports), so either it'd be good if I could call the devlink
> >helper for real ports, or we need the above.
>
> That wouldn't give correct results now. Until you introduce PF/VF port
> flavours, devlink_compat_phys_port_name_get() does not assemble correct
> names for them. So we have to call ndo_get_phys_port_name until it knows
> how to do that.
Okay, yeah, this won't give correct results after my series though, so
please advise on which order you want these things merged? I don't
think there were any changes or concerns with my series - one commit
message fix, split one helper into two, and wrap the peer into another
attr in the dump? Can it go in first?
Powered by blists - more mailing lists