[openib-general] Re: [PATCH] extend ib_device node_type to include iWarp
Grant Grundler
iod00d at hp.com
Mon Jan 30 13:55:47 PST 2006
On Mon, Jan 30, 2006 at 01:37:39PM -0800, Sean Hefty wrote:
> As long as IB_NODE_IB remains 0, we can eliminate this change.
> Or we could go with something like:
>
> if (device->node_type == IB_NODE_IB | IB_NODE_SWITCH)
If node_type were a bitmask mask, I'd expect
if (node_type & (IB_NODE_IB | IB_NODE_SWITCH))
> >it seems better to leave the field as an enum for better
> >documentation.
>
> The value being returned is no longer a member of the enum, but rather a
> value such as:
>
> IB_NODE_IB | IB_NODE_CA or IB_NODE_IWARP | IB_NODE_CA.
Ok. so it is a bitmask.
grant
More information about the general
mailing list