[openib-general] modify_device API?

Fab Tillier ftillier at infiniconsys.com
Fri Aug 13 19:14:19 PDT 2004


> From: Roland Dreier [mailto:roland at topspin.com]
> Sent: Friday, August 13, 2004 6:43 PM
> 
> I'm starting to look at implementing the new device query/modify API,
> and I have a few questions about the modify_device API.
> 
> First, the enum ib_device_attr_flags
> 
> 	enum ib_device_attr_flags {
> 		IB_DEVICE_SM			= 1,
> 		IB_DEVICE_SNMP_TUN_SUP		= (1<<1),
> 		IB_DEVICE_DM_SUP		= (1<<2),
> 		IB_DEVICE_VENDOR_CLS_SUP	= (1<<3),
> 		IB_DEVICE_RESET_QKEY_CNTR	= (1<<4)
> 	};
> 
> seems to leave out a few things that IBTA says can be changed, namely
> system image GUID, port shutdown, and PortInfo:InitType.
> 
> Also, there are a couple of extensions we may want to add, namely
> setting IsCM and possibly IsClientReregistrationSupported in the
> capabilities.

I agree we should support setting these bits.
 
> 
> Next, the API
> 
> 	int ib_modify_device(struct ib_device *device,
> 			     u8 port_num,
> 			     int device_attr_flags);
> 
> seems to leave out the actual properties structure.

Only if you add things like system image GUID and InitType.  Otherwise, the
flags provide all the information needed.

> 
> One last minor question: system image GUID is really per-device (since
> it's in NodeInfo, not PortInfo), so requiring a port number to set it
> seems a little unclean.  Is it worth creating a new entry point for
> setting system image GUID (and any other per-device settings we want)?
> 

InitType is also per-device.  I'd suggest ib_modify_device should be
ib_modify_port, and a new API for the system image GUID and InitType
created, named something like ib_modify_node.  This way, the function names
give a clue as to what is being changed - port info for ib_modify_port, and
node info for ib_modify_node.

Thoughts?

- Fab





More information about the general mailing list