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.
Showing the changes to include/uapi/linux (1 of 6 files). Show all
Unified · Split
| @@ -144,6 +144,7 @@ enum { · 143 unmodified lines | ||
| 144 | 144 | IFLA_NUM_RX_QUEUES, |
| 145 | 145 | IFLA_CARRIER, |
| 146 | 146 | IFLA_PHYS_PORT_ID, |
| 147 | + IFLA_SLAVE, | |
| 147 | 148 | __IFLA_MAX |
| 148 | 149 | }; |
| 149 | 150 | |
| @@ -368,6 +369,18 @@ enum { · 218 unmodified lines | ||
| 368 | 369 | |
| 369 | 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 | 384 | /* SR-IOV virtual function management section */ |
| 372 | 385 | |
| 373 | 386 | enum { |