From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yuanhan Liu Subject: Re: [PATCH] vhost: change mbuf allocation logs to debug Date: Wed, 29 Mar 2017 15:01:50 +0800 Message-ID: <20170329070150.GF18844@yliu-dev.sh.intel.com> References: <20170327162930.54281-1-allain.legacy@windriver.com> <20170328064841.GZ18844@yliu-dev.sh.intel.com> <70A7408C6E1BFB41B192A929744D8523968F8CC8@ALA-MBC.corp.ad.wrs.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "mtetsuyah@gmail.com" , "maxime.coquelin@redhat.com" , "dev@dpdk.org" , "Peters, Matt" , Thomas Monjalon To: "Legacy, Allain" Return-path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 4E7F11396 for ; Wed, 29 Mar 2017 09:04:07 +0200 (CEST) Content-Disposition: inline In-Reply-To: <70A7408C6E1BFB41B192A929744D8523968F8CC8@ALA-MBC.corp.ad.wrs.com> 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 Tue, Mar 28, 2017 at 11:39:37AM +0000, Legacy, Allain wrote: > > -----Original Message----- > > From: Yuanhan Liu [mailto:yuanhan.liu@linux.intel.com] > > Sent: Tuesday, March 28, 2017 2:49 AM > <...> > > > In order to prevent this condition, but > > > still enable debugging, the logs are being changed to debug logs to ensure > > > they are not emitted unless the CONFIG_RTE_LIBRTE_VHOST_DEBUG > > option is > > > enabled. > > > > That basically means you will never see them in real life. I'm suggesting > > to add a new log API, RTE_LOG_ONCE. Sounds good? > > > Rather than a log what is really needed here is a stat/counter, but this library does not have the infrastructure in place to support reporting datapath errors via stats back to the application. Right. It's supposed to be done in vhost-pmd, while the real Rx implementation is at vhost lib. > Are there any plans to add a stats infrastructure or a desired design for what that would look like? We could have such counter support once we move virtio_net.c to vhost-pmd. Unluckily, I don't think it will happen soon. OTOH, it's still good to have RTE_LOG_ONCE. It explicitly tells you something is wrong, then you could dump those stats for more info. --yliu