MCPcopy Create free account
hub / github.com/F-Stack/f-stack / vhost_user_iotlb_pool_get

Function vhost_user_iotlb_pool_get

dpdk/lib/vhost/iotlb.c:87–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85}
86
87static struct vhost_iotlb_entry *
88vhost_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
100static void
101vhost_user_iotlb_pool_put(struct virtio_net *dev, struct vhost_iotlb_entry *node)

Callers 2

Calls 2

rte_spinlock_lockFunction · 0.50
rte_spinlock_unlockFunction · 0.50

Tested by

no test coverage detected