[openib-general] [RFC] ib_mad

Roland Dreier roland at topspin.com
Thu Sep 16 17:46:59 PDT 2004


    Sean> It would be terribly convenient for the SMI to know how many
    Sean> ports are on a device without having to query for it.  I
    Sean> have some other options to get around this issue, but I'm
    Sean> wondering if phys_port_cnt for a device can't either be
    Sean> stored by the MAD layer somewhere, or if it would make sense
    Sean> to move it into ib_device.  (Random thought... is there a
    Sean> reason why ib_device_attr or a pointer can't be stored in
    Sean> ib_device?  Is it already stored that way internally?)

It makes sense to me to add the device attr to ib_device.  The only
fields that I see that might change are system_image_guid and
phys_port_cnt (if hot pluggable ports ever come about).  We could fix
this by requiring the low-level driver to keep the system_image_guid
field up to date (since it can only be changed through that driver),
and defining phys_port_cnt to be the maximum possible number of ports
(pluggable ports that aren't present would just always be down).  In
any case pretty much everyone's code would be broken by phys_port_cnt
changing under them.

If we did this we could just kill off the query_device method
entirely, which would be nice.

 - Roland



More information about the general mailing list