All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Ahern <dsahern@gmail.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH 3/3] iproute2: Add support for phys_port_name
Date: Thu, 26 Mar 2015 21:41:33 -0600	[thread overview]
Message-ID: <5514D16D.5010205@gmail.com> (raw)
In-Reply-To: <20150324155015.2dae6252@urahara>

On 3/24/15 4:50 PM, Stephen Hemminger wrote:
>> diff --git a/ip/ipaddress.c b/ip/ipaddress.c
>> index 99a6ab5977e3..9e65015b7a48 100644
>> --- a/ip/ipaddress.c
>> +++ b/ip/ipaddress.c
>> @@ -645,6 +645,9 @@ int print_linkinfo(const struct sockaddr_nl *who,
>>   				      b1, sizeof(b1)));
>>   	}
>>
>> +	if (tb[IFLA_PHYS_PORT_NAME])
>> +		fprintf(fp, "port name %s ", rta_getattr_str(tb[IFLA_PHYS_PORT_NAME]));
>> +
>>   	if (tb[IFLA_OPERSTATE])
>>   		print_operstate(fp, rta_getattr_u8(tb[IFLA_OPERSTATE]));
>>
>
> In general, this is a good idea, but there are several of issues.
> 1. There are programs that parse ip route output, therefore all new
>     fields need to go at the end.
> 2. The two word format 'port name' does not match other parts
> 3. Extra stuff usually goes int 'details' section
> 4. There are VPN scripts etc that expect all ip commands to
>     be invertable. I.e the output of ip link should also be easily
>     convertable to input.

The location of PORT_NAME is right after PORT_ID. I take it from this 
list you want it elsewhere. At the end?

And rather than 'port name' how about 'port-name'? no precedence for 
CamelCase and both 'port' and 'name' are too generic. 'pname' is not 
intuitive. Suggestions?

David

  reply	other threads:[~2015-03-27  3:41 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-16 15:46 [PATCH 1/3] net: add support for phys_port_name David Ahern
2015-03-16 15:46 ` [PATCH 2/3] rocker: " David Ahern
2015-03-16 15:46 ` [PATCH 3/3] iproute2: Add " David Ahern
2015-03-24 22:50   ` Stephen Hemminger
2015-03-27  3:41     ` David Ahern [this message]
2015-03-16 16:00 ` [PATCH 1/3] net: add " Jiri Pirko
2015-03-16 16:02   ` David Ahern
2015-03-16 16:15     ` Jiri Pirko
2015-03-17  3:29   ` David Ahern
  -- strict thread matches above, loose matches on Subject: below --
2015-03-17  3:27 [PATCH v2 " David Ahern
2015-03-17  3:27 ` [PATCH 3/3] iproute2: Add " David Ahern
2015-03-17  7:20   ` Jiri Pirko
2015-03-17 15:30 [PATCH v3 1/3] net: add " David Ahern
2015-03-17 15:30 ` [PATCH 3/3] iproute2: Add " David Ahern
2015-03-18  2:23 [PATCH v4 1/3] net: add " David Ahern
2015-03-18  2:23 ` [PATCH 3/3] iproute2: Add " David Ahern

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5514D16D.5010205@gmail.com \
    --to=dsahern@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.