From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 972FBA0471 for ; Fri, 21 Jun 2019 06:53:05 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 615501D4F9; Fri, 21 Jun 2019 06:53:04 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id ADE041D4F8 for ; Fri, 21 Jun 2019 06:53:02 +0200 (CEST) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Jun 2019 21:53:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,399,1557212400"; d="scan'208";a="154343169" Received: from npg-dpdk-virtio-tbie-2.sh.intel.com (HELO ___) ([10.67.104.151]) by orsmga008.jf.intel.com with ESMTP; 20 Jun 2019 21:53:00 -0700 Date: Fri, 21 Jun 2019 12:51:48 +0800 From: Tiwei Bie To: Maxime Coquelin Cc: dev@dpdk.org, zhihong.wang@intel.com Message-ID: <20190621045148.GA29479@___> References: <20190620200712.9187-1-maxime.coquelin@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20190620200712.9187-1-maxime.coquelin@redhat.com> User-Agent: Mutt/1.9.4 (2018-02-28) Subject: Re: [dpdk-dev] [PATCH] vhost: log Virtio and Vhost-user negotiated features X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Thu, Jun 20, 2019 at 10:07:12PM +0200, Maxime Coquelin wrote: > Having this info logged by default when analysing bug reports > has proved to be useful. > > Signed-off-by: Maxime Coquelin > --- > lib/librte_vhost/vhost_user.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c > index c9e29ece8..370864865 100644 > --- a/lib/librte_vhost/vhost_user.c > +++ b/lib/librte_vhost/vhost_user.c > @@ -284,6 +284,8 @@ vhost_user_set_features(struct virtio_net **pdev, struct VhostUserMsg *msg, > } else { > dev->vhost_hlen = sizeof(struct virtio_net_hdr); > } > + RTE_LOG(INFO, VHOST_CONFIG, > + "Negotiated Virtio features: 0x%" PRIx64 "\n", dev->features); Might be better to use lowercase for "Negotiated", and we will get more consistent messages like this: VHOST_CONFIG: new vhost user connection is 278 VHOST_CONFIG: new device, handle is 0 VHOST_CONFIG: read message VHOST_USER_SET_OWNER VHOST_CONFIG: read message VHOST_USER_GET_FEATURES VHOST_CONFIG: read message VHOST_USER_SET_VRING_CALL VHOST_CONFIG: vring call idx:0 file:279 VHOST_CONFIG: read message VHOST_USER_SET_VRING_CALL VHOST_CONFIG: vring call idx:1 file:280 VHOST_CONFIG: read message VHOST_USER_SET_FEATURES VHOST_CONFIG: negotiated Virtio features: 0xd10008000 VHOST_CONFIG: read message VHOST_USER_SET_MEM_TABLE VHOST_CONFIG: guest memory region 0, size: 0x20000000 ...... instead of: VHOST_CONFIG: new vhost user connection is 278 VHOST_CONFIG: new device, handle is 0 VHOST_CONFIG: read message VHOST_USER_SET_OWNER VHOST_CONFIG: read message VHOST_USER_GET_FEATURES VHOST_CONFIG: read message VHOST_USER_SET_VRING_CALL VHOST_CONFIG: vring call idx:0 file:279 VHOST_CONFIG: read message VHOST_USER_SET_VRING_CALL VHOST_CONFIG: vring call idx:1 file:280 VHOST_CONFIG: read message VHOST_USER_SET_FEATURES VHOST_CONFIG: Negotiated Virtio features: 0xd10008000 VHOST_CONFIG: read message VHOST_USER_SET_MEM_TABLE VHOST_CONFIG: guest memory region 0, size: 0x20000000 ...... > VHOST_LOG_DEBUG(VHOST_CONFIG, > "(%d) mergeable RX buffers %s, virtio 1 %s\n", > dev->vid, > @@ -1406,6 +1408,9 @@ vhost_user_set_protocol_features(struct virtio_net **pdev, > } > > dev->protocol_features = protocol_features; > + RTE_LOG(INFO, VHOST_CONFIG, > + "Negotiated Vhost-user protocol features: 0x%" PRIx64 "\n", > + dev->protocol_features); Ditto. Other than that, Reviewed-by: Tiwei Bie Thanks, Tiwei > > return RTE_VHOST_MSG_RESULT_OK; > } > -- > 2.21.0 >