From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1BD2EA0032; Mon, 13 Dec 2021 06:15:42 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 082084113D; Mon, 13 Dec 2021 06:15:42 +0100 (CET) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id ABC23410F7 for ; Mon, 13 Dec 2021 06:15:40 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1639372540; x=1670908540; h=from:to:cc:subject:date:message-id; bh=y34xQcQXiceXzsJTl+40LUUERRlH/lkkYq0POVk/Zrc=; b=N6zwtsCniqFAZucegXfESqmBhA2wUZ4Ec1NW07WNqj005CB+WCkiWnBL 5+xlIFPk3S++MGGEs9cmpAAI+/1K8xVYZ/2ir9vDrJ4mK/74KOhhBuF+x MA8SjSqkBVTCfeTMkrP0jyH0nrSJEWrqxXPnBXshZVD7ZizLirOnuVAO8 1ognPtAgjlnaAqqzMcboxFsay8zGRIZYqrCJxjO11RANa+2YbH7QAKUhy yIm1kWUbr7TuwUN+7zlpA7lBktd9gw6KrJbemMxLnafjRLGhsM87H9jRG FBBQ93HDRi2PwKl6WxekRpynS9knElv3A/nVrY0jVBoxafVvqIsAfaNr4 Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10196"; a="225939901" X-IronPort-AV: E=Sophos;i="5.88,201,1635231600"; d="scan'208";a="225939901" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Dec 2021 21:15:40 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,201,1635231600"; d="scan'208";a="463254924" Received: from dpdk-dipei.sh.intel.com ([10.67.111.91]) by orsmga003.jf.intel.com with ESMTP; 12 Dec 2021 21:15:39 -0800 From: Andy Pei To: dev@dpdk.org Cc: andy.pei@intel.com, chenbo.xia@intel.com, maxime.coquelin@redhat.com Subject: [PATCH 3/3] vhost: add some log for vhost message VHOST_USER_SET_VRING_BASE Date: Mon, 13 Dec 2021 12:29:45 +0800 Message-Id: <1639369785-103190-1-git-send-email-andy.pei@intel.com> X-Mailer: git-send-email 1.8.3.1 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Usually the last avail index and last used index is 0, but for target device of live migration, the last avail index and last used index is not 0. So I think some log is helpful. Signed-off-by: Andy Pei --- 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 a781346..3cb13fb 100644 --- a/lib/vhost/vhost_user.c +++ b/lib/vhost/vhost_user.c @@ -973,6 +973,11 @@ vq->last_avail_idx = msg->payload.state.num; } + VHOST_LOG_CONFIG(INFO, + "vring base idx:%d last_used_idx:%u last_avail_idx:%u.\n", + msg->payload.state.index, vq->last_used_idx, + vq->last_avail_idx); + return RTE_VHOST_MSG_RESULT_OK; } -- 1.8.3.1