bnxt_re: fix ioctl parameter count #1659
Open
+1 −1
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
Hi everyone,
I've encountered an issue when using libibverbs on BCM57508 NIC. For example, ibv_rc_pingpong invoked in this way:
would fail with the following output:
.
The build command was
cmake -B build -DCMAKE_BUILD_TYPE=RelWithDbgInfo -DCMAKE_INSTALL_PREFIX=/opt/rdma-core -DNO_MAN_PAGES=1for the v60.0 tag, but if I remember correctly, I got the same error with the current master branch. The Linux kernel version used for testing is 6.17.7I did some debugging and found that the
assert()causing the output is triggered by passing five parameters to the ioctl inbnxt_re_alloc_page, but only specifying four parameters in the correspondingstruct ibv_command_buffer-instance. The patch proposed in this pull request seems to fix (or hack) the issue, and if I understand the kernel source code correctly (https://elixir.bootlin.com/linux/v6.17.7/source/drivers/infiniband/hw/bnxt_re/ib_verbs.c#L4533), the kernel driver expects the corresponding five parameters.However I'm no expert in the bnxt family of drivers, and the RDMA subsystem of the kernel.