[openib-general] [RFC] ib_mad

Hal Rosenstock halr at voltaire.com
Thu Sep 16 16:14:48 PDT 2004


On Thu, 2004-09-16 at 18:15, Sean Hefty wrote:
> It would be terribly convenient for the SMI to know how many ports
> are on a device without having to query for it.  I have some other 
> options to get around this issue, but I'm wondering if 
> phys_port_cnt for a device can't either be stored by the 
> MAD layer somewhere, or if it would make sense to move it into
> ib_device.  

It could be saved in the ib_mad_port_private struct but this seems wrong
to me since this is a per port structure (and the MAD layer only uses
the IB device at start and stop time). 

> (Random thought... is there a reason why 
> ib_device_attr or a pointer can't be stored in ib_device?  
> Is it already stored that way internally?)

IMO it better belongs in the ib_device if it were to go anywhere but if
stored we would need a way to indicate changes if ports were hot
swappable.

> Along similar lines, renaming ib_mad_port_private::port to 
> port_num would let me think less, and my head already hurts 
> from studying the SMI portion of the spec.  (I'll submit a 
> patch for this with my latest SMI changes.)

Using port rather than port_num may have stemmed from
ib_register_mad_agent().

-- Hal





More information about the general mailing list