From 6aa6bfdda39457874922e90e60ff8b0c474c0d97 Mon Sep 17 00:00:00 2001 From: Jim Harris Date: Wed, 23 Jun 2021 16:50:03 +0000 Subject: [PATCH] nvmf: use DEBUGLOG for unsupported features and log pages We cannot control what the host may send to the target. For example, we have empirical evidence that Windows will send vendor-specific IDs for features and log pages (when testing with the vfio-user target transport). So let's change the ERRLOGs in these cases to DEBUGLOGs. Fixes issues #2004, #2007, #2008. Signed-off-by: Jim Harris Change-Id: I8d5b92fc5e33d698af246f2f1c34f7cf51e6488a Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8487 Tested-by: SPDK CI Jenkins Community-CI: Mellanox Build Bot Reviewed-by: Paul Luse Reviewed-by: Changpeng Liu Reviewed-by: Reviewed-by: Aleksey Marchuk --- lib/nvmf/ctrlr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/nvmf/ctrlr.c b/lib/nvmf/ctrlr.c index 28f8a46dff..e83db68b3f 100644 --- a/lib/nvmf/ctrlr.c +++ b/lib/nvmf/ctrlr.c @@ -2178,7 +2178,7 @@ nvmf_ctrlr_get_log_page(struct spdk_nvmf_request *req) } invalid_log_page: - SPDK_ERRLOG("Unsupported Get Log Page 0x%02X\n", lid); + SPDK_DEBUGLOG(nvmf, "Unsupported Get Log Page 0x%02X\n", lid); response->status.sct = SPDK_NVME_SCT_GENERIC; response->status.sc = SPDK_NVME_SC_INVALID_FIELD; return SPDK_NVMF_REQUEST_EXEC_STATUS_COMPLETE; @@ -2696,7 +2696,7 @@ nvmf_ctrlr_get_features(struct spdk_nvmf_request *req) case SPDK_NVME_FEAT_ASYNC_EVENT_CONFIGURATION: return get_features_generic(req, ctrlr->feat.async_event_configuration.raw); default: - SPDK_ERRLOG("Get Features command with unsupported feature ID 0x%02x\n", feature); + SPDK_DEBUGLOG(nvmf, "Get Features command with unsupported feature ID 0x%02x\n", feature); response->status.sc = SPDK_NVME_SC_INVALID_FIELD; return SPDK_NVMF_REQUEST_EXEC_STATUS_COMPLETE; }