+30
−3
Loading
This patch tries to solve the out of order call back handling for cmd sending and the incoming pdu handling. Normally, the cmd call back will be called before receving the next PDU from the target if the application uses the sync manner. With the uring implementation, after sending the cmd to the target, we may have the following scenerio: (1) Firstly receive the incoming pdu(e.g., CapsuleResp pdu, C2hdata pdu) due to the group polling read event. (2) Secondly execute the callback function related with NVMe command sending. This means that the data from the initiator is really sent out to the target, and the target receives, then sending back the data to the initiator. But the uring io_uring_cqe event is not handled, thus if we execute (1) first, it will clean the data structures related with nvme_tcp_req, and the nvme_tcp_req will be used for other purpose. Then causes wrong behaviour like the following: "Rand Write test failed at QD=128 because fio hangs with the following error: nvme_tcp.c: 971:nvme_tcp_capsule_resp_hdr_handle: *ERROR*: no tcp_req is found with cid=66 for tqpair=0x7f23d8001710". And this patch can address this issue. Signed-off-by:Ziye Yang <ziye.yang@intel.com> Change-Id: I5043aaa8adf5033d93dedac15f633f0850e0b9f2 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2818 Community-CI: Mellanox Build Bot Tested-by:
SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by:
Ben Walker <benjamin.walker@intel.com> Reviewed-by:
Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by:
Aleksey Marchuk <alexeymar@mellanox.com>