linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] libibmad: Add  ib_resolve_noderecord_via  API
@ 2013-02-12 20:39 Sarat Kakarla
       [not found] ` <511AA890.8050106-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: Sarat Kakarla @ 2013-02-12 20:39 UTC (permalink / raw)
  To: weiny2-i2BcT+NCU+M
  Cc: HANLIN.QIAN-QHcLZuEGTsvQT0dZR+AlfA, Jia Shi (E-mail),
	linux-rdma-u79uwXL29TY76Z2rM5mHXA

Add ib_resolve_noderecord_via wrapper similar to ib_resolve_portid_str_via

Signed-off-by: Sarat Kakarla <sarat.kakarla-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>

--- include/infiniband/mad.h  2009-11-01 16:17:12.000000000 -0800
+++ ../libibmad-1.3.3.wrapper/include/infiniband/mad.h  2013-02-07 10:32:05.000000000 -0800
@@ -934,6 +934,8 @@
      DEPRECATED;
  MAD_EXPORT int ib_resolve_self(ib_portid_t * portid, int *portnum,
              ibmad_gid_t * gid) DEPRECATED;
+MAD_EXPORT int ib_resolve_noderecord_via(char *addr_str,
+                                         const struct ibmad_port *srcport);

  /* resolve.c new interface */
  MAD_EXPORT int ib_resolve_smlid_via(ib_portid_t * sm_id, int timeout,
--- src/libibmad.map  2009-10-29 18:18:01.000000000 -0700
+++ ../libibmad-1.3.3.wrapper/src/libibmad.map  2013-02-11 10:47:13.000000000 -0800
@@ -105,6 +105,7 @@
     ib_resolve_gid_via;
     ib_resolve_portid_str_via;
     ib_resolve_self_via;
+    ib_resolve_noderecord_via;
     mad_field_name;
     bm_call_via;
   local: *;
--- src/resolve.c 2009-11-01 16:17:12.000000000 -0800
+++ ../libibmad-1.3.3.wrapper/src/resolve.c 2013-02-11 10:46:10.000000000 -0800
@@ -226,3 +226,21 @@
  {
   return ib_resolve_self_via(portid, portnum, gid, ibmp);
  }
+
+int ib_resolve_noderecord_via(char *addr_str, const struct ibmad_port *srcport)
+{
+   uint64_t    guid;
+   ib_portid_t sm_id;
+   char        buf[IB_SA_DATA_SIZE] = { 0 };
+
+   if (!(guid = strtoull(addr_str, 0, 0)))
+     return -1;
+
+   if (ib_resolve_smlid_via(&sm_id, MAD_DEF_TIMEOUT_MS, srcport) < 0)
+      return -1;
+
+   return ib_node_query_via(srcport, guid, &sm_id, buf);
+}
+
+

--
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

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-02-18 21:59 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-12 20:39 [PATCH] libibmad: Add ib_resolve_noderecord_via API Sarat Kakarla
     [not found] ` <511AA890.8050106-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2013-02-12 22:21   ` Hal Rosenstock
     [not found]     ` <511AC06B.3030005-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2013-02-12 23:03       ` Sarat Kakarla
     [not found]         ` <511ACA52.4060104-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2013-02-12 23:19           ` Hal Rosenstock
     [not found]             ` <511ACDE4.1080006-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2013-02-12 23:23               ` Sarat Kakarla
2013-02-12 23:28   ` Ira Weiny
     [not found]     ` <20130212152859.b62c4d6df7bd5bf0a393fa4a-i2BcT+NCU+M@public.gmane.org>
2013-02-12 23:36       ` Sarat Kakarla
     [not found]         ` <511AD1EB.8070807-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2013-02-12 23:49           ` Ira Weiny
     [not found]             ` <20130212154949.2ff378f25c6cce7e6119137c-i2BcT+NCU+M@public.gmane.org>
2013-02-18 21:59               ` Sarat Kakarla

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).