mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@mellanox.co.il>
To: Steve Wise <swise@opengridcomputing.com>
Cc: rdreier@cisco.com, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, openib-general@openib.org
Subject: Re: [PATCH  v4 01/13] Linux RDMA Core Changes
Date: Sun, 24 Dec 2006 10:49:25 +0200	[thread overview]
Message-ID: <20061224084925.GD15106@mellanox.co.il> (raw)
In-Reply-To: <20061214135303.21159.61880.stgit@dell3.ogc.int>

> diff --git a/drivers/infiniband/hw/mthca/mthca_cq.c b/drivers/infiniband/hw/mthca/mthca_cq.c
> index 283d50b..15cbd49 100644
> --- a/drivers/infiniband/hw/mthca/mthca_cq.c
> +++ b/drivers/infiniband/hw/mthca/mthca_cq.c
> @@ -722,7 +722,8 @@ repoll:
>  	return err == 0 || err == -EAGAIN ? npolled : err;
>  }
>  
> -int mthca_tavor_arm_cq(struct ib_cq *cq, enum ib_cq_notify notify)
> +int mthca_tavor_arm_cq(struct ib_cq *cq, enum ib_cq_notify notify, 
> +		       struct ib_udata *udata)
>  {
>  	__be32 doorbell[2];
>  
> @@ -739,7 +740,8 @@ int mthca_tavor_arm_cq(struct ib_cq *cq,
>  	return 0;
>  }
>  
> -int mthca_arbel_arm_cq(struct ib_cq *ibcq, enum ib_cq_notify notify)
> +int mthca_arbel_arm_cq(struct ib_cq *ibcq, enum ib_cq_notify notify,
> +		       struct ib_udata *udata)
>  {
>  	struct mthca_cq *cq = to_mcq(ibcq);
>  	__be32 doorbell[2];
> diff --git a/drivers/infiniband/hw/mthca/mthca_dev.h b/drivers/infiniband/hw/mthca/mthca_dev.h
> index fe5cecf..6b9ccf6 100644
> --- a/drivers/infiniband/hw/mthca/mthca_dev.h
> +++ b/drivers/infiniband/hw/mthca/mthca_dev.h
> @@ -493,8 +493,8 @@ void mthca_unmap_eq_icm(struct mthca_dev
>  
>  int mthca_poll_cq(struct ib_cq *ibcq, int num_entries,
>  		  struct ib_wc *entry);
> -int mthca_tavor_arm_cq(struct ib_cq *cq, enum ib_cq_notify notify);
> -int mthca_arbel_arm_cq(struct ib_cq *cq, enum ib_cq_notify notify);
> +int mthca_tavor_arm_cq(struct ib_cq *cq, enum ib_cq_notify notify, struct ib_udata *udata);
> +int mthca_arbel_arm_cq(struct ib_cq *cq, enum ib_cq_notify notify, struct ib_udata *udata);
>  int mthca_init_cq(struct mthca_dev *dev, int nent,
>  		  struct mthca_ucontext *ctx, u32 pdn,
>  		  struct mthca_cq *cq);
> diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
> index 8eacc35..e3e1a2c 100644
> --- a/include/rdma/ib_verbs.h
> +++ b/include/rdma/ib_verbs.h
> @@ -941,7 +941,8 @@ struct ib_device {
>  					      struct ib_wc *wc);
>  	int                        (*peek_cq)(struct ib_cq *cq, int wc_cnt);
>  	int                        (*req_notify_cq)(struct ib_cq *cq,
> -						    enum ib_cq_notify cq_notify);
> +						    enum ib_cq_notify cq_notify,
> +						    struct ib_udata *udata);
>  	int                        (*req_ncomp_notif)(struct ib_cq *cq,
>  						      int wc_cnt);
>  	struct ib_mr *             (*get_dma_mr)(struct ib_pd *pd,
> @@ -1373,7 +1374,7 @@ int ib_peek_cq(struct ib_cq *cq, int wc_
>  static inline int ib_req_notify_cq(struct ib_cq *cq,
>  				   enum ib_cq_notify cq_notify)
>  {
> -	return cq->device->req_notify_cq(cq, cq_notify);
> +	return cq->device->req_notify_cq(cq, cq_notify, NULL);
>  }
>  
>  /**

Can't say I like this adding overhead in data path operations (and note this
can't be optimized out). And kernel consumers work without passing it in, so it
hurts kernel code even for Chelsio. Granted, the cost is small here, but these
things do tend to add up.

It seems all Chelsio needs is to pass in a consumer index - so, how about a new
entry point? Something like void set_cq_udata(struct ib_cq *cq, struct ib_udata *udata)?

-- 
MST

  reply	other threads:[~2006-12-24  9:14 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-14 13:52 [PATCH v4 00/13] 2.6.20 Chelsio T3 RDMA Driver Steve Wise
2006-12-14 13:53 ` [PATCH v4 01/13] Linux RDMA Core Changes Steve Wise
2006-12-24  8:49   ` Michael S. Tsirkin [this message]
2007-01-03 14:25     ` Steve Wise
2007-01-03 14:41       ` Michael S. Tsirkin
2007-01-03 14:56         ` Steve Wise
2007-01-03 15:00           ` Michael S. Tsirkin
2007-01-03 15:07             ` Steve Wise
2007-01-03 15:18               ` Michael S. Tsirkin
2007-01-03 19:17                 ` Steve Wise
2007-01-03 19:33                   ` Michael S. Tsirkin
2007-01-03 20:20                     ` Steve Wise
2007-01-03 21:22                       ` [openib-general] " Steve Wise
2007-01-04  5:07                         ` Michael S. Tsirkin
2007-01-04 14:07                           ` Steve Wise
2007-01-04 21:34                         ` [openib-general] " Roland Dreier
2007-01-04 21:49                           ` Steve Wise
2007-01-05 14:22                           ` Steve Wise
2007-01-03 15:02           ` Michael S. Tsirkin
2007-01-03 15:06             ` Steve Wise
2007-01-03 15:10               ` Michael S. Tsirkin
2006-12-14 13:53 ` [PATCH v4 02/13] Device Discovery and ULLD Linkage Steve Wise
2006-12-14 13:54 ` [PATCH v4 03/13] Provider Methods and Data Structures Steve Wise
2006-12-14 13:54 ` [PATCH v4 04/13] Connection Manager Steve Wise
2006-12-14 13:55 ` [PATCH v4 05/13] Queue Pairs Steve Wise
2006-12-14 13:55 ` [PATCH v4 06/13] Completion Queues Steve Wise
2006-12-14 13:56 ` [PATCH v4 07/13] Async Event Handler Steve Wise
2006-12-14 13:56 ` [PATCH v4 08/13] Memory Registration Steve Wise
2006-12-14 13:57 ` [PATCH v4 09/13] Core WQE/CQE Types Steve Wise
2006-12-14 13:57 ` [PATCH v4 10/13] Core HAL Steve Wise
2006-12-14 13:58 ` [PATCH v4 11/13] Core Resource Allocation Steve Wise
2006-12-14 13:58 ` [PATCH v4 12/13] Core Debug functions Steve Wise
2006-12-14 13:59 ` [PATCH v4 13/13] Kconfig/Makefile Steve Wise
2007-01-05 17:32 [openib-general] [PATCH v4 01/13] Linux RDMA Core Changes Felix Marti
2007-01-06 17:34 ` Michael S. Tsirkin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20061224084925.GD15106@mellanox.co.il \
    --to=mst@mellanox.co.il \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=openib-general@openib.org \
    --cc=rdreier@cisco.com \
    --cc=swise@opengridcomputing.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®