[ofa-general] IB function calls in kernel module fail

neutron neutronsharc at gmail.com
Mon Feb 16 07:32:50 PST 2009


One remaining question.

In my code of kernel module,   do I need to #include the header files
from <ofed-prefix>/src/openib/include/....
Or I just include the header files from  <kernel_src_dir>/include/.....

Thanks!


On Mon, Feb 16, 2009 at 6:19 AM, Tziporet Koren
<tziporet at dev.mellanox.co.il> wrote:
> neutron wrote:
>>
>> Hi all,
>>
>> I'm writing a kernel module that make use of basic IB verbs to
>> communicate, like:
>> ib_register_client,  ib_unregister_client,  ib_alloc_pd,
>> ib_create_qp,  ib_reg_phys_mr,  etc.
>>
>> I can compile the code into a kernel module:  ib_rdma_lat.ko.   This
>> module is to test the RDMA write latency from kernel module.
>>
>> But when I "insmod", I got error reports at /var/log/messages:
>>
>> Feb 15 16:33:28 wci11 kernel: ib_rdma_lat: disagrees about version of
>> symbol ib_unregister_client
>> Feb 15 16:33:28 wci11 kernel: ib_rdma_lat: Unknown symbol
>> ib_unregister_client
>> Feb 15 16:33:28 wci11 kernel: ib_rdma_lat: disagrees about version of
>> symbol ib_create_cq
>> Feb 15 16:33:28 wci11 kernel: ib_rdma_lat: Unknown symbol ib_create_cq
>> Feb 15 16:33:28 wci11 kernel: ib_rdma_lat: disagrees about version of
>> symbol ib_reg_phys_mr
>> Feb 15 16:33:28 wci11 kernel: ib_rdma_lat: Unknown symbol ib_reg_phys_mr
>> Feb 15 16:33:28 wci11 kernel: ib_rdma_lat: disagrees about version of
>> symbol ib_dereg_mr
>> Feb 15 16:33:28 wci11 kernel: ib_rdma_lat: Unknown symbol ib_dereg_mr
>> Feb 15 16:33:28 wci11 kernel: ib_rdma_lat: disagrees about version of
>> symbol ib_register_client
>> Feb 15 16:33:28 wci11 kernel: ib_rdma_lat: Unknown symbol
>> ib_register_client
>> Feb 15 16:33:28 wci11 kernel: ib_rdma_lat: disagrees about version of
>> symbol ib_destroy_cq
>> Feb 15 16:33:28 wci11 kernel: ib_rdma_lat: Unknown symbol ib_destroy_cq
>> Feb 15 16:33:28 wci11 kernel: ib_rdma_lat: disagrees about version of
>> symbol ib_query_port
>> Feb 15 16:33:28 wci11 kernel: ib_rdma_lat: Unknown symbol ib_query_port
>> Feb 15 16:33:28 wci11 kernel: ib_rdma_lat: disagrees about version of
>> symbol ib_alloc_pd
>> Feb 15 16:33:28 wci11 kernel: ib_rdma_lat: Unknown symbol ib_alloc_pd
>> Feb 15 16:33:28 wci11 kernel: ib_rdma_lat: disagrees about version of
>> symbol ib_create_qp
>> Feb 15 16:33:28 wci11 kernel: ib_rdma_lat: Unknown symbol ib_create_qp
>> Feb 15 16:33:28 wci11 kernel: ib_rdma_lat: disagrees about version of
>> symbol ib_modify_qp
>> Feb 15 16:33:28 wci11 kernel: ib_rdma_lat: Unknown symbol ib_modify_qp
>> Feb 15 16:33:28 wci11 kernel: ib_rdma_lat: disagrees about version of
>> symbol ib_destroy_qp
>> Feb 15 16:33:28 wci11 kernel: ib_rdma_lat: Unknown symbol ib_destroy_qp
>> Feb 15 16:33:28 wci11 kernel: ib_rdma_lat: disagrees about version of
>> symbol ib_dealloc_pd
>> Feb 15 16:33:28 wci11 kernel: ib_rdma_lat: Unknown symbol ib_dealloc_pd
>>
>> I'm running rhel5.  I have rebooted the node many times but didn't
>> help at all.
>>
>>
>
> From OFED_tips:
> 4. External Module Compilation Over OFED-1.4
> ===============================================================================
>
> To build kernel modules depending on OFED's modules, take the
> Modules.symvers
> file from <prefix>/src/openib/Module.symvers (part of the kernel-ib-devel
> RPM)
> and copy it to the modules subdir and then compile your module.
>
> If <prefix>/src/openib/Module.symvers does not exist or it is empty, use the
> create_Module.symvers.sh (a part of the ofed-docs RPM) script to create the
> Module.symvers file.
>
> See "Module versioning & Module.symvers" in the modules.txt from kernel
> documentation (e.g. linux-2.6.20/Documentation/kbuild/modules.txt).
>
>
> Tziporet
>
>



More information about the general mailing list