How does the mlx5 driver use the IOVA generated by IOMMU as DMA address?

I have enabled IOMMU on the physical machine. I expect the RDMA NIC to use the IOVA allocated by the IOMMU module for DMA after enabling IOMMU. However, in reality, the RDMA NIC does not use the IOVA for DMA

I found through reading the kernel source code that ib_dma_map_sgtable_attrs() is called in ib_umem_get to obtain the DMA address for each scatterlist (sg) entry. During the process of obtaining the DMA address, it first checks whether dev->ops is empty, and then decides whether to assign the DMA address to IOVA. Currently, it was debugged that dev->ops is empty at this point, and the DMA address is not assigned to IOVA.

Does the mlx5 driver perform any other actions (such as assigning dev->ops) when obtaining the struct device *dev to be able to use IOMMU?

I guess you should rather ask in the network forums:
https://forums.developer.nvidia.com/c/infrastructure/adapters-and-cables/ethernet-adapter-cards/542
https://forums.developer.nvidia.com/c/infrastructure/adapters-and-cables/infiniband-vpi-adapter-cards/541