From patchwork Fri Jan 14 07:57:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Pei, Andy" X-Patchwork-Id: 105809 X-Patchwork-Delegate: maxime.coquelin@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7DBD4A0032; Fri, 14 Jan 2022 09:01:16 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6DD3642769; Fri, 14 Jan 2022 09:01:16 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id 80C114276E for ; Fri, 14 Jan 2022 09:01:14 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1642147274; x=1673683274; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=7makRPNVsjHF8bzj51qsCHKZKisv6EAXsKRO2AXCWlA=; b=YsTw+vDC7QiJ70SZxNOqjRfYC+bpvd034An7K2eyUWOh/Cr38+4SQY/p ngeUifMIVGoHCx2VMAUVYMsWpQZYtMCiF4frtv/T3uHYhT5MsYN4xXFXt lVIUbGLL6eWj5wABYEzGpKJqtq7Mm6/jdkrnOKoYzCd47Y45qt77YBKMV alJ+oX5HsP2nJcvGgk7G7F2B/9aEfd4Ymd2LDymF/BJBaNEEtgGZkbMgl NmZiQJto8YvOnrAqcMy8n2LR4CcPMZHz7hbYZXNuhfLkxcNrr8AThHdA6 D0OPXmAsOmUk21zRVTZ5IsyCwouDUjq5ozu9UwN7+ej7mtUhgFEq2cBi5 g==; X-IronPort-AV: E=McAfee;i="6200,9189,10226"; a="307546195" X-IronPort-AV: E=Sophos;i="5.88,287,1635231600"; d="scan'208";a="307546195" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jan 2022 00:01:11 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,287,1635231600"; d="scan'208";a="624251774" Received: from dpdk-dipei.sh.intel.com ([10.67.111.91]) by orsmga004.jf.intel.com with ESMTP; 14 Jan 2022 00:01:10 -0800 From: Andy Pei To: dev@dpdk.org Cc: chenbo.xia@intel.com Subject: [PATCH v2] vhost: add log for VHOST_USER_SET_VRING_BASE Date: Fri, 14 Jan 2022 15:57:07 +0800 Message-Id: <1642147027-203645-1-git-send-email-andy.pei@intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1642144737-201099-1-git-send-email-andy.pei@intel.com> References: <1642144737-201099-1-git-send-email-andy.pei@intel.com> 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 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 a781346..cd8c7bc 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:%u 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; }