netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch iproute2] iproute2: ipa: show switch id
@ 2015-07-08 15:08 Jiri Pirko
  2015-07-08 17:18 ` Andy Gospodarek
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Jiri Pirko @ 2015-07-08 15:08 UTC (permalink / raw)
  To: netdev; +Cc: stephen

We forgot to include this patch somehow. So do it now.

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
---
 ip/ipaddress.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/ip/ipaddress.c b/ip/ipaddress.c
index 85a81ba..b7b4e3e 100644
--- a/ip/ipaddress.c
+++ b/ip/ipaddress.c
@@ -688,6 +688,14 @@ int print_linkinfo(const struct sockaddr_nl *who,
 				      b1, sizeof(b1)));
 	}
 
+	if (tb[IFLA_PHYS_SWITCH_ID]) {
+		SPRINT_BUF(b1);
+		fprintf(fp, "switchid %s ",
+			hexstring_n2a(RTA_DATA(tb[IFLA_PHYS_SWITCH_ID]),
+				      RTA_PAYLOAD(tb[IFLA_PHYS_SWITCH_ID]),
+				      b1, sizeof(b1)));
+	}
+
 	if (tb[IFLA_OPERSTATE])
 		print_operstate(fp, rta_getattr_u8(tb[IFLA_OPERSTATE]));
 
-- 
1.9.3

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

* Re: [patch iproute2] iproute2: ipa: show switch id
  2015-07-08 15:08 [patch iproute2] iproute2: ipa: show switch id Jiri Pirko
@ 2015-07-08 17:18 ` Andy Gospodarek
  2015-07-08 21:29 ` David Ahern
  2015-07-09  1:05 ` Stephen Hemminger
  2 siblings, 0 replies; 7+ messages in thread
From: Andy Gospodarek @ 2015-07-08 17:18 UTC (permalink / raw)
  To: Jiri Pirko; +Cc: netdev, stephen

On Wed, Jul 08, 2015 at 05:08:18PM +0200, Jiri Pirko wrote:
> We forgot to include this patch somehow. So do it now.
I noticed this the other day and wondered where it was.  Thanks for
posting it before I searched archives wondering why it was not.

> 
> Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Acked-by: Andy Gospodarek <gospo@cumulusnetworks.com>

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

* Re: [patch iproute2] iproute2: ipa: show switch id
  2015-07-08 15:08 [patch iproute2] iproute2: ipa: show switch id Jiri Pirko
  2015-07-08 17:18 ` Andy Gospodarek
@ 2015-07-08 21:29 ` David Ahern
  2015-07-09  6:11   ` Jiri Pirko
  2015-07-09  1:05 ` Stephen Hemminger
  2 siblings, 1 reply; 7+ messages in thread
From: David Ahern @ 2015-07-08 21:29 UTC (permalink / raw)
  To: Jiri Pirko, netdev; +Cc: stephen

On 7/8/15 9:08 AM, Jiri Pirko wrote:
> We forgot to include this patch somehow. So do it now.
>
> Signed-off-by: Jiri Pirko <jiri@resnulli.us>
> ---
>   ip/ipaddress.c | 8 ++++++++
>   1 file changed, 8 insertions(+)
>
> diff --git a/ip/ipaddress.c b/ip/ipaddress.c
> index 85a81ba..b7b4e3e 100644
> --- a/ip/ipaddress.c
> +++ b/ip/ipaddress.c
> @@ -688,6 +688,14 @@ int print_linkinfo(const struct sockaddr_nl *who,
>   				      b1, sizeof(b1)));
>   	}
>
> +	if (tb[IFLA_PHYS_SWITCH_ID]) {
> +		SPRINT_BUF(b1);
> +		fprintf(fp, "switchid %s ",
> +			hexstring_n2a(RTA_DATA(tb[IFLA_PHYS_SWITCH_ID]),
> +				      RTA_PAYLOAD(tb[IFLA_PHYS_SWITCH_ID]),
> +				      b1, sizeof(b1)));
> +	}
> +
>   	if (tb[IFLA_OPERSTATE])
>   		print_operstate(fp, rta_getattr_u8(tb[IFLA_OPERSTATE]));
>
>

Do Stephen's comments about port-name apply here?
    http://www.spinics.net/lists/netdev/msg322693.html

I was wondering if this should go into -details output rather than the 
default.

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

* Re: [patch iproute2] iproute2: ipa: show switch id
  2015-07-08 15:08 [patch iproute2] iproute2: ipa: show switch id Jiri Pirko
  2015-07-08 17:18 ` Andy Gospodarek
  2015-07-08 21:29 ` David Ahern
@ 2015-07-09  1:05 ` Stephen Hemminger
  2015-07-09  6:09   ` Jiri Pirko
  2 siblings, 1 reply; 7+ messages in thread
From: Stephen Hemminger @ 2015-07-09  1:05 UTC (permalink / raw)
  To: Jiri Pirko; +Cc: netdev

On Wed,  8 Jul 2015 17:08:18 +0200
Jiri Pirko <jiri@resnulli.us> wrote:

>  
> +	if (tb[IFLA_PHYS_SWITCH_ID]) {
> +		SPRINT_BUF(b1);
> +		fprintf(fp, "switchid %s ",
> +			hexstring_n2a(RTA_DATA(tb[IFLA_PHYS_SWITCH_ID]),
> +				      RTA_PAYLOAD(tb[IFLA_PHYS_SWITCH_ID]),
> +				      b1, sizeof(b1)));
> +	}
> +

Ok, but why hex?

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

* Re: [patch iproute2] iproute2: ipa: show switch id
  2015-07-09  1:05 ` Stephen Hemminger
@ 2015-07-09  6:09   ` Jiri Pirko
  2015-07-09 22:22     ` Stephen Hemminger
  0 siblings, 1 reply; 7+ messages in thread
From: Jiri Pirko @ 2015-07-09  6:09 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: netdev

Thu, Jul 09, 2015 at 03:05:10AM CEST, stephen@networkplumber.org wrote:
>On Wed,  8 Jul 2015 17:08:18 +0200
>Jiri Pirko <jiri@resnulli.us> wrote:
>
>>  
>> +	if (tb[IFLA_PHYS_SWITCH_ID]) {
>> +		SPRINT_BUF(b1);
>> +		fprintf(fp, "switchid %s ",
>> +			hexstring_n2a(RTA_DATA(tb[IFLA_PHYS_SWITCH_ID]),
>> +				      RTA_PAYLOAD(tb[IFLA_PHYS_SWITCH_ID]),
>> +				      b1, sizeof(b1)));
>> +	}
>> +
>
>Ok, but why hex?

What else? It is an arbitrary byte array.

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

* Re: [patch iproute2] iproute2: ipa: show switch id
  2015-07-08 21:29 ` David Ahern
@ 2015-07-09  6:11   ` Jiri Pirko
  0 siblings, 0 replies; 7+ messages in thread
From: Jiri Pirko @ 2015-07-09  6:11 UTC (permalink / raw)
  To: David Ahern; +Cc: netdev, stephen

Wed, Jul 08, 2015 at 11:29:42PM CEST, dsahern@gmail.com wrote:
>On 7/8/15 9:08 AM, Jiri Pirko wrote:
>>We forgot to include this patch somehow. So do it now.
>>
>>Signed-off-by: Jiri Pirko <jiri@resnulli.us>
>>---
>>  ip/ipaddress.c | 8 ++++++++
>>  1 file changed, 8 insertions(+)
>>
>>diff --git a/ip/ipaddress.c b/ip/ipaddress.c
>>index 85a81ba..b7b4e3e 100644
>>--- a/ip/ipaddress.c
>>+++ b/ip/ipaddress.c
>>@@ -688,6 +688,14 @@ int print_linkinfo(const struct sockaddr_nl *who,
>>  				      b1, sizeof(b1)));
>>  	}
>>
>>+	if (tb[IFLA_PHYS_SWITCH_ID]) {
>>+		SPRINT_BUF(b1);
>>+		fprintf(fp, "switchid %s ",
>>+			hexstring_n2a(RTA_DATA(tb[IFLA_PHYS_SWITCH_ID]),
>>+				      RTA_PAYLOAD(tb[IFLA_PHYS_SWITCH_ID]),
>>+				      b1, sizeof(b1)));
>>+	}
>>+
>>  	if (tb[IFLA_OPERSTATE])
>>  		print_operstate(fp, rta_getattr_u8(tb[IFLA_OPERSTATE]));
>>
>>
>
>Do Stephen's comments about port-name apply here?
>   http://www.spinics.net/lists/netdev/msg322693.html
>
>I was wondering if this should go into -details output rather than the
>default.

I would like to have this in default. It is very important info for user
who has switch device. He should see this right away.

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

* Re: [patch iproute2] iproute2: ipa: show switch id
  2015-07-09  6:09   ` Jiri Pirko
@ 2015-07-09 22:22     ` Stephen Hemminger
  0 siblings, 0 replies; 7+ messages in thread
From: Stephen Hemminger @ 2015-07-09 22:22 UTC (permalink / raw)
  To: Jiri Pirko; +Cc: netdev

On Thu, 9 Jul 2015 08:09:18 +0200
Jiri Pirko <jiri@resnulli.us> wrote:

> Thu, Jul 09, 2015 at 03:05:10AM CEST, stephen@networkplumber.org wrote:
> >On Wed,  8 Jul 2015 17:08:18 +0200
> >Jiri Pirko <jiri@resnulli.us> wrote:
> >
> >>  
> >> +	if (tb[IFLA_PHYS_SWITCH_ID]) {
> >> +		SPRINT_BUF(b1);
> >> +		fprintf(fp, "switchid %s ",
> >> +			hexstring_n2a(RTA_DATA(tb[IFLA_PHYS_SWITCH_ID]),
> >> +				      RTA_PAYLOAD(tb[IFLA_PHYS_SWITCH_ID]),
> >> +				      b1, sizeof(b1)));
> >> +	}
> >> +
> >
> >Ok, but why hex?
> 
> What else? It is an arbitrary byte array.

Ok I though it was a number.

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

end of thread, other threads:[~2015-07-09 22:22 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-08 15:08 [patch iproute2] iproute2: ipa: show switch id Jiri Pirko
2015-07-08 17:18 ` Andy Gospodarek
2015-07-08 21:29 ` David Ahern
2015-07-09  6:11   ` Jiri Pirko
2015-07-09  1:05 ` Stephen Hemminger
2015-07-09  6:09   ` Jiri Pirko
2015-07-09 22:22     ` Stephen Hemminger

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).