From: ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org
To: roland-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
hal-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org,
jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org,
Ira Weiny <ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Subject: [PATCH 2/6] ib/ipath: change default node description processing
Date: Thu, 30 Oct 2014 19:50:17 -0400 [thread overview]
Message-ID: <1414713021-12175-3-git-send-email-ira.weiny@intel.com> (raw)
In-Reply-To: <1414713021-12175-1-git-send-email-ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
From: Ira Weiny <ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Change the default node description string to IB_DEFAULT_ND_FORMAT
Use ib_build_node_desc to dynamically map this string when queried
Reviewed-by: John Fleck <john.fleck-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Reviewed-by: Michael Heinz <michael.william.heinz-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Reviewed-by: Mike Marciniszyn <mike.marciniszyn-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Ira Weiny <ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
drivers/infiniband/hw/ipath/ipath_mad.c | 3 ++-
drivers/infiniband/hw/ipath/ipath_verbs.c | 4 ++--
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/infiniband/hw/ipath/ipath_mad.c b/drivers/infiniband/hw/ipath/ipath_mad.c
index e890e5b..1ec0afd 100644
--- a/drivers/infiniband/hw/ipath/ipath_mad.c
+++ b/drivers/infiniband/hw/ipath/ipath_mad.c
@@ -61,7 +61,8 @@ static int recv_subn_get_nodedescription(struct ib_smp *smp,
if (smp->attr_mod)
smp->status |= IB_SMP_INVALID_FIELD;
- memcpy(smp->data, ibdev->node_desc, sizeof(smp->data));
+ ib_build_node_desc(smp->data, ibdev->node_desc, IB_DEVICE_DESC_MAX,
+ ibdev);
return reply(smp);
}
diff --git a/drivers/infiniband/hw/ipath/ipath_verbs.c b/drivers/infiniband/hw/ipath/ipath_verbs.c
index 44ea939..bec61d6 100644
--- a/drivers/infiniband/hw/ipath/ipath_verbs.c
+++ b/drivers/infiniband/hw/ipath/ipath_verbs.c
@@ -2180,8 +2180,8 @@ int ipath_register_ib_device(struct ipath_devdata *dd)
dev->mmap = ipath_mmap;
dev->dma_ops = &ipath_dma_mapping_ops;
- snprintf(dev->node_desc, sizeof(dev->node_desc),
- IPATH_IDSTR " %s", init_utsname()->nodename);
+ snprintf(dev->node_desc, sizeof(dev->node_desc)-1, "%s",
+ IB_DEFAULT_ND_FORMAT);
ret = ib_register_device(dev, NULL);
if (ret)
--
1.8.2
--
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:[~2014-10-30 23:50 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-30 23:50 [PATCH 0/6] Make Node Description default to "<hostname> <device>" ira.weiny-ral2JQCrhuEAvxtiuMwx3w
[not found] ` <1414713021-12175-1-git-send-email-ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2014-10-30 23:50 ` [PATCH 1/6] ib/mad: Add function to support format specifiers for node description ira.weiny-ral2JQCrhuEAvxtiuMwx3w
2014-10-30 23:50 ` ira.weiny-ral2JQCrhuEAvxtiuMwx3w [this message]
2014-10-30 23:50 ` [PATCH 3/6] ib/mlx4: change default node description processing ira.weiny-ral2JQCrhuEAvxtiuMwx3w
[not found] ` <1414713021-12175-4-git-send-email-ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2014-11-07 12:17 ` Hal Rosenstock
2014-10-30 23:50 ` [PATCH 4/6] ib/mthca: " ira.weiny-ral2JQCrhuEAvxtiuMwx3w
[not found] ` <1414713021-12175-5-git-send-email-ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2014-11-07 12:17 ` Hal Rosenstock
2014-10-30 23:50 ` [PATCH 5/6] ib/qib: " ira.weiny-ral2JQCrhuEAvxtiuMwx3w
2014-10-30 23:50 ` [PATCH 6/6] ib/mlx5: " ira.weiny-ral2JQCrhuEAvxtiuMwx3w
[not found] ` <1414713021-12175-7-git-send-email-ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2014-11-07 12:17 ` Hal Rosenstock
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=1414713021-12175-3-git-send-email-ira.weiny@intel.com \
--to=ira.weiny-ral2jqcrhueavxtiumwx3w@public.gmane.org \
--cc=hal-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org \
--cc=jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=roland-DgEjT+Ai2ygdnm+yROfE0A@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