Subject: Re: [PATCH net-next v3 2/2] iproute2: bridge vlan show new option to print ranges

From: roopa <[email-masked]>
Date: Sun, 25 Jan 2015 21:18:02 -0800

On 1/25/15, 8:35 PM, Scott Feldman wrote:
>> diff --git a/bridge/bridge.c b/bridge/bridge.c
>> index 5fcc552..88469ca 100644
>> --- a/bridge/bridge.c
>> +++ b/bridge/bridge.c
>> @@ -21,6 +21,7 @@ int resolve_hosts;
>>   int oneline = 0;
>>   int show_stats;
>>   int show_details;
>> +int compress_vlans;
>>   int timestamp;
>>   char * _SL_ = NULL;
>>
>> @@ -32,7 +33,8 @@ static void usage(void)
>>   "Usage: bridge [ OPTIONS ] OBJECT { COMMAND | help }\n"
>>   "where  OBJECT := { link | fdb | mdb | vlan | monitor }\n"
>>   "       OPTIONS := { -V[ersion] | -s[tatistics] | -d[etails] |\n"
>> -"                    -o[neline] | -t[imestamp] | -n[etns] name }\n");
>> +"                    -o[neline] | -t[imestamp] | -n[etns] name |\n"
>> +"                    -c[ompressvlans] }\n");
> This option is awkward at this level since it's specific to bridge vlan cmd.
>
> Is it even necessary?  The real user of compressed vlans isn't the
> "bridge show" cmd; just keep "bridge show" simple, listing each vlan
> per line.
without ranges it does get a bit difficult (or rather long) to read if 
there are many vlans (it was also a comment I received on v2).

All the available options whether they apply to the immediate 
sub-command or not are at the toplevel command today.
Hence the position (Not a big fan of the current name. suggestions welcome).

I would have loved to have the default output print ranges, If that is 
acceptable. But, that can break new iproute2 on older kernels (If that 
is something we should care about).

other option is keyword argument like maybe 'bridge vlan show 
compressed' or 'bridge vlan show ranges'

Thanks,
Roopa