From a0878680c041cbd750805126f8beb75ae2364721 Mon Sep 17 00:00:00 2001 From: Seth Howell Date: Thu, 7 May 2020 11:24:13 -0700 Subject: [PATCH] include/spdk_internal: remove SPDK_LOG_NVME from nvme_tcp.h This file isn't exclusive to the nvme lib. As such, it shouldn't use the internal SPDK_LOG_NVME flag. Signed-off-by: Seth Howell Change-Id: Ib6d239ad2e45e58fb97a5ea70b01ce72afa938c0 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2246 Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins Reviewed-by: Darek Stojaczyk Reviewed-by: Jim Harris --- include/spdk_internal/nvme_tcp.h | 10 ++-------- test/unit/lib/nvmf/tcp.c/tcp_ut.c | 1 - 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/include/spdk_internal/nvme_tcp.h b/include/spdk_internal/nvme_tcp.h index 3f54b76ee..45e8def51 100644 --- a/include/spdk_internal/nvme_tcp.h +++ b/include/spdk_internal/nvme_tcp.h @@ -481,10 +481,7 @@ nvme_tcp_read_data(struct spdk_sock *sock, int bytes, } /* For connect reset issue, do not output error log */ - if (errno == ECONNRESET) { - SPDK_DEBUGLOG(SPDK_LOG_NVME, "spdk_sock_recv() failed, errno %d: %s\n", - errno, spdk_strerror(errno)); - } else { + if (errno != ECONNRESET) { SPDK_ERRLOG("spdk_sock_recv() failed, errno %d: %s\n", errno, spdk_strerror(errno)); } @@ -520,10 +517,7 @@ nvme_tcp_readv_data(struct spdk_sock *sock, struct iovec *iov, int iovcnt) } /* For connect reset issue, do not output error log */ - if (errno == ECONNRESET) { - SPDK_DEBUGLOG(SPDK_LOG_NVME, "spdk_sock_readv() failed, errno %d: %s\n", - errno, spdk_strerror(errno)); - } else { + if (errno != ECONNRESET) { SPDK_ERRLOG("spdk_sock_readv() failed, errno %d: %s\n", errno, spdk_strerror(errno)); } diff --git a/test/unit/lib/nvmf/tcp.c/tcp_ut.c b/test/unit/lib/nvmf/tcp.c/tcp_ut.c index e3384578f..88e0c2dd2 100644 --- a/test/unit/lib/nvmf/tcp.c/tcp_ut.c +++ b/test/unit/lib/nvmf/tcp.c/tcp_ut.c @@ -57,7 +57,6 @@ #define UT_NUM_SHARED_BUFFERS 128 SPDK_LOG_REGISTER_COMPONENT("nvmf", SPDK_LOG_NVMF) -SPDK_LOG_REGISTER_COMPONENT("nvme", SPDK_LOG_NVME) DEFINE_STUB(spdk_nvmf_qpair_get_listen_trid, int,