rtnetlink: put "BOND" into nl attribute names which are related to bonding
authorJiri Pirko <jiri@resnulli.us>
Wed, 22 Jan 2014 08:05:54 +0000 (09:05 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 23 Jan 2014 05:57:05 +0000 (21:57 -0800)
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>
drivers/net/bonding/bond_netlink.c
include/uapi/linux/if_link.h
net/core/rtnetlink.c

index a8fa7256b7b1498ce6e72b048e0c1fbf897f13a8..549eb8702ebb45d8914bda2940619fbf5a5eeb55 100644 (file)
@@ -26,27 +26,27 @@ int bond_get_slave(struct net_device *slave_dev, struct sk_buff *skb)
        struct slave *slave = bond_slave_get_rtnl(slave_dev);
        const struct aggregator *agg;
 
-       if (nla_put_u8(skb, IFLA_SLAVE_STATE, bond_slave_state(slave)))
+       if (nla_put_u8(skb, IFLA_BOND_SLAVE_STATE, bond_slave_state(slave)))
                goto nla_put_failure;
 
-       if (nla_put_u8(skb, IFLA_SLAVE_MII_STATUS, slave->link))
+       if (nla_put_u8(skb, IFLA_BOND_SLAVE_MII_STATUS, slave->link))
                goto nla_put_failure;
 
-       if (nla_put_u32(skb, IFLA_SLAVE_LINK_FAILURE_COUNT,
+       if (nla_put_u32(skb, IFLA_BOND_SLAVE_LINK_FAILURE_COUNT,
                        slave->link_failure_count))
                goto nla_put_failure;
 
-       if (nla_put(skb, IFLA_SLAVE_PERM_HWADDR,
+       if (nla_put(skb, IFLA_BOND_SLAVE_PERM_HWADDR,
                    slave_dev->addr_len, slave->perm_hwaddr))
                goto nla_put_failure;
 
-       if (nla_put_u16(skb, IFLA_SLAVE_QUEUE_ID, slave->queue_id))
+       if (nla_put_u16(skb, IFLA_BOND_SLAVE_QUEUE_ID, slave->queue_id))
                goto nla_put_failure;
 
        if (slave->bond->params.mode == BOND_MODE_8023AD) {
                agg = SLAVE_AD_INFO(slave).port.aggregator;
                if (agg)
-                       if (nla_put_u16(skb, IFLA_SLAVE_AD_AGGREGATOR_ID,
+                       if (nla_put_u16(skb, IFLA_BOND_SLAVE_AD_AGGREGATOR_ID,
                                        agg->aggregator_identifier))
                                goto nla_put_failure;
        }
index ba2f3bf5fdf55993e08d0a486b508328fe05d482..1f30b85ebf9da44fffa5a8686fa2912008945d13 100644 (file)
@@ -144,7 +144,7 @@ enum {
        IFLA_NUM_RX_QUEUES,
        IFLA_CARRIER,
        IFLA_PHYS_PORT_ID,
-       IFLA_SLAVE,
+       IFLA_BOND_SLAVE,
        __IFLA_MAX
 };
 
@@ -370,16 +370,17 @@ 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,
+       IFLA_BOND_SLAVE_UNSPEC,
+       IFLA_BOND_SLAVE_STATE,
+       IFLA_BOND_SLAVE_MII_STATUS,
+       IFLA_BOND_SLAVE_LINK_FAILURE_COUNT,
+       IFLA_BOND_SLAVE_PERM_HWADDR,
+       IFLA_BOND_SLAVE_QUEUE_ID,
+       IFLA_BOND_SLAVE_AD_AGGREGATOR_ID,
+       __IFLA_BOND_SLAVE_MAX,
 };
 
-#define IFLA_SLAVE_MAX (__IFLA_SLAVE_MAX - 1)
+#define IFLA_BOND_SLAVE_MAX    (__IFLA_BOND_SLAVE_MAX - 1)
 
 /* SR-IOV virtual function management section */
 
index 4f85de7aca33d96529d7302cb99a11052ab9413f..cace149622343d505c7fcdb0b6a7a5b8b2abcdd9 100644 (file)
@@ -725,13 +725,13 @@ static size_t rtnl_bond_slave_size(const struct net_device *dev)
 {
        struct net_device *bond;
        size_t slave_size =
-               nla_total_size(sizeof(struct nlattr)) + /* IFLA_SLAVE */
-               nla_total_size(1) +     /* IFLA_SLAVE_STATE */
-               nla_total_size(1) +     /* IFLA_SLAVE_MII_STATUS */
-               nla_total_size(4) +     /* IFLA_SLAVE_LINK_FAILURE_COUNT */
-               nla_total_size(MAX_ADDR_LEN) +  /* IFLA_SLAVE_PERM_HWADDR */
-               nla_total_size(2) +     /* IFLA_SLAVE_QUEUE_ID */
-               nla_total_size(2) +     /* IFLA_SLAVE_AD_AGGREGATOR_ID */
+               nla_total_size(sizeof(struct nlattr)) + /* IFLA_BOND_SLAVE */
+               nla_total_size(1) +     /* IFLA_BOND_SLAVE_STATE */
+               nla_total_size(1) +     /* IFLA_BOND_SLAVE_MII_STATUS */
+               nla_total_size(4) +     /* IFLA_BOND_SLAVE_LINK_FAILURE_COUNT */
+               nla_total_size(MAX_ADDR_LEN) +  /* IFLA_BOND_SLAVE_PERM_HWADDR */
+               nla_total_size(2) +     /* IFLA_BOND_SLAVE_QUEUE_ID */
+               nla_total_size(2) +     /* IFLA_BOND_SLAVE_AD_AGGREGATOR_ID */
                0;
 
        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)
        if (!bond || !bond->netdev_ops->ndo_get_slave)
                return 0;
 
-       nest = nla_nest_start(skb, IFLA_SLAVE);
+       nest = nla_nest_start(skb, IFLA_BOND_SLAVE);
        if (!nest)
                return -EMSGSIZE;