Refer to Doc: InfiniBandTM Architecture Specification Volume 1 Ver1.2.1
Section: 9.2 BASE TRANSPORT HEADER
bits |31---------24 | 23-----------16 | 15----------8 | 7---------0 |
bytes |______________________________________________________________|
0 - 3 |____OpCode____|__|SE|M|Pad|Tver_|_________ Partition Key______|
4 - 7 |___Reserved___|______________Destination QP___________________|
8 -11 |A|Reserved 7__|________ PSN - Packet Sequence Number _________|
Signed-off-by: Changcheng Liu <changcheng.liu@aliyun.com>
q_key(q_key),
dead(false)
{
- initial_psn = lrand48() & 0xffffff;
+ initial_psn = lrand48() & PSN_MSK;
if (type != IBV_QPT_RC && type != IBV_QPT_UD && type != IBV_QPT_RAW_PACKET) {
lderr(cct) << __func__ << " invalid queue pair type" << cpp_strerror(errno) << dendl;
ceph_abort();
#define ALIGN_TO_PAGE_SIZE(x) \
(((x) + HUGE_PAGE_SIZE -1) / HUGE_PAGE_SIZE * HUGE_PAGE_SIZE)
+#define PSN_LEN 24
+#define PSN_MSK ((1 << PSN_LEN) - 1)
+
struct IBSYNMsg {
uint16_t lid;
uint32_t qpn;