diff options
author | Jiri Pirko <jiri@resnulli.us> | 2014-01-22 03:05:54 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-01-23 00:57:05 -0500 |
commit | df7dbcbbafc0b8f3fb31a40c6f3c4a7e15cb0b40 (patch) | |
tree | 4df36f32c23aac6895c62b147f0305036a3c8b0a | |
parent | 0a9099f8836cd5f91f811078b367e0227e0a20f6 (diff) |
rtnetlink: put "BOND" into nl attribute names which are related to bonding
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Acked-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/bonding/bond_netlink.c | 12 | ||||
-rw-r--r-- | include/uapi/linux/if_link.h | 19 | ||||
-rw-r--r-- | net/core/rtnetlink.c | 16 |
3 files changed, 24 insertions, 23 deletions
diff --git a/drivers/net/bonding/bond_netlink.c b/drivers/net/bonding/bond_netlink.c index a8fa7256b7b1..549eb8702ebb 100644 --- a/drivers/net/bonding/bond_netlink.c +++ b/drivers/net/bonding/bond_netlink.c | |||
@@ -26,27 +26,27 @@ int bond_get_slave(struct net_device *slave_dev, struct sk_buff *skb) | |||
26 | struct slave *slave = bond_slave_get_rtnl(slave_dev); | 26 | struct slave *slave = bond_slave_get_rtnl(slave_dev); |
27 | const struct aggregator *agg; | 27 | const struct aggregator *agg; |
28 | 28 | ||
29 | if (nla_put_u8(skb, IFLA_SLAVE_STATE, bond_slave_state(slave))) | 29 | if (nla_put_u8(skb, IFLA_BOND_SLAVE_STATE, bond_slave_state(slave))) |
30 | goto nla_put_failure; | 30 | goto nla_put_failure; |
31 | 31 | ||
32 | if (nla_put_u8(skb, IFLA_SLAVE_MII_STATUS, slave->link)) | 32 | if (nla_put_u8(skb, IFLA_BOND_SLAVE_MII_STATUS, slave->link)) |
33 | goto nla_put_failure; | 33 | goto nla_put_failure; |
34 | 34 | ||
35 | if (nla_put_u32(skb, IFLA_SLAVE_LINK_FAILURE_COUNT, | 35 | if (nla_put_u32(skb, IFLA_BOND_SLAVE_LINK_FAILURE_COUNT, |
36 | slave->link_failure_count)) | 36 | slave->link_failure_count)) |
37 | goto nla_put_failure; | 37 | goto nla_put_failure; |
38 | 38 | ||
39 | if (nla_put(skb, IFLA_SLAVE_PERM_HWADDR, | 39 | if (nla_put(skb, IFLA_BOND_SLAVE_PERM_HWADDR, |
40 | slave_dev->addr_len, slave->perm_hwaddr)) | 40 | slave_dev->addr_len, slave->perm_hwaddr)) |
41 | goto nla_put_failure; | 41 | goto nla_put_failure; |
42 | 42 | ||
43 | if (nla_put_u16(skb, IFLA_SLAVE_QUEUE_ID, slave->queue_id)) | 43 | if (nla_put_u16(skb, IFLA_BOND_SLAVE_QUEUE_ID, slave->queue_id)) |
44 | goto nla_put_failure; | 44 | goto nla_put_failure; |
45 | 45 | ||
46 | if (slave->bond->params.mode == BOND_MODE_8023AD) { | 46 | if (slave->bond->params.mode == BOND_MODE_8023AD) { |
47 | agg = SLAVE_AD_INFO(slave).port.aggregator; | 47 | agg = SLAVE_AD_INFO(slave).port.aggregator; |
48 | if (agg) | 48 | if (agg) |
49 | if (nla_put_u16(skb, IFLA_SLAVE_AD_AGGREGATOR_ID, | 49 | if (nla_put_u16(skb, IFLA_BOND_SLAVE_AD_AGGREGATOR_ID, |
50 | agg->aggregator_identifier)) | 50 | agg->aggregator_identifier)) |
51 | goto nla_put_failure; | 51 | goto nla_put_failure; |
52 | } | 52 | } |
diff --git a/include/uapi/linux/if_link.h b/include/uapi/linux/if_link.h index ba2f3bf5fdf5..1f30b85ebf9d 100644 --- a/include/uapi/linux/if_link.h +++ b/include/uapi/linux/if_link.h | |||
@@ -144,7 +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_BOND_SLAVE, |
148 | __IFLA_MAX | 148 | __IFLA_MAX |
149 | }; | 149 | }; |
150 | 150 | ||
@@ -370,16 +370,17 @@ enum { | |||
370 | #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) |
371 | 371 | ||
372 | enum { | 372 | enum { |
373 | IFLA_SLAVE_STATE, | 373 | IFLA_BOND_SLAVE_UNSPEC, |
374 | IFLA_SLAVE_MII_STATUS, | 374 | IFLA_BOND_SLAVE_STATE, |
375 | IFLA_SLAVE_LINK_FAILURE_COUNT, | 375 | IFLA_BOND_SLAVE_MII_STATUS, |
376 | IFLA_SLAVE_PERM_HWADDR, | 376 | IFLA_BOND_SLAVE_LINK_FAILURE_COUNT, |
377 | IFLA_SLAVE_QUEUE_ID, | 377 | IFLA_BOND_SLAVE_PERM_HWADDR, |
378 | IFLA_SLAVE_AD_AGGREGATOR_ID, | 378 | IFLA_BOND_SLAVE_QUEUE_ID, |
379 | __IFLA_SLAVE_MAX, | 379 | IFLA_BOND_SLAVE_AD_AGGREGATOR_ID, |
380 | __IFLA_BOND_SLAVE_MAX, | ||
380 | }; | 381 | }; |
381 | 382 | ||
382 | #define IFLA_SLAVE_MAX (__IFLA_SLAVE_MAX - 1) | 383 | #define IFLA_BOND_SLAVE_MAX (__IFLA_BOND_SLAVE_MAX - 1) |
383 | 384 | ||
384 | /* SR-IOV virtual function management section */ | 385 | /* SR-IOV virtual function management section */ |
385 | 386 | ||
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index 4f85de7aca33..cace14962234 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c | |||
@@ -725,13 +725,13 @@ static size_t rtnl_bond_slave_size(const struct net_device *dev) | |||
725 | { | 725 | { |
726 | struct net_device *bond; | 726 | struct net_device *bond; |
727 | size_t slave_size = | 727 | size_t slave_size = |
728 | nla_total_size(sizeof(struct nlattr)) + /* IFLA_SLAVE */ | 728 | nla_total_size(sizeof(struct nlattr)) + /* IFLA_BOND_SLAVE */ |
729 | nla_total_size(1) + /* IFLA_SLAVE_STATE */ | 729 | nla_total_size(1) + /* IFLA_BOND_SLAVE_STATE */ |
730 | nla_total_size(1) + /* IFLA_SLAVE_MII_STATUS */ | 730 | nla_total_size(1) + /* IFLA_BOND_SLAVE_MII_STATUS */ |
731 | nla_total_size(4) + /* IFLA_SLAVE_LINK_FAILURE_COUNT */ | 731 | nla_total_size(4) + /* IFLA_BOND_SLAVE_LINK_FAILURE_COUNT */ |
732 | nla_total_size(MAX_ADDR_LEN) + /* IFLA_SLAVE_PERM_HWADDR */ | 732 | nla_total_size(MAX_ADDR_LEN) + /* IFLA_BOND_SLAVE_PERM_HWADDR */ |
733 | nla_total_size(2) + /* IFLA_SLAVE_QUEUE_ID */ | 733 | nla_total_size(2) + /* IFLA_BOND_SLAVE_QUEUE_ID */ |
734 | nla_total_size(2) + /* IFLA_SLAVE_AD_AGGREGATOR_ID */ | 734 | nla_total_size(2) + /* IFLA_BOND_SLAVE_AD_AGGREGATOR_ID */ |
735 | 0; | 735 | 0; |
736 | 736 | ||
737 | if (netif_is_bond_slave((struct net_device *)dev)) { | 737 | if (netif_is_bond_slave((struct net_device *)dev)) { |
@@ -883,7 +883,7 @@ static size_t rtnl_bond_slave_fill(struct sk_buff *skb, struct net_device *dev) | |||
883 | if (!bond || !bond->netdev_ops->ndo_get_slave) | 883 | if (!bond || !bond->netdev_ops->ndo_get_slave) |
884 | return 0; | 884 | return 0; |
885 | 885 | ||
886 | nest = nla_nest_start(skb, IFLA_SLAVE); | 886 | nest = nla_nest_start(skb, IFLA_BOND_SLAVE); |
887 | if (!nest) | 887 | if (!nest) |
888 | return -EMSGSIZE; | 888 | return -EMSGSIZE; |
889 | 889 | ||