> I'm not quite sure I understand the use for "enum ibv_extension_type".  
> Where/how is this used?

The intent is that this allows users to extend existing enums without 
conflicts.  For example,

> > /* Extend IBV_QP_TYPE for XRC */
> > #define OFA_QPT_XRC ((enum ibv_qp_type) \
> >     (IBV_EXTENSION_OFA << IBV_EXTENSION_BASE_SHIFT) + 6)

This defines a new QP type for XRC.  This new QP type is only usable as part of 
an OFA specific extension.  When XRC QP types are added directly to libibverbs, 
it receives a new number because there's no guarantee that the upstream version 
of XRC support will match what OFA published.  (Obviously it's too late to 
handle XRC QPs in this way.)

The trade-off is that the upper X number of bits (8 in the patch) of most enums 
end up being reserved for extension use.  The benefit is that existing 
functions, like ibv_create_qp, can support extensions, versus duplicating 
functions and structures.

- Sean
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to