mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
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>
This commit is contained in:
parent
f45437efff
commit
fbaec0ea54
2 changed files with 55 additions and 0 deletions
|
@ -783,6 +783,14 @@ struct netdev_tc_txq {
|
|||
* Set hardware filter for RFS. rxq_index is the target queue index;
|
||||
* flow_id is a flow ID to be passed to rps_may_expire_flow() later.
|
||||
* Return the filter ID on success, or a negative error code.
|
||||
*
|
||||
* Slave management functions (for bridge, bonding, etc). User should
|
||||
* call netdev_set_master() to set dev->master properly.
|
||||
* int (*ndo_add_slave)(struct net_device *dev, struct net_device *slave_dev);
|
||||
* Called to make another netdev an underling.
|
||||
*
|
||||
* int (*ndo_del_slave)(struct net_device *dev, struct net_device *slave_dev);
|
||||
* Called to release previously enslaved netdev.
|
||||
*/
|
||||
#define HAVE_NET_DEVICE_OPS
|
||||
struct net_device_ops {
|
||||
|
@ -862,6 +870,10 @@ struct net_device_ops {
|
|||
u16 rxq_index,
|
||||
u32 flow_id);
|
||||
#endif
|
||||
int (*ndo_add_slave)(struct net_device *dev,
|
||||
struct net_device *slave_dev);
|
||||
int (*ndo_del_slave)(struct net_device *dev,
|
||||
struct net_device *slave_dev);
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue