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

Function free_vq

dpdk/lib/vhost/vhost.c:409–423  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

407}
408
409void
410free_vq(struct virtio_net *dev, struct vhost_virtqueue *vq)
411{
412 if (vq_is_packed(dev))
413 rte_free(vq->shadow_used_packed);
414 else
415 rte_free(vq->shadow_used_split);
416
417 rte_rwlock_write_lock(&vq->access_lock);
418 vhost_free_async_mem(vq);
419 rte_rwlock_write_unlock(&vq->access_lock);
420 rte_free(vq->batch_copy_elems);
421 rte_free(vq->log_cache);
422 rte_free(vq);
423}
424
425/*
426 * Release virtqueues and device memory.

Callers 2

free_deviceFunction · 0.85
vhost_user_set_featuresFunction · 0.85

Calls 3

vq_is_packedFunction · 0.85
rte_freeFunction · 0.85
vhost_free_async_memFunction · 0.85

Tested by

no test coverage detected