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);
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, pending insertion failure\n",
dev->ifname, vq->iotlb_pool->name);
return;
}
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);
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;
}
/* If already created, free it and recreate */
vq->iotlb_pool = rte_mempool_lookup(pool_name);
- if (vq->iotlb_pool)
- rte_mempool_free(vq->iotlb_pool);
+ rte_mempool_free(vq->iotlb_pool);
vq->iotlb_pool = rte_mempool_create(pool_name,
IOTLB_CACHE_SIZE, sizeof(struct vhost_iotlb_entry), 0,