From: Jason Gunthorpe <jgg-uk2M96/98Pc@public.gmane.org>
To: Yishai Hadas <yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
majd-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org,
Alexr-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org,
dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
Subject: Re: [PATCH RFC rdma-core 4/5] mlx5: Add support for ibv_parent domain and its related verbs
Date: Mon, 13 Nov 2017 13:03:20 -0700 [thread overview]
Message-ID: <20171113200320.GE22610@ziepe.ca> (raw)
In-Reply-To: <1510522903-6838-5-git-send-email-yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
On Sun, Nov 12, 2017 at 11:41:42PM +0200, Yishai Hadas wrote:
> @@ -319,6 +319,9 @@ struct mlx5_buf {
> struct mlx5_pd {
> struct ibv_pd ibv_pd;
> uint32_t pdn;
> + int is_parent_domain;
> + struct ibv_td *td;
> + struct ibv_pd *protection_domain;
is_parent_domain can just be protection_domain != NULL
> +struct ibv_pd *mlx5_alloc_parent_domain(struct ibv_context *context,
> + struct ibv_parent_domain_init_attr *attr)
> +{
> + struct mlx5_pd *pd;
> +
> + pd = calloc(1, sizeof *pd);
> + if (!pd)
> + return NULL;
> +
> + pd->is_parent_domain = 1;
> + pd->td = attr->td;
> + pd->protection_domain= attr->pd;
Don't we need some kind of ref counting here?
What is the intention for the final version of this patch?
Are you going to do
pd->ibv_pd = *attr->pd;
During create?
Or change every call site very roughly like like..
inline struct mlx5_pd *resolve_pd(struct ibv_pd *pd)
{
if (pd->protection_domain)
return pd->protection_domain;
return pd;
}
mlx5_foo(struct ibv_pd *arg_pd)
{
struct mlx5_pd *pd = resolve_pd(arg_pd);
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-11-13 20:03 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-12 21:41 [PATCH RFC rdma-core 0/5] Add thread domain support Yishai Hadas
[not found] ` <1510522903-6838-1-git-send-email-yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2017-11-12 21:41 ` [PATCH RFC rdma-core 1/5] verbs: Introduce thread domain and its related verbs Yishai Hadas
[not found] ` <1510522903-6838-2-git-send-email-yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2017-11-13 19:58 ` Jason Gunthorpe
[not found] ` <20171113195822.GD22610-uk2M96/98Pc@public.gmane.org>
2017-11-14 8:26 ` Yishai Hadas
[not found] ` <3719edfc-282a-db5b-2474-3cf1355fb301-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2017-11-14 19:17 ` Jason Gunthorpe
[not found] ` <20171114191754.GI4263-uk2M96/98Pc@public.gmane.org>
2017-11-15 9:34 ` Yishai Hadas
[not found] ` <774e2f74-8361-6941-a015-27a2014d8cc9-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2017-11-17 18:42 ` Jason Gunthorpe
[not found] ` <20171117184248.GN4276-uk2M96/98Pc@public.gmane.org>
2017-11-19 6:43 ` Alex Rosenbaum
[not found] ` <CAFgAxU_m=i9kG1h2Rbqe+YtVYpea8-Ez5qvm6dQU4tZPgOUqhA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-11-19 15:32 ` Jason Gunthorpe
[not found] ` <20171119153219.GZ4276-uk2M96/98Pc@public.gmane.org>
2017-11-20 14:05 ` Alex Rosenbaum
2017-11-12 21:41 ` [PATCH RFC rdma-core 2/5] verbs: Introduce parent " Yishai Hadas
[not found] ` <1510522903-6838-3-git-send-email-yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2017-11-13 19:53 ` Jason Gunthorpe
[not found] ` <20171113195331.GC22610-uk2M96/98Pc@public.gmane.org>
2017-11-13 20:37 ` Alex Rosenbaum
2017-11-14 8:34 ` Yishai Hadas
[not found] ` <4c8448c2-373a-bbc1-73be-f792599b8b0a-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2017-11-14 19:08 ` Jason Gunthorpe
2017-11-12 21:41 ` [PATCH RFC rdma-core 3/5] mlx5: Add support for ibv_td object " Yishai Hadas
2017-11-12 21:41 ` [PATCH RFC rdma-core 4/5] mlx5: Add support for ibv_parent domain " Yishai Hadas
[not found] ` <1510522903-6838-5-git-send-email-yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2017-11-13 20:03 ` Jason Gunthorpe [this message]
[not found] ` <20171113200320.GE22610-uk2M96/98Pc@public.gmane.org>
2017-11-14 10:29 ` Yishai Hadas
[not found] ` <4232d248-8fb3-1d64-e117-6034d9240a05-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2017-11-14 19:15 ` Jason Gunthorpe
2017-11-12 21:41 ` [PATCH RFC rdma-core 5/5] mlx5: Handles QP creation with a given parent domain Yishai Hadas
[not found] ` <1510522903-6838-6-git-send-email-yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2017-11-13 20:05 ` Jason Gunthorpe
[not found] ` <20171113200518.GF22610-uk2M96/98Pc@public.gmane.org>
2017-11-13 20:24 ` Alex Rosenbaum
[not found] ` <CAFgAxU_ZPcB-oZ6DrDtHdVeOpT5S_CTvYxn4VUcU3t7S4PCJHQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-11-14 11:23 ` Yishai Hadas
2017-11-13 20:06 ` [PATCH RFC rdma-core 0/5] Add thread domain support Jason Gunthorpe
[not found] ` <20171113200651.GG22610-uk2M96/98Pc@public.gmane.org>
2017-11-14 12:09 ` Yishai Hadas
[not found] ` <ef4ab602-694d-f3be-9473-3fca4d97f6f2-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2017-11-14 19:18 ` Jason Gunthorpe
[not found] ` <CAFgAxU9Svu8jKBMzY91cOUFF9wngowbFZd+yKUBz9M60rcWfkg@mail.gmail.com>
[not found] ` <20171114025745.GO22610@ziepe.ca>
[not found] ` <20171114025745.GO22610-uk2M96/98Pc@public.gmane.org>
2017-11-14 20:14 ` Alex Rosenbaum
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=20171113200320.GE22610@ziepe.ca \
--to=jgg-uk2m96/98pc@public.gmane.org \
--cc=Alexr-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=majd-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.