]> git.droids-corp.org - dpdk.git/commitdiff
vhost: add log when setting vring base
authorAndy Pei <andy.pei@intel.com>
Fri, 14 Jan 2022 07:57:07 +0000 (15:57 +0800)
committerChenbo Xia <chenbo.xia@intel.com>
Thu, 27 Jan 2022 08:39:08 +0000 (09:39 +0100)
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 <andy.pei@intel.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
lib/vhost/vhost_user.c

index 5eb1dd6812316bd0c99838e06d5ba0979ae49987..f99692bdc1d3d8f89cdfda0090069daa5897fa90 100644 (file)
@@ -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;
 }