On Monday 17 December 2007 17:35, Tang, Changqing wrote:
> 
> I remembered someone else suggested to use:
> 
> struct ibv_context {
>          struct ibv_device      *device;
>          struct ibv_context_ops  ops;
>          int                     cmd_fd;
>          int                     async_fd;
>          int                     num_comp_vectors;
>          pthread_mutex_t         mutex;
>          void                   *abi_compat;
>          struct ibv_context_extra_ops  extra_ops;
> };
> 
> Here we don't use pointer for extra_ops, and any future changes are added 
> into 'extra_ops',
> So why not this way ?

That someone was me.  However, I think Roland's idea is better:
Roland wrote:
        Actually I'd prefer to add xrc_ops and then if we need to extend
        further with more new ops, add another structure after it.  That way
        we avoid having to put any define in libibverbs to tell drivers like
        libmlx4 that xrc support is present; libmlx4 et al can just use
        AC_CHECK_MEMBER(struct ibv_context.xrc_ops) to test with autoconf.

That is what I implemented.

- Jack

_______________________________________________
general mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to