On 06/30/09 22:08, Min Miles Xu wrote:
Garrett D'Amore wrote:
Peter Memishian wrote:
> I was looking at transitioning my driver from ndd to dladm,
> and I was wondering if there is a way to get a list, from
> the command line, of all private properties that a driver supports.
> > Eg, the bge driver supports some private properties like
"_drain_max":
> > # dladm show-linkprop bge0 -p _drain_max
> LINK PROPERTY PERM VALUE DEFAULT
POSSIBLE
> bge0 _drain_max rw 64 64 --
> > Trying the ndd trick (?) doesn't seem to work:
> > #dladm show-linkprop bge0 -p \?
> LINK PROPERTY PERM VALUE DEFAULT
POSSIBLE
> dladm: warning: cannot get link property '?' for bge0: object not
found
> bge0 ?
> > > So.. are private properties really private now?
Yes, this is by design: we don't want users poking around looking for
random low-level screws to turn. In general, users should learn about
private properties for a given driver by reading that driver's
documentation, at which point hopefully they will understand a bit more
about what they are actually fiddling with.
I'm not sure I agree with this philosophy, though I can appreciate
the sentiment. There are times when you know you want to enable a
tunable, but can't remember its name. Sometimes just using ndd's '?'
is helpful to see what the tunable is, and documentation can get out
of date.
I think dladm should have a way to enumerate these private properties.
-- Garrett
I think the very first point we need to learn is that what is the
expected users of the private properties. The system administrators,
the service engineers or the driver developers? I was told the private
properties were designed for driver developer's debugging so
explicitly listing the properties is no necessary. But I'm not
confident on this.
I'm confident that the audience needs to include system administrators
and service engineers.
There are values in some drivers which need to be accessible beyond just
device driver authors. Some values could even have an effect on the
bits on the wire. (For example, adjusting the IPG gaps or collision
recovery strategies.)
Others could even be major things like selecting which port of
multi-port device (such as a device with both fiber and copper ports) is
used. (This happens with legacy parts too -- e.g. 3com parts with BNC,
think-net, and RJ45 connections.)
- Garrett
Miles Xu
_______________________________________________
networking-discuss mailing list
[email protected]