public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Hal Rosenstock <hal-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
To: Ira Weiny <weiny2-i2BcT+NCU+M@public.gmane.org>,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: [PATCH 2/3] libibmad: Add support for SA GUIDInfoRecord fields
Date: Fri, 25 Mar 2011 21:23:22 +0200	[thread overview]
Message-ID: <4D8CEBAA.2020609@dev.mellanox.co.il> (raw)


Signed-off-by: Hal Rosenstock <hal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
  libibmad/include/infiniband/mad.h |   15 +++++++++++++++
  libibmad/src/fields.c             |   12 ++++++++++++
  2 files changed, 27 insertions(+), 0 deletions(-)

diff --git a/libibmad/include/infiniband/mad.h 
b/libibmad/include/infiniband/mad.h
index 02f0dc8..a0b368a 100644
--- a/libibmad/include/infiniband/mad.h
+++ b/libibmad/include/infiniband/mad.h
@@ -62,6 +62,7 @@ BEGIN_C_DECLS
  #define IB_PC_DATA_SZ        (IB_MAD_SIZE - IB_PC_DATA_OFFS)
  #define IB_SA_MCM_RECSZ        53
  #define IB_SA_PR_RECSZ        64
+#define IB_SA_GIR_RECSZ        72
  #define IB_BM_DATA_OFFS        64
  #define IB_BM_DATA_SZ        (IB_MAD_SIZE - IB_BM_DATA_OFFS)
  #define IB_BM_BKEY_OFFS        24
@@ -713,6 +714,20 @@ enum MAD_FIELDS {
      IB_PSC_SAMPLES_ONLY_OPT_MASK_F,
      IB_PSC_LAST_F,

+    /*
+     * GUID Info Record
+     */
+    IB_SA_GIR_LID_F,
+    IB_SA_GIR_BLOCKNUM_F,
+    IB_SA_GIR_GUID0,
+    IB_SA_GIR_GUID1,
+    IB_SA_GIR_GUID2,
+    IB_SA_GIR_GUID3,
+    IB_SA_GIR_GUID4,
+    IB_SA_GIR_GUID5,
+    IB_SA_GIR_GUID6,
+    IB_SA_GIR_GUID7,
+
      IB_FIELD_LAST_        /* must be last */
  };

diff --git a/libibmad/src/fields.c b/libibmad/src/fields.c
index c9897e7..1dc1fb8 100644
--- a/libibmad/src/fields.c
+++ b/libibmad/src/fields.c
@@ -511,6 +511,18 @@ static const ib_field_t ib_mad_f[] = {
      {576, 64, "SamplesOnlyOptionMask", mad_dump_hex},
      {0, 0},            /* IB_PSC_LAST_F */

+    /* GUID Info Record */
+    {BITSOFFS(0, 16), "Lid", mad_dump_uint},
+    {BITSOFFS(16, 8), "BlockNum", mad_dump_uint},
+    {64, 64, "Guid0", mad_dump_hex},
+    {128, 64, "Guid1", mad_dump_hex},
+    {192, 64, "Guid2", mad_dump_hex},
+    {256, 64, "Guid3", mad_dump_hex},
+    {320, 64, "Guid4", mad_dump_hex},
+    {384, 64, "Guid5", mad_dump_hex},
+    {448, 64, "Guid6", mad_dump_hex},
+    {512, 64, "Guid7", mad_dump_hex},
+
      {0, 0}            /* IB_FIELD_LAST_ */

  };
-- 
1.5.3

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

             reply	other threads:[~2011-03-25 19:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-25 19:23 Hal Rosenstock [this message]
     [not found] ` <4D8CEBAA.2020609-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2011-03-28 20:41   ` [PATCH 2/3] libibmad: Add support for SA GUIDInfoRecord fields Ira Weiny

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=4D8CEBAA.2020609@dev.mellanox.co.il \
    --to=hal-ldsdmyg8hgv8yrgs2mwiifqbs+8scbdb@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=weiny2-i2BcT+NCU+M@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