diff options
author | Maher Sanalla <msanalla@nvidia.com> | 2025-03-13 17:20:17 +0300 |
---|---|---|
committer | Leon Romanovsky <leon@kernel.org> | 2025-03-19 11:43:03 +0300 |
commit | 37826f0a8c2f6b6add5179003b8597e32a445362 (patch) | |
tree | b47a0a7a82b303c4eef9fab2b9a22ce05627c910 /scripts/gdb/linux/utils.py | |
parent | 0c55174524227a174c1a367889cd704212d15b45 (diff) | |
download | linux-37826f0a8c2f6b6add5179003b8597e32a445362.tar.xz |
IB/mad: Check available slots before posting receive WRs
The ib_post_receive_mads() function handles posting receive work
requests (WRs) to MAD QPs and is called in two cases:
1) When a MAD port is opened.
2) When a receive WQE is consumed upon receiving a new MAD.
Whereas, if MADs arrive during the port open phase, a race condition
might cause an extra WR to be posted, exceeding the QP’s capacity.
This leads to failures such as:
infiniband mlx5_0: ib_post_recv failed: -12
infiniband mlx5_0: Couldn't post receive WRs
infiniband mlx5_0: Couldn't start port
infiniband mlx5_0: Couldn't open port 1
Fix this by checking the current receive count before posting a new WR.
If the QP’s receive queue is full, do not post additional WRs.
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Maher Sanalla <msanalla@nvidia.com>
Link: https://patch.msgid.link/c4984ba3c3a98a5711a558bccefcad789587ecf1.1741875592.git.leon@kernel.org
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Diffstat (limited to 'scripts/gdb/linux/utils.py')
0 files changed, 0 insertions, 0 deletions