Actions
Bug #38391
closedmsg async rdma: fix rdma exchange port, parse string bug
Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
% Done:
0%
Source:
Tags:
Backport:
Regression:
No
Severity:
2 - major
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):
Description
In src/msg/async/rdma/Infiniband.cc
function send_msg encode struct IBSYNMsg to a string, and recv_msg parse the string.
In send_msg, im.lid (unsigned short int) is formatted into a string with format string %04x,
so, recv_msg should read im.lid from the string with format string %hx instead of %hu (unsigned short).
int Infiniband::recv_msg(CephContext *cct, int sd, IBSYNMsg& im)
{
...
sscanf(msg, "*%hu:%x:%x:%x:%s*", &(im.lid), &(im.qpn), &(im.psn), &(im.peer_qpn),gid);
...
}
int Infiniband::send_msg(CephContext *cct, int sd, IBSYNMsg& im)
{
...
sprintf(msg, "*%04x:%08x:%08x:%08x:%s*", im.lid, im.qpn, im.psn, im.peer_qpn, gid);
...
}
Actions