[PATCH v2 4/4] vhost: prefix logs with context

Maxime Coquelin maxime.coquelin at redhat.com
Fri Jul 1 10:00:19 CEST 2022



On 7/1/22 09:55, David Marchand wrote:
> We recently improved the log messages in the vhost library, adding some
> context that helps filtering for a given vhost-user device.
> However, some parts of the code were missed, and some later code changes
> broke this new convention (fixes were sent previous to this patch).
> 
> Change the VHOST_LOG_CONFIG/DATA helpers and always ask for a string
> used as context. This should help limit regressions on this topic.
> 
> Most of the time, the context is the vhost-user device socket path.
> For the rest when a vhost-user device can not be related, generic
> names were chosen:
> - "dma", for vhost-user async DMA operations,
> - "device", for vhost-user device creation and lookup,
> - "thread", for threads management,
> 
> Signed-off-by: David Marchand <david.marchand at redhat.com>
> ---
> Changes since v1:
> - preserved original format for logs (removing extra ':'),
> 
> ---
>   lib/vhost/iotlb.c      |  30 +-
>   lib/vhost/socket.c     | 129 ++++-----
>   lib/vhost/vdpa.c       |   4 +-
>   lib/vhost/vhost.c      | 144 ++++-----
>   lib/vhost/vhost.h      |  20 +-
>   lib/vhost/vhost_user.c | 642 +++++++++++++++++++++--------------------
>   lib/vhost/virtio_net.c | 258 +++++++++--------
>   7 files changed, 634 insertions(+), 593 deletions(-)
> 

Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>

Thanks,
Maxime



More information about the dev mailing list