| 175 | } |
| 176 | |
| 177 | void |
| 178 | vhost_user_iotlb_pending_remove(struct virtio_net *dev, uint64_t iova, uint64_t size, uint8_t perm) |
| 179 | { |
| 180 | struct vhost_iotlb_entry *node, *temp_node; |
| 181 | |
| 182 | rte_rwlock_write_lock(&dev->iotlb_pending_lock); |
| 183 | |
| 184 | RTE_TAILQ_FOREACH_SAFE(node, &dev->iotlb_pending_list, next, |
| 185 | temp_node) { |
| 186 | if (node->iova < iova) |
| 187 | continue; |
| 188 | if (node->iova >= iova + size) |
| 189 | continue; |
| 190 | if ((node->perm & perm) != node->perm) |
| 191 | continue; |
| 192 | TAILQ_REMOVE(&dev->iotlb_pending_list, node, next); |
| 193 | vhost_user_iotlb_pool_put(dev, node); |
| 194 | } |
| 195 | |
| 196 | rte_rwlock_write_unlock(&dev->iotlb_pending_lock); |
| 197 | } |
| 198 | |
| 199 | static void |
| 200 | vhost_user_iotlb_cache_remove_all(struct virtio_net *dev) |
no test coverage detected