diff options
author | Moni Shoua <monis@mellanox.com> | 2015-02-03 09:48:29 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-02-04 19:14:24 -0500 |
commit | 61bd3857ff2c7daf756d49b41e6277bbdaa8f789 (patch) | |
tree | 60cb4a6a64906a1420ebfea518277207ac61f939 /include | |
parent | 251c005a6403933b3405fdc15fca4355e7590b42 (diff) |
net/core: Add event for a change in slave state
Add event which provides an indication on a change in the state
of a bonding slave. The event handler should cast the pointer to the
appropriate type (struct netdev_bonding_info) in order to get the
full info about the slave.
Signed-off-by: Moni Shoua <monis@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/netdevice.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 1347ac50d2af..ce784d5018e0 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -51,6 +51,7 @@ | |||
51 | #include <linux/netdev_features.h> | 51 | #include <linux/netdev_features.h> |
52 | #include <linux/neighbour.h> | 52 | #include <linux/neighbour.h> |
53 | #include <uapi/linux/netdevice.h> | 53 | #include <uapi/linux/netdevice.h> |
54 | #include <uapi/linux/if_bonding.h> | ||
54 | 55 | ||
55 | struct netpoll_info; | 56 | struct netpoll_info; |
56 | struct device; | 57 | struct device; |
@@ -2056,6 +2057,7 @@ struct pcpu_sw_netstats { | |||
2056 | #define NETDEV_RESEND_IGMP 0x0016 | 2057 | #define NETDEV_RESEND_IGMP 0x0016 |
2057 | #define NETDEV_PRECHANGEMTU 0x0017 /* notify before mtu change happened */ | 2058 | #define NETDEV_PRECHANGEMTU 0x0017 /* notify before mtu change happened */ |
2058 | #define NETDEV_CHANGEINFODATA 0x0018 | 2059 | #define NETDEV_CHANGEINFODATA 0x0018 |
2060 | #define NETDEV_BONDING_INFO 0x0019 | ||
2059 | 2061 | ||
2060 | int register_netdevice_notifier(struct notifier_block *nb); | 2062 | int register_netdevice_notifier(struct notifier_block *nb); |
2061 | int unregister_netdevice_notifier(struct notifier_block *nb); | 2063 | int unregister_netdevice_notifier(struct notifier_block *nb); |
@@ -3494,6 +3496,19 @@ struct sk_buff *__skb_gso_segment(struct sk_buff *skb, | |||
3494 | struct sk_buff *skb_mac_gso_segment(struct sk_buff *skb, | 3496 | struct sk_buff *skb_mac_gso_segment(struct sk_buff *skb, |
3495 | netdev_features_t features); | 3497 | netdev_features_t features); |
3496 | 3498 | ||
3499 | struct netdev_bonding_info { | ||
3500 | ifslave slave; | ||
3501 | ifbond master; | ||
3502 | }; | ||
3503 | |||
3504 | struct netdev_notifier_bonding_info { | ||
3505 | struct netdev_notifier_info info; /* must be first */ | ||
3506 | struct netdev_bonding_info bonding_info; | ||
3507 | }; | ||
3508 | |||
3509 | void netdev_bonding_info_change(struct net_device *dev, | ||
3510 | struct netdev_bonding_info *bonding_info); | ||
3511 | |||
3497 | static inline | 3512 | static inline |
3498 | struct sk_buff *skb_gso_segment(struct sk_buff *skb, netdev_features_t features) | 3513 | struct sk_buff *skb_gso_segment(struct sk_buff *skb, netdev_features_t features) |
3499 | { | 3514 | { |