mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-24 05:01:03 +02:00
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>
This commit is contained in:
committed by
Jakub Kicinski
parent
77df1db80d
commit
dca56c3038
@@ -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_ */
|
||||
|
Reference in New Issue
Block a user