All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
To: Matan Barak <matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Cc: Eli Cohen <eli-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	Eran Ben Elisha <eranbe-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	Yann Droneaud <ydroneaud-RlY5vtjFyJ3QT0dZR+AlfA@public.gmane.org>
Subject: Re: [PATCH for-next 1/4] IB/mlx5: Add create_cq extended command
Date: Mon, 9 Nov 2015 16:22:59 -0700	[thread overview]
Message-ID: <20151109232259.GB20707@obsidianresearch.com> (raw)
In-Reply-To: <1447086657-15358-2-git-send-email-matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

On Mon, Nov 09, 2015 at 06:30:54PM +0200, Matan Barak wrote:
> In order to create a CQ that supports timestamp, mlx5 needs to
> support the extended create CQ command with the timestamp flag.
> 
> Signed-off-by: Matan Barak <matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
>  drivers/infiniband/hw/mlx5/cq.c   | 7 +++++++
>  drivers/infiniband/hw/mlx5/main.c | 3 ++-
>  2 files changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/infiniband/hw/mlx5/cq.c b/drivers/infiniband/hw/mlx5/cq.c
> index 2d0dbbf..674f857 100644
> +++ b/drivers/infiniband/hw/mlx5/cq.c
> @@ -743,6 +743,10 @@ static void destroy_cq_kernel(struct mlx5_ib_dev *dev, struct mlx5_ib_cq *cq)
>  	mlx5_db_free(dev->mdev, &cq->db);
>  }
>  
> +enum {
> +	CQ_CREATE_FLAGS_SUPPORTED = IB_CQ_FLAGS_TIMESTAMP_COMPLETION
> +};
> +
>  struct ib_cq *mlx5_ib_create_cq(struct ib_device *ibdev,
>  				const struct ib_cq_init_attr *attr,
>  				struct ib_ucontext *context,
> @@ -766,6 +770,9 @@ struct ib_cq *mlx5_ib_create_cq(struct ib_device *ibdev,
>  	if (entries < 0)
>  		return ERR_PTR(-EINVAL);
>  
> +	if (attr->flags & ~CQ_CREATE_FLAGS_SUPPORTED)
> +		return ERR_PTR(-EINVAL);

And this is what I was just mentioning to Eli, EINVAL is not the right
return, and this same comment applies to the places where the above
was copy and pasted into drivers during the ex patching.

Try for EOPNOTSUPP maybe?

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2015-11-09 23:22 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-09 16:30 [PATCH for-next 0/4] User-space time-stamping support for mlx5_ib Matan Barak
     [not found] ` <1447086657-15358-1-git-send-email-matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-11-09 16:30   ` [PATCH for-next 1/4] IB/mlx5: Add create_cq extended command Matan Barak
     [not found]     ` <1447086657-15358-2-git-send-email-matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-11-09 17:06       ` Eli Cohen
2015-11-09 17:06       ` Eli Cohen
2015-11-09 23:22       ` Jason Gunthorpe [this message]
     [not found]         ` <20151109232259.GB20707-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2015-11-10  8:28           ` Matan Barak
2015-11-09 23:24       ` Jason Gunthorpe
     [not found]         ` <20151109232400.GC20707-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2015-11-10  8:30           ` Matan Barak
2015-11-19 14:54       ` Christoph Hellwig
     [not found]         ` <20151119145457.GA1104-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2015-11-22  9:05           ` Matan Barak
     [not found]             ` <CAAKD3BAOq+26vV1k5LKOXgOfdr2J92fBta31Pv9XHhEcFc3v6g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-11-22 10:15               ` Christoph Hellwig
     [not found]                 ` <20151122101520.GA25187-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2015-11-22 14:04                   ` Matan Barak
2015-11-09 16:30   ` [PATCH for-next 2/4] IB/core: Add ib_is_udata_cleared Matan Barak
     [not found]     ` <1447086657-15358-3-git-send-email-matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-11-09 17:07       ` Eli Cohen
2015-11-09 19:18       ` Leon Romanovsky
     [not found]         ` <20151109191817.GE4023-2ukJVAZIZ/Y@public.gmane.org>
2015-11-10  8:38           ` Matan Barak
2015-11-09 16:30   ` [PATCH for-next 3/4] IB/mlx5: Add support querying timestamp related fields in query_device Matan Barak
     [not found]     ` <1447086657-15358-4-git-send-email-matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-11-09 17:08       ` Eli Cohen
2015-11-09 19:26       ` Leon Romanovsky
     [not found]         ` <20151109192610.GF4023-2ukJVAZIZ/Y@public.gmane.org>
2015-11-10  8:52           ` Matan Barak
2015-11-09 16:30   ` [PATCH for-next 4/4] IB/mlx5: Mmap the HCA's core clock register to user-space Matan Barak
     [not found]     ` <1447086657-15358-5-git-send-email-matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-11-09 17:09       ` Eli Cohen

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=20151109232259.GB20707@obsidianresearch.com \
    --to=jgunthorpe-epgobjl8dl3ta4ec/59zmfatqe2ktcn/@public.gmane.org \
    --cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=eli-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=eranbe-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=ydroneaud-RlY5vtjFyJ3QT0dZR+AlfA@public.gmane.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.