Lines Matching refs:node
31 struct vhost_iotlb_entry *node, *temp_node; in vhost_user_iotlb_pending_remove_all() local
35 TAILQ_FOREACH_SAFE(node, &vq->iotlb_pending_list, next, temp_node) { in vhost_user_iotlb_pending_remove_all()
36 TAILQ_REMOVE(&vq->iotlb_pending_list, node, next); in vhost_user_iotlb_pending_remove_all()
37 rte_mempool_put(vq->iotlb_pool, node); in vhost_user_iotlb_pending_remove_all()
47 struct vhost_iotlb_entry *node; in vhost_user_iotlb_pending_miss() local
52 TAILQ_FOREACH(node, &vq->iotlb_pending_list, next) { in vhost_user_iotlb_pending_miss()
53 if ((node->iova == iova) && (node->perm == perm)) { in vhost_user_iotlb_pending_miss()
68 struct vhost_iotlb_entry *node; in vhost_user_iotlb_pending_insert() local
71 ret = rte_mempool_get(vq->iotlb_pool, (void **)&node); in vhost_user_iotlb_pending_insert()
78 ret = rte_mempool_get(vq->iotlb_pool, (void **)&node); in vhost_user_iotlb_pending_insert()
85 node->iova = iova; in vhost_user_iotlb_pending_insert()
86 node->perm = perm; in vhost_user_iotlb_pending_insert()
90 TAILQ_INSERT_TAIL(&vq->iotlb_pending_list, node, next); in vhost_user_iotlb_pending_insert()
99 struct vhost_iotlb_entry *node, *temp_node; in vhost_user_iotlb_pending_remove() local
103 TAILQ_FOREACH_SAFE(node, &vq->iotlb_pending_list, next, temp_node) { in vhost_user_iotlb_pending_remove()
104 if (node->iova < iova) in vhost_user_iotlb_pending_remove()
106 if (node->iova >= iova + size) in vhost_user_iotlb_pending_remove()
108 if ((node->perm & perm) != node->perm) in vhost_user_iotlb_pending_remove()
110 TAILQ_REMOVE(&vq->iotlb_pending_list, node, next); in vhost_user_iotlb_pending_remove()
111 rte_mempool_put(vq->iotlb_pool, node); in vhost_user_iotlb_pending_remove()
120 struct vhost_iotlb_entry *node, *temp_node; in vhost_user_iotlb_cache_remove_all() local
124 TAILQ_FOREACH_SAFE(node, &vq->iotlb_list, next, temp_node) { in vhost_user_iotlb_cache_remove_all()
125 TAILQ_REMOVE(&vq->iotlb_list, node, next); in vhost_user_iotlb_cache_remove_all()
126 rte_mempool_put(vq->iotlb_pool, node); in vhost_user_iotlb_cache_remove_all()
137 struct vhost_iotlb_entry *node, *temp_node; in vhost_user_iotlb_cache_random_evict() local
144 TAILQ_FOREACH_SAFE(node, &vq->iotlb_list, next, temp_node) { in vhost_user_iotlb_cache_random_evict()
146 TAILQ_REMOVE(&vq->iotlb_list, node, next); in vhost_user_iotlb_cache_random_evict()
147 rte_mempool_put(vq->iotlb_pool, node); in vhost_user_iotlb_cache_random_evict()
161 struct vhost_iotlb_entry *node, *new_node; in vhost_user_iotlb_cache_insert() local
185 TAILQ_FOREACH(node, &vq->iotlb_list, next) { in vhost_user_iotlb_cache_insert()
190 if (node->iova == new_node->iova) { in vhost_user_iotlb_cache_insert()
193 } else if (node->iova > new_node->iova) { in vhost_user_iotlb_cache_insert()
194 TAILQ_INSERT_BEFORE(node, new_node, next); in vhost_user_iotlb_cache_insert()
214 struct vhost_iotlb_entry *node, *temp_node; in vhost_user_iotlb_cache_remove() local
221 TAILQ_FOREACH_SAFE(node, &vq->iotlb_list, next, temp_node) { in vhost_user_iotlb_cache_remove()
223 if (unlikely(iova + size < node->iova)) in vhost_user_iotlb_cache_remove()
226 if (iova < node->iova + node->size) { in vhost_user_iotlb_cache_remove()
227 TAILQ_REMOVE(&vq->iotlb_list, node, next); in vhost_user_iotlb_cache_remove()
228 rte_mempool_put(vq->iotlb_pool, node); in vhost_user_iotlb_cache_remove()
240 struct vhost_iotlb_entry *node; in vhost_user_iotlb_cache_find() local
246 TAILQ_FOREACH(node, &vq->iotlb_list, next) { in vhost_user_iotlb_cache_find()
248 if (unlikely(iova < node->iova)) in vhost_user_iotlb_cache_find()
251 if (iova >= node->iova + node->size) in vhost_user_iotlb_cache_find()
254 if (unlikely((perm & node->perm) != perm)) { in vhost_user_iotlb_cache_find()
259 offset = iova - node->iova; in vhost_user_iotlb_cache_find()
261 vva = node->uaddr + offset; in vhost_user_iotlb_cache_find()
263 mapped += node->size - offset; in vhost_user_iotlb_cache_find()
264 iova = node->iova + node->size; in vhost_user_iotlb_cache_find()