***SPAM*** Re: [ofa-general] Re: [PATCH 3/3 v4] ib/ipoib: blocking multicast loopback ipoib packets
Jack Morgenstein
jackm at dev.mellanox.co.il
Mon Jul 7 23:23:02 PDT 2008
On Tuesday 08 July 2008 00:31, Roland Dreier wrote:
> > What do you think of the following approach?
> > Instead of adding creation flags to the qp_init_attr, I can add a new verb:
> > ibv_qp *create_qp_extended(struct ibv_pd *pd, struct ibv_qp_init_attr,
> > *init_attr, enum ibv_qp_create_flags create_flags)
> >
> > I'm aware that adding a new verb isn't optimal, but at least we can
> > avoid incrementing the libibverbs version.
>
> I think this new verb seems like a better approach right now.
can we do this so that the new verb lies after XRC in ib_context, since OFED 1.3 went out
with XRC in userspace (so we don't break binary compatibility):
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_ops *xrc_ops;
/* ==> new verb ops structure pointer here */
};
Alternatively, we can rename ibv_xrc_ops to ibv_more_ops, and add the
new verbs after the XRC operations (this is my preference, actually, so that
we don't get into adding more and more structs at the end of the ibv_context
structure):
struct ibv_more_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);
int (*create_xrc_rcv_qp)(struct ibv_qp_init_attr *init_attr,
uint32_t *xrc_qp_num);
int (*modify_xrc_rcv_qp)(struct ibv_xrc_domain *xrc_domain,
uint32_t xrc_qp_num,
struct ibv_qp_attr *attr,
int attr_mask);
int (*query_xrc_rcv_qp)(struct ibv_xrc_domain *xrc_domain,
uint32_t xrc_qp_num,
struct ibv_qp_attr *attr,
int attr_mask,
struct ibv_qp_init_attr *init_attr);
int (*reg_xrc_rcv_qp)(struct ibv_xrc_domain *xrc_domain,
uint32_t xrc_qp_num);
int (*unreg_xrc_rcv_qp)(struct ibv_xrc_domain *xrc_domain,
uint32_t xrc_qp_num);
struct ibv_qp * (*create_qp_expanded)(struct ibv_pd *pd,
struct ibv_qp_init_attr *attr,
uint32_t flags);
};
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_more_ops *more_ops;
};
BTW, I suggest calling the new verb "ibv_create_qp_expanded()", so as not
to confuse things with XRC (Extended RC).
- Jack
More information about the general
mailing list