netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch net-next 0/5] fix bonding slave info API (sysfs and netlink)
@ 2014-01-22  8:05 Jiri Pirko
  2014-01-22  8:05 ` [patch net-next 1/5] bonding: change name of sysfs dir for bonding slaves Jiri Pirko
                   ` (7 more replies)
  0 siblings, 8 replies; 13+ messages in thread
From: Jiri Pirko @ 2014-01-22  8:05 UTC (permalink / raw)
  To: netdev
  Cc: davem, fubar, vfalico, andy, sfeldma, stephen, vyasevic,
	nicolas.dichtel, john.r.fastabend

The main part of this patchset is the introduction of a generic way how
to get/set info of slaves unsing rtnl_link_ops.

Jiri Pirko (5):
  bonding: change name of sysfs dir for bonding slaves
  rtnetlink: put "BOND" into nl attribute names which are related to
    bonding
  rtnetlink: provide api for getting and setting slave info
  bonding: convert netlink to use slave data info api
  rtnetlink: remove ndo_get_slave

 drivers/net/bonding/bond_main.c        |   1 -
 drivers/net/bonding/bond_netlink.c     |  33 ++++--
 drivers/net/bonding/bond_sysfs_slave.c |   2 +-
 drivers/net/bonding/bonding.h          |   1 -
 include/linux/netdevice.h              |   5 -
 include/net/rtnetlink.h                |  14 +++
 include/uapi/linux/if_link.h           |  21 ++--
 net/core/rtnetlink.c                   | 209 ++++++++++++++++++++++-----------
 8 files changed, 190 insertions(+), 96 deletions(-)

-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [patch net-next 1/5] bonding: change name of sysfs dir for bonding slaves
  2014-01-22  8:05 [patch net-next 0/5] fix bonding slave info API (sysfs and netlink) Jiri Pirko
@ 2014-01-22  8:05 ` Jiri Pirko
  2014-01-22  8:05 ` [patch net-next 2/5] rtnetlink: put "BOND" into nl attribute names which are related to bonding Jiri Pirko
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 13+ messages in thread
From: Jiri Pirko @ 2014-01-22  8:05 UTC (permalink / raw)
  To: netdev
  Cc: davem, fubar, vfalico, andy, sfeldma, stephen, vyasevic,
	nicolas.dichtel, john.r.fastabend

Allow user to identify easily what the attributes are related to. Change
the name of the group to "bonding_slave" to be similar to master which
is named "bonding".

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
---
 drivers/net/bonding/bond_sysfs_slave.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/bonding/bond_sysfs_slave.c b/drivers/net/bonding/bond_sysfs_slave.c
index 7cb97de..84b0e38 100644
--- a/drivers/net/bonding/bond_sysfs_slave.c
+++ b/drivers/net/bonding/bond_sysfs_slave.c
@@ -118,7 +118,7 @@ int bond_sysfs_slave_add(struct slave *slave)
 	int err;
 
 	err = kobject_init_and_add(&slave->kobj, &slave_ktype,
-				   &(slave->dev->dev.kobj), "slave");
+				   &(slave->dev->dev.kobj), "bonding_slave");
 	if (err)
 		return err;
 
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [patch net-next 2/5] rtnetlink: put "BOND" into nl attribute names which are related to bonding
  2014-01-22  8:05 [patch net-next 0/5] fix bonding slave info API (sysfs and netlink) Jiri Pirko
  2014-01-22  8:05 ` [patch net-next 1/5] bonding: change name of sysfs dir for bonding slaves Jiri Pirko
@ 2014-01-22  8:05 ` Jiri Pirko
  2014-01-22 15:57   ` Nicolas Dichtel
  2014-01-22  8:05 ` [patch net-next 3/5] rtnetlink: provide api for getting and setting slave info Jiri Pirko
                   ` (5 subsequent siblings)
  7 siblings, 1 reply; 13+ messages in thread
From: Jiri Pirko @ 2014-01-22  8:05 UTC (permalink / raw)
  To: netdev
  Cc: davem, fubar, vfalico, andy, sfeldma, stephen, vyasevic,
	nicolas.dichtel, john.r.fastabend

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
---
 drivers/net/bonding/bond_netlink.c | 12 ++++++------
 include/uapi/linux/if_link.h       | 19 ++++++++++---------
 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 21c6488..dd786a3 100644
--- a/drivers/net/bonding/bond_netlink.c
+++ b/drivers/net/bonding/bond_netlink.c
@@ -27,27 +27,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;
 	}
diff --git a/include/uapi/linux/if_link.h b/include/uapi/linux/if_link.h
index ba2f3bf..1f30b85 100644
--- a/include/uapi/linux/if_link.h
+++ b/include/uapi/linux/if_link.h
@@ -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 */
 
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index 4f85de7..cace149 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)
 {
 	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;
 
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [patch net-next 3/5] rtnetlink: provide api for getting and setting slave info
  2014-01-22  8:05 [patch net-next 0/5] fix bonding slave info API (sysfs and netlink) Jiri Pirko
  2014-01-22  8:05 ` [patch net-next 1/5] bonding: change name of sysfs dir for bonding slaves Jiri Pirko
  2014-01-22  8:05 ` [patch net-next 2/5] rtnetlink: put "BOND" into nl attribute names which are related to bonding Jiri Pirko
@ 2014-01-22  8:05 ` Jiri Pirko
  2014-01-22  8:05 ` [patch net-next 4/5] bonding: convert netlink to use slave data info api Jiri Pirko
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 13+ messages in thread
From: Jiri Pirko @ 2014-01-22  8:05 UTC (permalink / raw)
  To: netdev
  Cc: davem, fubar, vfalico, andy, sfeldma, stephen, vyasevic,
	nicolas.dichtel, john.r.fastabend

Recent patch
bonding: add netlink attributes to slave link dev (1d3ee88ae0d6)

Introduced yet another device specific way to access slave information
over rtnetlink. There is one already there for bridge.

This patch introduces generic way to do this, for getting and setting
info as well by extending link_ops. Later on, this new interface will
be used for bridge ports as well.

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
---
 include/net/rtnetlink.h      |  14 ++++
 include/uapi/linux/if_link.h |   2 +
 net/core/rtnetlink.c         | 158 +++++++++++++++++++++++++++++++++++++------
 3 files changed, 154 insertions(+), 20 deletions(-)

diff --git a/include/net/rtnetlink.h b/include/net/rtnetlink.h
index 8fb4207..661e45d 100644
--- a/include/net/rtnetlink.h
+++ b/include/net/rtnetlink.h
@@ -79,6 +79,20 @@ struct rtnl_link_ops {
 					       const struct net_device *dev);
 	unsigned int		(*get_num_tx_queues)(void);
 	unsigned int		(*get_num_rx_queues)(void);
+
+	int			slave_maxtype;
+	const struct nla_policy	*slave_policy;
+	int			(*slave_validate)(struct nlattr *tb[],
+						  struct nlattr *data[]);
+	int			(*slave_changelink)(struct net_device *dev,
+						    struct net_device *slave_dev,
+						    struct nlattr *tb[],
+						    struct nlattr *data[]);
+	size_t			(*get_slave_size)(const struct net_device *dev,
+						  const struct net_device *slave_dev);
+	int			(*fill_slave_info)(struct sk_buff *skb,
+						   const struct net_device *dev,
+						   const struct net_device *slave_dev);
 };
 
 int __rtnl_link_register(struct rtnl_link_ops *ops);
diff --git a/include/uapi/linux/if_link.h b/include/uapi/linux/if_link.h
index 1f30b85..b8fb352 100644
--- a/include/uapi/linux/if_link.h
+++ b/include/uapi/linux/if_link.h
@@ -241,6 +241,8 @@ enum {
 	IFLA_INFO_KIND,
 	IFLA_INFO_DATA,
 	IFLA_INFO_XSTATS,
+	IFLA_INFO_SLAVE_KIND,
+	IFLA_INFO_SLAVE_DATA,
 	__IFLA_INFO_MAX,
 };
 
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index cace149..a56bccf 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -365,6 +365,22 @@ void rtnl_link_unregister(struct rtnl_link_ops *ops)
 }
 EXPORT_SYMBOL_GPL(rtnl_link_unregister);
 
+static size_t rtnl_link_get_slave_info_data_size(const struct net_device *dev)
+{
+	struct net_device *master_dev;
+	const struct rtnl_link_ops *ops;
+
+	master_dev = netdev_master_upper_dev_get((struct net_device *) dev);
+	if (!master_dev)
+		return 0;
+	ops = master_dev->rtnl_link_ops;
+	if (!ops->get_slave_size)
+		return 0;
+	/* IFLA_INFO_SLAVE_DATA + nested data */
+	return nla_total_size(sizeof(struct nlattr)) +
+	       ops->get_slave_size(master_dev, dev);
+}
+
 static size_t rtnl_link_get_size(const struct net_device *dev)
 {
 	const struct rtnl_link_ops *ops = dev->rtnl_link_ops;
@@ -385,6 +401,8 @@ static size_t rtnl_link_get_size(const struct net_device *dev)
 		/* IFLA_INFO_XSTATS */
 		size += nla_total_size(ops->get_xstats_size(dev));
 
+	size += rtnl_link_get_slave_info_data_size(dev);
+
 	return size;
 }
 
@@ -459,40 +477,101 @@ static size_t rtnl_link_get_af_size(const struct net_device *dev)
 	return size;
 }
 
-static int rtnl_link_fill(struct sk_buff *skb, const struct net_device *dev)
+static bool rtnl_have_link_slave_info(const struct net_device *dev)
 {
-	const struct rtnl_link_ops *ops = dev->rtnl_link_ops;
-	struct nlattr *linkinfo, *data;
-	int err = -EMSGSIZE;
+	struct net_device *master_dev;
 
-	linkinfo = nla_nest_start(skb, IFLA_LINKINFO);
-	if (linkinfo == NULL)
-		goto out;
+	master_dev = netdev_master_upper_dev_get((struct net_device *) dev);
+	if (master_dev && master_dev->rtnl_link_ops &&
+	    master_dev->rtnl_link_ops->fill_slave_info)
+		return true;
+	return false;
+}
+
+static int rtnl_link_slave_info_fill(struct sk_buff *skb,
+				     const struct net_device *dev)
+{
+	struct net_device *master_dev;
+	const struct rtnl_link_ops *ops;
+	struct nlattr *slave_data;
+	int err;
 
+	master_dev = netdev_master_upper_dev_get((struct net_device *) dev);
+	if (!master_dev)
+		return 0;
+	ops = master_dev->rtnl_link_ops;
+	if (!ops)
+		return 0;
+	if (nla_put_string(skb, IFLA_INFO_SLAVE_KIND, ops->kind) < 0)
+		return -EMSGSIZE;
+	if (ops->fill_slave_info) {
+		slave_data = nla_nest_start(skb, IFLA_INFO_SLAVE_DATA);
+		if (!slave_data)
+			return -EMSGSIZE;
+		err = ops->fill_slave_info(skb, master_dev, dev);
+		if (err < 0)
+			goto err_cancel_slave_data;
+		nla_nest_end(skb, slave_data);
+	}
+	return 0;
+
+err_cancel_slave_data:
+	nla_nest_cancel(skb, slave_data);
+	return err;
+}
+
+static int rtnl_link_info_fill(struct sk_buff *skb,
+			       const struct net_device *dev)
+{
+	const struct rtnl_link_ops *ops = dev->rtnl_link_ops;
+	struct nlattr *data;
+	int err;
+
+	if (!ops)
+		return 0;
 	if (nla_put_string(skb, IFLA_INFO_KIND, ops->kind) < 0)
-		goto err_cancel_link;
+		return -EMSGSIZE;
 	if (ops->fill_xstats) {
 		err = ops->fill_xstats(skb, dev);
 		if (err < 0)
-			goto err_cancel_link;
+			return err;
 	}
 	if (ops->fill_info) {
 		data = nla_nest_start(skb, IFLA_INFO_DATA);
-		if (data == NULL) {
-			err = -EMSGSIZE;
-			goto err_cancel_link;
-		}
+		if (data == NULL)
+			return -EMSGSIZE;
 		err = ops->fill_info(skb, dev);
 		if (err < 0)
 			goto err_cancel_data;
 		nla_nest_end(skb, data);
 	}
-
-	nla_nest_end(skb, linkinfo);
 	return 0;
 
 err_cancel_data:
 	nla_nest_cancel(skb, data);
+	return err;
+}
+
+static int rtnl_link_fill(struct sk_buff *skb, const struct net_device *dev)
+{
+	struct nlattr *linkinfo;
+	int err = -EMSGSIZE;
+
+	linkinfo = nla_nest_start(skb, IFLA_LINKINFO);
+	if (linkinfo == NULL)
+		goto out;
+
+	err = rtnl_link_info_fill(skb, dev);
+	if (err < 0)
+		goto err_cancel_link;
+
+	err = rtnl_link_slave_info_fill(skb, dev);
+	if (err < 0)
+		goto err_cancel_link;
+
+	nla_nest_end(skb, linkinfo);
+	return 0;
+
 err_cancel_link:
 	nla_nest_cancel(skb, linkinfo);
 out:
@@ -1052,10 +1131,7 @@ static int rtnl_fill_ifinfo(struct sk_buff *skb, struct net_device *dev,
 	if (rtnl_port_fill(skb, dev))
 		goto nla_put_failure;
 
-	if (rtnl_bond_slave_fill(skb, dev))
-		goto nla_put_failure;
-
-	if (dev->rtnl_link_ops) {
+	if (dev->rtnl_link_ops || rtnl_have_link_slave_info(dev)) {
 		if (rtnl_link_fill(skb, dev) < 0)
 			goto nla_put_failure;
 	}
@@ -1178,6 +1254,8 @@ EXPORT_SYMBOL(ifla_policy);
 static const struct nla_policy ifla_info_policy[IFLA_INFO_MAX+1] = {
 	[IFLA_INFO_KIND]	= { .type = NLA_STRING },
 	[IFLA_INFO_DATA]	= { .type = NLA_NESTED },
+	[IFLA_INFO_SLAVE_KIND]	= { .type = NLA_STRING },
+	[IFLA_INFO_SLAVE_DATA]	= { .type = NLA_NESTED },
 };
 
 static const struct nla_policy ifla_vfinfo_policy[IFLA_VF_INFO_MAX+1] = {
@@ -1765,7 +1843,9 @@ static int rtnl_newlink(struct sk_buff *skb, struct nlmsghdr *nlh)
 {
 	struct net *net = sock_net(skb->sk);
 	const struct rtnl_link_ops *ops;
+	const struct rtnl_link_ops *m_ops = NULL;
 	struct net_device *dev;
+	struct net_device *master_dev = NULL;
 	struct ifinfomsg *ifm;
 	char kind[MODULE_NAME_LEN];
 	char ifname[IFNAMSIZ];
@@ -1795,6 +1875,12 @@ replay:
 			dev = NULL;
 	}
 
+	if (dev) {
+		master_dev = netdev_master_upper_dev_get(dev);
+		if (master_dev)
+			m_ops = master_dev->rtnl_link_ops;
+	}
+
 	err = validate_linkmsg(dev, tb);
 	if (err < 0)
 		return err;
@@ -1816,7 +1902,10 @@ replay:
 	}
 
 	if (1) {
-		struct nlattr *attr[ops ? ops->maxtype + 1 : 0], **data = NULL;
+		struct nlattr *attr[ops ? ops->maxtype + 1 : 0];
+		struct nlattr *slave_attr[m_ops ? m_ops->slave_maxtype + 1 : 0];
+		struct nlattr **data = NULL;
+		struct nlattr **slave_data = NULL;
 		struct net *dest_net;
 
 		if (ops) {
@@ -1835,6 +1924,24 @@ replay:
 			}
 		}
 
+		if (m_ops) {
+			if (m_ops->slave_maxtype &&
+			    linkinfo[IFLA_INFO_SLAVE_DATA]) {
+				err = nla_parse_nested(slave_attr,
+						       m_ops->slave_maxtype,
+						       linkinfo[IFLA_INFO_SLAVE_DATA],
+						       m_ops->slave_policy);
+				if (err < 0)
+					return err;
+				slave_data = slave_attr;
+			}
+			if (m_ops->slave_validate) {
+				err = m_ops->slave_validate(tb, slave_data);
+				if (err < 0)
+					return err;
+			}
+		}
+
 		if (dev) {
 			int modified = 0;
 
@@ -1854,6 +1961,17 @@ replay:
 				modified = 1;
 			}
 
+			if (linkinfo[IFLA_INFO_SLAVE_DATA]) {
+				if (!m_ops || !m_ops->slave_changelink)
+					return -EOPNOTSUPP;
+
+				err = m_ops->slave_changelink(master_dev, dev,
+							      tb, slave_data);
+				if (err < 0)
+					return err;
+				modified = 1;
+			}
+
 			return do_setlink(dev, ifm, tb, ifname, modified);
 		}
 
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [patch net-next 4/5] bonding: convert netlink to use slave data info api
  2014-01-22  8:05 [patch net-next 0/5] fix bonding slave info API (sysfs and netlink) Jiri Pirko
                   ` (2 preceding siblings ...)
  2014-01-22  8:05 ` [patch net-next 3/5] rtnetlink: provide api for getting and setting slave info Jiri Pirko
@ 2014-01-22  8:05 ` Jiri Pirko
  2014-01-22  8:05 ` [patch net-next 5/5] rtnetlink: remove ndo_get_slave Jiri Pirko
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 13+ messages in thread
From: Jiri Pirko @ 2014-01-22  8:05 UTC (permalink / raw)
  To: netdev
  Cc: davem, fubar, vfalico, andy, sfeldma, stephen, vyasevic,
	nicolas.dichtel, john.r.fastabend

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
---
 drivers/net/bonding/bond_main.c    |  1 -
 drivers/net/bonding/bond_netlink.c | 21 ++++++++++++++--
 drivers/net/bonding/bonding.h      |  1 -
 net/core/rtnetlink.c               | 51 --------------------------------------
 4 files changed, 19 insertions(+), 55 deletions(-)

diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 3220b48..df85cec 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -3883,7 +3883,6 @@ static const struct net_device_ops bond_netdev_ops = {
 #endif
 	.ndo_add_slave		= bond_enslave,
 	.ndo_del_slave		= bond_release,
-	.ndo_get_slave		= bond_get_slave,
 	.ndo_fix_features	= bond_fix_features,
 };
 
diff --git a/drivers/net/bonding/bond_netlink.c b/drivers/net/bonding/bond_netlink.c
index dd786a3..524d7ce 100644
--- a/drivers/net/bonding/bond_netlink.c
+++ b/drivers/net/bonding/bond_netlink.c
@@ -22,10 +22,23 @@
 #include <linux/reciprocal_div.h>
 #include "bonding.h"
 
-int bond_get_slave(struct net_device *slave_dev, struct sk_buff *skb)
+static size_t bond_get_slave_size(const struct net_device *bond_dev,
+				  const struct net_device *slave_dev)
+{
+	return nla_total_size(sizeof(u8)) +	/* IFLA_BOND_SLAVE_STATE */
+		nla_total_size(sizeof(u8)) +	/* IFLA_BOND_SLAVE_MII_STATUS */
+		nla_total_size(sizeof(u32)) +	/* IFLA_BOND_SLAVE_LINK_FAILURE_COUNT */
+		nla_total_size(MAX_ADDR_LEN) +	/* IFLA_BOND_SLAVE_PERM_HWADDR */
+		nla_total_size(sizeof(u16)) +	/* IFLA_BOND_SLAVE_QUEUE_ID */
+		nla_total_size(sizeof(u16)) +	/* IFLA_BOND_SLAVE_AD_AGGREGATOR_ID */
+		0;
+}
+
+static int bond_fill_slave_info(struct sk_buff *skb,
+				const struct net_device *bond_dev,
+				const struct net_device *slave_dev)
 {
 	struct slave *slave = bond_slave_get_rtnl(slave_dev);
-	const struct aggregator *agg;
 
 	if (nla_put_u8(skb, IFLA_BOND_SLAVE_STATE, bond_slave_state(slave)))
 		goto nla_put_failure;
@@ -45,6 +58,8 @@ int bond_get_slave(struct net_device *slave_dev, struct sk_buff *skb)
 		goto nla_put_failure;
 
 	if (slave->bond->params.mode == BOND_MODE_8023AD) {
+		const struct aggregator *agg;
+
 		agg = SLAVE_AD_INFO(slave).port.aggregator;
 		if (agg)
 			if (nla_put_u16(skb, IFLA_BOND_SLAVE_AD_AGGREGATOR_ID,
@@ -518,6 +533,8 @@ struct rtnl_link_ops bond_link_ops __read_mostly = {
 	.get_num_tx_queues	= bond_get_num_tx_queues,
 	.get_num_rx_queues	= bond_get_num_tx_queues, /* Use the same number
 							     as for TX queues */
+	.get_slave_size		= bond_get_slave_size,
+	.fill_slave_info	= bond_fill_slave_info,
 };
 
 int __init bond_netlink_init(void)
diff --git a/drivers/net/bonding/bonding.h b/drivers/net/bonding/bonding.h
index 8a935f8..5033e83 100644
--- a/drivers/net/bonding/bonding.h
+++ b/drivers/net/bonding/bonding.h
@@ -432,7 +432,6 @@ int bond_sysfs_slave_add(struct slave *slave);
 void bond_sysfs_slave_del(struct slave *slave);
 int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev);
 int bond_release(struct net_device *bond_dev, struct net_device *slave_dev);
-int bond_get_slave(struct net_device *slave_dev, struct sk_buff *skb);
 int bond_xmit_hash(struct bonding *bond, struct sk_buff *skb, int count);
 int bond_parse_parm(const char *mode_arg, const struct bond_parm_tbl *tbl);
 int bond_parm_tbl_lookup(int mode, const struct bond_parm_tbl *tbl);
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index a56bccf..db6a239 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)
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [patch net-next 5/5] rtnetlink: remove ndo_get_slave
  2014-01-22  8:05 [patch net-next 0/5] fix bonding slave info API (sysfs and netlink) Jiri Pirko
                   ` (3 preceding siblings ...)
  2014-01-22  8:05 ` [patch net-next 4/5] bonding: convert netlink to use slave data info api Jiri Pirko
@ 2014-01-22  8:05 ` Jiri Pirko
  2014-01-22 10:43 ` [patch net-next 6/6] rtnetlink: remove IFLA_SLAVES definition Jiri Pirko
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 13+ messages in thread
From: Jiri Pirko @ 2014-01-22  8:05 UTC (permalink / raw)
  To: netdev
  Cc: davem, fubar, vfalico, andy, sfeldma, stephen, vyasevic,
	nicolas.dichtel, john.r.fastabend

No longer used API bond-specific can be removed now. This is now handled
in a generic way in rtnl_link_ops.

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
---
 include/linux/netdevice.h | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 83ce2ae..e985231 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -921,9 +921,6 @@ struct netdev_phys_port_id {
  * int (*ndo_del_slave)(struct net_device *dev, struct net_device *slave_dev);
  *	Called to release previously enslaved netdev.
  *
- * int (*ndo_get_slave)(struct net_device *slave_dev, struct sk_buff *skb);
- *	Called to fill netlink skb with slave info.
- *
  *      Feature/offload setting functions.
  * netdev_features_t (*ndo_fix_features)(struct net_device *dev,
  *		netdev_features_t features);
@@ -1096,8 +1093,6 @@ struct net_device_ops {
 						 struct net_device *slave_dev);
 	int			(*ndo_del_slave)(struct net_device *dev,
 						 struct net_device *slave_dev);
-	int			(*ndo_get_slave)(struct net_device *slave_dev,
-						 struct sk_buff *skb);
 	netdev_features_t	(*ndo_fix_features)(struct net_device *dev,
 						    netdev_features_t features);
 	int			(*ndo_set_features)(struct net_device *dev,
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [patch net-next 6/6] rtnetlink: remove IFLA_SLAVES definition
  2014-01-22  8:05 [patch net-next 0/5] fix bonding slave info API (sysfs and netlink) Jiri Pirko
                   ` (4 preceding siblings ...)
  2014-01-22  8:05 ` [patch net-next 5/5] rtnetlink: remove ndo_get_slave Jiri Pirko
@ 2014-01-22 10:43 ` Jiri Pirko
  2014-01-23 20:47   ` David Miller
  2014-01-22 23:06 ` [patch net-next 0/5] fix bonding slave info API (sysfs and netlink) Scott Feldman
  2014-01-23  5:58 ` David Miller
  7 siblings, 1 reply; 13+ messages in thread
From: Jiri Pirko @ 2014-01-22 10:43 UTC (permalink / raw)
  To: netdev
  Cc: davem, fubar, vfalico, andy, sfeldma, stephen, vyasevic,
	nicolas.dichtel, john.r.fastabend

Not used anymore, and never should be.

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
---
 include/uapi/linux/if_link.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/include/uapi/linux/if_link.h b/include/uapi/linux/if_link.h
index b8fb352..ed7b2f8 100644
--- a/include/uapi/linux/if_link.h
+++ b/include/uapi/linux/if_link.h
@@ -144,7 +144,6 @@ enum {
 	IFLA_NUM_RX_QUEUES,
 	IFLA_CARRIER,
 	IFLA_PHYS_PORT_ID,
-	IFLA_BOND_SLAVE,
 	__IFLA_MAX
 };
 
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [patch net-next 2/5] rtnetlink: put "BOND" into nl attribute names which are related to bonding
  2014-01-22  8:05 ` [patch net-next 2/5] rtnetlink: put "BOND" into nl attribute names which are related to bonding Jiri Pirko
@ 2014-01-22 15:57   ` Nicolas Dichtel
  0 siblings, 0 replies; 13+ messages in thread
From: Nicolas Dichtel @ 2014-01-22 15:57 UTC (permalink / raw)
  To: Jiri Pirko, netdev
  Cc: davem, fubar, vfalico, andy, sfeldma, stephen, vyasevic,
	john.r.fastabend

Le 22/01/2014 09:05, Jiri Pirko a écrit :
> Signed-off-by: Jiri Pirko <jiri@resnulli.us>

You didn't tell it in the commit log, but you've also fix the API
to add the UNSPEC attribute (IFLA_BOND_SLAVE_UNSPEC), nice!

Acked-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>

> ---
>   drivers/net/bonding/bond_netlink.c | 12 ++++++------
>   include/uapi/linux/if_link.h       | 19 ++++++++++---------
>   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 21c6488..dd786a3 100644
> --- a/drivers/net/bonding/bond_netlink.c
> +++ b/drivers/net/bonding/bond_netlink.c
> @@ -27,27 +27,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;
>   	}
> diff --git a/include/uapi/linux/if_link.h b/include/uapi/linux/if_link.h
> index ba2f3bf..1f30b85 100644
> --- a/include/uapi/linux/if_link.h
> +++ b/include/uapi/linux/if_link.h
> @@ -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 */
>
> diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
> index 4f85de7..cace149 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)
>   {
>   	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;
>
>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [patch net-next 0/5] fix bonding slave info API (sysfs and netlink)
  2014-01-22  8:05 [patch net-next 0/5] fix bonding slave info API (sysfs and netlink) Jiri Pirko
                   ` (5 preceding siblings ...)
  2014-01-22 10:43 ` [patch net-next 6/6] rtnetlink: remove IFLA_SLAVES definition Jiri Pirko
@ 2014-01-22 23:06 ` Scott Feldman
  2014-01-23  5:58 ` David Miller
  7 siblings, 0 replies; 13+ messages in thread
From: Scott Feldman @ 2014-01-22 23:06 UTC (permalink / raw)
  To: Jiri Pirko
  Cc: Netdev, David S. Miller, Jay Vosburgh, Veaceslav Falico,
	Andy Gospodarek, Stephen Hemminger, vyasevic, nicolas.dichtel,
	john.r.fastabend


On Jan 22, 2014, at 12:05 AM, Jiri Pirko <jiri@resnulli.us> wrote:

> The main part of this patchset is the introduction of a generic way how
> to get/set info of slaves unsing rtnl_link_ops.
> 
> Jiri Pirko (5):
>  bonding: change name of sysfs dir for bonding slaves
>  rtnetlink: put "BOND" into nl attribute names which are related to
>    bonding
>  rtnetlink: provide api for getting and setting slave info
>  bonding: convert netlink to use slave data info api
>  rtnetlink: remove ndo_get_slave

Looks good.  You’ll need to update iproute2 patch I posted to Stephen to reflect the IFLA_BOND_SLAVE_xx renames and nesting.

(patch 6/6 was part of this, correct)?

Acked-by: Scott Feldman <sfeldma@cumulusnetworks.com>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [patch net-next 0/5] fix bonding slave info API (sysfs and netlink)
  2014-01-22  8:05 [patch net-next 0/5] fix bonding slave info API (sysfs and netlink) Jiri Pirko
                   ` (6 preceding siblings ...)
  2014-01-22 23:06 ` [patch net-next 0/5] fix bonding slave info API (sysfs and netlink) Scott Feldman
@ 2014-01-23  5:58 ` David Miller
  7 siblings, 0 replies; 13+ messages in thread
From: David Miller @ 2014-01-23  5:58 UTC (permalink / raw)
  To: jiri
  Cc: netdev, fubar, vfalico, andy, sfeldma, stephen, vyasevic,
	nicolas.dichtel, john.r.fastabend

From: Jiri Pirko <jiri@resnulli.us>
Date: Wed, 22 Jan 2014 09:05:52 +0100

> The main part of this patchset is the introduction of a generic way how
> to get/set info of slaves unsing rtnl_link_ops.

Series applied.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [patch net-next 6/6] rtnetlink: remove IFLA_SLAVES definition
  2014-01-22 10:43 ` [patch net-next 6/6] rtnetlink: remove IFLA_SLAVES definition Jiri Pirko
@ 2014-01-23 20:47   ` David Miller
  2014-01-23 21:33     ` Jiri Pirko
  0 siblings, 1 reply; 13+ messages in thread
From: David Miller @ 2014-01-23 20:47 UTC (permalink / raw)
  To: jiri
  Cc: netdev, fubar, vfalico, andy, sfeldma, stephen, vyasevic,
	nicolas.dichtel, john.r.fastabend

From: Jiri Pirko <jiri@resnulli.us>
Date: Wed, 22 Jan 2014 11:43:55 +0100

> Not used anymore, and never should be.
> 
> Signed-off-by: Jiri Pirko <jiri@resnulli.us>

First of all your Subject doesn't match the patch, the subject mentions
IFLA_SLAVES whereas the patch deletes IFLA_BOND_SLAVE.

Secondly, you can't remove this, otherwise the next IFLA_* value added
here will reuse that old number potentially breaking userland apps.

I'm not applying this, sorry.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [patch net-next 6/6] rtnetlink: remove IFLA_SLAVES definition
  2014-01-23 20:47   ` David Miller
@ 2014-01-23 21:33     ` Jiri Pirko
  2014-01-23 22:43       ` David Miller
  0 siblings, 1 reply; 13+ messages in thread
From: Jiri Pirko @ 2014-01-23 21:33 UTC (permalink / raw)
  To: David Miller
  Cc: netdev, fubar, vfalico, andy, sfeldma, stephen, vyasevic,
	nicolas.dichtel, john.r.fastabend

Thu, Jan 23, 2014 at 09:47:16PM CET, davem@davemloft.net wrote:
>From: Jiri Pirko <jiri@resnulli.us>
>Date: Wed, 22 Jan 2014 11:43:55 +0100
>
>> Not used anymore, and never should be.
>> 
>> Signed-off-by: Jiri Pirko <jiri@resnulli.us>
>
>First of all your Subject doesn't match the patch, the subject mentions
>IFLA_SLAVES whereas the patch deletes IFLA_BOND_SLAVE.

Yep, sorry, IFLA_SLAVE was the original name, which I removed. Should I
repost?

>
>Secondly, you can't remove this, otherwise the next IFLA_* value added
>here will reuse that old number potentially breaking userland apps.

This has been in net-next tree for 3 days. It was a mistake, I think
there is very legit to remove this now, isn't it?

>
>I'm not applying this, sorry.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [patch net-next 6/6] rtnetlink: remove IFLA_SLAVES definition
  2014-01-23 21:33     ` Jiri Pirko
@ 2014-01-23 22:43       ` David Miller
  0 siblings, 0 replies; 13+ messages in thread
From: David Miller @ 2014-01-23 22:43 UTC (permalink / raw)
  To: jiri
  Cc: netdev, fubar, vfalico, andy, sfeldma, stephen, vyasevic,
	nicolas.dichtel, john.r.fastabend

From: Jiri Pirko <jiri@resnulli.us>
Date: Thu, 23 Jan 2014 22:33:45 +0100

> Thu, Jan 23, 2014 at 09:47:16PM CET, davem@davemloft.net wrote:
>>From: Jiri Pirko <jiri@resnulli.us>
>>Date: Wed, 22 Jan 2014 11:43:55 +0100
>>
>>Secondly, you can't remove this, otherwise the next IFLA_* value added
>>here will reuse that old number potentially breaking userland apps.
> 
> This has been in net-next tree for 3 days. It was a mistake, I think
> there is very legit to remove this now, isn't it?

Fair enough, please resend with fixed Subj.

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2014-01-23 22:43 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-22  8:05 [patch net-next 0/5] fix bonding slave info API (sysfs and netlink) Jiri Pirko
2014-01-22  8:05 ` [patch net-next 1/5] bonding: change name of sysfs dir for bonding slaves Jiri Pirko
2014-01-22  8:05 ` [patch net-next 2/5] rtnetlink: put "BOND" into nl attribute names which are related to bonding Jiri Pirko
2014-01-22 15:57   ` Nicolas Dichtel
2014-01-22  8:05 ` [patch net-next 3/5] rtnetlink: provide api for getting and setting slave info Jiri Pirko
2014-01-22  8:05 ` [patch net-next 4/5] bonding: convert netlink to use slave data info api Jiri Pirko
2014-01-22  8:05 ` [patch net-next 5/5] rtnetlink: remove ndo_get_slave Jiri Pirko
2014-01-22 10:43 ` [patch net-next 6/6] rtnetlink: remove IFLA_SLAVES definition Jiri Pirko
2014-01-23 20:47   ` David Miller
2014-01-23 21:33     ` Jiri Pirko
2014-01-23 22:43       ` David Miller
2014-01-22 23:06 ` [patch net-next 0/5] fix bonding slave info API (sysfs and netlink) Scott Feldman
2014-01-23  5:58 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).