On Tue, Jan 30, 2007 at 01:07:20PM +0800, Peter Memishian wrote:
> 
>  > As you might know that the Clearview vanity naming component is
>  > proposing to add a "-l" option to specify the link of various dladm
>  > subcommands. For example, "dladm create-vlan -l net0 -v 28 vlan1" is to
>  > create a VLAN vlan1 over link net0.
>  > 
>  > But then we found that "-l" is already used in the create-aggr
>  > subcommand to specify the LACP mode.
>  > 
>  > We can think of several options to solve this problem:
>  > 
>  > 1. we can choose not to introduce another option, but simply use the 
>  > original "-d" option to specify the link. Although it might be somewhat 
>  > misleading because the link is not really a *d*evice, but from the user's 
>  > perspective, it might not necessarily a bad thing. Plus "-d" is used in 
>  > snoop to specify a link anyway.
>  > 
>  > 2. use "-l" to specify both link and the LACP mode. Because link name
>  > always ends with a digit, so that we can differentiate these two cases.
>  >

this seems fine. what do you display in usage()?
both '-l' and '-L'? it might be less confusing to just display '-L' in usage()
and leave the '-l' in the manpage.

eric

 
>  > 3. use "-L" to specify the link, and leave "-l" to specify the LACP mode. 
> I 
>  > personally don't like this option.
> 
> As the person who suggested (2), let me clarify my suggestion: it was that
> we change the documentation create-aggr and modify-aggr to state that "-L"
> changes the LACP mode, but that for compatibility, we continue to quietly
> recognize "-l off", "-l active", and "-l passive" as synonyms for "-L
> off", "-L active" and "-L passive".  My reasoning for this is threefold:
> 
>   1. As Cathy mentioned, we will be making a split -- especially apparent
>      in dladm -- between devices and links.  It is possible (though not
>      recommended) for an administrator to have two devices, A and B, with
>      link names B and A.  Having them to specify "-d A" and actually end
>      up with link B fails the principle of least surprise.  I would rather
>      have "-d A" remain a legacy way to refer to device A (regardless of
>      its link name), and "-l A" refer to link A (device B here).  We would
>      of course encourage people to use "-l" in general with dladm.
> 
>   2. Also related to the principle of least surprise, I'd like all dladm
>      subcommands that operate on links to use the same option letter.  So
>      if we choose "-d" for create-aggr, I'd want to use "-d" across the
>      board.  But then we risk deepening the confusion between links and
>      devices stated above -- and all to sidestep what seems to be a rarely
>      used option to a command that has only been available to customers
>      for a year or so.  Since dladm will likely last for decades, that
>      doesn't seem like the right trade-off to me.  Likewise, in a decade,
>      no one will remember that for a couple of S10 update releases, "-l"
>      was the documented way to set the LACP mode for create-aggr.
> 
>   3. Speaking of consistency, show-aggr already uses -L to show LACP
>      information.  So using -L to set LACP mode with create-aggr and
>      modify-aggr seems more consistent anyway.
> 
> -- 
> meem

Reply via email to