From: Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Jason Gunthorpe <jgg-uk2M96/98Pc@public.gmane.org>
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Yonatan Cohen <yonatanc-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Subject: Re: [PATCH rdma-next v1 1/6] IB/uverbs: Allow CQ moderation with modify CQ
Date: Fri, 10 Nov 2017 14:15:29 -0500 [thread overview]
Message-ID: <1510341329.3735.19.camel@redhat.com> (raw)
In-Reply-To: <20171030152815.GA16127-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 2417 bytes --]
On Mon, 2017-10-30 at 17:28 +0200, Leon Romanovsky wrote:
> On Mon, Oct 30, 2017 at 08:48:07AM -0600, Jason Gunthorpe wrote:
> > On Sun, Oct 29, 2017 at 08:28:08PM +0200, Leon Romanovsky wrote:
> >
> > > > > +int ib_uverbs_ex_modify_cq(struct ib_uverbs_file *file,
> > > > > + struct ib_device *ib_dev,
> > > > > + struct ib_udata *ucore,
> > > > > + struct ib_udata *uhw)
> > > >
> > > > Is this really a good idea?
> > > >
> > > > Why not ib_uverbs_set_cq_moderation ?
> > >
> > > It follows already existed ib_modify_cq(), see commit 2dd571622787
> > > ("IB/core: Add support for modify CQ")
> >
> > And that function should have been called set_cq_moderation:
> >
> > + * ib_modify_cq - Modifies moderation params of the CQ
> > + * @cq: The CQ to modify.
> > + * @cq_count: number of CQEs that will trigger an event
> > + * @cq_period: max period of time in usec before triggering an event
> > + *
> > + */
> > +int ib_modify_cq(struct ib_cq *cq, u16 cq_count, u16 cq_period);
>
> I see it differently, this is extendable version of modify_cq, which is
> going to benefit all other users who will decide to extend it.
If it's the extendable version, then it should have just passed the attr
struct (or equivalent), it shouldn't have spelled out the moderation
parameters in the function signature. So, either we need to change the
signature of ib_modify_cq to a generic, extendable signature, or we need
to change the name as Jason points out so we match name and parameter
signature in the same spirit.
Also, as you point out, need to update the log message to not use
cookie.
Let's please make this consistent before merging. BTW, because so much
of the rest of the API uses things like modify_qp with an attr struct
and a single entry point, I'm leaning towards following that here for
the sake of API consistency. Although I can see Jason's point about
having simpler entry points for the API, I don't think it buys us
anything in the RDMA space because we already have to be aware of and
use the monolithic single entry point API style. I'm more inclined to
think a single API style is better than mixed API styles, just like
mixed coding styles is bad.
--
Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
GPG KeyID: B826A3330E572FDD
Key fingerprint = AE6B 1BDA 122B 23B4 265B 1274 B826 A333 0E57 2FDD
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2017-11-10 19:15 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-29 13:51 [PATCH rdma-next v1 0/6] Expose CQ moderation to user space Leon Romanovsky
[not found] ` <20171029135140.32649-1-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-10-29 13:51 ` [PATCH rdma-next v1 1/6] IB/uverbs: Allow CQ moderation with modify CQ Leon Romanovsky
[not found] ` <20171029135140.32649-2-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-10-29 17:43 ` Jason Gunthorpe
[not found] ` <20171029174345.GC4488-uk2M96/98Pc@public.gmane.org>
2017-10-29 18:28 ` Leon Romanovsky
[not found] ` <20171029182808.GN16127-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-10-30 14:48 ` Jason Gunthorpe
[not found] ` <20171030144807.GA12392-uk2M96/98Pc@public.gmane.org>
2017-10-30 15:28 ` Leon Romanovsky
[not found] ` <20171030152815.GA16127-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-10-30 15:52 ` Jason Gunthorpe
[not found] ` <20171030155236.GC12392-uk2M96/98Pc@public.gmane.org>
2017-10-30 19:09 ` Leon Romanovsky
[not found] ` <20171030190952.GC16127-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-10-30 23:07 ` Jason Gunthorpe
[not found] ` <20171030230753.GB4081-uk2M96/98Pc@public.gmane.org>
2017-10-31 5:08 ` Leon Romanovsky
[not found] ` <20171031050802.GE16127-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-10-31 11:31 ` Yishai Hadas
[not found] ` <13d687d9-80b4-621e-87bf-c6045da98c0c-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2017-10-31 15:40 ` Jason Gunthorpe
[not found] ` <20171031154046.GB9852-uk2M96/98Pc@public.gmane.org>
2017-10-31 17:06 ` Yishai Hadas
[not found] ` <6e7e94e2-9b50-bfa4-a06a-b2452e1bc8a5-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2017-11-01 18:06 ` Jason Gunthorpe
[not found] ` <20171101180616.GI1030-uk2M96/98Pc@public.gmane.org>
2017-11-01 18:41 ` Yishai Hadas
2017-11-10 19:15 ` Doug Ledford [this message]
[not found] ` <1510341329.3735.19.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2017-11-10 21:16 ` Jason Gunthorpe
2017-11-11 8:09 ` Leon Romanovsky
[not found] ` <20171111080943.GT18825-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-11-11 15:45 ` Jason Gunthorpe
2017-10-29 13:51 ` [PATCH rdma-next v1 2/6] IB/mlx4: Exposing modify CQ callback to uverbs layer Leon Romanovsky
2017-10-29 13:51 ` [PATCH rdma-next v1 3/6] IB/mlx5: " Leon Romanovsky
2017-10-29 13:51 ` [PATCH rdma-next v1 4/6] IB/uverbs: Add CQ moderation capability to query_device Leon Romanovsky
2017-10-29 13:51 ` [PATCH rdma-next v1 5/6] IB/mlx4: " Leon Romanovsky
2017-10-29 13:51 ` [PATCH rdma-next v1 6/6] IB/mlx5: " Leon Romanovsky
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=1510341329.3735.19.camel@redhat.com \
--to=dledford-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
--cc=jgg-uk2M96/98Pc@public.gmane.org \
--cc=leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=yonatanc-VPRAkNaXOzVWk0Htik3J/w@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.