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 B89FBA0032; Fri, 14 Jan 2022 08:23:03 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A7A6842760; Fri, 14 Jan 2022 08:23:03 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 6A97F40DDD for ; Fri, 14 Jan 2022 08:23:01 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1642144981; x=1673680981; h=from:to:cc:subject:date:message-id; bh=y34xQcQXiceXzsJTl+40LUUERRlH/lkkYq0POVk/Zrc=; b=fHOM4tIkfp1+0KBZbEYfjGwowkCxofSi1eFEtM30XRSnJDhbhDjLTU9W w6c+hQrJHc9Pmwn67ZrplCThuj3FCieGDKO+oLdruE3i2PJij+jOgPnFG znnXttqeOTspiw0nt/HZr9An6F0muw32sZZGvu5VdEheb2EouiaHY2kYs c5SmRWUw7PhugJR9bk1O85MxLPjJVYOG/TYmI731tvjm0R5YpXM/rIa0m MBLU06WKcolprD9GW3JeCBYR8JjaxEV/gZkJQBv3GnjtD3+ML4TNpfGBq Q/rCePBqmWN/Uw/Nhgj83gButu47jP9ckpQ4Fv4dg+4Ek8+gJp7DALc0d Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10226"; a="243995034" X-IronPort-AV: E=Sophos;i="5.88,287,1635231600"; d="scan'208";a="243995034" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jan 2022 23:23:00 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,287,1635231600"; d="scan'208";a="559387928" Received: from dpdk-dipei.sh.intel.com ([10.67.111.91]) by orsmga001.jf.intel.com with ESMTP; 13 Jan 2022 23:22:59 -0800 From: Andy Pei To: dev@dpdk.org Cc: chenbo.xia@intel.com Subject: [PATCH] vhost: add some log for vhost message VHOST_USER_SET_VRING_BASE Date: Fri, 14 Jan 2022 15:18:57 +0800 Message-Id: <1642144737-201099-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