From 022da3d276a683c420e80d613b9692aee3411739 Mon Sep 17 00:00:00 2001 From: John Levon Date: Mon, 30 May 2022 21:41:47 +0100 Subject: [PATCH] nvmf/vfio-user: correct vfu_setup_log() usage SPDK was previously incorrectly requesting log levels such as LOG_NOTICE. Update libvfio-user so it is in fact supported, and check that setting up the callback actually worked. Signed-off-by: John Levon Change-Id: I41c2a8cf683868c3c2e40470f78e1af3dba29de4 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12839 Community-CI: Broadcom CI Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins Reviewed-by: Ben Walker Reviewed-by: Jim Harris Reviewed-by: Thanos Makatos Reviewed-by: Changpeng Liu Reviewed-by: Swapnil Ingle --- lib/nvmf/vfio_user.c | 8 +++++++- libvfio-user | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/nvmf/vfio_user.c b/lib/nvmf/vfio_user.c index 585f34738..5af0d7301 100644 --- a/lib/nvmf/vfio_user.c +++ b/lib/nvmf/vfio_user.c @@ -4252,7 +4252,13 @@ nvmf_vfio_user_listen(struct spdk_nvmf_transport *transport, ret = -1; goto out; } - vfu_setup_log(endpoint->vfu_ctx, vfio_user_log, vfio_user_get_log_level()); + + ret = vfu_setup_log(endpoint->vfu_ctx, vfio_user_log, + vfio_user_get_log_level()); + if (ret < 0) { + goto out; + } + ret = vfio_user_dev_info_fill(vu_transport, endpoint); if (ret < 0) { diff --git a/libvfio-user b/libvfio-user index e036ac145..d307dbcab 160000 --- a/libvfio-user +++ b/libvfio-user @@ -1 +1 @@ -Subproject commit e036ac145acea1a5aa77879e978ac2fff909a657 +Subproject commit d307dbcab74aef3680ba99d7f836f2bc0b4bc81e