From: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
To: Matan Barak <matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Cc: Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Yishai Hadas <yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
Sean Hefty <sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
Ira Weiny <ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
Christoph Lameter <cl-vYTEC60ixJUAvxtiuMwx3w@public.gmane.org>,
Majd Dibbiny <majd-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
Tal Alon <talal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
Liran Liss <liranl-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
Haggai Eran <haggaie-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Subject: Re: [PATCH for-next 6/7] IB/core: Declare all common IB types
Date: Wed, 11 Jan 2017 17:19:55 -0700 [thread overview]
Message-ID: <20170112001955.GF31682@obsidianresearch.com> (raw)
In-Reply-To: <1484132033-3346-7-git-send-email-matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
On Wed, Jan 11, 2017 at 12:53:52PM +0200, Matan Barak wrote:
> diff --git a/drivers/infiniband/core/uverbs_ioctl_cmd.c b/drivers/infiniband/core/uverbs_ioctl_cmd.c
> new file mode 100644
This is not really an appropriate file name for this point in the
series...
> +DECLARE_UVERBS_TYPE(uverbs_type_comp_channel,
> + &UVERBS_TYPE_ALLOC_FD(0, sizeof(struct ib_uobject) + sizeof(struct ib_uverbs_event_file),
> + uverbs_free_event_file,
> + &uverbs_event_fops,
> + "[infinibandevent]",
> O_RDONLY));
Really hate these macros.
const struct ib_uobject_type uverbs_type_comp_channel = {
.size = sizeof(struct ib_uverbs_event_file,
.destroy = uverbs_destroy_event_file, // destroy = release device resources!!
.fd = {
.fops = &uverbs_event_fops,
.name = "[infinibandevent]"
},
};
If you can't do it without macros something else is wrong.
> +DECLARE_UVERBS_TYPES(uverbs_common_types,
> + ADD_UVERBS_TYPE(UVERBS_TYPE_PD, uverbs_type_pd),
> + ADD_UVERBS_TYPE(UVERBS_TYPE_MR, uverbs_type_mr),
> + ADD_UVERBS_TYPE(UVERBS_TYPE_COMP_CHANNEL, uverbs_type_comp_channel),
> + ADD_UVERBS_TYPE(UVERBS_TYPE_CQ, uverbs_type_cq),
> + ADD_UVERBS_TYPE(UVERBS_TYPE_QP, uverbs_type_qp),
> + ADD_UVERBS_TYPE(UVERBS_TYPE_AH, uverbs_type_ah),
> + ADD_UVERBS_TYPE(UVERBS_TYPE_MW, uverbs_type_mw),
> + ADD_UVERBS_TYPE(UVERBS_TYPE_SRQ, uverbs_type_srq),
> + ADD_UVERBS_TYPE(UVERBS_TYPE_FLOW, uverbs_type_flow),
> + ADD_UVERBS_TYPE(UVERBS_TYPE_WQ, uverbs_type_wq),
> + ADD_UVERBS_TYPE(UVERBS_TYPE_RWQ_IND_TBL,
> + uverbs_type_rwq_ind_table),
> + ADD_UVERBS_TYPE(UVERBS_TYPE_XRCD, uverbs_type_xrcd),
> +);
> +EXPORT_SYMBOL(uverbs_common_types);
No purpose at this point in the series.
I didn't look carefully at patch 7 due to to convoluted it is, split
it please..
Everything else looks broadly reasonable to me and is a good overall
improvement I think.
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
next prev parent reply other threads:[~2017-01-12 0:19 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-11 10:53 [PATCH for-next 0/7] Change IDR usage and locking in uverbs Matan Barak
[not found] ` <1484132033-3346-1-git-send-email-matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2017-01-11 10:53 ` [PATCH for-next 1/7] IB/core: Refactor IDR to be per-device Matan Barak
[not found] ` <1484132033-3346-2-git-send-email-matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2017-01-11 22:39 ` Jason Gunthorpe
[not found] ` <20170111223917.GA31682-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-01-17 17:08 ` Matan Barak
[not found] ` <CAAKD3BDMDyahSu1uFPE_bA=QXAy9Q+qdMPoVw-hJTrFN3um9rg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-01-17 18:09 ` Jason Gunthorpe
2017-01-11 10:53 ` [PATCH for-next 2/7] IB/core: Add support for custom types Matan Barak
[not found] ` <1484132033-3346-3-git-send-email-matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2017-01-11 23:28 ` Jason Gunthorpe
[not found] ` <20170111232811.GB31682-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-01-17 17:23 ` Matan Barak
[not found] ` <CAAKD3BBkzoLuY3TF=bDK3U=rnLzK0uWmDL2tgsUwmBoGTXAqrw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-01-17 19:01 ` Jason Gunthorpe
2017-01-11 10:53 ` [PATCH for-next 3/7] IB/core: Add support for fd objects Matan Barak
[not found] ` <1484132033-3346-4-git-send-email-matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2017-01-11 23:58 ` Jason Gunthorpe
[not found] ` <20170111235801.GC31682-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-01-17 17:24 ` Matan Barak
[not found] ` <CAAKD3BBQLxnh-keng+LjZEyWBYKbXN_Sszk1BcGnyVeZU_45nw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-01-17 19:11 ` Jason Gunthorpe
2017-01-11 10:53 ` [PATCH for-next 4/7] IB/core: Add generic ucontext initialization and teardown Matan Barak
[not found] ` <1484132033-3346-5-git-send-email-matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2017-01-12 0:09 ` Jason Gunthorpe
2017-01-11 10:53 ` [PATCH for-next 5/7] IB/core: Add macros for declaring types and type groups Matan Barak
[not found] ` <1484132033-3346-6-git-send-email-matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2017-01-12 0:10 ` Jason Gunthorpe
[not found] ` <20170112001029.GE31682-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-01-17 17:25 ` Matan Barak
[not found] ` <CAAKD3BCvEP4MdvSy6dD0DDjfyd+PO8Y=7O+qFwPO5rjGDW_nfA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-01-17 19:13 ` Jason Gunthorpe
2017-01-11 10:53 ` [PATCH for-next 6/7] IB/core: Declare all common IB types Matan Barak
[not found] ` <1484132033-3346-7-git-send-email-matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2017-01-12 0:19 ` Jason Gunthorpe [this message]
[not found] ` <20170112001955.GF31682-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-01-12 6:48 ` Matan Barak
2017-01-17 17:37 ` Matan Barak
[not found] ` <CAAKD3BBKnJRNF+iqRSkjmGVcff=Hd68wVvXW7y+=pnnc4=yDfA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-01-17 19:15 ` Jason Gunthorpe
2017-01-11 10:53 ` [PATCH for-next 7/7] IB/core: Use the new IDR and locking infrastructure in uverbs_cmd Matan Barak
[not found] ` <1484132033-3346-8-git-send-email-matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2017-01-11 22:49 ` kbuild test robot
2017-01-11 23:43 ` kbuild test robot
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=20170112001955.GF31682@obsidianresearch.com \
--to=jgunthorpe-epgobjl8dl3ta4ec/59zmfatqe2ktcn/@public.gmane.org \
--cc=cl-vYTEC60ixJUAvxtiuMwx3w@public.gmane.org \
--cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=haggaie-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=liranl-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=majd-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=talal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=yishaih-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.