[PATCH v2 8/9] vhost: differentiate IOTLB logs
Xia, Chenbo
chenbo.xia at intel.com
Wed Jan 26 04:27:05 CET 2022
> -----Original Message-----
> From: Maxime Coquelin <maxime.coquelin at redhat.com>
> Sent: Tuesday, January 25, 2022 7:25 PM
> To: dev at dpdk.org; Xia, Chenbo <chenbo.xia at intel.com>;
> david.marchand at redhat.com
> Cc: Maxime Coquelin <maxime.coquelin at redhat.com>
> Subject: [PATCH v2 8/9] vhost: differentiate IOTLB logs
>
> Same logging messages were used for both IOTLB cache
> insertion failure and IOTLB pending insertion failure.
>
> This patch differentiate them to ease logs analysis.
>
> Suggested-by: David Marchand <david.marchand at redhat.com>
> Signed-off-by: Maxime Coquelin <maxime.coquelin at redhat.com>
> ---
> lib/vhost/iotlb.c | 12 ++++++++----
> 1 file changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/lib/vhost/iotlb.c b/lib/vhost/iotlb.c
> index afa86d7c2b..adc426612a 100644
> --- a/lib/vhost/iotlb.c
> +++ b/lib/vhost/iotlb.c
> @@ -70,7 +70,8 @@ vhost_user_iotlb_pending_insert(struct virtio_net *dev,
> struct vhost_virtqueue *
>
> ret = rte_mempool_get(vq->iotlb_pool, (void **)&node);
> if (ret) {
> - VHOST_LOG_CONFIG(DEBUG, "(%s) IOTLB pool %s empty, clear
> entries\n",
> + VHOST_LOG_CONFIG(DEBUG,
> + "(%s) IOTLB pool %s empty, clear entries for pending
> insertion\n",
> dev->ifname, vq->iotlb_pool->name);
> if (!TAILQ_EMPTY(&vq->iotlb_pending_list))
> vhost_user_iotlb_pending_remove_all(vq);
> @@ -78,7 +79,8 @@ vhost_user_iotlb_pending_insert(struct virtio_net *dev,
> struct vhost_virtqueue *
> vhost_user_iotlb_cache_random_evict(vq);
> ret = rte_mempool_get(vq->iotlb_pool, (void **)&node);
> if (ret) {
> - VHOST_LOG_CONFIG(ERR, "(%s) IOTLB pool %s still empty,
> failure\n",
> + VHOST_LOG_CONFIG(ERR,
> + "(%s) IOTLB pool %s still empty, prending
> insertion failure\n",
Prending -> pending
With this fixed:
Reviewed-by: Chenbo Xia <chenbo.xia at intel.com>
> dev->ifname, vq->iotlb_pool->name);
> return;
> }
> @@ -167,7 +169,8 @@ vhost_user_iotlb_cache_insert(struct virtio_net *dev,
> struct vhost_virtqueue *vq
>
> ret = rte_mempool_get(vq->iotlb_pool, (void **)&new_node);
> if (ret) {
> - VHOST_LOG_CONFIG(DEBUG, "(%s) IOTLB pool %s empty, clear
> entries\n",
> + VHOST_LOG_CONFIG(DEBUG,
> + "(%s) IOTLB pool %s empty, clear entries for cache
> insertion\n",
> dev->ifname, vq->iotlb_pool->name);
> if (!TAILQ_EMPTY(&vq->iotlb_list))
> vhost_user_iotlb_cache_random_evict(vq);
> @@ -175,7 +178,8 @@ vhost_user_iotlb_cache_insert(struct virtio_net *dev,
> struct vhost_virtqueue *vq
> vhost_user_iotlb_pending_remove_all(vq);
> ret = rte_mempool_get(vq->iotlb_pool, (void **)&new_node);
> if (ret) {
> - VHOST_LOG_CONFIG(ERR, "(%s) IOTLB pool %s still empty,
> failure\n",
> + VHOST_LOG_CONFIG(ERR,
> + "(%s) IOTLB pool %s still empty, cache insertion
> failed\n",
> dev->ifname, vq->iotlb_pool->name);
> return;
> }
> --
> 2.34.1
More information about the dev
mailing list