From: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
To: kaike.wan-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
John Fleck <john.fleck-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
Ira Weiny <ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Subject: Re: [PATCH v9 4/4] IB/sa: Route SA pathrecord query through netlink
Date: Fri, 21 Aug 2015 17:12:03 -0600 [thread overview]
Message-ID: <20150821231203.GB16951@obsidianresearch.com> (raw)
In-Reply-To: <1439556729-27876-5-git-send-email-kaike.wan-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
On Fri, Aug 14, 2015 at 08:52:09AM -0400, kaike.wan-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org wrote:
> +static LIST_HEAD(ib_nl_request_list);
> +static DEFINE_SPINLOCK(ib_nl_request_lock);
> +static atomic_t ib_nl_sa_request_seq;
> +static struct workqueue_struct *ib_nl_wq;
> +static struct delayed_work ib_nl_timed_work;
> +static const struct nla_policy ib_nl_policy[LS_NLA_TYPE_MAX] = {
> + [LS_NLA_TYPE_PATH_RECORD] = {.type = NLA_BINARY,
> + .len = sizeof(struct ib_path_rec_data)},
> + [LS_NLA_TYPE_TIMEOUT] = {.type = NLA_U32},
> + [LS_NLA_TYPE_SERVICE_ID] = {.type = NLA_U64},
> + [LS_NLA_TYPE_DGID] = {.type = NLA_BINARY,
> + .len = sizeof(struct rdma_nla_ls_gid)},
> + [LS_NLA_TYPE_SGID] = {.type = NLA_BINARY,
> + .len = sizeof(struct rdma_nla_ls_gid)},
> + [LS_NLA_TYPE_TCLASS] = {.type = NLA_U8},
> + [LS_NLA_TYPE_PKEY] = {.type = NLA_U16},
> + [LS_NLA_TYPE_QOS_CLASS] = {.type = NLA_U16},
> +};
I'm not sure a single policy is the right way to use this API. The
majority of cases seem to use a policy per message type. However, I
can't think of a downside.
I'd like to test this again here next week, but I think this is OK
now.
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:[~2015-08-21 23:12 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-14 12:52 [PATCH v9 0/4] Sending kernel pathrecord query to user cache server kaike.wan-ral2JQCrhuEAvxtiuMwx3w
[not found] ` <1439556729-27876-1-git-send-email-kaike.wan-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-08-14 12:52 ` [PATCH v9 1/4] IB/netlink: Add defines for local service requests through netlink kaike.wan-ral2JQCrhuEAvxtiuMwx3w
2015-08-14 12:52 ` [PATCH v9 2/4] IB/core: Add rdma netlink helper functions kaike.wan-ral2JQCrhuEAvxtiuMwx3w
2015-08-14 12:52 ` [PATCH v9 3/4] IB/sa: Allocate SA query with kzalloc kaike.wan-ral2JQCrhuEAvxtiuMwx3w
2015-08-14 12:52 ` [PATCH v9 4/4] IB/sa: Route SA pathrecord query through netlink kaike.wan-ral2JQCrhuEAvxtiuMwx3w
[not found] ` <1439556729-27876-5-git-send-email-kaike.wan-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-08-21 23:12 ` Jason Gunthorpe [this message]
2015-08-21 23:07 ` [PATCH v9 0/4] Sending kernel pathrecord query to user cache server Jason Gunthorpe
[not found] ` <20150821230734.GA16951-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2015-08-22 6:17 ` Haggai Eran
2015-08-24 14:32 ` Wan, Kaike
[not found] ` <3F128C9216C9B84BB6ED23EF16290AFB18548AF0-8k97q/ur5Z2krb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-08-24 15:10 ` Haggai Eran
2015-08-25 6:34 ` Haggai Eran
2015-08-25 6:37 ` Haggai Eran
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=20150821231203.GB16951@obsidianresearch.com \
--to=jgunthorpe-epgobjl8dl3ta4ec/59zmfatqe2ktcn/@public.gmane.org \
--cc=ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=john.fleck-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=kaike.wan-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).