summaryrefslogtreecommitdiff
path: root/net/core
diff options
context:
space:
mode:
authorJiri Pirko <jiri@resnulli.us>2014-01-22 09:05:56 +0100
committerDavid S. Miller <davem@davemloft.net>2014-01-22 21:57:17 -0800
commit3bad540ed8285fb53f6365420bba0320d8cd2066 (patch)
tree89801857c75c7cf93d18294096452bd8aebbe957 /net/core
parentba7d49b1f0f8e5f24294a880ed576964059af5ef (diff)
bonding: convert netlink to use slave data info api
Signed-off-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/rtnetlink.c51
1 files changed, 0 insertions, 51 deletions
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index a56bccf6629e..db6a239e0bcc 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -800,28 +800,6 @@ static size_t rtnl_port_size(const struct net_device *dev)
return port_self_size;
}
-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_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)) {
- bond = netdev_master_upper_dev_get((struct net_device *)dev);
- if (bond && bond->netdev_ops->ndo_get_slave)
- return slave_size;
- }
-
- return 0;
-}
-
static noinline size_t if_nlmsg_size(const struct net_device *dev,
u32 ext_filter_mask)
{
@@ -851,7 +829,6 @@ static noinline size_t if_nlmsg_size(const struct net_device *dev,
+ rtnl_port_size(dev) /* IFLA_VF_PORTS + IFLA_PORT_SELF */
+ rtnl_link_get_size(dev) /* IFLA_LINKINFO */
+ rtnl_link_get_af_size(dev) /* IFLA_AF_SPEC */
- + rtnl_bond_slave_size(dev) /* IFLA_SLAVE */
+ nla_total_size(MAX_PHYS_PORT_ID_LEN); /* IFLA_PHYS_PORT_ID */
}
@@ -949,34 +926,6 @@ static int rtnl_phys_port_id_fill(struct sk_buff *skb, struct net_device *dev)
return 0;
}
-static size_t rtnl_bond_slave_fill(struct sk_buff *skb, struct net_device *dev)
-{
- struct net_device *bond;
- struct nlattr *nest;
- int err;
-
- if (!netif_is_bond_slave(dev))
- return 0;
-
- bond = netdev_master_upper_dev_get(dev);
- if (!bond || !bond->netdev_ops->ndo_get_slave)
- return 0;
-
- nest = nla_nest_start(skb, IFLA_BOND_SLAVE);
- if (!nest)
- return -EMSGSIZE;
-
- err = bond->netdev_ops->ndo_get_slave(dev, skb);
- if (err) {
- nla_nest_cancel(skb, nest);
- return (err == -EMSGSIZE) ? err : 0;
- }
-
- nla_nest_end(skb, nest);
-
- return 0;
-}
-
static int rtnl_fill_ifinfo(struct sk_buff *skb, struct net_device *dev,
int type, u32 pid, u32 seq, u32 change,
unsigned int flags, u32 ext_filter_mask)