Some random thoughts from a Monday morning...

[EMAIL PROTECTED] wrote:

One of the suggestions that have been discussed in  Project Brussels
is to provide an improvement on the popular "ndd -get /dev/<..> \?"
by providing, not just the names of the supported tuables, but
a short description of what the tunable means, allowed values,
and other useful info. A lot of useful info is already provided by "dladm show-linkprop". Currently (i.e., in Nevada), for example, this does:

LINK PROPERTY VALUE DEFAULT POSSIBLE bge0 zone -- -- --
so that, post-Brussels, this would get extended to something like the output
below:

LINK PROPERTY VALUE DEFAULT POSSIBLE bge1 zone -- -- -- bge1 link_duplex full full full, half, none
bge1         link_speed      1000           1000           10, 1000
bge1         link_status     up             up             up, down
bge1         adv_autoneg_cap 1              1              0, 1
bge1         default_mtu     9000           1500           0 - 9000


A link speed of "1000" is meaningless, plus it does not seem
to scale down to modem speed.  Either report the full number
(10000000, 10000000000) or abbreviate it meaingfullly:
10M, 10G, etc - the default output from "zfs list" is an
example of how this can be done:
NAME                   USED  AVAIL  REFER  MOUNTPOINT
biscuit               32.6G   152G  46.5K  /biscuit
biscuit/crashes        118M   152G   118M  /biscuit/crashes
biscuit/data          6.15M   152G  6.15M  /biscuit/data
biscuit/foo           25.5K   152G  25.5K  /biscuit/foo
biscuit/home          5.79G   152G  5.79G  /biscuit/home

As for what to display for "possible", I don't think that
this is meaningful here.  I would rather see the default
output just be "LINK", "PROPERTY", "VALUE" and "DEFAULT".

Additionally, what are you reporting at the MTU here?
The network layer MTU or the link layer MTU?
Does it make sense to report the network layer MTU
with a link layer device?  (ie. 1536 vs 1500.)

Something that I haven't seen discussed:

How does dladm see itself working with NICs that have
pluggable MAUs?  For example, if I have a NIC that has
a fibre GBIC in it for the MAU but I replace that GBIC
with a copper MAU, how would dladm cope with that?
Do I need to plumb/unplumb for this to be recognised?
Is the type of media also another useful trait here?
(This was perhaps more relevant in the time of 10M,
when there was 10Base2, 10BaseT and 10Base5 connectors
all on the same NIC, but can still be relevant today
for identifying whether fibre or copper is in use.)


It would be useful to have some additional information about the property
(for example, a pointer to the ieee802.3(5) man page for adv_autoneg_cap), but clearly, there is not much room left in the output above, if we
assume the standard 80 char window. Putting the description in its own
line (and interspersing that above) is also not likely to be universally appealing.


If you want to make "POSSIBLE" really useful, you might
have it auto-adjust, such that if a 1G card is plugged into
a 1G or 10G switch, it displays "10M, 100M, 1G" as the
possible line speeds but if it is plugged into a 100M
switch, it just displays "10M, 100M" as being possible.
I think I'd rather see some other dladm command line
thing where you did "dladm describe link_speed" and it
told you possible values.  But that may not even be
enough.  For example, if I set bge1 to be 10M, does
that then imply some kind of restriction on the MTU
size, given that basic ethernet is restricted to the
old frame size?  Similarly, there may also be some
kind of restrictions on the combinations of link speeds
and duplex.


I'd suggest having a command line option specific to
returning extended output, so you can have:
# dladm describe link_speed bge1
capabilities: 10M, 100M, 1G
possible: 10M, 100M
man page: bge(7)
blah blah blah blah...


Darren

_______________________________________________
networking-discuss mailing list
[email protected]

Reply via email to