git: 4aed4f191c49 - main - fixup! verbs/mlx5: Annotate ibv_wc and ibv_send_wr with endian
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 16 Sep 2026 14:13:02 UTC
The branch main has been updated by kib:
URL: https://cgit.FreeBSD.org/src/commit/?id=4aed4f191c4953d4704973432fea93514a37fa45
commit 4aed4f191c4953d4704973432fea93514a37fa45
Author: Ariel Ehrenberg <aehrenberg@nvidia.com>
AuthorDate: 2026-07-28 12:02:45 +0000
Commit: Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2026-09-16 14:12:08 +0000
fixup! verbs/mlx5: Annotate ibv_wc and ibv_send_wr with endian
Fix is based on upstream rdma-core commit 14a0fc824f16 ("rdma-core/irdma:
Implement device supported verb APIs").
Use ib_wr->invalidate_rkey instead of ib_wr->imm_data for
IBV_WR_SEND_WITH_INV and IBV_WR_LOCAL_INV. The two share a union, but
imm_data is __be32 while the rkey to invalidate is host order, so with the
new endian annotations this path reads the wrong member. Upstream irdma
has always used invalidate_rkey here.
Sponsored by: NVidia networking
MFC after: 1 month
---
contrib/ofed/libirdma/irdma_uverbs.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/contrib/ofed/libirdma/irdma_uverbs.c b/contrib/ofed/libirdma/irdma_uverbs.c
index aee904a087bf..34a02020a91d 100644
--- a/contrib/ofed/libirdma/irdma_uverbs.c
+++ b/contrib/ofed/libirdma/irdma_uverbs.c
@@ -1725,7 +1725,7 @@ irdma_upost_send(struct ibv_qp *ib_qp, struct ibv_send_wr *ib_wr,
info.op_type = IRDMA_OP_TYPE_SEND_SOL_INV;
else
info.op_type = IRDMA_OP_TYPE_SEND_INV;
- info.stag_to_inv = ib_wr->imm_data;
+ info.stag_to_inv = ib_wr->invalidate_rkey;
}
info.op.send.num_sges = ib_wr->num_sge;
info.op.send.sg_list = (struct ibv_sge *)ib_wr->sg_list;
@@ -1821,7 +1821,7 @@ irdma_upost_send(struct ibv_qp *ib_qp, struct ibv_send_wr *ib_wr,
break;
case IBV_WR_LOCAL_INV:
info.op_type = IRDMA_OP_TYPE_INV_STAG;
- info.op.inv_local_stag.target_stag = ib_wr->imm_data;
+ info.op.inv_local_stag.target_stag = ib_wr->invalidate_rkey;
err = irdma_uk_stag_local_invalidate(&iwuqp->qp, &info, true);
break;
default: