From: Hal Rosenstock <hal-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
To: "Wan, Kaike" <kaike.wan-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: "linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"Fleck,
John" <john.fleck-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
"Weiny, Ira" <ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Subject: Re: [PATCH v4 1/1] ibacm: Add support for pathrecord query through netlink
Date: Thu, 11 Jun 2015 11:52:59 -0400 [thread overview]
Message-ID: <5579AEDB.5070702@dev.mellanox.co.il> (raw)
In-Reply-To: <3F128C9216C9B84BB6ED23EF16290AFB0CABD14B-8k97q/ur5Z2krb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
On 6/11/2015 10:25 AM, Wan, Kaike wrote:
>>> +static void acm_nl_process_resolve(struct acmc_client *client,
>>> + struct acm_nl_msg *acmnlmsg)
>>> +{
>>> + struct acm_msg msg;
>>> + struct nlattr *attr;
>>> + int payload_len;
>>> + int rem;
>>> + int total_attr_len;
>>> +
>>> + memset(&msg, 0, sizeof(msg));
>>> + msg.hdr.opcode = ACM_OP_RESOLVE;
>>> + msg.hdr.version = ACM_VERSION;
>>> + msg.hdr.length = ACM_MSG_HDR_LENGTH +
>> ACM_MSG_EP_LENGTH;
>>> + msg.hdr.status = ACM_STATUS_SUCCESS;
>>> + msg.hdr.tid = (uint64_t) acmnlmsg;
>>> + msg.resolve_data[0].type = ACM_EP_INFO_PATH;
>>> +
>>> + payload_len = acmnlmsg->nlmsg_header.nlmsg_len -
>> NLMSG_HDRLEN;
>>> + attr = NLMSG_DATA(&acmnlmsg->nlmsg_header);
>>> + rem = payload_len;
>>> + while (1) {
>>> + if (rem < (int) sizeof(*attr) ||
>>> + attr->nla_len < sizeof(*attr) ||
>>> + attr->nla_len > rem)
>>> + break;
>>> +
>>> + acm_nl_parse_path_attr(attr, &msg.resolve_data[0]);
>>> +
>>> + /* Next attribute */
>>> + total_attr_len = NLA_ALIGN(attr->nla_len);
>>> + rem -= total_attr_len;
>>> + attr = (struct nlattr *) ((char *) attr + total_attr_len);
>>> + }
>>> +
>>
>> Since ACM does not resolve multicast PRs,
>
> Why not? The multicast gid will be used as the dgid and ibacm will not ask peers for address resolution.
> Instead, It will ask SA directly for the multicast pathrecord (route resolution only).
> I can't see why it can't be done here.
Are you saying the local cache lookup fails so it falls back to ask SA
for multicast PR ? If so, then perhaps there's provider optimization to
fail that style of lookup rather than doing the tree lookup.
>> as an optimization here, some
>> minor check of DGID could be done and if it's multicast DGID, ENODATA
>> could be indicated in NL message.
>>
>
--
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-06-11 15:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-09 14:57 [PATCH v4 1/1] ibacm: Add support for pathrecord query through netlink kaike.wan-ral2JQCrhuEAvxtiuMwx3w
[not found] ` <1433861878-26264-1-git-send-email-kaike.wan-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-06-11 14:15 ` Hal Rosenstock
[not found] ` <557997EF.7070707-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2015-06-11 14:25 ` Wan, Kaike
[not found] ` <3F128C9216C9B84BB6ED23EF16290AFB0CABD14B-8k97q/ur5Z2krb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-06-11 15:52 ` Hal Rosenstock [this message]
[not found] ` <5579AEDB.5070702-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2015-06-11 16:01 ` Wan, Kaike
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=5579AEDB.5070702@dev.mellanox.co.il \
--to=hal-ldsdmyg8hgv8yrgs2mwiifqbs+8scbdb@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