All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH iproute2 1/3] ip-link: display parentid for netdevs
@ 2014-12-05 18:02 Andy Gospodarek
  2014-12-05 18:02 ` [PATCH net-next 2/3] netlink: IFLA_PHYS_SWITCH_ID to IFLA_PHYS_PARENT_ID Andy Gospodarek
  2014-12-05 18:02 ` [PATCH net-next 3/3] net: rename *_switch_parent_id_get to *_parent_id_get Andy Gospodarek
  0 siblings, 2 replies; 7+ messages in thread
From: Andy Gospodarek @ 2014-12-05 18:02 UTC (permalink / raw)
  To: netdev; +Cc: sfeldma, jpirko

Display parentid for netdev that may actually be associated with device
capable of offloading network forwarding.  Useful to identify which
netdevs are connected device when multiple forwarding elements are on a
system.

Based on patch from Jiri Pirko but with a different name for netlink
attribute.

Signed-off-by: Andy Gospodarek <gospo@cumulusnetworks.com>
---

I did not include definition for IFLA_PHYS_PARENT_ID as Stephen
indicated that patching if_link.h isn't needed since it will get pulled
later.

 ip/ipaddress.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/ip/ipaddress.c b/ip/ipaddress.c
index 4d99324..d155085 100644
--- a/ip/ipaddress.c
+++ b/ip/ipaddress.c
@@ -581,6 +581,14 @@ int print_linkinfo(const struct sockaddr_nl *who,
 		fprintf(fp, "master %s ", ll_idx_n2a(*(int*)RTA_DATA(tb[IFLA_MASTER]), b1));
 	}
 
+	if (tb[IFLA_PHYS_PARENT_ID]) {
+		SPRINT_BUF(b1);
+		fprintf(fp, "parentid %s ",
+			hexstring_n2a(RTA_DATA(tb[IFLA_PHYS_PARENT_ID]),
+				      RTA_PAYLOAD(tb[IFLA_PHYS_PARENT_ID]),
+				      b1, sizeof(b1)));
+	}
+
 	if (tb[IFLA_PHYS_PORT_ID]) {
 		SPRINT_BUF(b1);
 		fprintf(fp, "portid %s ",
-- 
1.9.3

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

* [PATCH net-next 2/3] netlink: IFLA_PHYS_SWITCH_ID to IFLA_PHYS_PARENT_ID
  2014-12-05 18:02 [PATCH iproute2 1/3] ip-link: display parentid for netdevs Andy Gospodarek
@ 2014-12-05 18:02 ` Andy Gospodarek
  2014-12-08 15:17   ` Jiri Pirko
  2014-12-05 18:02 ` [PATCH net-next 3/3] net: rename *_switch_parent_id_get to *_parent_id_get Andy Gospodarek
  1 sibling, 1 reply; 7+ messages in thread
From: Andy Gospodarek @ 2014-12-05 18:02 UTC (permalink / raw)
  To: netdev; +Cc: sfeldma, jpirko

There has been much discussion about proper nomenclature to use for this
and I would prefer parent rather than calling every forwarding element a
switch.

Signed-off-by: Andy Gospodarek <gospo@cumulusnetworks.com>
---
 include/uapi/linux/if_link.h | 2 +-
 net/core/rtnetlink.c         | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/uapi/linux/if_link.h b/include/uapi/linux/if_link.h
index f7d0d2d..3d8edd8 100644
--- a/include/uapi/linux/if_link.h
+++ b/include/uapi/linux/if_link.h
@@ -145,7 +145,7 @@ enum {
 	IFLA_CARRIER,
 	IFLA_PHYS_PORT_ID,
 	IFLA_CARRIER_CHANGES,
-	IFLA_PHYS_SWITCH_ID,
+	IFLA_PHYS_PARENT_ID,
 	__IFLA_MAX
 };
 
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index 61cb7e7..1fe0a16 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -982,7 +982,7 @@ static int rtnl_phys_switch_id_fill(struct sk_buff *skb, struct net_device *dev)
 		return err;
 	}
 
-	if (nla_put(skb, IFLA_PHYS_SWITCH_ID, psid.id_len, psid.id))
+	if (nla_put(skb, IFLA_PHYS_PARENT_ID, psid.id_len, psid.id))
 		return -EMSGSIZE;
 
 	return 0;
@@ -1222,7 +1222,7 @@ static const struct nla_policy ifla_policy[IFLA_MAX+1] = {
 	[IFLA_NUM_RX_QUEUES]	= { .type = NLA_U32 },
 	[IFLA_PHYS_PORT_ID]	= { .type = NLA_BINARY, .len = MAX_PHYS_ITEM_ID_LEN },
 	[IFLA_CARRIER_CHANGES]	= { .type = NLA_U32 },  /* ignored */
-	[IFLA_PHYS_SWITCH_ID]	= { .type = NLA_BINARY, .len = MAX_PHYS_ITEM_ID_LEN },
+	[IFLA_PHYS_PARENT_ID]	= { .type = NLA_BINARY, .len = MAX_PHYS_ITEM_ID_LEN },
 };
 
 static const struct nla_policy ifla_info_policy[IFLA_INFO_MAX+1] = {
-- 
1.9.3

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

* [PATCH net-next 3/3] net: rename *_switch_parent_id_get to *_parent_id_get
  2014-12-05 18:02 [PATCH iproute2 1/3] ip-link: display parentid for netdevs Andy Gospodarek
  2014-12-05 18:02 ` [PATCH net-next 2/3] netlink: IFLA_PHYS_SWITCH_ID to IFLA_PHYS_PARENT_ID Andy Gospodarek
@ 2014-12-05 18:02 ` Andy Gospodarek
  1 sibling, 0 replies; 7+ messages in thread
From: Andy Gospodarek @ 2014-12-05 18:02 UTC (permalink / raw)
  To: netdev; +Cc: sfeldma, jpirko

Clean up ops to get parent_id for netdev by dropping 'switch' from the
names.

Signed-off-by: Andy Gospodarek <gospo@cumulusnetworks.com>
---
 Documentation/networking/switchdev.txt | 19 +++++++++----------
 drivers/net/ethernet/rocker/rocker.c   |  4 ++--
 include/linux/netdevice.h              |  2 +-
 include/net/switchdev.h                |  4 ++--
 net/core/net-sysfs.c                   |  2 +-
 net/core/rtnetlink.c                   |  2 +-
 net/switchdev/switchdev.c              | 12 ++++++------
 7 files changed, 22 insertions(+), 23 deletions(-)

diff --git a/Documentation/networking/switchdev.txt b/Documentation/networking/switchdev.txt
index f981a92..5afc1a3 100644
--- a/Documentation/networking/switchdev.txt
+++ b/Documentation/networking/switchdev.txt
@@ -46,14 +46,13 @@ of the switch chip. eth0 and eth1 are instances of some other existing driver.
 The only difference of the switch-port netdevice from the ordinary netdevice
 is that is implements couple more NDOs:
 
-  ndo_switch_parent_id_get - This returns the same ID for two port netdevices
-			     of the same physical switch chip. This is
-			     mandatory to be implemented by all switch drivers
-			     and serves the caller for recognition of a port
-			     netdevice.
-  ndo_switch_parent_* - Functions that serve for a manipulation of the switch
-			chip itself (it can be though of as a "parent" of the
-			port, therefore the name). They are not port-specific.
-			Caller might use arbitrary port netdevice of the same
-			switch and it will make no difference.
+  ndo_parent_id_get - This returns the same ID for two port netdevices of the
+		      same physical switch chip. This is mandatory to be
+		      implemented by all switch drivers and serves the caller for
+		      recognition of a port netdevice.
+  ndo_parent_* - Functions that serve for a manipulation of the switch chip
+		 itself (it can be though of as a "parent" of the port,
+		 therefore the name). They are not port-specific.  Caller might
+		 use arbitrary port netdevice of the same switch and it will
+		 make no difference.
   ndo_switch_port_* - Functions that serve for a port-specific manipulation.
diff --git a/drivers/net/ethernet/rocker/rocker.c b/drivers/net/ethernet/rocker/rocker.c
index fded127..baa2ac8 100644
--- a/drivers/net/ethernet/rocker/rocker.c
+++ b/drivers/net/ethernet/rocker/rocker.c
@@ -3762,7 +3762,7 @@ static int rocker_port_bridge_getlink(struct sk_buff *skb, u32 pid, u32 seq,
 				       rocker_port->brport_flags, mask);
 }
 
-static int rocker_port_switch_parent_id_get(struct net_device *dev,
+static int rocker_port_parent_id_get(struct net_device *dev,
 					    struct netdev_phys_item_id *psid)
 {
 	struct rocker_port *rocker_port = netdev_priv(dev);
@@ -3792,7 +3792,7 @@ static const struct net_device_ops rocker_port_netdev_ops = {
 	.ndo_fdb_dump			= rocker_port_fdb_dump,
 	.ndo_bridge_setlink		= rocker_port_bridge_setlink,
 	.ndo_bridge_getlink		= rocker_port_bridge_getlink,
-	.ndo_switch_parent_id_get	= rocker_port_switch_parent_id_get,
+	.ndo_parent_id_get		= rocker_port_parent_id_get,
 	.ndo_switch_port_stp_update	= rocker_port_switch_port_stp_update,
 };
 
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 29c92ee..5c384b3 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1181,7 +1181,7 @@ struct net_device_ops {
 	bool			(*ndo_gso_check) (struct sk_buff *skb,
 						  struct net_device *dev);
 #ifdef CONFIG_NET_SWITCHDEV
-	int			(*ndo_switch_parent_id_get)(struct net_device *dev,
+	int			(*ndo_parent_id_get)(struct net_device *dev,
 							    struct netdev_phys_item_id *psid);
 	int			(*ndo_switch_port_stp_update)(struct net_device *dev,
 							      u8 state);
diff --git a/include/net/switchdev.h b/include/net/switchdev.h
index 8a6d164..a16502c 100644
--- a/include/net/switchdev.h
+++ b/include/net/switchdev.h
@@ -14,13 +14,13 @@
 
 #ifdef CONFIG_NET_SWITCHDEV
 
-int netdev_switch_parent_id_get(struct net_device *dev,
+int netdev_parent_id_get(struct net_device *dev,
 				struct netdev_phys_item_id *psid);
 int netdev_switch_port_stp_update(struct net_device *dev, u8 state);
 
 #else
 
-static inline int netdev_switch_parent_id_get(struct net_device *dev,
+static inline int netdev_parent_id_get(struct net_device *dev,
 					      struct netdev_phys_item_id *psid)
 {
 	return -EOPNOTSUPP;
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c
index 9993412..a9e27ef 100644
--- a/net/core/net-sysfs.c
+++ b/net/core/net-sysfs.c
@@ -429,7 +429,7 @@ static ssize_t phys_switch_id_show(struct device *dev,
 	if (dev_isalive(netdev)) {
 		struct netdev_phys_item_id ppid;
 
-		ret = netdev_switch_parent_id_get(netdev, &ppid);
+		ret = netdev_parent_id_get(netdev, &ppid);
 		if (!ret)
 			ret = sprintf(buf, "%*phN\n", ppid.id_len, ppid.id);
 	}
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index 1fe0a16..37bd62f 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -975,7 +975,7 @@ static int rtnl_phys_switch_id_fill(struct sk_buff *skb, struct net_device *dev)
 	int err;
 	struct netdev_phys_item_id psid;
 
-	err = netdev_switch_parent_id_get(dev, &psid);
+	err = netdev_parent_id_get(dev, &psid);
 	if (err) {
 		if (err == -EOPNOTSUPP)
 			return 0;
diff --git a/net/switchdev/switchdev.c b/net/switchdev/switchdev.c
index d162b21..c3e8fb28 100644
--- a/net/switchdev/switchdev.c
+++ b/net/switchdev/switchdev.c
@@ -15,22 +15,22 @@
 #include <net/switchdev.h>
 
 /**
- *	netdev_switch_parent_id_get - Get ID of a switch
+ *	netdev_switch_id_get - Get ID of a switch
  *	@dev: port device
  *	@psid: switch ID
  *
  *	Get ID of a switch this port is part of.
  */
-int netdev_switch_parent_id_get(struct net_device *dev,
+int netdev_parent_id_get(struct net_device *dev,
 				struct netdev_phys_item_id *psid)
 {
 	const struct net_device_ops *ops = dev->netdev_ops;
 
-	if (!ops->ndo_switch_parent_id_get)
+	if (!ops->ndo_parent_id_get)
 		return -EOPNOTSUPP;
-	return ops->ndo_switch_parent_id_get(dev, psid);
+	return ops->ndo_parent_id_get(dev, psid);
 }
-EXPORT_SYMBOL(netdev_switch_parent_id_get);
+EXPORT_SYMBOL(netdev_parent_id_get);
 
 /**
  *	netdev_switch_port_stp_update - Notify switch device port of STP
@@ -46,7 +46,7 @@ int netdev_switch_port_stp_update(struct net_device *dev, u8 state)
 
 	if (!ops->ndo_switch_port_stp_update)
 		return -EOPNOTSUPP;
-	WARN_ON(!ops->ndo_switch_parent_id_get);
+	WARN_ON(!ops->ndo_parent_id_get);
 	return ops->ndo_switch_port_stp_update(dev, state);
 }
 EXPORT_SYMBOL(netdev_switch_port_stp_update);
-- 
1.9.3

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

* Re: [PATCH net-next 2/3] netlink: IFLA_PHYS_SWITCH_ID to IFLA_PHYS_PARENT_ID
  2014-12-05 18:02 ` [PATCH net-next 2/3] netlink: IFLA_PHYS_SWITCH_ID to IFLA_PHYS_PARENT_ID Andy Gospodarek
@ 2014-12-08 15:17   ` Jiri Pirko
  2014-12-08 15:37     ` Andy Gospodarek
  0 siblings, 1 reply; 7+ messages in thread
From: Jiri Pirko @ 2014-12-08 15:17 UTC (permalink / raw)
  To: Andy Gospodarek; +Cc: netdev, sfeldma, jpirko

Fri, Dec 05, 2014 at 07:02:16PM CET, gospo@cumulusnetworks.com wrote:
>There has been much discussion about proper nomenclature to use for this
>and I would prefer parent rather than calling every forwarding element a
>switch.

Andy, I must say I really do not like just plain "parent". It is really
not clear what it means as it can mean 1000 things.

I know "switch" is not ideal but everytime anyone is talking about these
kind of forwarding devices, they use word "switch" even if it is not
accurate and everyone knows what they are talking about. Nobody uses
"parent".

For me this is nack for this patchset.

Jiri

>
>Signed-off-by: Andy Gospodarek <gospo@cumulusnetworks.com>
>---
> include/uapi/linux/if_link.h | 2 +-
> net/core/rtnetlink.c         | 4 ++--
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
>diff --git a/include/uapi/linux/if_link.h b/include/uapi/linux/if_link.h
>index f7d0d2d..3d8edd8 100644
>--- a/include/uapi/linux/if_link.h
>+++ b/include/uapi/linux/if_link.h
>@@ -145,7 +145,7 @@ enum {
> 	IFLA_CARRIER,
> 	IFLA_PHYS_PORT_ID,
> 	IFLA_CARRIER_CHANGES,
>-	IFLA_PHYS_SWITCH_ID,
>+	IFLA_PHYS_PARENT_ID,
> 	__IFLA_MAX
> };
> 
>diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
>index 61cb7e7..1fe0a16 100644
>--- a/net/core/rtnetlink.c
>+++ b/net/core/rtnetlink.c
>@@ -982,7 +982,7 @@ static int rtnl_phys_switch_id_fill(struct sk_buff *skb, struct net_device *dev)
> 		return err;
> 	}
> 
>-	if (nla_put(skb, IFLA_PHYS_SWITCH_ID, psid.id_len, psid.id))
>+	if (nla_put(skb, IFLA_PHYS_PARENT_ID, psid.id_len, psid.id))
> 		return -EMSGSIZE;
> 
> 	return 0;
>@@ -1222,7 +1222,7 @@ static const struct nla_policy ifla_policy[IFLA_MAX+1] = {
> 	[IFLA_NUM_RX_QUEUES]	= { .type = NLA_U32 },
> 	[IFLA_PHYS_PORT_ID]	= { .type = NLA_BINARY, .len = MAX_PHYS_ITEM_ID_LEN },
> 	[IFLA_CARRIER_CHANGES]	= { .type = NLA_U32 },  /* ignored */
>-	[IFLA_PHYS_SWITCH_ID]	= { .type = NLA_BINARY, .len = MAX_PHYS_ITEM_ID_LEN },
>+	[IFLA_PHYS_PARENT_ID]	= { .type = NLA_BINARY, .len = MAX_PHYS_ITEM_ID_LEN },
> };
> 
> static const struct nla_policy ifla_info_policy[IFLA_INFO_MAX+1] = {
>-- 
>1.9.3
>

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

* Re: [PATCH net-next 2/3] netlink: IFLA_PHYS_SWITCH_ID to IFLA_PHYS_PARENT_ID
  2014-12-08 15:17   ` Jiri Pirko
@ 2014-12-08 15:37     ` Andy Gospodarek
  2014-12-08 16:41       ` Jiri Pirko
  0 siblings, 1 reply; 7+ messages in thread
From: Andy Gospodarek @ 2014-12-08 15:37 UTC (permalink / raw)
  To: Jiri Pirko; +Cc: netdev, sfeldma

On Mon, Dec 08, 2014 at 04:17:14PM +0100, Jiri Pirko wrote:
> Fri, Dec 05, 2014 at 07:02:16PM CET, gospo@cumulusnetworks.com wrote:
> >There has been much discussion about proper nomenclature to use for this
> >and I would prefer parent rather than calling every forwarding element a
> >switch.
> 
> Andy, I must say I really do not like just plain "parent". It is really
> not clear what it means as it can mean 1000 things.
> 
> I know "switch" is not ideal but everytime anyone is talking about these
> kind of forwarding devices, they use word "switch" even if it is not
> accurate and everyone knows what they are talking about. Nobody uses
> "parent".

Well of course they are not going to use it until it's committed.  ;-)

> For me this is nack for this patchset.

Thanks for the review.  I am not big marketing person, so it was not
clear to me what was ideal.  Due to parent already being in the code
and having as a logical description of the relationship (parent
switch/router device and sibling network interfaces -- like sibling CPU
cores on the same socket).

I do really want to collectively come up with something other than
switch for everything.  Those L3 ops with 'switch' in the name will
feel really awkward....

> 
> Jiri
> 
> >
> >Signed-off-by: Andy Gospodarek <gospo@cumulusnetworks.com>
> >---
> > include/uapi/linux/if_link.h | 2 +-
> > net/core/rtnetlink.c         | 4 ++--
> > 2 files changed, 3 insertions(+), 3 deletions(-)
> >
> >diff --git a/include/uapi/linux/if_link.h b/include/uapi/linux/if_link.h
> >index f7d0d2d..3d8edd8 100644
> >--- a/include/uapi/linux/if_link.h
> >+++ b/include/uapi/linux/if_link.h
> >@@ -145,7 +145,7 @@ enum {
> > 	IFLA_CARRIER,
> > 	IFLA_PHYS_PORT_ID,
> > 	IFLA_CARRIER_CHANGES,
> >-	IFLA_PHYS_SWITCH_ID,
> >+	IFLA_PHYS_PARENT_ID,
> > 	__IFLA_MAX
> > };
> > 
> >diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
> >index 61cb7e7..1fe0a16 100644
> >--- a/net/core/rtnetlink.c
> >+++ b/net/core/rtnetlink.c
> >@@ -982,7 +982,7 @@ static int rtnl_phys_switch_id_fill(struct sk_buff *skb, struct net_device *dev)
> > 		return err;
> > 	}
> > 
> >-	if (nla_put(skb, IFLA_PHYS_SWITCH_ID, psid.id_len, psid.id))
> >+	if (nla_put(skb, IFLA_PHYS_PARENT_ID, psid.id_len, psid.id))
> > 		return -EMSGSIZE;
> > 
> > 	return 0;
> >@@ -1222,7 +1222,7 @@ static const struct nla_policy ifla_policy[IFLA_MAX+1] = {
> > 	[IFLA_NUM_RX_QUEUES]	= { .type = NLA_U32 },
> > 	[IFLA_PHYS_PORT_ID]	= { .type = NLA_BINARY, .len = MAX_PHYS_ITEM_ID_LEN },
> > 	[IFLA_CARRIER_CHANGES]	= { .type = NLA_U32 },  /* ignored */
> >-	[IFLA_PHYS_SWITCH_ID]	= { .type = NLA_BINARY, .len = MAX_PHYS_ITEM_ID_LEN },
> >+	[IFLA_PHYS_PARENT_ID]	= { .type = NLA_BINARY, .len = MAX_PHYS_ITEM_ID_LEN },
> > };
> > 
> > static const struct nla_policy ifla_info_policy[IFLA_INFO_MAX+1] = {
> >-- 
> >1.9.3
> >

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

* Re: [PATCH net-next 2/3] netlink: IFLA_PHYS_SWITCH_ID to IFLA_PHYS_PARENT_ID
  2014-12-08 15:37     ` Andy Gospodarek
@ 2014-12-08 16:41       ` Jiri Pirko
  2014-12-08 17:49         ` Andy Gospodarek
  0 siblings, 1 reply; 7+ messages in thread
From: Jiri Pirko @ 2014-12-08 16:41 UTC (permalink / raw)
  To: Andy Gospodarek; +Cc: netdev, sfeldma

Mon, Dec 08, 2014 at 04:37:47PM CET, gospo@cumulusnetworks.com wrote:
>On Mon, Dec 08, 2014 at 04:17:14PM +0100, Jiri Pirko wrote:
>> Fri, Dec 05, 2014 at 07:02:16PM CET, gospo@cumulusnetworks.com wrote:
>> >There has been much discussion about proper nomenclature to use for this
>> >and I would prefer parent rather than calling every forwarding element a
>> >switch.
>> 
>> Andy, I must say I really do not like just plain "parent". It is really
>> not clear what it means as it can mean 1000 things.
>> 
>> I know "switch" is not ideal but everytime anyone is talking about these
>> kind of forwarding devices, they use word "switch" even if it is not
>> accurate and everyone knows what they are talking about. Nobody uses
>> "parent".
>
>Well of course they are not going to use it until it's committed.  ;-)


Do you seriously expect people talking about "parents" instead of
"switches". I doubt that...

>
>> For me this is nack for this patchset.
>
>Thanks for the review.  I am not big marketing person, so it was not
>clear to me what was ideal.  Due to parent already being in the code
>and having as a logical description of the relationship (parent
>switch/router device and sibling network interfaces -- like sibling CPU
>cores on the same socket).
>
>I do really want to collectively come up with something other than
>switch for everything.  Those L3 ops with 'switch' in the name will
>feel really awkward....


I say it is not optimal, but I did not see any better proposal...


>
>> 
>> Jiri
>> 
>> >
>> >Signed-off-by: Andy Gospodarek <gospo@cumulusnetworks.com>
>> >---
>> > include/uapi/linux/if_link.h | 2 +-
>> > net/core/rtnetlink.c         | 4 ++--
>> > 2 files changed, 3 insertions(+), 3 deletions(-)
>> >
>> >diff --git a/include/uapi/linux/if_link.h b/include/uapi/linux/if_link.h
>> >index f7d0d2d..3d8edd8 100644
>> >--- a/include/uapi/linux/if_link.h
>> >+++ b/include/uapi/linux/if_link.h
>> >@@ -145,7 +145,7 @@ enum {
>> > 	IFLA_CARRIER,
>> > 	IFLA_PHYS_PORT_ID,
>> > 	IFLA_CARRIER_CHANGES,
>> >-	IFLA_PHYS_SWITCH_ID,
>> >+	IFLA_PHYS_PARENT_ID,
>> > 	__IFLA_MAX
>> > };
>> > 
>> >diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
>> >index 61cb7e7..1fe0a16 100644
>> >--- a/net/core/rtnetlink.c
>> >+++ b/net/core/rtnetlink.c
>> >@@ -982,7 +982,7 @@ static int rtnl_phys_switch_id_fill(struct sk_buff *skb, struct net_device *dev)
>> > 		return err;
>> > 	}
>> > 
>> >-	if (nla_put(skb, IFLA_PHYS_SWITCH_ID, psid.id_len, psid.id))
>> >+	if (nla_put(skb, IFLA_PHYS_PARENT_ID, psid.id_len, psid.id))
>> > 		return -EMSGSIZE;
>> > 
>> > 	return 0;
>> >@@ -1222,7 +1222,7 @@ static const struct nla_policy ifla_policy[IFLA_MAX+1] = {
>> > 	[IFLA_NUM_RX_QUEUES]	= { .type = NLA_U32 },
>> > 	[IFLA_PHYS_PORT_ID]	= { .type = NLA_BINARY, .len = MAX_PHYS_ITEM_ID_LEN },
>> > 	[IFLA_CARRIER_CHANGES]	= { .type = NLA_U32 },  /* ignored */
>> >-	[IFLA_PHYS_SWITCH_ID]	= { .type = NLA_BINARY, .len = MAX_PHYS_ITEM_ID_LEN },
>> >+	[IFLA_PHYS_PARENT_ID]	= { .type = NLA_BINARY, .len = MAX_PHYS_ITEM_ID_LEN },
>> > };
>> > 
>> > static const struct nla_policy ifla_info_policy[IFLA_INFO_MAX+1] = {
>> >-- 
>> >1.9.3
>> >
>--
>To unsubscribe from this list: send the line "unsubscribe netdev" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH net-next 2/3] netlink: IFLA_PHYS_SWITCH_ID to IFLA_PHYS_PARENT_ID
  2014-12-08 16:41       ` Jiri Pirko
@ 2014-12-08 17:49         ` Andy Gospodarek
  0 siblings, 0 replies; 7+ messages in thread
From: Andy Gospodarek @ 2014-12-08 17:49 UTC (permalink / raw)
  To: Jiri Pirko; +Cc: netdev, sfeldma

On Mon, Dec 08, 2014 at 05:41:43PM +0100, Jiri Pirko wrote:
> Mon, Dec 08, 2014 at 04:37:47PM CET, gospo@cumulusnetworks.com wrote:
> >On Mon, Dec 08, 2014 at 04:17:14PM +0100, Jiri Pirko wrote:
> >> Fri, Dec 05, 2014 at 07:02:16PM CET, gospo@cumulusnetworks.com wrote:
> >> >There has been much discussion about proper nomenclature to use for this
> >> >and I would prefer parent rather than calling every forwarding element a
> >> >switch.
> >> 
> >> Andy, I must say I really do not like just plain "parent". It is really
> >> not clear what it means as it can mean 1000 things.
> >> 
> >> I know "switch" is not ideal but everytime anyone is talking about these
> >> kind of forwarding devices, they use word "switch" even if it is not
> >> accurate and everyone knows what they are talking about. Nobody uses
> >> "parent".
> >
> >Well of course they are not going to use it until it's committed.  ;-)
> 
> 
> Do you seriously expect people talking about "parents" instead of
"Parent device" -- absolutely

> "switches". I doubt that...
Agree to disagree, I guess! 

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

end of thread, other threads:[~2014-12-08 17:49 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-05 18:02 [PATCH iproute2 1/3] ip-link: display parentid for netdevs Andy Gospodarek
2014-12-05 18:02 ` [PATCH net-next 2/3] netlink: IFLA_PHYS_SWITCH_ID to IFLA_PHYS_PARENT_ID Andy Gospodarek
2014-12-08 15:17   ` Jiri Pirko
2014-12-08 15:37     ` Andy Gospodarek
2014-12-08 16:41       ` Jiri Pirko
2014-12-08 17:49         ` Andy Gospodarek
2014-12-05 18:02 ` [PATCH net-next 3/3] net: rename *_switch_parent_id_get to *_parent_id_get Andy Gospodarek

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.