aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/netdevice.h
diff options
context:
space:
mode:
authorJiri Pirko <jpirko@redhat.com>2011-02-13 05:15:37 -0500
committerDavid S. Miller <davem@davemloft.net>2011-02-13 19:58:39 -0500
commitfbaec0ea54f7d9131891ff98744e82c073ce03b1 (patch)
treed0622d38a51b7e4a1e853338e7cbd954d3977cf2 /include/linux/netdevice.h
parentf45437efff460aa033978180da88229c5fc68455 (diff)
rtnetlink: implement setting of master device
This patch allows userspace to enslave/release slave devices via netlink interface using IFLA_MASTER. This introduces generic way to add/remove underling devices. Signed-off-by: Jiri Pirko <jpirko@redhat.com> Acked-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r--include/linux/netdevice.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 5a42b1003767..d08ef6538579 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -783,6 +783,14 @@ struct netdev_tc_txq {
783 * Set hardware filter for RFS. rxq_index is the target queue index; 783 * Set hardware filter for RFS. rxq_index is the target queue index;
784 * flow_id is a flow ID to be passed to rps_may_expire_flow() later. 784 * flow_id is a flow ID to be passed to rps_may_expire_flow() later.
785 * Return the filter ID on success, or a negative error code. 785 * Return the filter ID on success, or a negative error code.
786 *
787 * Slave management functions (for bridge, bonding, etc). User should
788 * call netdev_set_master() to set dev->master properly.
789 * int (*ndo_add_slave)(struct net_device *dev, struct net_device *slave_dev);
790 * Called to make another netdev an underling.
791 *
792 * int (*ndo_del_slave)(struct net_device *dev, struct net_device *slave_dev);
793 * Called to release previously enslaved netdev.
786 */ 794 */
787#define HAVE_NET_DEVICE_OPS 795#define HAVE_NET_DEVICE_OPS
788struct net_device_ops { 796struct net_device_ops {
@@ -862,6 +870,10 @@ struct net_device_ops {
862 u16 rxq_index, 870 u16 rxq_index,
863 u32 flow_id); 871 u32 flow_id);
864#endif 872#endif
873 int (*ndo_add_slave)(struct net_device *dev,
874 struct net_device *slave_dev);
875 int (*ndo_del_slave)(struct net_device *dev,
876 struct net_device *slave_dev);
865}; 877};
866 878
867/* 879/*