summaryrefslogtreecommitdiffstats
path: root/include/linux/netdevice.h
diff options
context:
space:
mode:
authorsfeldma@cumulusnetworks.com <sfeldma@cumulusnetworks.com>2014-01-16 22:57:56 -0800
committerDavid S. Miller <davem@davemloft.net>2014-01-17 18:51:58 -0800
commit1d3ee88ae0d605629bf369ab0b868dae8ca62a48 (patch)
tree7d547bb8ba12b9417a8f0055a08f1026d6392cf2 /include/linux/netdevice.h
parent07699f9a7c8d1002e07011d5aa382cd63241eea8 (diff)
downloadlinux-1d3ee88ae0d605629bf369ab0b868dae8ca62a48.tar.gz
linux-1d3ee88ae0d605629bf369ab0b868dae8ca62a48.tar.bz2
linux-1d3ee88ae0d605629bf369ab0b868dae8ca62a48.zip
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/netdevice.h')
-rw-r--r--include/linux/netdevice.h5
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 {
* int (*ndo_del_slave)(struct net_device *dev, struct net_device *slave_dev);
* Called to release previously enslaved netdev.
*
+ * int (*ndo_get_slave)(struct net_device *slave_dev, struct sk_buff *skb);
+ * Called to fill netlink skb with slave info.
+ *
* Feature/offload setting functions.
* netdev_features_t (*ndo_fix_features)(struct net_device *dev,
* netdev_features_t features);
@@ -1093,6 +1096,8 @@ struct net_device_ops {
struct net_device *slave_dev);
int (*ndo_del_slave)(struct net_device *dev,
struct net_device *slave_dev);
+ int (*ndo_get_slave)(struct net_device *slave_dev,
+ struct sk_buff *skb);
netdev_features_t (*ndo_fix_features)(struct net_device *dev,
netdev_features_t features);
int (*ndo_set_features)(struct net_device *dev,