nvme/tcp: Fix the issue of handling send pdu failure
Previously, if the return value of nvme_tcp_qpair_process_send_queue is not zero, we directly return but not continue receiving the pdu. But this is wrong, we should only handle the case when the return value is negative. Reported-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: Ziye Yang <ziye.yang@intel.com> Change-Id: I83453733f5a3e3350a0461b4cb0bc409fde32fea Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/455899 Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
d7ead05419
commit
5391b29c79
@ -406,7 +406,7 @@ nvme_tcp_qpair_process_send_queue(struct nvme_tcp_qpair *tqpair)
|
||||
} else {
|
||||
SPDK_ERRLOG("spdk_sock_writev() failed, errno %d: %s\n",
|
||||
errno, spdk_strerror(errno));
|
||||
return -1;
|
||||
return -errno;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1589,8 +1589,8 @@ nvme_tcp_qpair_process_completions(struct spdk_nvme_qpair *qpair, uint32_t max_c
|
||||
int rc;
|
||||
|
||||
rc = nvme_tcp_qpair_process_send_queue(tqpair);
|
||||
if (rc) {
|
||||
return 0;
|
||||
if (rc < 0) {
|
||||
return rc;
|
||||
}
|
||||
|
||||
if (max_completions == 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user