diff options
author | Jiri Pirko <jiri@nvidia.com> | 2022-11-02 19:02:11 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-11-04 06:48:37 +0300 |
commit | dca56c3038c34a3e5acfe0aadb1f2bc9d724ae79 (patch) | |
tree | 60c421dedd3719ff429d2eb16198db38babb96e1 /include/net/devlink.h | |
parent | 77df1db80da384c565106321f5934967690da7dd (diff) | |
download | linux-dca56c3038c34a3e5acfe0aadb1f2bc9d724ae79.tar.xz |
net: expose devlink port over rtnetlink
Expose devlink port handle related to netdev over rtnetlink. Introduce a
new nested IFLA attribute to carry the info. Call into devlink code to
fill-up the nest with existing devlink attributes that are used over
devlink netlink.
Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/net/devlink.h')
-rw-r--r-- | include/net/devlink.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/net/devlink.h b/include/net/devlink.h index 7befad57afd4..fa6e936af1a5 100644 --- a/include/net/devlink.h +++ b/include/net/devlink.h @@ -1873,6 +1873,9 @@ int devlink_compat_phys_port_name_get(struct net_device *dev, int devlink_compat_switch_id_get(struct net_device *dev, struct netdev_phys_item_id *ppid); +int devlink_nl_port_handle_fill(struct sk_buff *msg, struct devlink_port *devlink_port); +size_t devlink_nl_port_handle_size(struct devlink_port *devlink_port); + #else static inline struct devlink *devlink_try_get(struct devlink *devlink) @@ -1909,6 +1912,17 @@ devlink_compat_switch_id_get(struct net_device *dev, return -EOPNOTSUPP; } +static inline int +devlink_nl_port_handle_fill(struct sk_buff *msg, struct devlink_port *devlink_port) +{ + return 0; +} + +static inline size_t devlink_nl_port_handle_size(struct devlink_port *devlink_port) +{ + return 0; +} + #endif #endif /* _NET_DEVLINK_H_ */ |