From 8974b6c730a1f8e9cd64d327e3df53d2b86fb2a4 Mon Sep 17 00:00:00 2001 From: Andy Pei Date: Fri, 14 Jan 2022 15:57:07 +0800 Subject: [PATCH] vhost: add log when setting vring base This patch adds log for vring related info in handling of vhost message VHOST_USER_SET_VRING_BASE, which will be useful in live migration case. Signed-off-by: Andy Pei Reviewed-by: Chenbo Xia --- lib/vhost/vhost_user.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/vhost/vhost_user.c b/lib/vhost/vhost_user.c index 5eb1dd6812..f99692bdc1 100644 --- a/lib/vhost/vhost_user.c +++ b/lib/vhost/vhost_user.c @@ -973,6 +973,11 @@ vhost_user_set_vring_base(struct virtio_net **pdev, vq->last_avail_idx = msg->payload.state.num; } + VHOST_LOG_CONFIG(INFO, + "(%s) vring base idx:%u last_used_idx:%u last_avail_idx:%u.\n", + dev->ifname, msg->payload.state.index, vq->last_used_idx, + vq->last_avail_idx); + return RTE_VHOST_MSG_RESULT_OK; } -- 2.39.5