public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: frank zago <fzago-klaOcWyJdxkshyMvu7JE4pqQE7yCjDx5@public.gmane.org>
To: "linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: [PATCH] perftest/write_bw_postlist
Date: Thu, 03 Feb 2011 15:37:01 -0600	[thread overview]
Message-ID: <4D4B1FFD.9070906@systemfabricworks.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 318 bytes --]

Hello,

in write_bw_postlist.c, my_dest (and possibly rem_dest) must be initialized, else the remote node may not be able to parse the connection string and the test will fail to start.
The others test are doing that initialization.

Signed-off-by: Frank Zago <fzago-klaOcWyJdxkshyMvu7JE4pqQE7yCjDx5@public.gmane.org>

[-- Attachment #2: write_bw_postlist-fix.diff --]
[-- Type: text/x-diff, Size: 599 bytes --]

diff --git a/write_bw_postlist.c b/write_bw_postlist.c
index 0349c40..e2e191f 100644
--- a/write_bw_postlist.c
+++ b/write_bw_postlist.c
@@ -738,8 +743,8 @@ int main(int argc, char *argv[])
 	if (!ctx)
 		return 1;
 
-	my_dest  = malloc(sizeof(struct pingpong_dest)*user_param.num_of_qps);
-	rem_dest = malloc(sizeof(struct pingpong_dest)*user_param.num_of_qps);
+	my_dest  = calloc(user_param.num_of_qps, sizeof(struct pingpong_dest));
+	rem_dest = calloc(user_param.num_of_qps, sizeof(struct pingpong_dest));
     if (!my_dest || !rem_dest) {
 		perror("malloc my_dest or rem_dest");
 		return 1;

             reply	other threads:[~2011-02-03 21:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-03 21:37 frank zago [this message]
     [not found] ` <4D4B1FFD.9070906-klaOcWyJdxkshyMvu7JE4pqQE7yCjDx5@public.gmane.org>
2011-02-15  9:27   ` [PATCH] perftest/write_bw_postlist Ido Shamai

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=4D4B1FFD.9070906@systemfabricworks.com \
    --to=fzago-klaocwyjdxkshymvu7je4pqqe7ycjdx5@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