Skip to content

Conversation

@erbth
Copy link

@erbth erbth commented Nov 7, 2025

Hi everyone,

I've encountered an issue when using libibverbs on BCM57508 NIC. For example, ibv_rc_pingpong invoked in this way:

ibv_rc_pingpong -g <gid> -d <device, e.g. bnxt_re0> [<server's ipv4 address>, on the client] 

would fail with the following output:

ibv_rc_pingpong: /home/erbesdob/software/rdma-core/build/include/infiniband/cmd_ioctl.h:200: _ioctl_next_attr: Assertion `cmd->next_attr < cmd->last_attr' failed. 

.

The build command was cmake -B build -DCMAKE_BUILD_TYPE=RelWithDbgInfo -DCMAKE_INSTALL_PREFIX=/opt/rdma-core -DNO_MAN_PAGES=1 for 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.7

I did some debugging and found that the assert() causing the output is triggered by passing five parameters to the ioctl in bnxt_re_alloc_page, but only specifying four parameters in the corresponding struct 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.

Signed-off-by: Thomas Erbesdobler <t.erbesdobler@gmx.de>
@erbth erbth force-pushed the bnxt_re_param_cnt_fix branch from e14f468 to 43ebe92 Compare November 7, 2025 20:30
BNXT_RE_OBJECT_ALLOC_PAGE,
BNXT_RE_METHOD_ALLOC_PAGE,
4);
5);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your patch looks correct to me. However there is a need to format it according to our patch rules (same as in the kernel). Please write commit message which describes the issue and add Fixes line which points to the commit which is fixed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants