Skip to content

Commit 3bea371

Browse files
committed
Restrict range of sequence number to 24 bits. Linux complains with:
kernel: infiniband mlx4_0: _ib_modify_qp rq_psn overflow, masking to 24 bits without this.
1 parent 72947b8 commit 3bea371

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/infinity/queues/QueuePair.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ QueuePair::QueuePair(infinity::core::Context* context) :
6767
INFINITY_ASSERT(returnValue == 0, "[INFINITY][QUEUES][QUEUEPAIR] Cannot transition to INIT state.\n");
6868

6969
std::random_device randomGenerator;
70-
this->sequenceNumber = randomGenerator();
70+
std::uniform_int_distribution<int> range(0, 1<<24);
71+
this->sequenceNumber = range(randomGenerator);
7172

7273
this->userData = NULL;
7374
this->userDataSize = 0;

0 commit comments

Comments
 (0)