[ofa-general] Re: [ewg] [PATCH] IB/core: Add support for Receive Core Affinity

Ralph Campbell ralph.campbell at qlogic.com
Mon Aug 4 16:59:11 PDT 2008


On Tue, 2008-07-15 at 19:13 +0300, Eli Cohen wrote:
> Add the capability flag IB_DEVICE_IPOIB_RCA to denote devices which
> support distribution of received packects to multiple receive queues.
> This results in better utilization of the system CPU cores by
> distributing interrupt handling between the cores. The patch adds a
> new verb, ib_create_qp_range(), to create a list range of QPs with
> specific alignment requirements that should be used by a consumer to
> for the different receive queues.
> 
> Signed-off-by: Eli Cohen <eli at mellanox.co.il>
> ---
>  drivers/infiniband/core/verbs.c |   39 ++++++++++++++++++++++++++++++++++++++-
>  include/rdma/ib_verbs.h         |   30 +++++++++++++++++++++++++++++-
>  2 files changed, 67 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/infiniband/core/verbs.c b/drivers/infiniband/core/verbs.c
> index a7da9be..871fb1e 100644
> --- a/drivers/infiniband/core/verbs.c
> +++ b/drivers/infiniband/core/verbs.c
> @@ -280,6 +280,39 @@ EXPORT_SYMBOL(ib_destroy_srq);
>  
>  /* Queue pairs */
>  
> +int ib_create_qp_range(struct ib_pd *pd, struct ib_qp_init_attr *qp_init_attr,
> +		       int nqps, int align, struct ib_qp *list[])

It just seems wrong to me to require the caller to specify the alignment
restrictions. Isn't this HCA specific? Is IPoIB really going to know
whether or not the QP numbers returned by this call are "aligned"
or not? What if I call ib_create_qp_range() with nqps=3 and align=0?

Also, in ib_verbs.h, struct ib_qp_attr now has a struct rca_attr field.
I don't see why the struct rca_attr field is needed for ib_modify_qp().
It seems to me that this information should be stored as part of the
QP info when creating the N QPs. Why should the verbs caller need to
know about this? The values are determined by the HCA when the QPs
are created.




More information about the general mailing list