On Tue, Mar 28, 2017 at 11:39:37AM +0000, Legacy, Allain wrote: > > -----Original Message----- > > From: Yuanhan Liu [mailto:yuanhan....@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