From a620cd198f08e9781ae8ba6110efe4dde198ac29 Mon Sep 17 00:00:00 2001 From: Ziye Yang Date: Fri, 26 Mar 2021 01:35:53 +0800 Subject: [PATCH] nvme/tcp: Fix the zero copy enablement issue. Remove the polling group check. Because at this moment, the qpair is not added into a polling group. If we do not remove it, we will never enable zcopy feature for I/O qpair. And in sock implementmentation, we already fixed the zero copy handling if a socket is not in a polling group. See posix_sock_flush function. So we can fix this issue if we directly remove this check. Reported by: Aleksey Marchuk Signed-off-by: Ziye Yang Change-Id: I969936c4b6c7f13cbfa4d6eb479010c53f3e384a Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7056 Tested-by: SPDK CI Jenkins Reviewed-by: Aleksey Marchuk Reviewed-by: Ben Walker Community-CI: Mellanox Build Bot --- lib/nvme/nvme_tcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/nvme/nvme_tcp.c b/lib/nvme/nvme_tcp.c index a2f708c92..0d56e5e21 100644 --- a/lib/nvme/nvme_tcp.c +++ b/lib/nvme/nvme_tcp.c @@ -1805,7 +1805,7 @@ nvme_tcp_qpair_connect_sock(struct spdk_nvme_ctrlr *ctrlr, struct spdk_nvme_qpai opts.opts_size = sizeof(opts); spdk_sock_get_default_opts(&opts); opts.priority = ctrlr->trid.priority; - opts.zcopy = !nvme_qpair_is_admin_queue(qpair) && qpair->poll_group != NULL; + opts.zcopy = !nvme_qpair_is_admin_queue(qpair); tqpair->sock = spdk_sock_connect_ext(ctrlr->trid.traddr, port, NULL, &opts); if (!tqpair->sock) { SPDK_ERRLOG("sock connection error of tqpair=%p with addr=%s, port=%ld\n",