[ewg] Re: [ofa-general] OFED 1.3 Beta release is available

Tang, Changqing changquing.tang at hp.com
Wed Dec 5 11:59:17 PST 2007


There are some other input structure changes such as ibv_qp_init_attr, if the qp_type is not IBV_QPT_XRC,
the field xrc_domain is not touched, right ?

Similar thing for "struct ibv_send_wr" xrc_remote_srq_num field.


--CQ Tang


> -----Original Message-----
> From: Jack Morgenstein [mailto:jackm at dev.mellanox.co.il]
> Sent: Wednesday, December 05, 2007 12:34 PM
> To: ewg at lists.openfabrics.org
> Cc: Roland Dreier; Tang, Changqing;
> general at lists.openfabrics.org; tziporet at mellanox.co.il
> Subject: Re: [ewg] Re: [ofa-general] OFED 1.3 Beta release is
> available
>
> On Wednesday 05 December 2007 07:24, Roland Dreier wrote:
> >
> > I think the only alternative we have to preserve backwards
> > compatibility is to leave struct ibv_context_ops alone and
> change the
> > structure to:
> >
> > 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_xrc_op      *xrc_ops;
> > };
> >
> > with xrc_ops added at the end.  It's my fault for not
> making the ops
> > member a pointer I guess.
> >
>
> We don't need to have this as a pointer, really (I'd like to
> save the extra malloc and associated bookkeeping). If we have
> the ibv_xrc_op struct at the end of ibv_context, this is
> sufficient for backwards binary
> compatibility(libmlx4 itself allocates the ibv_context
> structure for libibverbs.  If the actual structure is a bit
> bigger, who cares -- we just need to preserve the current
> offsets of the structure fields for binary compatibility).
>
> If you want to be a bit more generic, we could do this as an
> "extra_ops"
> structure and add new ops as needed.
> (If future changes are messier than just adding a new op, we
> can then increment the API version):
>
> struct ibv_context_extra_ops {
>         struct ibv_srq *        (*create_xrc_srq)(struct ibv_pd *pd,
>                                                   struct
> ibv_xrc_domain *xrc_domain,
>                                                   struct
> ibv_cq *xrc_cq,
>                                                   struct
> ibv_srq_init_attr *srq_init_attr);
>         struct ibv_xrc_domain * (*open_xrc_domain)(struct
> ibv_context *context,
>                                                    int fd, int oflag);
>         int                     (*close_xrc_domain)(struct
> ibv_xrc_domain *d);
> };
>
>  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;  };
>
>



More information about the ewg mailing list