Skip to content

Commit

Permalink
pingpong: Include address format with fi_info hints
Browse files Browse the repository at this point in the history
The pingpong test does an out of band address exchange.
However, it does not provide the format of the address back
into the hints.

Include the address format as part of the exchange.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
  • Loading branch information
shefty committed Dec 17, 2018
1 parent e3937fe commit 07ee7c0
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions util/pingpong.c
Expand Up @@ -565,6 +565,18 @@ static int pp_send_name(struct ct_pingpong *ct, struct fid *endpoint)
if (ret < 0)
goto fn;

PP_DEBUG("Sending address format\n");
if (ct->fi) {
ret = pp_ctrl_send(ct, (char *) &ct->fi->addr_format,
sizeof(ct->fi->addr_format));
} else {
ret = pp_ctrl_send(ct, (char *) &ct->fi_pep->addr_format,
sizeof(ct->fi_pep->addr_format));

}
if (ret < 0)
goto fn;

PP_DEBUG("Sending name\n");
ret = pp_ctrl_send(ct, local_name, addrlen);
PP_DEBUG("Sent name\n");
Expand Down Expand Up @@ -592,6 +604,12 @@ static int pp_recv_name(struct ct_pingpong *ct)
return -ENOMEM;
}

PP_DEBUG("Receiving address format\n");
ret = pp_ctrl_recv(ct, (char *) &ct->hints->addr_format,
sizeof(ct->hints->addr_format));
if (ret < 0)
return ret;

PP_DEBUG("Receiving name\n");
ret = pp_ctrl_recv(ct, ct->rem_name, len);
if (ret < 0)
Expand Down

0 comments on commit 07ee7c0

Please sign in to comment.