History

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.

sfeldma@cumulusnetworks.com committed 12 years ago

Commit 1d3ee881 parent 07699f96 files · +118 −2Browse files

Showing the changes to include/uapi/linux (1 of 6 files). Show all

Unified · Split

include/uapi/linux/if_link.h+13−0
@@ -144,6 +144,7 @@ enum { · 143 unmodified lines
144144 IFLA_NUM_RX_QUEUES,
145145 IFLA_CARRIER,
146146 IFLA_PHYS_PORT_ID,
147+ IFLA_SLAVE,
147148 __IFLA_MAX
148149 };
149150
@@ -368,6 +369,18 @@ enum { · 218 unmodified lines
368369
369370 #define IFLA_BOND_AD_INFO_MAX (__IFLA_BOND_AD_INFO_MAX - 1)
370371
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+
371384 /* SR-IOV virtual function management section */
372385
373386 enum {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t