net: add possibility to pass information about upper device via notifier
Sometimes the drivers and other code would find it handy to know some internal information about upper device being changed. So allow upper-code to pass information down to notifier listeners during linking. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
6dffb0447c
commit
29bf24afb2
@@ -2163,6 +2163,7 @@ struct netdev_notifier_changeupper_info {
|
||||
struct net_device *upper_dev; /* new upper dev */
|
||||
bool master; /* is upper dev master */
|
||||
bool linking; /* is the nofication for link or unlink */
|
||||
void *upper_info; /* upper dev info */
|
||||
};
|
||||
|
||||
static inline void netdev_notifier_info_init(struct netdev_notifier_info *info,
|
||||
@@ -3620,7 +3621,7 @@ struct net_device *netdev_master_upper_dev_get_rcu(struct net_device *dev);
|
||||
int netdev_upper_dev_link(struct net_device *dev, struct net_device *upper_dev);
|
||||
int netdev_master_upper_dev_link(struct net_device *dev,
|
||||
struct net_device *upper_dev,
|
||||
void *upper_priv);
|
||||
void *upper_priv, void *upper_info);
|
||||
void netdev_upper_dev_unlink(struct net_device *dev,
|
||||
struct net_device *upper_dev);
|
||||
void netdev_adjacent_rename_links(struct net_device *dev, char *oldname);
|
||||
|
Reference in New Issue
Block a user