| 85 | } |
| 86 | |
| 87 | static struct vhost_iotlb_entry * |
| 88 | vhost_user_iotlb_pool_get(struct virtio_net *dev) |
| 89 | { |
| 90 | struct vhost_iotlb_entry *node; |
| 91 | |
| 92 | rte_spinlock_lock(&dev->iotlb_free_lock); |
| 93 | node = SLIST_FIRST(&dev->iotlb_free_list); |
| 94 | if (node != NULL) |
| 95 | SLIST_REMOVE_HEAD(&dev->iotlb_free_list, next_free); |
| 96 | rte_spinlock_unlock(&dev->iotlb_free_lock); |
| 97 | return node; |
| 98 | } |
| 99 | |
| 100 | static void |
| 101 | vhost_user_iotlb_pool_put(struct virtio_net *dev, struct vhost_iotlb_entry *node) |
no test coverage detected