From d7f842a7c649f8252f03ad251ac988a0d163bb79 Mon Sep 17 00:00:00 2001 From: Daniel Verkamp Date: Thu, 5 Apr 2018 10:29:32 -0700 Subject: [PATCH] copy/ioat: reduce log level of informational messages Change-Id: I9c4fc8dfc8ca960f6d30a29a9c129fae815ffec5 Signed-off-by: Daniel Verkamp Reviewed-on: https://review.gerrithub.io/406632 Tested-by: SPDK Automated Test System Reviewed-by: Jim Harris Reviewed-by: Ben Walker --- lib/copy/ioat/copy_engine_ioat.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/lib/copy/ioat/copy_engine_ioat.c b/lib/copy/ioat/copy_engine_ioat.c index f4f8819446..c5dc7380e4 100644 --- a/lib/copy/ioat/copy_engine_ioat.c +++ b/lib/copy/ioat/copy_engine_ioat.c @@ -34,10 +34,10 @@ #include "spdk/stdinc.h" #include "spdk_internal/copy_engine.h" +#include "spdk_internal/log.h" #include "spdk/env.h" #include "spdk/conf.h" -#include "spdk/log.h" #include "spdk/event.h" #include "spdk/io_channel.h" #include "spdk/ioat.h" @@ -241,13 +241,14 @@ probe_cb(void *cb_ctx, struct spdk_pci_device *pci_dev) struct ioat_probe_ctx *ctx = cb_ctx; struct spdk_pci_addr pci_addr = spdk_pci_device_get_addr(pci_dev); - SPDK_NOTICELOG(" Found matching device at %04x:%02x:%02x.%x vendor:0x%04x device:0x%04x\n", - pci_addr.domain, - pci_addr.bus, - pci_addr.dev, - pci_addr.func, - spdk_pci_device_get_vendor_id(pci_dev), - spdk_pci_device_get_device_id(pci_dev)); + SPDK_INFOLOG(SPDK_LOG_COPY_IOAT, + " Found matching device at %04x:%02x:%02x.%x vendor:0x%04x device:0x%04x\n", + pci_addr.domain, + pci_addr.bus, + pci_addr.dev, + pci_addr.func, + spdk_pci_device_get_vendor_id(pci_dev), + spdk_pci_device_get_device_id(pci_dev)); if (ctx->num_whitelist_devices > 0 && !ioat_find_dev_by_whitelist_bdf(&pci_addr, ctx->whitelist, ctx->num_whitelist_devices)) { @@ -315,7 +316,7 @@ copy_engine_ioat_init(void) return -1; } - SPDK_NOTICELOG("Ioat Copy Engine Offload Enabled\n"); + SPDK_INFOLOG(SPDK_LOG_COPY_IOAT, "Ioat Copy Engine Offload Enabled\n"); spdk_copy_engine_register(&ioat_copy_engine); spdk_io_device_register(&ioat_copy_engine, ioat_create_cb, ioat_destroy_cb, sizeof(struct ioat_io_channel)); @@ -349,3 +350,5 @@ copy_engine_ioat_config_text(FILE *fp) dev->domain, dev->bus, dev->dev, dev->func); } } + +SPDK_LOG_REGISTER_COMPONENT("copy_ioat", SPDK_LOG_COPY_IOAT)