[PATCH v3] vhost: prefix logs with context
Maxime Coquelin
maxime.coquelin at redhat.com
Fri Jul 1 16:00:27 CEST 2022
On 7/1/22 15:20, 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>
> Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>
> ---
> Changes since v2:
> - rebased on next-virtio,
>
> 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 | 146 +++++-----
> lib/vhost/vhost.h | 20 +-
> lib/vhost/vhost_user.c | 644 +++++++++++++++++++++--------------------
> lib/vhost/virtio_net.c | 258 +++++++++--------
> 7 files changed, 636 insertions(+), 595 deletions(-)
>
Applied to dpdk-next-virtio/main.
Thanks,
Maxime
More information about the dev
mailing list