[dpdk-dev] [PATCH] vhost: Add dynamic logging system

Maxime Coquelin maxime.coquelin at redhat.com
Thu Jan 9 16:45:04 CET 2020



On 1/9/20 3:40 PM, Maxime Coquelin wrote:
> 
> 
> On 12/4/19 4:07 PM, Adrian Moreno wrote:
>> Currently there are a couple of limitations on the logging system: Most
>> of the logs are compiled out and both datapath and controlpath logs
>> share the same loglevel.
>>
>> This patch tries to help fix that situation by:
>> - Splitting control plane and data plane logs
>> - Making control plane logs dynamic while keeping data plane logs
>> compiled out by default for log levels lower than the INFO.
>>
>> As a result, two macros are introduced:
>> - VHOST_LOG_CONFIG(LEVEL, ...): Config path logging. Level can be
>> dynamically controlled by "lib.vhost.config"
>>
>> - VHOST_LOG_DATA(LEVEL, ...): Data path logging. Level can be dynamically
>> controlled by "lib.vhost.data". Every log macro with a level lower than
>> RTE_LOG_DP_LEVEL (which defaults to RTE_LOG_INFO) will be compiled out.
>>
>> Signed-off-by: Adrian Moreno <amorenoz at redhat.com>
>> Fixes: 1c01d52392d5 ("vhost: add debug print")

I propose to remove the Fixes line, as thinking at it again, it is more
an improvement.

Also, I fixed the title to remove the upper case to "Add" so that it
complies with the guidelines.


Thanks,
Maxime

>> Cc: huawei.xie at intel.com
>> Cc: maxime.coquelin at redhat.com
>> ---
>>  lib/librte_vhost/iotlb.c      |  10 +-
>>  lib/librte_vhost/socket.c     |  84 ++++++-------
>>  lib/librte_vhost/vhost.c      |  34 ++++--
>>  lib/librte_vhost/vhost.h      |  24 ++--
>>  lib/librte_vhost/vhost_user.c | 218 +++++++++++++++++-----------------
>>  lib/librte_vhost/virtio_net.c |  38 +++---
>>  6 files changed, 214 insertions(+), 194 deletions(-)
>>
> 
> Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>
> 
> Thanks,
> Maxime
> 



More information about the dev mailing list