diff options
| author | sfeldma@cumulusnetworks.com <sfeldma@cumulusnetworks.com> | 2014-01-17 01:57:56 -0500 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2014-01-17 21:51:58 -0500 |
| commit | 1d3ee88ae0d605629bf369ab0b868dae8ca62a48 (patch) | |
| tree | 7d547bb8ba12b9417a8f0055a08f1026d6392cf2 /include/linux | |
| parent | 07699f9a7c8d1002e07011d5aa382cd63241eea8 (diff) | |
bonding: add netlink attributes to slave link dev
If link is IFF_SLAVE, extend link dev netlink attributes to include
slave attributes with new IFLA_SLAVE nest. Add netlink notification
(RTM_NEWLINK) when slave status changes from backup to active, or
visa-versa.
Adds new ndo_get_slave op to net_device_ops to fill skb with IFLA_SLAVE
attributes. Currently only used by bonding driver, but could be
used by other aggregating devices with slaves.
Signed-off-by: Scott Feldman <sfeldma@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/netdevice.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index e985231fe04b..83ce2aee65e6 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
| @@ -921,6 +921,9 @@ struct netdev_phys_port_id { | |||
| 921 | * int (*ndo_del_slave)(struct net_device *dev, struct net_device *slave_dev); | 921 | * int (*ndo_del_slave)(struct net_device *dev, struct net_device *slave_dev); |
| 922 | * Called to release previously enslaved netdev. | 922 | * Called to release previously enslaved netdev. |
| 923 | * | 923 | * |
| 924 | * int (*ndo_get_slave)(struct net_device *slave_dev, struct sk_buff *skb); | ||
| 925 | * Called to fill netlink skb with slave info. | ||
| 926 | * | ||
| 924 | * Feature/offload setting functions. | 927 | * Feature/offload setting functions. |
| 925 | * netdev_features_t (*ndo_fix_features)(struct net_device *dev, | 928 | * netdev_features_t (*ndo_fix_features)(struct net_device *dev, |
| 926 | * netdev_features_t features); | 929 | * netdev_features_t features); |
| @@ -1093,6 +1096,8 @@ struct net_device_ops { | |||
| 1093 | struct net_device *slave_dev); | 1096 | struct net_device *slave_dev); |
| 1094 | int (*ndo_del_slave)(struct net_device *dev, | 1097 | int (*ndo_del_slave)(struct net_device *dev, |
| 1095 | struct net_device *slave_dev); | 1098 | struct net_device *slave_dev); |
| 1099 | int (*ndo_get_slave)(struct net_device *slave_dev, | ||
| 1100 | struct sk_buff *skb); | ||
| 1096 | netdev_features_t (*ndo_fix_features)(struct net_device *dev, | 1101 | netdev_features_t (*ndo_fix_features)(struct net_device *dev, |
| 1097 | netdev_features_t features); | 1102 | netdev_features_t features); |
| 1098 | int (*ndo_set_features)(struct net_device *dev, | 1103 | int (*ndo_set_features)(struct net_device *dev, |
