diff options
| author | David S. Miller <davem@davemloft.net> | 2019-03-28 12:55:31 -0700 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2019-03-28 12:55:31 -0700 |
| commit | 1571e2fdac902c25d7ba47cd6a3258c55fa9afa9 (patch) | |
| tree | 3a4d5031f135209c4db0a6027e7b983e45caca40 /include/linux | |
| parent | ede1fd1851467a107f14faace274479dfe28a36c (diff) | |
| parent | 746364f298d48cc89067e6d0c9bc1a4da1efb52a (diff) | |
Merge branch 'net-call-for-phys_port_name-into-devlink-directly-if-possible'
Jiri Pirko says:
===================
net: call for phys_port_name into devlink directly if possible
phys_port_name may be assembled by a helper in devlink. It is currently
the case only for mlxsw driver. Benefit from the get_devlink_port ndo
and call into devlink directly from dev_get_phys_port_name(). That saves
the trip to the driver, simplifies the code and makes it similar to
recently introduced ethtool-devlink compat helpers.
Move bnxt, partly nfp and dsa to let devlink core generate the name too.
===================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/netdevice.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 166fdc0a78b4..78f5ec4ebf64 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -1250,8 +1250,8 @@ struct devlink; * that got dropped are freed/returned via xdp_return_frame(). * Returns negative number, means general error invoking ndo, meaning * no frames were xmit'ed and core-caller will free all frames. - * struct devlink *(*ndo_get_devlink)(struct net_device *dev); - * Get devlink instance associated with a given netdev. + * struct devlink_port *(*ndo_get_devlink_port)(struct net_device *dev); + * Get devlink port instance associated with a given netdev. * Called with a reference on the netdevice and devlink locks only, * rtnl_lock is not held. */ @@ -1451,7 +1451,7 @@ struct net_device_ops { u32 flags); int (*ndo_xsk_async_xmit)(struct net_device *dev, u32 queue_id); - struct devlink * (*ndo_get_devlink)(struct net_device *dev); + struct devlink_port * (*ndo_get_devlink_port)(struct net_device *dev); }; /** |
