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>
Cc: "linux-rdma
	(linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org)"
	<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: [PATCH] mcm_rereg_test.c: Fix a couple of output messages
Date: Thu, 05 Jul 2012 14:25:50 -0400	[thread overview]
Message-ID: <4FF5DC2E.6000904@dev.mellanox.co.il> (raw)


In rereg_send, it's not a leave but query
Fix endian of guid in rereg_send_all

Signed-off-by: Hal Rosenstock <hal-rOwS8X3CFV5BDgjK7y7TUQ@public.gmane.org>
---
diff --git a/src/mcm_rereg_test.c b/src/mcm_rereg_test.c
index ec979d7..a8cce8b 100644
--- a/src/mcm_rereg_test.c
+++ b/src/mcm_rereg_test.c
@@ -101,7 +101,9 @@ static int rereg_send(int port, int agent, ib_portid_t * dport,
 
 	build_mcm_rec_umad(umad, dport, method, comp_mask, data);
 	if (umad_send(port, agent, umad, len, TMO, 0) < 0) {
-		err("umad_send leave failed: %s\n", strerror(errno));
+		err("umad_send %s failed: %s\n",
+		    (method == IB_MAD_METHOD_GET) ? "query" : "non query",
+		    strerror(errno));
 		return -1;
 	}
 	dbg("umad_send %d: tid = 0x%016" PRIx64 "\n", method,
@@ -164,7 +166,7 @@ static int rereg_send_all(int port, int agent, ib_portid_t * dport,
 		    rereg_port_gid(port, agent, dport, umad, len, list[i].gid);
 		if (ret < 0) {
 			err("rereg_send_all: rereg_port_gid 0x%016" PRIx64
-			    " failed\n", list[i].guid);
+			    " failed\n", ntohll(list[i].guid));
 			continue;
 		}
 		list[i].trid = mad_get_field64(umad_get_mad(umad), 0,
--
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:[~2012-07-05 18:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-05 18:25 Hal Rosenstock [this message]
     [not found] ` <4FF5DC2E.6000904-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2012-07-08  0:26   ` [PATCH] mcm_rereg_test.c: Fix a couple of output messages 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=4FF5DC2E.6000904@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