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/uapi | |
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/uapi')
-rw-r--r-- | include/uapi/linux/if_link.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/uapi/linux/if_link.h b/include/uapi/linux/if_link.h index 3e6bd3c7445d..ba2f3bf5fdf5 100644 --- a/include/uapi/linux/if_link.h +++ b/include/uapi/linux/if_link.h | |||
@@ -144,6 +144,7 @@ enum { | |||
144 | IFLA_NUM_RX_QUEUES, | 144 | IFLA_NUM_RX_QUEUES, |
145 | IFLA_CARRIER, | 145 | IFLA_CARRIER, |
146 | IFLA_PHYS_PORT_ID, | 146 | IFLA_PHYS_PORT_ID, |
147 | IFLA_SLAVE, | ||
147 | __IFLA_MAX | 148 | __IFLA_MAX |
148 | }; | 149 | }; |
149 | 150 | ||
@@ -368,6 +369,18 @@ enum { | |||
368 | 369 | ||
369 | #define IFLA_BOND_AD_INFO_MAX (__IFLA_BOND_AD_INFO_MAX - 1) | 370 | #define IFLA_BOND_AD_INFO_MAX (__IFLA_BOND_AD_INFO_MAX - 1) |
370 | 371 | ||
372 | enum { | ||
373 | IFLA_SLAVE_STATE, | ||
374 | IFLA_SLAVE_MII_STATUS, | ||
375 | IFLA_SLAVE_LINK_FAILURE_COUNT, | ||
376 | IFLA_SLAVE_PERM_HWADDR, | ||
377 | IFLA_SLAVE_QUEUE_ID, | ||
378 | IFLA_SLAVE_AD_AGGREGATOR_ID, | ||
379 | __IFLA_SLAVE_MAX, | ||
380 | }; | ||
381 | |||
382 | #define IFLA_SLAVE_MAX (__IFLA_SLAVE_MAX - 1) | ||
383 | |||
371 | /* SR-IOV virtual function management section */ | 384 | /* SR-IOV virtual function management section */ |
372 | 385 | ||
373 | enum { | 386 | enum { |