Project

General

Profile

Actions

Bug #38391

closed

msg async rdma: fix rdma exchange port, parse string bug

Added by Peng Liu about 5 years ago. Updated about 5 years ago.

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

Updated by Kefu Chai about 5 years ago

  • Status changed from New to Resolved
  • Pull request ID set to 26525
Actions #3

Updated by Greg Farnum about 5 years ago

  • Project changed from Ceph to Messengers
  • Category deleted (msgr)
Actions

Also available in: Atom PDF