Problems using krping
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
It appears the MLX4 driver does not support kernel mode memory regions. You'll have to use dma mrs or fast_reg mrs with that device.
Steve.
Quoted 48 lines · lihaidong
Mr.Wise:
When using mr mode as the memory registration method, krping failed to get memory region using ib_reg_phys_mr().Could you help me, please?
dmesg:
krping_init
krping: proc write |client,addr=10.10.10.15,mem_mode=mr,port=9999,count=1,verbose| client
ipaddr (10.10.10.15)
port 9999
count 1
verbose
createdcm_idffff88013c74c800cma_eventtype 0cma_idffff88013c74c800(parent)cma_eventtype 2cma_idffff88013c74c800(parent)rdma_resolve_addr-rdma_resolve_routesuccessful
created pdffff880133845280
created cqffff88013c1ff400
created qpffff88013c1ffe00
krping:krping_setup_bufferscalled on cbffff88013c59f800
krping: recv bufdma_addr13c59f968size 16
krping:recv_bufreg_mrfailed
krping:krping_setup_buffersfailed: -38
destroycm_idffff88013c74c800
krping: proc write |client,addr=10.10.10.15,mem_mode=mr,port=9999,count=1,verbose| client
ipaddr (10.10.10.15)
port 9999
count 1
verbose
createdcm_idffff88013c59f800cma_eventtype 0cma_idffff88013c59f800(parent)cma_eventtype 2cma_idffff88013c59f800(parent)rdma_resolve_addr-rdma_resolve_routesuccessful
created pdffff88012f5964a0
created cqffff88012faee400
created qpffff88012faeec00
krping:krping_setup_bufferscalled on cbffff88013c71d400
krping: recv bufdma_addr13c71d568size 16
krping:recv_bufreg_mrfailed
krping:krping_setup_buffersfailed: -38
destroycm_idffff88013c59f800echo "client,addr=10.10.10.15,mem_mode=mr,port=9999,count=1" >
/proc/krpingecho "server,addr=10.10.10.15,mem_mode=mr,port=9999" >
/proc/krping
Quoted 8 lines
Using OFED-1.5 ofa_kernel-1.5
HardWare:Mellanox Technologies MT26428 [ConnectX VPI PCIe 2.0 5GT/s - IB QDR / 10GigE]put krping source files into
drivers/infiniband/hw/mlx42010-01-21
------------------------------------------------------------------------
lihaidong
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 6 lines · lihaidong
Mr.Wise:
Sorry to Bother you Another problem.
fastreg(Must withlocal_dma_keyto avoid usingib_reg_phys_mrin my
case) withread_invsucceed, yet withserver_invfailed.What does 'krping: cq completion failed with
wr_id0 status 6 opcode -1vender_err78' in client dmesg info mean?
Maybe the mlx4 experts can comment on status 6 vender_err 78?
Quoted 1 line
Why data transferring happened before server waked up from waiting for CONNECTED?
This can happen. There is a race between getting the CONNECTED event and the first incoming data completion (like a recv completion).
Quoted 123 lines
Client demsg:
krping: proc write |client,addr=10.10.10.15,port=8888,count=1,verbose,local_dma_lkey,mem_mode=fastreg,server_inv| client
ipaddr (10.10.10.15)
port 8888
count 1
verbose
using local dma lkey
createdcm_idffff88013cd11000cma_eventtype 0cma_idffff88013cd11000(parent)cma_eventtype 2cma_idffff88013cd11000(parent)
Fastreg supported -device_cap_flags0x7c9c76rdma_resolve_addr-rdma_resolve_routesuccessful
created pdffff88012a9fff80
created cqffff8801305d5400
created qpffff8801305d5800
krping:krping_setup_bufferscalled on cbffff88013cd11800
krping: fastreg rkey0x88001a00page_listffff88012b3cee80page_list_len1
krping: allocated & registered buffers...cma_eventtype 9cma_idffff88013cd11000(parent)
ESTABLISHEDrdma_connectsuccessful
krping: page_list[0]0x12a40c000
krping:post_inv= 0, fastreg new rkey0x88001a01shift 12 len 64iova_start12a40c180page_list_len1 RDMA addr12a40c180rkey88001a01len 64
krping: cq completion failed withwr_id0 status 6 opcode -1vender_err78
krping: cq completion in ERROR state
krping:krping_format_sendfailedkrping_free_bufferscalled on cbffff88013cd11800
destroycm_idffff88013cd11000Server dmesg:
krping: proc write |server,addr=10.10.10.15,port=8888,count=1,verbose,local_dma_lkey,mem_mode=fastreg,server_inv| server
ipaddr (10.10.10.15)
port 8888
count 1
verbose
using local dma lkey
createdcm_idffff88007e3c5c00rdma_bind_addrsuccessfulrdma_listencma_eventtype 4cma_idffff88003e0dac00(child)
child cmaffff88003e0dac00
Fastreg supported -device_cap_flags0x7c9c76
created pdffff880035d17d20
created cqffff88001e0f9e00
created qpffff88001e0f9c00
krping:krping_setup_bufferscalled on cbffff88007e2b0000
krping: fastreg rkey0x68001d00page_listffff8800027ab580page_list_len1
krping: allocated & registered buffers...
accepting client connection requestcma_eventtype 9cma_idffff88003e0dac00(child)
ESTABLISHEDcma_eventtype 10cma_idffff88003e0dac00(child)
krping: DISCONNECT EVENT...
krping: wait for CONNECTED state 10
krping: connect error -1krping_free_bufferscalled on cbffff88007e2b0000
destroycm_idffff88007e3c5c00
2010-01-22
------------------------------------------------------------------------
lihaidong
------------------------------------------------------------------------
*发件人:* Steve Wise
*发送时间:* 2010-01-21 06:43:30
*收件人:* lihaidong
*抄送:* linux-rdma
*主题:* Re: Problems using krping
It appears the MLX4 driver does not support kernel mode memory regions. You'll have to use dma mrs orfast_regmrs with that device. Steve.Quoted 51 lines · lihaidong
Mr.Wise:
When using mr mode as the memory registration method, krping failed to get memory region using ib_reg_phys_mr().Could you help me, please?
dmesg:
krping_init
krping: proc write |client,addr=10.10.10.15,mem_mode=mr,port=9999,count=1,verbose| client
ipaddr (10.10.10.15)
port 9999
count 1
verbose
createdcm_idffff88013c74c800cma_eventtype 0cma_idffff88013c74c800(parent)cma_eventtype 2cma_idffff88013c74c800(parent)rdma_resolve_addr-rdma_resolve_routesuccessful
created pdffff880133845280
created cqffff88013c1ff400
created qpffff88013c1ffe00
krping:krping_setup_bufferscalled on cbffff88013c59f800
krping: recv bufdma_addr13c59f968size 16
krping:recv_bufreg_mrfailed
krping:krping_setup_buffersfailed: -38
destroycm_idffff88013c74c800
krping: proc write |client,addr=10.10.10.15,mem_mode=mr,port=9999,count=1,verbose| client
ipaddr (10.10.10.15)
port 9999
count 1
verbose
createdcm_idffff88013c59f800cma_eventtype 0cma_idffff88013c59f800(parent)cma_eventtype 2cma_idffff88013c59f800(parent)rdma_resolve_addr-rdma_resolve_routesuccessful
created pdffff88012f5964a0
created cqffff88012faee400
created qpffff88012faeec00
krping:krping_setup_bufferscalled on cbffff88013c71d400
krping: recv bufdma_addr13c71d568size 16
krping:recv_bufreg_mrfailed
krping:krping_setup_buffersfailed: -38
destroycm_idffff88013c59f800echo "client,addr=10.10.10.15,mem_mode=mr,port=9999,count=1" >
/proc/krpingecho "server,addr=10.10.10.15,mem_mode=mr,port=9999" >
/proc/krpingUsing OFED-1.5 ofa_kernel-1.5
HardWare:Mellanox Technologies MT26428 [ConnectX VPI PCIe 2.0 5GT/s - IB QDR / 10GigE]
Quoted 8 lines
Quoted 5 lines
put krping source files into
drivers/infiniband/hw/mlx42010-01-21
------------------------------------------------------------------------
lihaidong__________ Information from ESET NOD32 Antivirus, version of virus signature database 4788 (20100120) __________ The message was checked by ESET NOD32 Antivirus.
http://www.eset.com
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 11 lines · lihaidong
Mr.Wise
I'm actually rewritting your program in order to get familiar with Verbs+CMA API. In order to make the procedure more clearly, I put nearly all the stuff into two long functions, one for server, the other for client, the cq/cma event handler are the only exception. I get the program run step by step.I use DMA mode firstly. As mlx4 driver don't support MR/MW mode, I turned to FMR.
Before adding FMR codes, I want makelocal_dma_lkeyoption work.ie. mem_mode=dma,local_dma_lkey
I run into a strange problem here.
I changed the sgl's lkey intolocal_dma_lkeywhen preparing recv send , rdma write wrs.
The problem is : After server post RDMA Read wr, get completion, and print the data read from client.These are all normal. But after post a send wr to indicate client to go ahead, instead of receving aIB_WC_SENDwc ,the cq event handler get an event whose status is not 0, so it print something as follows:
cq completion failed withwr_id0 opcode 2 status 4vendor_err52<3>the opcode is 2, so it is an event of RDMA read, isn't weird? Why it comes again and in wrong status?
the status 4 meansIB_WC_LOC_PROT_ERR, is it a base/bounds violation? How could this happen? Theremote_lentold by client is equal tocb->size.
Maybe the opcode is not valid for error CQEs with mlx4? I seem to remember that was the case for mthca. You could make the wr_id's in the WRs unique, then correlate the wr_id in the CQE to verify this. LOC_PROT_ERR usually means the MR doesn't have the appropriate access rights.
Quoted 4 lines
ps: Why
recv_sglsend_sglusesdma_mr->lkeywhilerdma_sglusedma_mr->rkey?Could recv_sgl uses dma_mr->rkey or rdma_sgl use dma_mr_lkey? Why?
For iWARP, the targer or sink of a read must have remote write. So you must use the rkey if you want the code to run on both IB and iWARP...
Steve.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 6 lines
Quoted 4 lines
Quoted 3 lines
Why data transferring happened before server waked up from waiting for CONNECTED?
This can happen. There is a race between getting the CONNECTED event and the first incoming data completion (like a recv completion).
Could give me some tips to fix this? Since this sometimes will upset normal state machine, which a stable program does not allow it appears. --
What normal state machine? Its the nature of the beast. Make your state machine handle it. :)
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 19 lines · lihaidong
Mr.Wise
||| else { ||| ||| cb->rdma_sq_wr.opcode = IB_WR_RDMA_READ; ||| if (cb->mem == FASTREG) { ||| /* ||| * Immediately follow the read with a ||| * fenced LOCAL_INV. ||| */ ||| cb->rdma_sq_wr.next = &inv; ||| memset(&inv, 0, sizeof inv); ||| inv.opcode = IB_WR_LOCAL_INV; ||| inv.ex.invalidate_rkey = cb->fastreg_mr->rkey; ||| inv.send_flags = IB_SEND_FENCE; ||| } ||| } ||| ||| ret = ib_post_send(cb->qp, &cb->rdma_sq_wr, &bad_wr); ||| if (ret) { ||| printk(KERN_ERR PFX "post send error %d\n", ret); ||| break; ||| } ||| cb->rdma_sq_wr.next = NULL;
Quoted 2 lines
the last line, is that safe? There's an invalidate wr following rdma_sq_wr.This line will not disturb invalidate wr being performed in lower level, right?
Correct. The work requests are copied by the verbs layer. So once you return from ib_post_send, the send work request structure itself can be reused/freed/whatever.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 1 line · lihaidong
Mr.Wise
You need to start calling me Steve. You're making me feel older than I am. ;-)
Quoted 3 lines
When krping setup buffers failed,
ib_free_fast_reg_page_listis used; When krping free buffers,ib_free_fast_reg_page_listis not used. Though krping still works well, could you an comment on that?
Sounds like a bug.
Steve.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html