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>
This commit is contained in:

committed by
David S. Miller

parent
07699f9a7c
commit
1d3ee88ae0
@@ -144,6 +144,7 @@ enum {
|
||||
IFLA_NUM_RX_QUEUES,
|
||||
IFLA_CARRIER,
|
||||
IFLA_PHYS_PORT_ID,
|
||||
IFLA_SLAVE,
|
||||
__IFLA_MAX
|
||||
};
|
||||
|
||||
@@ -368,6 +369,18 @@ enum {
|
||||
|
||||
#define IFLA_BOND_AD_INFO_MAX (__IFLA_BOND_AD_INFO_MAX - 1)
|
||||
|
||||
enum {
|
||||
IFLA_SLAVE_STATE,
|
||||
IFLA_SLAVE_MII_STATUS,
|
||||
IFLA_SLAVE_LINK_FAILURE_COUNT,
|
||||
IFLA_SLAVE_PERM_HWADDR,
|
||||
IFLA_SLAVE_QUEUE_ID,
|
||||
IFLA_SLAVE_AD_AGGREGATOR_ID,
|
||||
__IFLA_SLAVE_MAX,
|
||||
};
|
||||
|
||||
#define IFLA_SLAVE_MAX (__IFLA_SLAVE_MAX - 1)
|
||||
|
||||
/* SR-IOV virtual function management section */
|
||||
|
||||
enum {
|
||||
|
Reference in New Issue
Block a user